munotes®

The Software Testing Life Cycle, Phase by Phase

Get access to whole semester resourcesSemester Pass

Chapter Six

Syllabus topic Module 1, "Basics of software testing process"; the paired practical, "as per STLC process"

Pages 35 to 39 of 622

In one line

The software testing life cycle is the test process of Chapter Five cut into six phases, each with a clear start, a clear finish and a document to show for it, so that testing can be planned and tracked like any other project work.

In the wording a student can write in an examination: the software testing life cycle (STLC) is the sequence of phases through which testing proceeds in a project: requirement analysis, test planning, test case development, test environment set-up, test execution and test cycle closure. Each phase has entry criteria that must hold before it starts, exit criteria that must hold before it ends, and deliverables it produces.

Why the STLC exists, and what it is not

The previous chapter described the test process as the ISTQB syllabus and the ISO/IEC/IEEE 29119-2 standard describe it: groups of activities, often overlapping. A project manager, however, wants phases: something that starts on a date, finishes on a date, and hands over a document. The software testing life cycle is that project view of the same work, and it is how most companies and training courses in India describe testing. The paired practical of this paper uses it by name: a student prepares a test plan, test scenarios, test cases, a test execution report and a defect report "as per STLC process".

It is worth being exact about its status. No international standard defines the STLC. ISO/IEC/IEEE 29119-2 defines test processes and ISTQB defines test activities; the six phases below are the form industry uses, and independent descriptions of it agree closely on the phases and their order. Where they differ, it is in names (test case development is sometimes called test design) or in splitting one phase in two. An examination answer that gives the six phases, their entry and exit criteria and their deliverables, and says how they relate to the standard process, is complete.

The six phases

Phase 1: requirement analysis. The test team studies the requirements from a testing point of view: what is testable, what is ambiguous, what is missing, which requirements are non-functional (performance, security, usability), and where the risks lie. Questions go back to the business analysts and the users. For ExamReg, this is where the question of what a negative number of days late should mean was first asked.

Phase 2: test planning. The test lead defines the objectives, scope and approach, chooses manual or automated testing and the tools, estimates effort, time and cost, assigns roles, sets the entry and exit criteria for each later phase, identifies the deliverables and the risks, and has the test plan reviewed and approved. Chapter Eleven is about writing the test plan.

munotes.in35

The Software Testing Life Cycle, Phase by Phase

Phase 3: test case development. Test scenarios and test cases are written, with test data and expected results, and reviewed. The requirement traceability matrix is updated so every requirement maps to its test cases. Automated test scripts are written here too.

Phase 4: test environment set-up. The hardware, software, network, browsers, databases, test accounts and permissions are prepared, and the environment is checked, usually with a short smoke test that confirms the build installs and its main functions respond. This phase often runs in parallel with phase 3, and it is often run by a separate team.

Phase 5: test execution. The test cases are run as scheduled, results are compared with expected results and logged, failures are reported as defects with severity and priority, fixed defects are retested, and regression tests are run after fixes. Execution usually takes several test cycles, each on a new build.

Phase 6: test cycle closure. The team checks the exit criteria, prepares the test summary (or completion) report, makes sure every defect is closed or knowingly deferred, archives the testware, returns the environment, and holds a meeting on lessons learned.

Entry criteria, exit criteria and deliverables

The phases are made controllable by their criteria. ISO/IEC/IEEE 24765:2017 defines entry criteria as "states of being that have to be present before an effort can begin successfully" and exit criteria as those that "have to be present before an effort can end successfully". The table gives typical ones; a real test plan states them for its own project.

PhaseEntry criteria (typical)Exit criteria (typical)Deliverables
Requirement analysisRequirements document available; access to people who can answer questionsTestable requirements listed; questions answered or loggedRequirement review comments; list of testable requirements; first risk list
Test planningRequirements analysed; scope and timeline knownTest plan reviewed and signed offTest plan; effort and cost estimate; schedule
Test case developmentApproved test plan; stable requirementsTest cases written, reviewed and approved; traceability matrix completeTest scenarios; test cases; test data; automation scripts; traceability matrix
Test environment set-upEnvironment requirements known; build availableEnvironment ready and smoke test passedReady environment; smoke test result
Test executionApproved test cases; ready environment; build handed overPlanned tests run; exit thresholds met, for example no open critical defectTest logs; defect reports; execution reports each cycle
Test cycle closureExecution finished; exit criteria evaluatedReport signed off; testware archivedTest summary (completion) report; lessons learned

The six phases against the standard process

STLC phaseISTQB v4.0.1 activity (the basic test process, Chapter Five)ISO/IEC/IEEE 29119-2 process
Requirement analysisTest analysis (reviewing the test basis)Test design and implementation (its first part)
Test planningTest planningTest strategy and planning
Test case developmentTest design and test implementationTest design and implementation
Test environment set-upTest implementation (building the environment)Test environment set-up and maintenance
Test executionTest executionTest execution; test incident reporting
Test cycle closureTest completionTest completion
(throughout)Test monitoring and test controlTest monitoring and control
munotes.in36

The Software Testing Life Cycle, Phase by Phase

Read the table and one difference stands out. The STLC puts requirement analysis before planning, while ISTQB puts planning first and analysis after. In practice both happen together: a plan cannot be made without knowing what the requirements ask for, and the analysis cannot be complete without knowing the plan's scope. The last row matters too. Monitoring and control are not a phase of the STLC, but they run through all six, exactly as in the basic test process of Chapter Five.

Worked example: does execution exit?

ExamReg release 2.0 has 240 planned test cases, 40 of them critical, 80 high priority and 120 medium. The test plan's exit criteria for the execution phase are: every critical test has been run; at least 90 per cent of all planned tests have been run; at least 95 per cent of the tests run have passed; and no critical defect is open. After the first execution cycle the figures are as below, and the program checks each criterion.

planned = {"critical": 40, "high": 80, "medium": 120}
run     = {"critical": 40, "high": 78, "medium": 101}
passed  = {"critical": 38, "high": 72, "medium": 96}
open_defects = {"critical": 1, "major": 3, "minor": 7}

total_planned = sum(planned.values())
total_run = sum(run.values())
total_passed = sum(passed.values())
criteria = [
    ("every critical test run", run["critical"] == planned["critical"]),
    (f"at least 90% of planned tests run ({total_run} of {total_planned}, "
     f"{100 * total_run / total_planned:.1f}%)", total_run >= 0.90 * total_planned),
    (f"at least 95% of tests run passed ({total_passed} of {total_run}, "
     f"{100 * total_passed / total_run:.1f}%)", total_passed >= 0.95 * total_run),
    ("no critical defect open", open_defects["critical"] == 0),
]
for text, met in criteria:
    print(("met     " if met else "NOT MET ") + text)
print("execution phase may close:", all(met for _, met in criteria))
met     every critical test run
met     at least 90% of planned tests run (219 of 240, 91.2%)
NOT MET at least 95% of tests run passed (206 of 219, 94.1%)
NOT MET no critical defect open
execution phase may close: False

The phase does not close. Two criteria are met and two are not: the pass rate is just under the threshold, and one critical defect is still open. Test control now acts: the critical defect is fixed first, the failed tests are rerun on the next build, and a second cycle begins. Nobody argues about whether testing is finished, because the plan said in advance what finished means. That is the whole value of exit criteria.

munotes.in37

The Software Testing Life Cycle, Phase by Phase

The STLC inside the SDLC

The STLC is not a separate life cycle running beside development; it runs inside the software development life cycle (SDLC), which Module 1's second row covers from Chapter Thirteen. Its first two phases can begin as soon as requirements exist, long before code, which is principle 3 (early testing) in practice. In the V-model (Chapter Fifteen), each development phase on the left of the V has its test level on the right, and a complete STLC, from analysis to closure, can be run for each test level.

In agile development the six phases compress into each short iteration. Requirement analysis becomes refining a user story and its acceptance criteria, planning becomes the sprint's test tasks, case development and execution happen within the sprint, and closure becomes the sprint review and retrospective. The phases are still there; they are just two weeks long.

SDLCSTLC
PurposeTo build the softwareTo evaluate the software and find its defects
PhasesRequirements, design, implementation, testing, deployment, maintenanceRequirement analysis, test planning, test case development, environment set-up, execution, closure
Main outputThe working product and its documentsTest plan, test cases, logs, defect reports, completion report
RelationshipThe whole life cycleRuns inside it, starting as early as requirements

What it does not mean

The STLC is not an international standard. It is industry's phase view of the standard test process; ISO/IEC/IEEE 29119-2 and ISTQB define the process it describes.

The STLC does not make a product defect-free. Some descriptions give its objective as a defect-free product; no process can deliver that (principle 1, Chapter Four). Its objective is to find defects and give evidence about quality in a planned, controlled way.

The phases are not strictly sequential. Environment set-up usually overlaps case development, and execution runs in cycles with fixes between them.

The STLC phases are not test levels. Unit, integration, system and acceptance testing are levels (Chapter Thirty-Two); the STLC can be followed within any of them.

Quick revision

  • STLC: the phases testing goes through in a project; industry's view of the test process, not an international standard.
  • Six phases: requirement analysis, test planning, test case development, test environment set-up, test execution, test cycle closure.
  • Each has entry criteria (to begin), exit criteria (to end) and deliverables.
  • Deliverables: review comments; test plan; test cases, data, traceability matrix; ready environment and smoke test result; logs, defect reports, execution reports; summary report and lessons learned.
  • Maps onto ISTQB's activities and ISO/IEC/IEEE 29119-2's processes; monitoring and control run throughout.
  • Worked example: 219 of 240 tests run (91.25 per cent), 206 of them passed (about 94.1 per cent), one critical defect open, so execution does not exit.
  • In agile, all six phases happen inside each iteration.
munotes.in38

The Software Testing Life Cycle, Phase by Phase

Test yourself

1. What is the software testing life cycle? Name its phases. It is the sequence of phases through which testing proceeds in a project: requirement analysis, test planning, test case development, test environment set-up, test execution and test cycle closure, each with entry criteria, exit criteria and deliverables.

2. Define entry and exit criteria, with one example of each for test execution. Entry criteria are the conditions that must hold before a phase begins, such as approved test cases and an environment that has passed its smoke test. Exit criteria are those that must hold before it ends, such as every critical test run and no critical defect open.

3. What are the deliverables of test cycle closure? The test summary or completion report, confirmation that defects are closed or knowingly deferred, archived testware, the environment returned, and documented lessons learned.

4. How does the STLC relate to the SDLC? It runs inside the SDLC, as its testing thread. Its first phases can begin as soon as requirements exist, before any code, and in the V-model a full testing cycle can be run for each test level.

5. In the worked example, why could the execution phase not close? Two of its four exit criteria were not met: only 94.1 per cent of the tests run had passed against a threshold of 95 per cent, and one critical defect was still open.

6. Is it correct to say the objective of the STLC is a defect-free product? Justify. No. Testing can show the presence of defects but never their absence (principle 1), so no process can guarantee a defect-free product. The STLC's objective is to find defects and give evidence of quality in a planned and controlled way.

munotes.in39

The rest of this subject

These notes are cut from the University's printed syllabus. Open the syllabus itself, or the past papers, for the same subject.

Issue
Done!