• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

SoftwareTestingo - Jira Selenium Protractor Testing SDLC Agile Methodology

Java Selenium Tutorial & Testing Interview Questions

  • Home
  • Interview Questions
  • Java
  • Java Programs
  • Test Cases
  • Selenium
  • Manual Testing
  • Difference
  • Search
SoftwareTestingo » Manual Testing » Test Cases Example » Factorial Test Cases For a Given Number

Factorial Test Cases For a Given Number

Last Updated on: June 8, 2020 By Softwaretestingo Editorial Board

What We Are Learn On This Post

  • Test Case For Factorial | Factorial Test Case

Test Case For Factorial | Factorial Test Case

n! means n(n-1)(n-2)……3,2,1 First Check the given integer is positive If the given integer is negative,n! is not defined If the given number is a fraction,n! is not defined check the given number is 0,n! is 1hope I’ll get an idea…if any wrong in this….correct me.

Test Scenario Overview
Post On: Test Case For Factorial
Post Type: Test Case Template
Published On: www.softwaretestingo.com
Applicable For: Freshers & Experience

n! :n(n-1)(n-2)…..3,2,1.First TC: Check the given integer is positive If the given number is negative, ExpectedResult: n! is not defined If the given integer is a fraction. n! is not defined TC: check the given number is 0 (0!=1) ER: 1 is displayed Hope I’ll get an idea…correct if it’s wrong

Factorials are represented by n!

Examples:

3! = 1 * 2 * 3 = 6
4! = 1 * 2 * 3 * 4 = 24
5! = 1 * 2 * 3 * 4 * 5 = 120

A factorial program is easy to test because you are simply testing the input value for an integer variable related to a single text box and then verifying its output value.  Here are the test cases:

Related Test Cases
☑️ Facebook Test Cases ☑️ E-Wallet Test Cases
☑️ Fan Test Cases ☑️ File Transfer Test Cases

Determine the maximum integer value that the computer can calculate its factorial.  This value becomes the upper boundary.

Positive Test Cases
  • Submit integer value at lower boundary [ 0 ]
  • Submit integer value at lower boundary +1 [ 1 ]
  • Submit integer value at the upper boundary -1
  • Submit integer value at the upper boundary
Negative Test Cases
  • Submit integer value at upper boundary +1
  • Submit integer value with leading 0
  • Submit integer value with leading plus sign [+]
  • Submit integer value with the leading minus sign [-]
  • Submit integer value with leading space
  • Submit number with a decimal point
  • Submit number with the letter ‘e’ in it
  • Submit alpha character(s)
  • Submit special character(s) [ex: !@#$^]
  • Submit with only space
  • Submit with nothing entered
Tasks To Improve Your Knowledge
☑️ Test case for factorial of a number ☑️ Factorial algorithm in c
☑️ Factorial program ☑️ Factorial c++
☑️ Factorial using recursion ☑️ Junit test for factorial
☑️ Junit test cases for prime number ☑️ Junit test case for addition of two numbers
Let We Inform you, For improves your knowledge you can take the above as a task and you can work on that. But from the above task list some of the tasks we have already completed and you can find those on our blog. After Completion if you want to share with us that then you can write to us at softwaretestingo.com@gmail.com.

In return for that maybe we plan something more surprising for your career.

Factorial of a given number should not be negative numbers, decimal point numbers, alpha characters, special characters, and if it is a function, it takes only one parameter.

    Filed Under: Test Cases Example

    Reader Interactions

    Comments

    1. Meroedu says

      August 18, 2019 at 3:30 PM

      Thanks for the information

      Reply

    Leave a Reply Cancel reply

    Your email address will not be published. Required fields are marked *

    Primary Sidebar

    Join SoftwareTestingo Telegram Group

    Tutorials Important Links

    • Software Testing Jobs
    • Manual Testing Tutorial
    • Selenium Tutorial
    • Core Java Tutorial
    • TestNG Tutorial
    • Java Programs
    • Selenium Programs
    • Manual Test Cases
    • Interview Tips
    • Contact US
    • www.softwaretestingo.com

    Important Links

    • Software Testing Interview Questions
    • Agile Interview Questions
    • Manual Testing Interview Questions
    • Testing Interview Questions
    • Selenium Interview Questions
    • Selenium Real Time Interview Questions
    • Selenium WebDriver Interview Questions
    • Automation Framework Interview Questions
    • Appium Interview Questions
    • TestNG Interview Questions
    • Java Interview Questions
    • Core Java Interview Questions

    Categories

    Copyright © 2021 SoftwareTestingo.com ~ Contact Us ~ Sitemap ~ Privacy Policy