0
0
Testing Fundamentalstesting~8 mins

Test case components (steps, expected, actual) in Testing Fundamentals - Framework Patterns

Choose your learning style9 modes available
Framework Mode - Test case components (steps, expected, actual)
Folder Structure for Test Cases
  test-cases/
  ├── login_tests/
  │   ├── login_valid_credentials.test
  │   └── login_invalid_password.test
  ├── checkout_tests/
  │   ├── add_to_cart.test
  │   └── payment_processing.test
  └── README.md
  

This folder holds test case files organized by feature or module.

Test Case Components Layers
  • Test Steps: Clear instructions to perform actions (like clicking buttons, entering data).
  • Expected Result: What should happen after each step (like a message appears, page loads).
  • Actual Result: What actually happened when the test was run (to compare with expected).

These components help testers follow and verify the test precisely.

Configuration Patterns for Test Cases

Test cases can be stored in simple text files, spreadsheets, or test management tools.

  • Use consistent templates for steps, expected, and actual results.
  • Include test case IDs for easy tracking.
  • Keep test data separate to reuse in multiple test cases.
Test Reporting and Tracking

After running tests, record the actual result and mark test as Pass or Fail.

  • Use test management tools or spreadsheets to log results.
  • Include notes for failures to help developers fix issues.
  • Integrate with CI/CD pipelines to run tests automatically and report results.
Best Practices for Test Case Components
  1. Write clear, simple steps anyone can follow.
  2. Define expected results precisely to avoid confusion.
  3. Record actual results immediately after test execution.
  4. Keep test cases independent and reusable.
  5. Review and update test cases regularly to keep them relevant.
Self Check Question

Where in the test case file would you add the expected result for a step?

Key Result
Test cases are structured with clear steps, expected results, and actual results for precise verification.