0
0
Testing Fundamentalstesting~6 mins

Test case components (steps, expected, actual) in Testing Fundamentals - Full Explanation

Choose your learning style9 modes available
Introduction
Imagine trying to check if a new phone app works correctly without a clear plan. You might miss important actions or misunderstand what should happen. Test case components help organize these checks clearly so anyone can follow and verify the app's behavior.
Explanation
Test Steps
Test steps are the exact actions you perform to check a feature. They guide you through what to do, like clicking buttons or entering data. Clear steps ensure anyone can repeat the test the same way.
Test steps provide a clear, repeatable path to test a feature.
Expected Result
The expected result describes what should happen after following the test steps. It sets the goal for the test, like showing a message or saving data correctly. This helps decide if the feature works as intended.
Expected results define the correct outcome to compare against.
Actual Result
The actual result is what really happens when you perform the test steps. It shows the real behavior of the feature. Comparing this with the expected result reveals if there is a problem or if the test passes.
Actual results show the real behavior to verify correctness.
Real World Analogy

Think of following a recipe to bake a cake. The test steps are the recipe instructions, the expected result is a delicious cake, and the actual result is the cake you actually bake. If the cake looks and tastes right, the recipe worked well.

Test Steps → Recipe instructions guiding each action in baking
Expected Result → The ideal cake described by the recipe
Actual Result → The cake you actually bake and taste
Diagram
Diagram
┌─────────────┐     ┌───────────────┐     ┌───────────────┐
│ Test Steps  │ ──▶ │ Expected      │ ──▶ │ Actual        │
│ (Actions)   │     │ Result        │     │ Result        │
└─────────────┘     └───────────────┘     └───────────────┘
       │                  │                   │
       └──────────────────┴───────────────────┘
                      Compare Results
Flow showing test steps leading to expected and actual results, which are then compared.
Key Facts
Test StepsDetailed actions performed to test a feature.
Expected ResultThe correct outcome anticipated after test steps.
Actual ResultThe real outcome observed after executing test steps.
Test CaseA document containing test steps, expected result, and actual result.
Test PassWhen actual result matches the expected result.
Common Confusions
Believing test steps alone prove a feature works.
Believing test steps alone prove a feature works. Test steps guide the test, but only comparing actual and expected results confirms success.
Assuming expected results are flexible or vague.
Assuming expected results are flexible or vague. Expected results must be clear and specific to accurately judge test outcomes.
Recording actual results before performing test steps.
Recording actual results before performing test steps. Actual results come only after executing test steps and observing behavior.
Summary
Test steps are clear actions to follow during testing to ensure consistency.
Expected results define what should happen to know if the feature works correctly.
Actual results show what really happens and are compared to expected results to find issues.