0
0
Testing Fundamentalstesting~8 mins

Test case writing in Testing Fundamentals - Framework Patterns

Choose your learning style9 modes available
Framework Mode - Test case writing
Folder Structure for Test Case Writing
project-root/
├── test-cases/
│   ├── login_tests.md
│   ├── signup_tests.md
│   └── profile_tests.md
├── test-data/
│   └── user_data.csv
├── test-reports/
│   └── report_2024_06_01.html
└── README.md

This simple structure organizes test cases as markdown files inside test-cases/. Test data is stored separately in test-data/. Reports go to test-reports/.

Test Case Writing Layers
  • Test Cases: Written in clear steps describing inputs, actions, and expected results.
  • Test Data: Sample data used in test cases, kept separate for easy updates.
  • Test Execution: Manual or automated running of test cases to verify software behavior.
  • Test Reporting: Documenting results of test execution, pass or fail.
  • Review & Maintenance: Regular updates to test cases to keep them relevant and accurate.
Configuration Patterns for Test Case Writing
  • Test Case Template: Use a consistent format for all test cases including fields like Test ID, Title, Preconditions, Steps, Expected Result, Actual Result, Status.
  • Environment Details: Specify software version, hardware, and environment setup in test case documentation.
  • Test Data Management: Keep test data in separate files or tables referenced by test cases.
  • Version Control: Store test cases in a version control system (like Git) to track changes over time.
Test Reporting and Integration
  • Test Execution Logs: Record pass/fail status and any defects found during test runs.
  • Summary Reports: Provide overview of test coverage, number of tests passed/failed, and critical issues.
  • Defect Linking: Connect failed test cases to bug tracking tools for easy follow-up.
  • Continuous Integration: Integrate test case execution results into CI pipelines for automated feedback.
Best Practices for Test Case Writing
  1. Clear and Simple Language: Write test steps so anyone can understand and follow them easily.
  2. One Action per Step: Keep each step focused on a single action to avoid confusion.
  3. Include Expected Results: Always state what should happen after each step to verify correctness.
  4. Reusable Test Cases: Design test cases that can be reused for different data or scenarios.
  5. Keep Test Cases Up-to-Date: Regularly review and update test cases to reflect software changes.
Self Check Question

Where in this folder structure would you add a new test case for verifying the password reset feature?

Key Result
Organize clear, simple test cases in dedicated folders with consistent templates and separate test data for easy maintenance and reporting.