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|
|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!
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 email@example.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.