4-Mastering Test Documentation - How to Write Bug Reports
Overview
This lecture covers test documentation fundamentals in QA, focusing on types of documentation (PRD, TRD), the creation and structure of test plans and test cases, and best practices for effective software testing.
Introduction & Importance of Test Documentation
- Test documentation is essential in QA to track and validate software features and issues.
- QA work is split between performing tests and documenting results for project visibility.
- Documentation ensures consistency and communication among QA, engineers, and stakeholders.
Product Requirements Document (PRD)
- The PRD describes how the product should function and outlines core features.
- Created by product managers/owners/business analysts; reviewed by developers for feasibility.
- PRDs include introductions, features/requirements, user roles, design mockups, and priorities.
- All test cases are based primarily on the PRD.
Technical Requirements Document (TRD)
- The TRD is produced by engineers, detailing system performance, environment, error handling, and technical constraints.
- TRDs address both positive and negative/exception scenarios, unlike PRDs which are often high level.
- TRDs are especially relevant for defining edge cases and technical details needed for certain tests.
Test Plans
- Test plans outline QA strategies, resources, tools, team roles, scope, risks, and schedules.
- They specify the kinds of testing performed (functional, non-functional, localization, etc.).
- Risks like scope creep and scheduling conflicts (e.g., holidays) should be documented.
Test Cases
- Test cases are the smallest elements of QA documentation.
- Every test case should include: Title, Precondition, Steps, and Expected Result.
- Titles should state the object, action, and condition being tested.
- Positive test cases check expected behavior; negative test cases check error/edge conditions.
- Test cases should be independent, clear, and detailed enough for others to execute accurately.
Supporting Tools & Best Practices
- Use tools like Google Sheets for draft test cases, then migrate to Test Rail (TCMS) for management.
- Requirement Traceability Matrix (RTM) ensures full coverage of all requirements.
- Confluence is used for documentation sharing across teams.
- Test case management systems provide tracking, statistics, and integration with bug reporting (e.g., Jira).
Practice: Writing Test Cases Without Documentation
- In interviews, expect to write test cases for everyday items (e.g., pens) without any PRD.
- Group test ideas by categories (functional, UI, performance, etc.).
- Always clarify the item and scenario before forming test cases.
Key Terms & Definitions
- PRD (Product Requirements Document) — Describes product functionality and features.
- TRD (Technical Requirements Document) — Details technical specifications and error handling.
- Test Case — A documented step-by-step check of a specific software feature.
- Test Plan — Document outlining the QA test strategy, scope, team, and schedule.
- RTM (Requirement Traceability Matrix) — Matrix linking requirements to test cases to ensure coverage.
- TCMS (Test Case Management System) — Software for organizing and tracking test cases (e.g., Test Rail).
- Confluence — A documentation collaboration tool.
- Positive/Negative Test Cases — Positive: verify correct behavior; Negative: verify error handling or restrictions.
Action Items / Next Steps
- Join the Slack channel for updates and collaboration.
- Review the provided slides and linked examples for pen/toaster/vending machine test cases.
- Complete the check-on-learning quiz in your LMS.
- Practice drafting test cases for basic login/registration scenarios and for real-world objects without documentation.