Suppose a simple application is there to print a Prime Number. Input box takes any Integer and print only Prime number. If the input number is not prime number then the message will be displayed "Not a Prime number". Please suggest a test cases for this apllication. Number range - 1 to infinity.

Showing Answers 1 - 12 of 12 Answers

rameshkumar

  • Sep 1st, 2006
 

Your test condition is not clear

  Was this answer useful?  Yes

neeraja

  • Sep 11th, 2006
 

Hi,

 Yes Anand i agree with you, the question asked is very vague. But somehow i put all togeather to get the question correct and put the test case here.

1. write a test case to check it(test box) accepts only numbers.- Valid test case.

2.test case to check alpha, special chars - test box should not accept.

3. not prime number(boundry values min to Max) - message should be displayed.

4.prime number - correct output.

  Was this answer useful?  Yes

PAWAN

  • Sep 29th, 2006
 

write a test case to check it(test box) accepts only numbers.- Valid test case.



1. ENTER DECIMAL NUMBERS-----NEGATIVE TEST CASE



2. ENTER NUMBER IN P/Q FORM----NEGATIVE TEST CASE



3. test case to check alpha, special chars - test box should not accept.



4. not prime number(boundry values min to Max) - message should be displayed.



5. prime number - correct output.



6. CHECK THE LENGTH OF CHARCTERS.



7. CHECK HOW MANY(MAX.) NUMBER OF DIGITS ENTERED BY USER



8. CHECK MINIMUM.NUMBER OF DIGITS ENTERED BY USER

  Was this answer useful?  Yes

a. Ensure that the text box should accept only the integers.
b. Ensure that the text box accpet the values from-1 to infinity
c. Ensure that the message "Not a Prime number" if the entered number in Text box in not a prime number
d. Ensure that the Prime number should display in the screen if the entered number in the Text box is prime.

  Was this answer useful?  Yes

PRIME NUMBER APPLICATION

Test Cases

1) Can enter integers from -1 to infinity
    a) Can not enter -2
    b) Can enter -1
    c) Can enter zero (0)
    d) Can enter the largest integer computer can handle   

2) When input is prime, app displays the prime number entered

3) When input is not prime, app displays "Not a Prime" message

4) Can not enter alpha and special characters


 

  Was this answer useful?  Yes

Test Cases  :

1. To check whether the result must display as Prime number when that number cannot be divided and the remainder is not equl to zero
2.To check whent the number divide by other number then the remainder is zero then it must display as not a prime number

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions