9lessons programming blog
Loading Search
9lessons Bring Friends
Wall Script
Follow Me:
Monday, February 21, 2011

How to Write Test Cases for Login

As a software tester, you should always think like a person who is using it, and you need to imagine various scenarios, which will happen in the real time environment. If you do this creative visualization you are rest assured that the application is more or less an error free. Just always see the application in a Negative way, as a software tester your attitude must be always negative with the application, if you have this attitude you can easily find out the mistakes.

Software Testing Fail

Author
Suriya Ganesan
Suriya Ganesan
Test Engineer
INDIA

The basic objective of writing test cases is to validate the testing coverage of the application. Well written test cases can make the testing cycle smooth and efficient. A good test case is easy to determine if a feature of an application is working correctly.

Login Test Cases

I have given some valid Test Cases for a Login credentials below


Comments
{ 146 comments }
Anonymous said...

Good information. Every programmer should consider these test cases before going for Design & Coding!

Thank You

John Seigle said...

Thank You for Good information. I got to know for the 1st time about testing!

Anonymous said...

Thank You @Suriya.

Chandra Mohan said...

Good information for beginners about testing.

Srinivas Tamada said...

Great job @Suriya

Buzzknow said...

@Suriya

really nice post :thumbup

Ravi Tamada said...

Good article ! Important one.

Kandaiya said...

Nice article and expecting more articles....

Greg said...

it's nice to see some planning! thanks for the ideas :)

dskanth said...

Very useful... need to implement all those test cased thoroughly... it is a bit headache for the developer... but no escape...

Anil Kumar Panigrahi said...

Very nice article. Thank you for sharing to all.

Atul kumar said...

Nice post..

Anonymous said...

Never say if username or password is wrong. Just say something is wrong

Anonymous said...

Actually, a well-designed log-in page should never divulge whether the user name or the password is incorrect. The correct response for both TC-002 and TC-003 should be "Invalid user name or password", or similar. Apart from that, thanks for sharing.

Anonymous said...

I agree with post exactly above me.

Lierts said...

good form dummies :) haha

Anonymous said...

great

Anonymous said...

simple yet useful article

Anonymous said...

great Suriya we waiting more ;)

Anonymous said...

Very useful

Shishir said...

Thanks Suriya..Nice post..

Anonymous said...

thanx alot.......its vry clear.

Unknown said...

simply superbbbbbbbbbbbbbbb

Anonymous said...

it is very useful 4r every one frnd nd simply superb nd v people xpecting more unformation like tis ll u pls,........

xxxx said...

simple n superb:)

Amar said...

Very Nice Post And Easy To Understand

Anonymous said...

Its very useful for beginners Apart from this i want to clarify one thing Is it necessary for manual tester to learn database.

Godwin said...

Very Nice post I need to use this for my next project. Keep going

raj said...

nice supriya you done good job
rise doubts on my mind abt this i clarify those after saw your posted sereen

Anonymous said...

useful one.

Anonymous said...

was effective

Amirtha said...

thanks a lot

Anonymous said...

gud test case experience for starter

nikita said...

gud.... it healped me a lot...we were told to write 30 test cases for log in page...after seeing ur valid test cases i completed ma all 30 test case.....thanx

Anonymous said...

very nicely made,easy to understand

venky said...

it'sgood

Anonymous said...

i m a beginner in the field of testing an hence it helps me a lot.

kalyan chakravarthy said...

good information and thank you

Sam said...

Awesome demo Suriya... keep it up!!

Anonymous said...

really nice..

Anonymous said...

Good one... expecting more scenario with test cases..

venkat said...

hello sis
i am venkat,as a fresher i feel comfortable by seeing this,i need your help,I cleared ISTQB certification,But i am having doubt how to prepare test scenario,which one will come first eithier test case or test scenario

Anonymous said...

superb..........i was more confused about how to present a test case?, but after reading "test case for login" i can say i am clear over the test case

Anonymous said...

thanks for sharing, i am learning testing and it helps me understand how to write test cases .

Anonymous said...

Thank you for helping me in understanding how to write test cases. After seeing this example I can write test cases for my project now.


Anand

Bhaskar said...

Nice one ...

Bhaskar said...

thnxx for your kind Information.

Vabhs Lu said...

Thanx.......suberb job....

NISHIT said...

NICELY DESCRIBED..

Anonymous said...

thank you

jitendra singh said...

Thanks

Anonymous said...

thanks for post.

Anonymous said...

@surya will be very useful for my interviews

Anonymous said...

Thanks for the post Suriya..

Anonymous said...

very useful..thanks a lot...

nagendra said...

great and it is to understand for learner.

bushra said...

It really help in understanding that how to write a test case. its very useful. thanks alot:) for guidance

Anonymous said...

Hi suriya,

can you please provide me some screen shots with test cases for other applications like CRM,salary processing applications, can u please send all these documents to raghavendra.bhaskar@gmail.com, waiting for your reply.

Thanks
Raghavendra

Esther Asare said...

Thanx Suriya, your post was really helpful to me

Sughanya said...

My Searching end here. Thanks

swati said...

understandable

Anonymous said...

nice tipps. But this is only a fonctional Test for the login page. I would be so much thankfull if you can post some idea for security testing like cross site scripting, session testing and authorization testing.

Anonymous said...

nice work brother

Anonymous said...

Good Example.I understood how to write a test case.thanq

naveen singh said...

its a great example for a view of testing....thanks@lot...

naveen singh said...

its a great example for a view of testing....thanks@lot...

sandeep said...

i am new to test cases it is simply and easy to understand good job for helping a lot of members by doing so

Srinivas Tamada said...

Thank you all for the best feedback. Here you can request any tutorial about testing.

Anonymous said...

thanks...

sarang... said...

Thanks Nice test cases/

Anonymous said...

Hi mam,

Great Posting but my interview exp i went attend one interview i tried to write like that but interviewer told we are not expecting this type of template we want only concept for scenario. I dont know why people behave like this, they have to inform before starting the written test but never told anything. At last simply told ur name is not shortlisted, it is the shame for those companies.

Anonymous said...

hi suriya
can you please provide me some more information n screen shots with test cases for other applications like doctors profile salary processing applications, can u please send all these documents to silu.chavvakula@gmail.com, waiting for your reply.

Thank you
keethu

Lokanadham said...

NICE ONE BOSS. keep posting.... new to testing need to know a lot about Testing

Lokanadham said...

Nice ONE BOSS...

vijay said...

can u send about testing tutorials to vijay.tadepu@gmail.com

Anonymous said...

THANKS FOR GIVING GOOD TEST CASES.CAN U SEND MATERIAL ABOUT TEST CASES WRITING VITH SOME EXAMPLES SO THAT I CAN UNDERSTAND MORE EASILY BECAUSE I AM FRESHER IN TESTING.SEND TO gudikishore1@gmail.com

Vijayshree said...

Thank You, you have written exactly what is important.

Anonymous said...

thanks

yogesh patil said...

good but expecting more test cases

Anonymous said...

thanks

Anonymous said...

Great approach and great work, keep it up

Sandeep Rabindranath said...

The above approach was cool, could you please tell me few steps to come out with best off scenario in writing test case. Please mail me sandeeep4u@yahoo.com and few screen shots of it with templet will be help full. Thank you.

Ram-Wipro2011 said...

Nice posting ....

Anonymous said...

it is so easy to undestand......

Anonymous said...

its is very good style to test case write,thanks

swetha reddy said...

Nice answer

Anonymous said...

:)

Anonymous said...

:)

Anonymous said...

helpful

Anonymous said...

Good work

Anonymous said...

Never say 'Username is wrong' or 'Password is wrong' . We won't give correct messages for login screens. You can also add Keyboard functionalities test cases like tab order , reverse tab order and enter key functionalities.
Also try to to incorporate some aesthetic test cases also like look and feel, enough space between username and password labels , visibility of buttons and the fonts
Regards
Hari MR

Anonymous said...

It is good

Anonymous said...

can u tell me the scenario of the login page...

Anonymous said...

good article, thanks for d same.. hope it will help us for d beginners during interview selection....

Suresh Kumar said...

can u tell me the testcase of manage user page

Josephine reyes-baluyot said...

thank you! do you have any info on test registry? thanks

Tim said...

This is good article. Another scenario I can think of:

1) Login with valid uid and password

2)then copy the loggedin url from the browser say from IE
3)Paste it in another browser say firefox.
4)It should not show you the logged in user details as the login cookies does not exist for firefox.

Thanks
Tim
http://softwareqatestings.com/introduction-to-software-testing/how-to-write-a-good-test-case.html

Mahesh Boga said...

Hi suriya..

Your article on test cases is good.
Iam a fresher i need to know mare about testing and how to write test cases. if u have any test cases with examples please do send me.
If u have any useful information about testing send me the articles or notes any time.
My mail id: maheshboga24@gmail.com

Thanks
Mahesh Boga

Anonymous said...

This one is of great help! Please post some more examples. Thanks a lot!

Anonymous said...

good article

Anonymous said...

Well explained..

பரமேந்தன் said...

Easy to Learn Thanks for this nice article

Subsimoo said...

thank you it seems very useful information

Rahul Chavan said...

if u enter wrong username or password then popup message should be 'enter valid user name or password'. It should not specify that enter correct username or password.

rashmi saini said...

helpful..

Livin Antony said...

very helpful ..can u anyone xpaln the possible cases for a login page with proper username and password, but user couldnt login

Anonymous said...

Good....
Can u pls tell possible test cases for registration form.

Anonymous said...

good post can u give more examples like this so dat it would be better for freshers.really gud job

abodeqa said...

This is a nice effort and very helpful to answer interview question asked for Manual testing position for login page

k venkatadri said...

thank you so much

k venkatadri said...

thank you so much,plese provide more test scenarios and test cases

Chowdary said...

its very niceelpful
and so much h

Anonymous said...

its very niceelpful
and so much h

Anonymous said...

Really very useful posting

Anonymous said...

1) Incase of Invalid Username or Password, You should expect a common message "Authentication failed. Otherwise it is a security defect.

2) Now a days Login comesup with ADS Sever integrations. Need cases around

3) * mark should appear always for mandatory field. Its not after using missing it.

You can write around 60 Testcases for the given scenario

Geethi said...

Good job dear Thank you soo much..... :)

Anonymous said...

nice post ,can u give me some more examples

Sachin said...

Very Useful Explanation
Thanx

Uma said...


simple to understand & imp for interview purpose.
thx

Uma said...

Simple to understand & imp for interview

Thx

Anonymous said...

it's really good...........why cant you share software testing jobs link in this page????????

Nisha said...

Its nice very useful to new ones to testing.
Please update some useful information about basic testing techniques.

Anonymous said...

thank you very much

Anonymous said...

thank u

Anonymous said...

Nice Thank u.

jeevanpal singh shaktawat said...

good example. thanks

Anonymous said...

vary thank full it's vary useful greats job...........

Anonymous said...

easy understanable and superb...@Suriya

Tarique said...

very helpful...thanks.

Anonymous said...

very useful

Krishnakumar Adoni said...

thanq u so much .....
for given this information

divya said...

Very useful.. thnx for this useful information.

hermes victoria said...

It's good that they have thought about that. It was about time they did something. Thanks for sharing.

Anonymous said...

useful..expecting test cases for many scenarios..

boopathi said...

I don't know how to start writing the Test cases. This is the first test case i have seen..Thanks for this useful information.

Anonymous said...

good

Anonymous said...

good article:)

Sciflare said...

Wow, a new type of tutorial, always wanted to create test cases, thx for saving the time :)

Ayyappa AV said...

This is very good test case for login.
thank you :)

Gagan said...

thnx for such a useful information.

Anonymous said...

Thank you for sharing knowledge...Keep up the good work.. God bless

Anonymous said...

Hi Suria, Thank you so much for log in test cases. I am new in this field, please provide me functional test cases as well. My emailID is hemmehan@gmail.com. I will appreciate your help.

Anonymous said...

THANKS A LOT FOR SHARING THE KNOWLEDGE

Puttoju Vanitha said...

Nice...

Priti Bajad said...

thank u

Selvam Paulraj said...

Very useful. Thank you!!!

Post a Comment