STLC in Software Testing: 6 Phases Explained With Example
On this page
- In short
- What is STLC in software testing?
- The six STLC phases at a glance
- One feature through all six phases: OTP login
- STLC vs SDLC: how they fit together
- Six phases or seven? How STLC maps to ISTQB
- Does STLC still apply in Agile?
- Hands-on: check exit criteria with a short Python script
- Common STLC mistakes freshers make
- What the official docs say
- STLC interview questions
- Frequently asked questions
- Your next step
- Sources
PassPython 3.13 on Linux, December 2026 (the exit criteria script below was run and its real output is shown).
STLC, the software testing life cycle, is the order of work a QA team follows for a release: understand the requirements, plan, write test cases, prepare the environment, run the tests, then close the cycle. Each phase has a clear starting point (entry criteria) and a finishing line (exit criteria). In this guide we take one feature, OTP login on a food-delivery app, through all six phases, so you can see what each phase actually produces and when you are allowed to move on.
In short
- STLC has six commonly taught phases: requirement analysis, test planning, test case development, test environment setup, test execution and test cycle closure.
- Every phase needs entry and exit criteria. Without them, “testing is done” becomes a feeling instead of a decision.
- ISTQB does not use the word STLC. Its Foundation syllabus describes a test process with seven groups of activities, which is where the “7 phases of STLC” question comes from.
- In Agile teams the phases still happen, but inside every sprint and often in parallel.
What is STLC in software testing?
Think of STLC as the testing half of a release. Developers follow the SDLC to build the feature; testers follow the STLC to find out whether that feature is fit to ship. It starts the moment requirements are available, not when the first build lands on your machine. That is the part freshers usually miss.
The six-phase model you see in most Indian training institutes and interview guides is a teaching model. It is useful because it gives every activity a name and an output. Real projects blur the lines: you might still be writing test cases while the environment is being set up, and that is fine as long as each phase has an owner and a clear “done” condition.
The six STLC phases at a glance
Here is the whole cycle on one screen. The entry and exit criteria below are practical examples we would use on a typical web or mobile project, not a fixed rule. Your test plan decides the real ones.
| Phase | Question it answers | Typical entry criteria | Typical exit criteria | Main output |
|---|---|---|---|---|
| 1. Requirement analysis | What can we test, and is it clear? | Requirement document or user stories shared | Doubts raised and answered, testable items listed | Requirement questions log, first draft of RTM |
| 2. Test planning | How, by whom, by when? | Requirements reviewed | Test plan reviewed and signed off | Test plan, effort estimate, risk list |
| 3. Test case development | Exactly what will we check? | Approved test plan | Test cases reviewed, test data ready, RTM updated | Test cases, test data, updated RTM |
| 4. Test environment setup | Where will we test? | Environment needs listed in the plan | Build deployed and smoke test passed | Ready test environment, smoke test result |
| 5. Test execution | Does the build behave as expected? | Test cases ready and environment stable | Exit criteria from the plan met, or risk accepted | Execution log, defect reports |
| 6. Test cycle closure | What did we learn, and can we release? | Execution finished | Closure report shared, testware archived | Test summary or completion report, lessons learned |
One feature through all six phases: OTP login
Definitions are easy to memorise and easy to forget. So let us follow a single, very common feature: a food-delivery app where users log in with their mobile number and a 6-digit OTP. This is an imaginary app; the details are the kind you would see in almost any Indian consumer app.

1. Requirement analysis
You read the user story and immediately start asking questions. How long is the OTP valid? How many wrong attempts before the account is locked, and for how long? Can the user ask for a new OTP, and after how many seconds? Does the app auto-read the SMS on Android? What happens with a +91 number typed with a leading zero?
None of this is “testing” in the clicking sense, yet this is where the cheapest bugs get caught. A missing answer here becomes an argument between developer and tester three weeks later. Log every question with the date and who answered it, and start your requirements traceability matrix so each requirement has an ID you can trace later.
2. Test planning
Now the test lead decides scope and approach. For OTP login, the plan might say: functional testing on Android and iOS, API checks on the send-OTP and verify-OTP endpoints, basic security checks for brute force and OTP reuse, and no load testing in this release. It names who does what, the devices, the timeline and the risks, for example “SMS delivery in the test environment depends on a third-party gateway”.
The plan is also where entry and exit criteria get written down. If you need a starting point, our test plan template has a section for both.
3. Test case development
This is where the questions from phase one turn into concrete checks: valid OTP, expired OTP, wrong OTP once, wrong OTP until lockout, resend before and after the timer, OTP from an older request, number with spaces, and so on. Each case gets an ID, steps, test data and an expected result. Peer review matters more than people admit, because a second tester will spot the scenario you never thought of. A ready test case template saves time here.
4. Test environment setup
Someone has to make sure the QA build is deployed, test mobile numbers can receive OTPs (or a fixed OTP is configured for test numbers), devices are available and logs are accessible. In many teams developers or DevOps own this, and testers verify it with a quick smoke test: can I open the app, enter a number and receive an OTP? If the smoke test fails, execution should not start. Running full regression on a broken environment only produces noise.
5. Test execution
You run the cases, mark each one pass, fail or blocked, and raise defects for failures with clear steps, build number and evidence. Fixed defects come back for retesting, and the areas around them get a regression pass. Our bug report template covers the fields developers usually ask for.
The tricky question in this phase is “when do we stop?” The honest answer: when the exit criteria in the plan are met, or when the product owner knowingly accepts the remaining risk. We automate that check later in this guide.
6. Test cycle closure
Once execution ends, the team writes a short closure report: what was tested, what was not, pass and fail numbers, open defects with severity, and what to do differently next time. Maybe the SMS gateway in the test environment was flaky for two days; that belongs in lessons learned so the next release plans for it. Testware such as test cases, data and scripts gets archived for reuse. A test summary report template keeps this to one or two pages.
STLC vs SDLC: how they fit together
SDLC is the life cycle of the product: requirements, design, development, testing, deployment and maintenance. STLC sits inside it and covers only the testing work. The overlap is the point. Testers start requirement analysis while developers are still in design, so by the time code arrives, test cases are already waiting.
| Aspect | SDLC | STLC |
|---|---|---|
| Goal | Build and deliver working software | Give evidence about quality and risk before release |
| Who drives it | Whole product team | QA team, with developers and product owners |
| Starts | With the business need | When requirements are available for review |
| Ends | When the product is retired | With test cycle closure for that release or sprint |
Six phases or seven? How STLC maps to ISTQB
Here is something most STLC articles skip. The ISTQB Foundation Level syllabus (v4.0.1) never uses the term STLC. It talks about a test process made of seven groups of activities: test planning, test monitoring and control, test analysis, test design, test implementation, test execution and test completion. It also says these activities are often carried out iteratively or in parallel rather than strictly one after another.
So if an interviewer asks “What are the 7 phases of STLC?”, they are most likely thinking of the ISTQB list. The two models describe the same work with different cuts:
| Common 6-phase STLC | ISTQB test activities (CTFL v4.0.1) |
|---|---|
| Requirement analysis | Test analysis (what to test) |
| Test planning | Test planning, plus test monitoring and control throughout |
| Test case development | Test design (how to test) |
| Test environment setup | Test implementation (testware and environment ready) |
| Test execution | Test execution |
| Test cycle closure | Test completion |
The one ISTQB activity with no separate phase in the six-phase model is monitoring and control. In practice it is the daily stand-up question “are we on track?”, and it runs across every phase. If you remember only one difference for an interview, remember that.
Does STLC still apply in Agile?
Yes, but it shrinks and repeats. In a two-week sprint, requirement analysis happens in backlog refinement, planning happens in sprint planning, test cases are written while the story is being developed, and closure is often a few lines in the sprint review instead of a formal report. The phases do not disappear; they get shorter and more frequent.
Our honest view: a heavy, document-first STLC slows small Agile teams down, and people end up writing test plans nobody reads. But skipping the thinking behind the phases is worse. A one-page plan and a checklist of exit criteria per sprint gives you most of the benefit for a fraction of the paperwork. Large banking or government projects with audits are different; there, the formal documents are often a requirement, not a choice.
Hands-on: check exit criteria with a short Python script
Exit criteria are only useful if someone checks them honestly. Here is a small script that reads test results and open defects for our OTP login cycle and tells you whether you can move from execution to closure. It uses only the Python standard library, so it runs on any machine with Python 3.
# exit_criteria_check.py
# Checks a test cycle's results against agreed exit criteria.
# Python 3 standard library only.
results = [
# (test case ID, status)
("TC_LOGIN_01", "pass"),
("TC_LOGIN_02", "pass"),
("TC_LOGIN_03", "fail"),
("TC_LOGIN_04", "pass"),
("TC_LOGIN_05", "blocked"),
("TC_LOGIN_06", "pass"),
("TC_LOGIN_07", "pass"),
("TC_LOGIN_08", "pass"),
("TC_LOGIN_09", "pass"),
("TC_LOGIN_10", "pass"),
]
open_defects = [
# (defect ID, severity)
("BUG-101", "critical"),
("BUG-102", "minor"),
]
exit_criteria = {
"min_executed_pct": 100, # every planned case must be run
"min_pass_pct": 95, # of the cases that were run
"max_open_critical": 0,
}
planned = len(results)
executed = [r for r in results if r[1] in ("pass", "fail")]
passed = [r for r in executed if r[1] == "pass"]
executed_pct = round(len(executed) / planned * 100, 1)
pass_pct = round(len(passed) / len(executed) * 100, 1)
open_critical = sum(1 for d in open_defects if d[1] == "critical")
checks = [
("Executed %", executed_pct, executed_pct >= exit_criteria["min_executed_pct"]),
("Pass % of executed", pass_pct, pass_pct >= exit_criteria["min_pass_pct"]),
("Open critical defects", open_critical, open_critical <= exit_criteria["max_open_critical"]),
]
for name, value, ok in checks:
print(f"{name:<24}{value:>8} {'OK' if ok else 'NOT MET'}")
if all(ok for _, _, ok in checks):
print("\nExit criteria met: move to test cycle closure.")
else:
print("\nExit criteria NOT met: stay in test execution or get a sign-off on the risk.")
Save it as exit_criteria_check.py and run it:
python3 exit_criteria_check.py
This is the real output we got:
Executed % 90.0 NOT MET
Pass % of executed 88.9 NOT MET
Open critical defects 1 NOT MET
Exit criteria NOT met: stay in test execution or get a sign-off on the risk.
All three checks fail here, and that is the useful part. One case is still blocked, one has failed, and a critical defect is open. The script does not decide whether to release. It turns a vague “testing is almost done” into three facts the team can discuss. Change the statuses or criteria and run it again to see how the result moves.
Common STLC mistakes freshers make
- Waiting for the build to start testing. Requirement analysis and test design should start as soon as stories are ready.
- No written exit criteria. Without them, the release date decides when testing ends, not the evidence.
- Treating the phases as a strict waterfall. Phases overlap in real projects. What matters is that each one has an owner and a finish line.
- Skipping the smoke test after environment setup. A full regression run on a broken build wastes a day and produces misleading results.
- Calling closure “just a report”. The lessons learned section is what makes the next cycle faster. Write it while the problems are fresh.
What the official docs say
ISTQB defines entry criteria as the conditions for officially starting a task, and exit criteria as the conditions for officially finishing one. A test process is, in their words, a set of test activities carried out to reach a test objective, and a test completion report evaluates the test items against the exit criteria at a completion milestone.
The ISTQB CTFL syllabus v4.0.1 (section 1.4) describes the seven activity groups covered above and lists typical work products, such as the test plan, schedule, risk register and entry and exit criteria from planning, and the completion report and lessons learned from completion. For a formal standard, ISO/IEC/IEEE 29119-2:2021 specifies generic test processes and says it applies to all software development lifecycle models.
STLC interview questions
- What is the difference between STLC and SDLC? SDLC covers building and maintaining the whole product; STLC covers the testing activities inside it, from requirement analysis to test closure.
- What are entry and exit criteria? Give an example. Conditions to start and finish a phase. Example exit criteria for execution: all planned cases run, no open critical defects.
- Which STLC phase finds the cheapest defects? Requirement analysis, because a wrong or unclear requirement can be fixed before any code is written.
- What is in a test closure report? Scope tested, results, open defects and their risk, deviations from the plan and lessons learned.
- Can STLC phases overlap? Yes. ISTQB notes that test activities are often done iteratively or in parallel, which is normal in Agile teams.
Want more practice? Try the ISTQB Foundation practice test on TesterPath.
Frequently asked questions
What is STLC in simple words?
STLC is the step-by-step order of testing work for a release. You understand the requirements, plan the testing, write test cases, prepare the environment, run the tests and then close the cycle with a report. Each step has conditions to start and finish, so the team knows when testing is really done.
What are the 6 phases of STLC?
The commonly taught phases are requirement analysis, test planning, test case development, test environment setup, test execution and test cycle closure. Some teams merge or rename them, and ISTQB describes the same work as seven groups of test activities, but these six names are what most interviewers in India expect.
What are the 7 phases of STLC?
This usually refers to the ISTQB Foundation syllabus, which lists test planning, monitoring and control, analysis, design, implementation, execution and completion. ISTQB calls this the test process rather than STLC. The extra item compared with the six-phase model is monitoring and control, which runs across all phases.
What are entry and exit criteria in STLC?
Entry criteria are the conditions that must be true before a phase starts, such as an approved test plan before writing test cases. Exit criteria are the conditions for finishing it, such as all planned tests run and no open critical defects. They are agreed in the test plan, not decided at the last minute.
Is STLC used in Agile projects?
Yes. The same activities happen inside each sprint, just in a shorter and lighter form. Analysis happens during backlog refinement, test cases are written while developers code the story, and closure may be a short note in the sprint review. Teams with audit needs still keep formal plans and reports.
Your next step
Pick one feature you are testing right now and write down, for each of the six phases, what you produced and what told you the phase was finished. If any phase has no clear output or no finish line, that is the gap to fix first. Then turn your notes into a proper plan using the TesterPath test plan template, and browse more fundamentals in our manual testing guides.
Sources
- ISTQB – Certified Tester Foundation Level Syllabus v4.0.1 (2024), section 1.4
- ISTQB Glossary – entry criteria (checked December 2026)
- ISTQB Glossary – exit criteria (checked December 2026)
- ISTQB Glossary – test process (checked December 2026)
- ISTQB Glossary – test completion report (checked December 2026)
- ISO – ISO/IEC/IEEE 29119-2:2021 Test processes (2021)
- Python Software Foundation – Python 3 documentation (2026)
Tools and features change often. Check the official documentation for the version you are using.
Test yourself on this topic
- Step 1 of the roadmap
- Software testing basics
- Test case design
- Bug reporting and defect tracking
- Types of testing
- Foundation practice test
The same four API checks written in both Postman and Playwright, with real output, so you can see exactly what…
Related guides
- Manual Testing Black Box vs White Box Testing: Differences with Examples Black box vs white box testing in plain words: one food-delivery coupon tested both ways, with real coverage output and the bug…
- Manual Testing UPI Payment Test Cases: How to Test a UPI Payment UPI payment test cases with examples: positive, negative, boundary and pending cases, sandbox test UPI IDs, and the RBI refund timelines to…
- Automation Chatbot Testing: How to Test AI and LLM Chatbots How to test AI and LLM chatbots: ready test cases with Indian examples, security checks from OWASP, and a Playwright suite you…