- divya_agsrdkProfessional
- Posts : 93
Join date : 2013-01-17
How to make a failure in gmail login page?
Sat Jan 19, 2013 11:17 am
just gave dummy username and pswd. click on button. its running successfully.
in gmail it asks please enter valid username / pswd.
How to make a failure test case in gmail login page ?
in gmail it asks please enter valid username / pswd.
How to make a failure test case in gmail login page ?
- ccoxMaster
- Posts : 205
Join date : 2012-01-06
Age : 38
Location : Denver, CO
Re: How to make a failure in gmail login page?
Wed Jan 23, 2013 6:19 am
You could do something like assertTextNotPresent |please enter valid username. If the error message is there, the script will fail
- divya_agsrdkProfessional
- Posts : 93
Join date : 2013-01-17
Re: How to make a failure in gmail login page?
Wed Jan 23, 2013 1:30 pm
I gave invalid username and password. clicked on button. and i stoped recording. in the application its showing error message as please enter valid username and pswd. bt my test script is executed successfully.. no failures.
as of i couldnt login. y my test case s succeed?
as of i couldnt login. y my test case s succeed?
- adityacProfessional
- Posts : 101
Join date : 2013-01-17
Re: How to make a failure in gmail login page?
Wed Jan 23, 2013 2:26 pm
You are lukng for failed login scenario of gmail... so wn u execute the test case...as a test case itself is a invalid login,login fails...which means scenario wat u r tryng is passed...so it shws as a passed testcase ....
- adityacProfessional
- Posts : 101
Join date : 2013-01-17
Re: How to make a failure in gmail login page?
Wed Jan 23, 2013 6:31 pm
Then the scenario wat u did is crect only...result wil be pass
- ccoxMaster
- Posts : 205
Join date : 2012-01-06
Age : 38
Location : Denver, CO
Re: How to make a failure in gmail login page?
Wed Jan 23, 2013 10:27 pm
You are recording the 3 steps of enter username, enter password and click login. If you record nothing after this, the steps will almost always pass. You are not checking to see if something is failing afterwards or if you are getting an error message as expected.
For a negative case you need a step 4 of assertTextPresent| "error message". This will pass if the message is present, thus passing your negative test case
For a negative case you need a step 4 of assertTextPresent| "error message". This will pass if the message is present, thus passing your negative test case
- divya_agsrdkProfessional
- Posts : 93
Join date : 2013-01-17
Re: How to make a failure in gmail login page?
Thu Jan 24, 2013 12:44 pm
hw to make a negative test case to fail in the gmail login page?
- ccoxMaster
- Posts : 205
Join date : 2012-01-06
Age : 38
Location : Denver, CO
Re: How to make a failure in gmail login page?
Thu Jan 24, 2013 12:55 pm
You want a negative test case to pass... If a negative test case fails that means it is not working correctly, therefore would be a defect. A negative test case failing would be like entering an invalid username and being able to login.
I would suggest doing some research on negative test cases prior to attempting to automate a test. It might explain what we have explained to you a little better.
I would suggest doing some research on negative test cases prior to attempting to automate a test. It might explain what we have explained to you a little better.
- ccoxMaster
- Posts : 205
Join date : 2012-01-06
Age : 38
Location : Denver, CO
Re: How to make a failure in gmail login page?
Thu Jan 24, 2013 11:14 pm
Why would you want a test case to FAIL?
- divya_agsrdkProfessional
- Posts : 93
Join date : 2013-01-17
Re: How to make a failure in gmail login page?
Mon Jan 28, 2013 1:52 pm
just to knw hw to make a failure.
even though im givin invalid usename n pswd . and gives a error messg in applicatin. bt my test script pass.
since i m not validating anything in ide. so its gettin pass right?
even though im givin invalid usename n pswd . and gives a error messg in applicatin. bt my test script pass.
since i m not validating anything in ide. so its gettin pass right?
- Parameterise you login page using java.
- my selenium html file opens the code page rather than web page
- Sharepoint forgets login and doesn't react on clicks on in-page-links
- how to make script to wait until ajax components get loaded in page
- In Gmail create account page phone no. field inserting phone no. after the default country code issue
Permissions in this forum:
You cannot reply to topics in this forum
|
|