Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
AEM Training | Free Online DemoWed Apr 21, 2021 5:45 pmazharuddin
c# PageFactory - issue initializing elementsFri Nov 01, 2019 8:40 pmthegoatboy
Selenium making automatic connection to random urlsMon Jul 08, 2019 12:58 pmrepairtechsolutions1
How can we design the custom framework in Selenium RCMon Jun 24, 2019 2:26 pmrandybonnettes
What are the new features in Selenium 3.0Tue Jun 18, 2019 5:37 pmpappyvicky
What are you using Selenium for? Fri Apr 12, 2019 3:52 amzhl
LIMITATIONS OF SELENIUMWed Apr 10, 2019 11:23 amswara
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

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

How to  make a failure in gmail login page? Empty 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 ?
avatar
ccox
Master
Master
Posts : 205
Join date : 2012-01-06
Age : 38
Location : Denver, CO

How to  make a failure in gmail login page? Empty 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
avatar
divya_agsrdk
Professional
Professional
Posts : 93
Join date : 2013-01-17

How to  make a failure in gmail login page? Empty 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?
avatar
adityac
Professional
Professional
Posts : 101
Join date : 2013-01-17

How to  make a failure in gmail login page? Empty 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 ....
avatar
adityac
Professional
Professional
Posts : 101
Join date : 2013-01-17

How to  make a failure in gmail login page? Empty 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
avatar
ccox
Master
Master
Posts : 205
Join date : 2012-01-06
Age : 38
Location : Denver, CO

How to  make a failure in gmail login page? Empty 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
avatar
divya_agsrdk
Professional
Professional
Posts : 93
Join date : 2013-01-17

How to  make a failure in gmail login page? Empty 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?
avatar
ccox
Master
Master
Posts : 205
Join date : 2012-01-06
Age : 38
Location : Denver, CO

How to  make a failure in gmail login page? Empty 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.
avatar
ccox
Master
Master
Posts : 205
Join date : 2012-01-06
Age : 38
Location : Denver, CO

How to  make a failure in gmail login page? Empty 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?
avatar
divya_agsrdk
Professional
Professional
Posts : 93
Join date : 2013-01-17

How to  make a failure in gmail login page? Empty 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?
Sponsored content

How to  make a failure in gmail login page? Empty 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