QA & careerTemplatesBusiness coursesEveryday tools

Blog / Testing basics

Test case examples for a login page

The login page is the classic first exercise for testers. It is small, everyone knows how it should behave, and it shows the main ideas of test design.

What a test case contains

A test case usually has an ID, a short title, preconditions, steps, test data, the expected result and a status after you run it. Keep each case focused on one idea.

Positive cases

  • TC01: Login with a valid email and correct password. Expected: user reaches the dashboard.
  • TC02: Press Enter instead of clicking the button. Expected: login works the same way.
  • TC03: Use the "show password" icon. Expected: password text becomes visible, then hidden again.

Negative cases

  • TC04: Valid email, wrong password. Expected: a clear error, no login.
  • TC05: Unregistered email. Expected: an error that does not reveal whether the account exists, if that is the product rule.
  • TC06: Both fields empty. Expected: required-field messages.
  • TC07: Email without the @ sign. Expected: a format message.

Boundary and extra checks

  • TC08: Password at the minimum allowed length, and one character less.
  • TC09: Very long input in the email field. Expected: the page does not break.
  • TC10: Spaces before or after the email. Expected: handled consistently.
  • TC11: Browser back button after login and after logout.
  • TC12: Open the page on a phone-sized screen. Expected: fields and button remain usable.

How to run them

Write the cases before you test. Run each one, note pass or fail, and for every fail write a bug report. Notice which ideas repeat: valid input, invalid input, empty input, limits. You can reuse them on almost any form.

These are practice examples. Real projects follow their own requirements, so always check what the product is supposed to do.

Keep going

Get the free QA checklist

Join the SkillRung email list for the checklist and product updates.

Sign up on the home page