HI ,
I am writing a java program to validate email addresses. This program use Pattern class to validate the input string against the Regex pattern. I have procured Regex Pattern for the email validatation and my program is successfully working.
Now, I see some wrong email addresses in my database(Email delevery fails to these addresses.), So, i decided to prepare a test case that will run a validation on the handfull of email addresses list. I want this list to have all possible cases for a valid email address and invalid email address.
I am wondering if some has prepared email validatation test case before? If so Please Guide me to have this test case prepared with me?
Regards,
VSD
This article contains some regexps which cover valid addresses.
There are no test cases, though. In your case, I suggest to try the usual approach: Take a couple (2-3) valid and invalid addresses and test that. If you find your code to accept an illegal address or reject a valid one, then extend the test.