How to Write Test Cases for Login
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


Was this article helpful?
Thanks! Your feedback helps us to improve 9lessons.info


153 comments:

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

    Thank You

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

    ReplyDelete
  3. Thank You @Suriya.

    ReplyDelete
  4. Good information for beginners about testing.

    ReplyDelete
  5. @Suriya

    really nice post :thumbup

    ReplyDelete
  6. Nice article and expecting more articles....

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

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

    ReplyDelete
  9. Very nice article. Thank you for sharing to all.

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

    ReplyDelete
  11. 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.

    ReplyDelete
  12. I agree with post exactly above me.

    ReplyDelete
  13. simple yet useful article

    ReplyDelete
  14. great Suriya we waiting more ;)

    ReplyDelete
  15. thanx alot.......its vry clear.

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

    ReplyDelete
  17. Very Nice Post And Easy To Understand

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

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

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

    ReplyDelete
  21. gud test case experience for starter

    ReplyDelete
  22. 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

    ReplyDelete
  23. very nicely made,easy to understand

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

    ReplyDelete
  25. Awesome demo Suriya... keep it up!!

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

    ReplyDelete
  27. 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

    ReplyDelete
  28. 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

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

    ReplyDelete
  30. 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

    ReplyDelete
  31. thnxx for your kind Information.

    ReplyDelete
  32. Thanx.......suberb job....

    ReplyDelete
  33. @surya will be very useful for my interviews

    ReplyDelete
  34. Thanks for the post Suriya..

    ReplyDelete
  35. very useful..thanks a lot...

    ReplyDelete
  36. great and it is to understand for learner.

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

    ReplyDelete
  38. 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

    ReplyDelete
  39. Thanx Suriya, your post was really helpful to me

    ReplyDelete
  40. My Searching end here. Thanks

    ReplyDelete
  41. 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.

    ReplyDelete
  42. nice work brother

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

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

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

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

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

    ReplyDelete
  48. 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.

    ReplyDelete
  49. 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

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

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

    ReplyDelete
  52. 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

    ReplyDelete
  53. Thank You, you have written exactly what is important.

    ReplyDelete
  54. good but expecting more test cases

    ReplyDelete
  55. Great approach and great work, keep it up

    ReplyDelete
  56. 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.

    ReplyDelete
  57. it is so easy to undestand......

    ReplyDelete
  58. its is very good style to test case write,thanks

    ReplyDelete
  59. 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

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

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

    ReplyDelete
  62. can u tell me the testcase of manage user page

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

    ReplyDelete
  64. 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

    ReplyDelete
  65. 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

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

    ReplyDelete
  67. Well explained..

    ReplyDelete
  68. thank you it seems very useful information

    ReplyDelete
  69. 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.

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

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

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

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

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

    ReplyDelete
  75. its very niceelpful
    and so much h

    ReplyDelete
  76. its very niceelpful
    and so much h

    ReplyDelete
  77. Really very useful posting

    ReplyDelete
  78. 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

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

    ReplyDelete
  80. nice post ,can u give me some more examples

    ReplyDelete
  81. Very Useful Explanation
    Thanx

    ReplyDelete

  82. simple to understand & imp for interview purpose.
    thx

    ReplyDelete
  83. Simple to understand & imp for interview

    Thx

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

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

    ReplyDelete
  86. thank you very much

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

    ReplyDelete
  88. easy understanable and superb...@Suriya

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

    ReplyDelete
  90. Very useful.. thnx for this useful information.

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

    ReplyDelete
  92. useful..expecting test cases for many scenarios..

    ReplyDelete
  93. 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.

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

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

    ReplyDelete
  96. thnx for such a useful information.

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

    ReplyDelete
  98. 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.

    ReplyDelete
  99. THANKS A LOT FOR SHARING THE KNOWLEDGE

    ReplyDelete
  100. great job........waiting to see more..........

    ReplyDelete
  101. Hi Suriya,

    Thanks for providing the TC details for Login, But i have one suggestion when we are validating the "Password By entering invalid password then an error message should appear as " Please Enter Correct Password "" in this case Error message should never say that Please enter correct password due to security issue if user enters incorrect Password but the username is correct or vice-verse the error message should say that Either username or password is incorrect.

    ReplyDelete
  102. Tnx for providing the tc deatils for login

    ReplyDelete

Make in India