Test Scenarios and Test Cases
Test cases turn requirements into precise, repeatable checks anyone on the team can run.
On this page · 5 min · Beginner
On this page
- Learning objectives
- Explanation
- Code example
- Step by step
- Real-world use
- Common mistakes
- Best practices
- Remember this
- Practice exercise
- Mini quiz
- Related topics
- My notes
- Reading time
- 5 min
- Difficulty
- Beginner
- Updated
- Oct 29, 2026
Related tutorials
Learning objectives#
- Distinguish scenarios from test cases
- Write a complete test case
- Cover positive and negative paths
- Keep cases maintainable
Explanation#
A test scenario is a one-line “what to test”: “Verify login with valid credentials.”
A test case is the detailed “how”: ID, title, preconditions, steps, test data, expected result, actual result, status and priority.
Write positive cases (valid input works) and negative cases (invalid input is handled gracefully).
Each case checks one thing, with expected results that leave no room for interpretation.
Code example: Login test cases#
Scenario: Verify user login
TC-LOGIN-01 Login with valid email and password Priority: High
Pre: User asha@example.com exists and is active
Steps: 1. Open /login 2. Enter email 3. Enter password Passw0rd! 4. Click Sign in
Expected: Dashboard opens; header shows "Namaste, Asha"
TC-LOGIN-02 Login with wrong password Priority: High
Steps: as TC-01 with password wrongpass
Expected: Stays on /login; message "Email or password is incorrect"; password field cleared
TC-LOGIN-03 Login with empty fields Priority: Medium
Expected: Both fields show "This field is required"; no request sent
TC-LOGIN-04 Account locks after 5 failed attempts Priority: High
Expected: 6th attempt shows "Account locked for 15 minutes"
Four clear cases cover the main positive, negative and security behaviour of login.
This example is illustrative. Copy or download it and run it in your own environment; the expected output is shown above.
Step-by-step explanation#
- Start with the scenario.
- Add preconditions and exact test data.
- Write numbered, unambiguous steps.
- State a precise expected result.
Real-world use case#
New team members execute the regression suite on day one because every case is self-explanatory.
Common mistakes#
“Login should work” cannot be judged. Say exactly what should be seen.
If one fails, the rest are unclear. One objective per case.
Best practices#
- One objective per case
- Include negative and edge cases
- Use realistic test data
- Review cases with developers and BAs
Remember this#
Scenario = what. Test case = how.
Pre, steps, data, expected.
Positive + negative.
Practice exercise#
Your task: Write a negative test case title for a “Phone number” field that accepts 10 digits.
Show solution
TC-PHONE-03 Phone number with 9 digits shows "Enter a 10-digit mobile number"
Mini quiz#
Which is a test scenario rather than a test case?
Want more? Practise all Manual Testing MCQs · Manual Testing interview questions
My notes#
Saved in this browser.