What are the no. of test cases to check that a no. is exist between one to hundred.

Showing Answers 1 - 21 of 21 Answers

It dependsIn this case we write testcases depending upon the Boundary Value Analysis(BVA(Range)) and Equavalance Class Partition(ECP(Type)). 1. BVA(Number)MIN = 1 -> PASSMIN+1 = 2 -> PASS MIN-1 = 0 -> FAILMAX = 100 -> PASSMAX+1 = 101 -> FAILMAX-1 = 99 -> PASS2. ECP(Number)Valid Invalid0-9 a-z, A-Z, Special Chars3. give negative number4. Blank

  Was this answer useful?  Yes

Lakshmi

  • Feb 8th, 2007
 

The question is for Range like 1 to 100.
so by applying the concept of Boundary value Analysis and Equivalence Partitioning-the total number of Test Case can be 3 (1 invalid + 2 invalid)

1 invalid ----
Ex: any number between 1 to 100.

2 invalid ----
Ex: one Value which is <1 and aonther value >100.

  Was this answer useful?  Yes

srilathareddy

  • Feb 12th, 2007
 

using BVA, we can write 5 test cases
min is 1 and max is 1001.
enter valid data with min as 12.
enter valid data with min +1=23.
enter valid data with middle value (min+max)/2=55.5
we can take the value as 55 or 564.
enter valid data with max-1 value =995
enter valid data with max value =100
its not a fixed value so we can use BVA instead of ECP where in ECP we take only either valid or invalid as the value is fixed

  Was this answer useful?  Yes

praveen

  • Mar 3rd, 2007
 

6 test cases
for 1
for o
for 2
for 99
for 100
for 101

  Was this answer useful?  Yes

helloanup

  • Nov 14th, 2008
 

9 testcases !!..

Here,  Lower boundary = 1
          Upper boundary = 100

So, for Positive testing

#1. For  " 1 "     --> ( Lower boundary value )
#2. For  " 2 "     --> ( Lower boundary value + 1 )
#3. For  " 50 "   --> ( Lower boundary value + Upper boundary value ) / 2
#4. For  " 99 "   --> ( Upper boundary value -  1 )
#5. For  " 100 " --> ( Upper boundary value )

Note: #3.  Can have  any value like 20, 45, 69 etc ... For Eg: 50 taken here. 

Similarly, Negative testing,

#6. For  " 0 "     --> ( Lower boundary value - 1 )
#7. For  " 101 " --> ( Upper boundary value + 1 )
#8. For  " ABCD...XYZ"  --> Alphabets i.e. Lower case & Upper case both
#9. For  " !@#$..   _+" --> Special characters + including blank space.

Please let me know if I have missed any ... ???


Cheers,
Anup | Mahindrakar



  Was this answer useful?  Yes

REQUIREMENT:  Produce a game that allows persons to guess a number from 1 through 100.  The computer randomly chooses the number and the user makes guesses until the right number is submitted.  For each user input, the computer responds with either "Not the Number!" or "That's the Number!"  There is one text box that can handle numbers from 1 through 100.  A button reads "Submit" and clicking it will submit the entry.  And there is one label that displays results.  A validation message reads "Invalid input" under the text box when users enter improper data.

For this application, I would write the following test cases:

POSITVE TESTS
TC1: Submit 1  (Lower boundary)
TC2: Submit 2  (Lower boundary + 1)
TC3: Submit 99 (Upper boundary - 1)
TC4: Submit 100 (Upper boundary)
TC5: Enter valid # and backspace to delete it then enter same number and submit
TC6: Copy a valid # into text box and submit
TC7: Enter integer, use arrow key to backspace and then insert another integer in front of it; then submit

NEGATIVE TESTS

TC8: Submit 0 (Lower boundary - 1)
TC9: Submit 101 (Upper boundary + 1)
TC10: Submit lowercase and uppercase alpha characters
TC11: Submit valid integer preceded by a plus sign (+)
TC12: Submit valid integer preceded by a minus sign (-)
TC13: Submit valid integer preceded by a zero (0)
TC14: Submit nothing
TC15: Submit valid integer followed by a space

* Verify validation message is properly displayed on all negative test cases

OTHER TESTS
TC16: Verify game name is properly displayed in title bar of window
TC17: Enter valid # and wait for until after the application times out before submitting
TC18: Enter valid # and power off computer; turn on computer and see what happens
TC19: Enter valid integer and rapidly click the 'Submit' button and see what happens   TC20: Verify tab order is proper
TC21: When you first access page, verify focus is on text box
TC22: Verify button reads "Submit"
TC23: Enter a valid number in text box then go to another application.  Return to game and see if focus is properly on text box


  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