Does anyone know how to derive test cases by using equivalence partitioning on email address field validation?
2 Answers
Test cases
1) Email Length
The format of email addresses is local-part@domain where the local-part may be up to 64 characters long and the domain name may have a maximum of 255 characters – but the maximum 256 characters length of a forward or reverse path restricts the entire email address to be no more than 254 characters
So, divide test cases in two scenarios:
i) email id between 0 to 254 characters
ii) email id greater than 254 characters
2) Characters and Numbers
Email accepts Uppercase and lowercase English letters (a–z, A–Z) and Digits 0 to 9
So, check email address with alphabets lower and upper-case and numbers, Check weather the loginid accepts the user name starting with caps letter or number or spl charaters
eg. niceandsimple@example.com, niceand122simple123@example.com
3) Special Charachters
Characters !#$%&'*+-/=?^_{|}~ are been accepted. So, write two scenarios.
1) email id with Characters !#$%&'*+-/=?^_
{|}~ should be accepted
ii) email id containing characters other than Characters !#$%&'*+-/=?^_`{|}~ should not be accepted
eg. ---> !#$%&'*+-/=?^_`{}|~@example.org
---> " "@example.org
4) Special Characters with restrictions
Special characters are allowed with restrictions. They are: Space and "(),:;<>@[] The restrictions for special characters are that they must only be used when contained between quotation marks, and that 2 of them (the backslash \ and quotation mark " (ASCII: 92, 34)) must also be preceded by a backslash \ (e.g. "\\"").
Two scenarios 1) characters "(),:;<>@[] within double quotes ii) charachters "(),:;<>@[] without double quotes
eg. ----> "()<>[]:,;@\\"!#$%&'*+-/=?^_`{}| ~.a"@example.org
5) Email with Dots (.)
i) email id with single dot should be accepted
a.little.lengthy.but.fine@dept.example.com
ii) email with multiple continues dot not accepted
a.little.....fine@dept.example.com
iii) Leading dot in address is not allowed
.abc123@gmail.com
iv) Trailing dot in address is not allowed
abc123.@gmail.com
v) Multiple dot in the domain portion is invalid
abc123@gmail..com
6) domain name
i) same domain name ----> check the mail can be of same domain name i.e gmail@gmail.com ii) Domain is valid IP address iii) Square bracket around IP address is considered valid iv) Dash in domain name is valid v) Missing @ sign and domain vi) Garbage ( #@%^%#$@#$@#.com ) vii) Two @ sign viii) Leading dash in front of domain is invalid ix) .web is not a valid top level domain x) Invalid IP format
7) Text in email
1) Text followed email is not allowed
email@domain.com (Joe Smith)
2) Text before email allowed
(Joe Smith)email@domain.com

- 253
- 2
- 9
-
if you like answer please do comment and like – user2365657_Shraddha S Sep 16 '13 at 13:46
-
These test cases are not comprehensive by any means, and might be probably missing a bunch of edge cases. if anyone else would like to contribute more cases to this list, or spot errors (fingers crossed), please feel free to let me know and I'll make sure the list is up-to-date. :) – user2365657_Shraddha S Sep 17 '13 at 06:39
Take each input condition described in the specification and derive at least two equivalence classes for it. One class represents the set of cases which satisfy the condition (the valid class) and one represents cases which do not (the invalid class), example as below:
–Number of email field: 0<21
•Class 1: any value less then 1(invalid input)
•Class 2: 1-20 (valid input)
•Class 3: any value more then 20(invalid input)
•Select at least 1 value from each class as test data for testing on the field “Number of email”
–Value below will be use for testing for “number of email” field validation and verification
–-5, 5, 25

- 1,804
- 14
- 21
-
how you can say more then 20 is invalid input? i think max length of email address is 256 charcters. – Naveen Chhaniwal Apr 30 '13 at 05:51
-
The format of email addresses is local-part@domain where the local-part may be up to 64 characters long and the domain name may have a maximum of 255 characters – but the maximum 256 characters length of a forward or reverse path restricts the entire email address to be no more than 254 characters – user2365657_Shraddha S Sep 16 '13 at 13:07