Imagine you’re baking your favourite cookies. Would you just throw ingredients into a bowl and hope for the best? Probably not! You'd follow a recipe, right? A recipe tells you exactly what ingredients you need, in what amounts, and step-by-step how to mix and bake them to get perfect cookies every time.
In the world of software, a Manual Test Case is exactly like that recipe, but for testing! It's a detailed, step-by-step guide that tells a person (a "tester") exactly what to do with a piece of software, what to look for, and what the correct outcome should be.
Why Do We Even Need Test Cases?
You might wonder, "Can't I just try out the software?" You can, but without a test case, it's easy to:
Forget Things: You might miss checking an important part.
Be Inconsistent: You might test differently each time, or someone else might test it differently.
Not Know What's Right: How do you know if what you see is actually how it's supposed to work?
Communicate Poorly: If you find a problem, how do you clearly tell someone else how to find it too?
Test cases solve these problems! They bring clarity, consistency, and repeatability to your testing.
What Goes Into a Test Case? (The Essential Ingredients)
Just like a cookie recipe has flour, sugar, and eggs, a test case has several key parts. Let's look at the most common ones:
Test Case ID (TC-ID):
What it is: A unique code or number for this specific test. Like a social security number for your test.
Why it's important: Helps you find and track this test case easily.
Example:
TC_LOGIN_001
,TC001
Test Case Title / Name:
What it is: A short, clear name that tells you what the test is about.
Why it's important: Helps you quickly understand the test's purpose without reading details.
Example:
Verify user can log in with valid credentials
,Check shopping cart displays correct total
Description / Purpose:
What it is: A brief sentence or two explaining what this test aims to check.
Why it's important: Gives context to anyone reading the test.
Example:
To ensure a registered user can successfully access their account using a correct username and password.
Pre-conditions:
What it is: Things that must be true or set up before you can start this test.
Why it's important: If these aren't met, the test won't work correctly. It's like saying "Pre-heat oven to 350°F" before you can bake.
Example:
User is registered and has a valid username/password. Internet connection is stable. Browser is open.
Test Steps:
What it is: The heart of the test case! These are the numbered, detailed actions you need to perform, one by one.
Why it's important: Guides the tester precisely. Each step should be simple and clear.
Example:
Navigate to the website login page (
www.example.com/login
).Enter "testuser" into the 'Username' field.
Enter "Password123" into the 'Password' field.
Click the 'Login' button.
Expected Results:
What it is: What you expect to happen after completing the steps. This is the "right" outcome.
Why it's important: This is how you know if the software is working correctly or if you found a "bug" (a problem).
Example:
User is redirected to their dashboard page. "Welcome, testuser!" message is displayed.
Actual Results (During Execution):
What it is: (This field is filled during testing) What actually happened when you performed the steps.
Why it's important: This is where you write down if it matched your expectations or not.
Example:
User was redirected to dashboard. "Welcome, testuser!" message displayed.
(If successful) ORApp crashed after clicking login.
(If a bug)
Status (During Execution):
What it is: (This field is filled during testing) Did the test pass or fail?
Why it's important: Quick overview of the test's outcome.
Example:
PASS
orFAIL
Post-conditions (Optional but useful):
What it is: What the state of the system is after the test, or what cleanup might be needed.
Example:
User is logged in.
Test data created during test is removed.
Environment:
What it is: On what device, browser, or operating system did you perform this test?
Example:
Chrome, Windows 10
Safari, iPhone 15
Tested By / Date:
What it is: Who ran the test and when.
Example:
John Doe, 2025-07-27
Let's Write One Together! (A Simple Example)
Imagine we're testing the login feature of a simple online store.
Test Case ID: TC_LOGIN_002
Test Case Title: Verify login with incorrect password fails and shows error
Description / Purpose: To ensure a user attempting to log in with a correct username but an incorrect password receives an appropriate error message and remains on the login page.
Pre-conditions: User is registered and has a valid username (e.g., 'testuser'). Internet connection is stable. Browser is open.
Test Steps:
Maps to the login page of the online store (e.g., www.onlinestore.com/login).
Enter "testuser" into the 'Username' field.
Enter "wrongpass123" into the 'Password' field.
Click the 'Login' button.
Expected Results:
An error message "Invalid username or password" is displayed.
The user remains on the login page.
The user is NOT redirected to their dashboard.
Actual Results: (To be filled during testing) Status: (To be filled during testing) Environment:Google Chrome 127.0.0.1 on Windows 11
Tested By / Date:[Your Name], 2025-07-27
Tips for Writing Great Test Cases (Even as a Beginner)
Keep it Simple & Clear: Each step should be easy to understand and perform. Avoid long, complicated sentences.
Be Specific: Instead of "Go to website," write "Navigate to
www.example.com
." Instead of "Click button," write "Click 'Submit' button."One Action Per Step: Break down complex actions into multiple steps.
Make it Repeatable: Anyone following your steps should get the same result every time.
Test One Thing (Mostly): Focus each test case on checking one specific piece of functionality or one specific scenario.
Think Like a User (and a mischievous one!): Don't just follow the "happy path." What if the user types something wrong? What if they click buttons quickly?
Conclusion
Manual test case writing might seem like a lot of detail at first, but it's a foundational skill for anyone serious about software quality. It transforms random clicking into a structured, effective process, ensuring that every part of the software gets a thorough check.
Just like a good recipe guarantees delicious cookies, a good test case helps guarantee great software. So, grab your virtual pen and paper, and start writing those test cases – you're on your way to becoming a quality champion!
0 comments:
Post a Comment