Define equivalent partitions for a text field which accepts maximum 20 alphabetical chars and hyphens "-".

Questions by ioanagoga   answers by ioanagoga

Showing Answers 1 - 4 of 4 Answers


  • May 31st, 2009

Generalized testing will have infinite combinations. so to reduce the combinations, we will take a definite string and we will test that string with all possible regular exp combination (assumption is only ? and * are used)

Better to take a medium length string (not so big and not so small)
Panic is a good word.

So the number of letters is 5.





So 18 test cases are enough to test this string.
If you want we can change the string panic with more complex words (a five letter word with numbers and spl characters) and check.
It should be data driven testing.

  Was this answer useful?  Yes

Equivlence class partioning is nothing but more the number of input is passed but minimising the test cases has to be written

for the above case Kindly undergo the following :

1.adcd - positive test below 20 characters
2.abcdefghijklmnopqrstw - Negative testing above 20 characters
3.adcd_gh - positive testing 
4.abcd.hj - Negative testing

Enter the following:

- no alpha chars or hyphens
- 1 alpha char
- 1 hyphen
- 1 alpha char and 1 hyphen
- combination of (max - 1) alpha chars and hyphens
- combination of max alpha chars and hyphens
- combination of (max + 1) alpha chars and hyphens
- string of (max - 1) common symbols besides hyphens
- string of integers from 0 through 9

  Was this answer useful?  Yes


  • Jan 24th, 2010

1 ) Chk by enterning empty string in the text field

2 ) Chk by enterning special char other than hyphen
3 ) Chk by enterning a alphabetical chars  with a max of 20 
4 ) Chk by enterning a hyphens with  a max of 20.
5 ) Chk by enterning both the alphabetical chars & hyphen with the max of 20
6 ) Chk by enterning the alphabetical chars exceeding the max of 20 char. 
7 ) Chk by enterning the hyphen exceeding 20. 
8 ) Chk by enterning both alphaberical char & hyphen exceeding the max of 20. 

  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