Search
Display results as :
Advanced Search
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Share
Go down
avatar
divya_agsrdk
Professional
Professional
Posts : 93
Join date : 2013-01-17

How to make a failure in gmail login page?

on 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 ?
avatar
ccox
Master
Master
Posts : 205
Join date : 2012-01-06
Age : 33
Location : Denver, CO

Re: How to make a failure in gmail login page?

on 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
avatar
divya_agsrdk
Professional
Professional
Posts : 93
Join date : 2013-01-17

Re: How to make a failure in gmail login page?

on 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?
avatar
adityac
Professional
Professional
Posts : 101
Join date : 2013-01-17

Re: How to make a failure in gmail login page?

on 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 ....
avatar
adityac
Professional
Professional
Posts : 101
Join date : 2013-01-17

Re: How to make a failure in gmail login page?

on Wed Jan 23, 2013 6:31 pm
Then the scenario wat u did is crect only...result wil be pass
avatar
ccox
Master
Master
Posts : 205
Join date : 2012-01-06
Age : 33
Location : Denver, CO

Re: How to make a failure in gmail login page?

on 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
avatar
divya_agsrdk
Professional
Professional
Posts : 93
Join date : 2013-01-17

Re: How to make a failure in gmail login page?

on Thu Jan 24, 2013 12:44 pm
hw to make a negative test case to fail in the gmail login page?
avatar
ccox
Master
Master
Posts : 205
Join date : 2012-01-06
Age : 33
Location : Denver, CO

Re: How to make a failure in gmail login page?

on 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.
avatar
ccox
Master
Master
Posts : 205
Join date : 2012-01-06
Age : 33
Location : Denver, CO

Re: How to make a failure in gmail login page?

on Thu Jan 24, 2013 11:14 pm
Why would you want a test case to FAIL?
avatar
divya_agsrdk
Professional
Professional
Posts : 93
Join date : 2013-01-17

Re: How to make a failure in gmail login page?

on 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?
Sponsored content

Re: How to make a failure in gmail login page?

Back to top
Permissions in this forum:
You cannot reply to topics in this forum