I have started writting test cases for a project, The first page is login page.
i have started to write test case for valid email adress validation.
public void LoginValidEmailProvided(string baseUrl)
{
_driver.Navigate().GoToUrl(baseUrl);
UserIdField.Clear();
UserIdField.SendKeys("abc.xyz.com");
PasswordField.Clear();
PasswordField.SendKeys("");
LoginButton.Click();
}
Now my question is do we need to write different function for each variation for valid emaiil address checking.
Like on manual testing test usually do
some.com
@some.com
@some
some@
some@@@.com
and many more.
so do we have to write test cases for above varaitions in automate testing. or just one variation is suffucient. as I am checking the return message and comparing with expected and what I get. In each case it returns Invalid credentials. So I have just checked is page contains the message Invalid credentials then the Invalid Emaild address test case passed.
Please advise Thanks