Test Case: A specific, written check: the steps to follow, the input data to use, and the result you expect, so anyone can run it and tell whether the software passed.

Example

Test case TC-07: open the login page, enter a registered email and a wrong password, click Sign in. Expected result: the message "Incorrect email or password" appears, and the user stays on the login page.

Parts of a Test Case

FieldExample
ID and titleTC-07: Login with wrong password
PreconditionsUser asha@test.com exists and is active
Steps1. Open login page 2. Enter email and wrong password 3. Click Sign in
Test dataEmail: asha@test.com, Password: Wrong@123
Expected resultError message shown; user not logged in
Actual result and statusFilled in when run: Pass or Fail

Writing Good Test Cases

  • One check per test case, with a clear expected result.
  • Cover positive cases (valid input) and negative cases (invalid input).
  • Test boundaries, such as the minimum and maximum allowed values.
  • Write steps so someone new can follow them without asking you.
  • Link each test case to its requirement or acceptance criteria.

Test Case vs Test Scenario

A test scenario is what to test, such as "Verify login". Test cases are the detailed checks under it: valid login, wrong password, locked account, empty fields. Interviewers often ask you to write test cases for a login page or a pen; practise both.

Related terms

Previous term: Technical Round  |  Next term: Test Data

Related guides

Frequently asked questions

What is a test case?

A test case is a written check with steps, input data, and an expected result, used to verify one behaviour of the software.

What are positive and negative test cases?

Positive test cases use valid input to check normal behaviour. Negative test cases use invalid input to check errors are handled.

What is the difference between a test case and a test scenario?

A test scenario describes what to test. Test cases are the detailed steps and expected results for it.

How do I write test cases for a login page?

Cover valid login, wrong password, unregistered email, empty fields, locked accounts, password visibility, and the remember-me option.

Explore more internship terms

The IT Internship Glossary explains 199 terms you will hear before and during your internship, with simple definitions and real examples.

Browse all 199 terms
Dhaivat Ajwaliya

About the author

Dhaivat Ajwaliya

Dhaivat has 16+ years of experience in the IT industry, working on AI and cloud technologies, project delivery, and engineering leadership. He has interviewed and mentored many interns, wrote The Lost Intern, and runs the non-commercial Career Impact Initiative, mentoring students for free.