Course outline: Foundations
Module 01 · Foundations
The software testing life cycle (STLC)
Six phases, from reading the requirements to closing the test cycle, with what goes in and what comes out of each one.
What you'll be able to do
- Tell a BRS, an FRS and an SRS apart, and say what a tester looks for in each.
- Walk a release through the six STLC phases, with what starts and what ends each one.
- Write entry and exit criteria that a team can check rather than argue about.
- Rank test work by risk, so the riskiest parts are tested first and deepest.
What is STLC?
STLC is a sequence of specific activities conducted during the testing process to ensure software quality goals are met. It involves both verification and validation activities. STLC is an integral part of SDLC but focuses solely on testing phases. It provides a step-by-step process to ensure quality software, starting as soon as requirements are defined. Early analysis and test case creation help reduce test cycle time and improve quality by finding bugs sooner.
Understanding Requirement Documents
Different documents capture requirements at various levels. Understanding their purpose is crucial for effective testing.
BRS (Business)
Created by the Business Analyst (BA) interacting with customers. Describes business rules, project scope, and client requirements in simple business language. Focuses on 'what' the business needs.
Example: "The Company would like to improve efficiency by tracking employee time spent on activities."
FRS (Functional)
Created by developers/engineers. Describes all functions the software must perform, detailing how components behave during user interaction. Focuses on 'how' a specific feature works step-by-step. Does not typically include use cases.
Example: "Enter Username: Textbox allowing registered email ID. Enter Password: Textbox, input masked ('*'). Submit Button: Validates credentials on click, shows 'Incorrect Username or Password' alert if invalid."
SRS (Software)
Created by the BA or System Analyst. Translates customer requirements (CRS/BRS) into a detailed document understandable by developers and testers. Describes how the software should be developed, including functional and non-functional requirements, and often includes use cases.
Example: "Proposed software modules: Login (authentication), Administrator (user/project management), Employee (effort entry), Reporting (admin reports, exportable)."
BRS vs FRS vs SRS Comparison
| Aspect | BRS | FRS | SRS |
|---|---|---|---|
| Full Name | Business Requirement Specification | Functional Requirement Specification | Software Requirement Specification |
| Deals With | Business requirements | Client requirements / Functionality | Company resources / System behavior |
| Use Cases | Not included | Not included | Included |
| Developed By | Business Analyst (BA) | Developers / Engineers | System Analyst |
| Focus | What the customer wants (broad) | Detailed page/feature functionality | Functional & non-functional requirements |
| Analogy | The 'Why' & 'What' (High-level) | The 'How' (Detailed steps) | The 'What' & 'How' (System view) |
STLC Phases
Click on each phase to explore its activities, deliverables, and specific details in this structured testing process.
1. Requirement Analysis
Test team studies requirements from a testing perspective to identify testable requirements. Interaction with stakeholders (Client, BA, Tech Leads, Architects) is key to understand functional and non-functional requirements.
Key Activities:
- Analyze requirements for testability.
- Identify types of tests to be performed.
- Gather details about testing priorities and focus.
- Prepare Requirement Traceability Matrix (RTM).
- Identify test environment details.
- Define area of stress and performance testing.
- Define procedures for data maintenance (backup, restore, validation).
- Review documentation.
- Catch ambiguous or unclear requirement criteria.
Deliverables: Requirement Traceability Matrix (RTM), Clarified Requirements
Requirement Traceability Matrix (RTM)
Links business requirements to functional requirements and test cases. Helps ensure all requirements are tested and track defects back to requirements.
Example from Cedar Books release 2.4: REQ-03 (one coupon code at checkout) is proved by TC-08 and TC-09. When TC-09 failed, the matrix showed at once which requirement was at risk, and BUG-07 traced straight back to REQ-03. The traceability matrix on the templates page has the whole example.
2. Test Planning
Creation of a detailed document outlining the test strategy, objectives, schedule, estimation, deliverables, and resources required. It serves as a blueprint for testing activities.
Key Activities:
- Analyze the product.
- Design the Test Strategy (Scope, Types, Risks, Logistics).
- Define Test Objectives.
- Define Test Criteria (Suspension & Exit Criteria).
- Resource Planning (Human, System).
- Plan Test Environment.
- Schedule & Estimation.
- Determine Test Deliverables.
Deliverables: Test Plan Document, Effort Estimation Document
Test Plan Elements (IEEE 829 Standard):
- Analyze the product (User, Purpose, Functionality, Tech Stack)
- Design the Test Strategy (Scope, Types, Risks, Logistics)
- Define the Test Objectives (Goals, Features to test)
- Define Test Criteria (Suspension Criteria, Exit Criteria)
- Resource Planning (Human, System resources)
- Plan Test Environment (Hardware, Software setup)
- Schedule & Estimation (Timelines, Effort)
- Determine Test Deliverables (Reports, Logs, Documents)
3. Test Case Development / Design
Creating detailed test cases and scenarios based on the test plan and requirements. This phase defines how testing will be performed.
Key Activities:
- Create test scenarios.
- Create test cases (steps, data, preconditions, expected results).
- Create/identify test data.
- Review and baseline test cases and scripts.
Deliverables: Test Cases, Test Scenarios, Test Data
Key Concepts:
- Test Scenario: Any functionality that can be tested (Test Condition/Possibility). Think from the end-user's perspective.
- Test Case: Set of actions, data, pre/postconditions to verify a specific feature against a requirement.
- Use Case: Description of how an end-user interacts with the system (designed by BA).
Test Case Parameters:
Best Practices for Writing Good Test Cases:
- Test only one thing at a time (atomic).
- Ensure clarity; avoid overlap or complexity.
- Cover both positive and negative scenarios.
- Use simple, easy-to-understand language.
- Use active voice (e.g., 'Click button', 'Enter data').
- Use exact and consistent names for UI elements.
- Accurate: Exacts the purpose.
- Economical: No unnecessary steps.
- Traceable: Links back to requirements.
- Repeatable: Can be executed multiple times consistently.
Test Case Review:
Why? To uncover errors, check completeness, ensure standards are followed.
Types: Self-Review, Peer Review, Lead Review, Client Review.
A short review checklist: each case traces to a requirement, tests one thing, names its exact test data, takes its expected result from the requirement, and can be run by someone else without asking a question.
4. Test Environment Setup
Setting up the software and hardware conditions for testing. This can be done in parallel with Test Case Development. Includes readiness checks (smoke testing) if the environment is provided.
Key Activities:
- Understand the required architecture, environment set-up.
- Prepare hardware and software requirement list for the Test Environment.
- Setup test Environment and test data.
- Perform smoke test on the build.
Deliverables: Test Environment Ready, Smoke Test Results
Typical Environments:
5. Test Execution
Testers execute the test cases based on the prepared test plans and test cases in the configured test environment. Defects are logged and tracked.
Key Activities:
- Execute tests as per plan.
- Document test results and log defects for failed cases.
- Map defects to test cases in RTM.
- Retest the defect fixes.
- Track the defects to closure.
Deliverables: Completed RTM with execution status, Test cases updated with results, Defect reports
6. Test Cycle Closure
Evaluating and documenting the testing process upon completion. Involves analyzing results, identifying lessons learned, and preparing final reports.
Key Activities:
- Evaluate cycle completion criteria (Time, Coverage, Cost, Quality, Business Objectives).
- Prepare test metrics based on the parameters.
- Document the learning from the project.
- Prepare Test Closure Report.
- Qualitative and quantitative reporting of the work product quality.
- Test result analysis (defect distribution by type and severity).
Deliverables: Test Closure Report, Test Metrics
Test Metrics:
Quantitative measures of quality (e.g., "Number of issues per thousand lines of code"). Used to track progress and quality.
Test Closure Report:
Summary document prepared before formally completing testing. Includes test execution summary, defect analysis (count, type, severity), lessons learned, etc.
Example: the test summary report on the templates page, filled in for Cedar Books release 2.4, shows 48 of 50 planned cases executed and 44 passed (a pass rate of 91.7%: passed divided by executed), the defects found, fixed and still open by severity, and each exit criterion with its evidence.
Worked example · Cedar Books
Release 2.4 through the six phases
Release 2.4 of Cedar Books, the Academy's practice shop, adds coupon codes and a one-page checkout. Its test plan (a worked example on the templates page) takes it through the six phases. Each phase has a condition to start (entry criteria) and a condition to end (exit criteria):
| Phase | Starts when | Work on release 2.4 | Ends when |
|---|---|---|---|
| 1. Requirement analysis | The SRS for 2.4 is shared | Read REQ-01 to REQ-08 for testability; ask what happens to a coupon when a book is removed; start the RTM | Each requirement is clear or has a question with an owner; the RTM is drafted |
| 2. Test planning | Requirements are clarified and the release date is known | Write the plan: scope, approach, environment, schedule, risks and roles | The QA lead and the product owner approve the plan (30 Nov) |
| 3. Test case development | The plan is approved | 1 to 4 Dec: scenarios and cases by partitions and boundary values; test data: accounts, coupons, test cards | Every requirement has at least one reviewed case in the RTM |
| 4. Environment setup (beside phase 3) | The list of hardware, software and access is ready | Staging with the release candidate, a copy of the catalogue and the payment sandbox; a smoke test on each new build | The candidate is on staging, its unit tests pass and the test data is loaded |
| 5. Test execution | Phase 4 is done and the smoke test passes | Cycle 1 (7 to 11 Dec), cycle 2 and regression (14 to 17 Dec): run cases, log bugs, retest fixes, update the RTM | Every planned case has run, or the report says why not |
| 6. Test cycle closure | Execution has finished | 18 Dec: check the exit criteria; write the test summary report and the lessons learned | Every Must requirement has a passed case, no critical or high defect is open, regression passes 100%, the checkout meets its Lighthouse targets |
The plan also says when to stop: if checkout or sign-in is broken for every user, or staging is down for more than two hours, testing is suspended, and it resumes on a build that fixes the cause, starting with a smoke test.
Written down before testing begins, entry and exit criteria end the argument at the end. On 18 Dec the team does not debate whether testing was "enough": it checks four lines.
Risk-based testing
There is never time to test everything equally (exhaustive testing is impossible), so test planning decides where the effort goes. Risk-based testing decides it by risk: how likely a problem is, times how much harm it would do. A risk that is both likely and harmful is tested first, with the most techniques, and kept in the regression suite. A risk that is unlikely and minor gets a quick check.
There are two kinds of risk. A product risk is something that could go wrong for the users: a wrong total, a lost order, a page nobody can use with a keyboard. A project risk is something that could stop the testing itself: an environment that is down, rules that change late, too few people. The test plan of release 2.4 lists project risks; here are the product risks of its checkout, scored with high = 3, medium = 2 and low = 1:
| Risk | Likelihood | Impact | Score | How much testing |
|---|---|---|---|---|
| A wrong amount charged after a coupon (REQ-03, REQ-04) | High (3): new code, many rules | High (3): money and trust | 9 | First: partitions, boundary values and a decision table; two exploratory sessions; automated for regression |
| A declined or slow payment handled wrongly (REQ-07) | Medium (2) | High (3) | 6 | Every test card, and a 10-second wait for the slow bank |
| The confirmation shows the wrong total (REQ-08) | Medium (2) | Medium (2) | 4 | A planned case for each requirement |
| Checkout not usable with a keyboard (NFR-02) | Medium (2) | Medium (2) | 4 | A planned keyboard pass of the whole checkout |
| An unclear message for an expired code (REQ-06) | Medium (2) | Low (1) | 2 | One case, run last |
The scores are a team's judgement, not a measurement: agree them with the product owner and the developers, and score again when something changes. The point is the order. When time runs short, the risks at the bottom of the table are the ones left untested, never the ones at the top.
Sign in to keep your progress: a tick here lives in this browser only.
Test yourself
Quiz: STLC
10 questions, about 8 minutes. Sign in to take the quiz.
10 questions, about 8 minutes, no time limit. 7 right answers pass, and passing marks the lesson as read. Every new quiz draws new questions.