Notes
The idea
The software testing life cycle, or STLC, is the ordered set of phases that testing work moves through. Requirement analysis, test planning, test design, environment setup, test execution, and test closure, with defects looping back along the way. Each phase has entry criteria, which say when you are ready to start, activities, deliverables, and exit criteria, which say when it is done enough. The SDLC builds the product. The STLC runs alongside it and tests it.
- the ordered phases of testing
- work, each with: entry criteria: ready to start? activities: the work itself deliverables: what it produces exit criteria: done enough?
- the SDLC builds the product;
- the STLC tests it, alongside
Two vocabularies
You will meet two vocabularies. Many job ads and interviews use the six phases in this episode. The ISTQB syllabus, the common language of testing certificates, uses slightly different names: test analysis, test design, test implementation, test execution and test completion, plus planning, and monitoring and control running the whole time. The work is the same. Use whichever words your team uses, and know how they map, because interviewers mix them.
common STLC ISTQB v4.0 requirement test analysis analysis test planning test planning test design test design environment setup test implementation test execution test execution test closure test completion ISTQB adds monitoring and control, running all the way
Requirement analysis
Phase one, requirement analysis. You read the requirements and decide what can be tested. Take ShopRung rule price three: SAVE10 gives ten percent off when the subtotal is fifty dollars or more. It is testable, because the number is clear. You still ask questions. Does exactly fifty count? Yes, or more. Is free shipping judged before or after the discount? Rule price nine says after. The outputs are answered questions, a list of testable rules, and ideas about what to automate.
- rule: SAVE10 = 10% off when subtotal is $50.00 or more testable? yes: clear number
- questions: exactly $50.00 counts? yes free shipping before or after discount? after
- out: questions, testable rules, what to automate
Test planning
Phase two, test planning. The test plan answers practical questions. What is in scope, and what is deliberately left out? Which test levels and techniques will we use, and what is manual versus automated? Which environments and data do we need? Who does what, and by when? What could go wrong? And when do we start and stop? In an Agile team this is often a page or two. The thinking matters far more than the template.
- scope: in and out approach: levels, techniques, manual vs automated
- environments and test data
- roles and schedule
- risks and how to handle them
- entry and exit criteria
- a page or two is often enough
Plan by risk
You never have time to test everything equally, so plan by risk. Risk is roughly how likely something is to break, times how bad it would be. In ShopRung, coupons and totals touch money, so they get deep testing. Rule order seven, a customer must never see another customer's order, is a privacy risk, so it is high too. Search wording matters less. Money and privacy go first and deepest. This one habit makes a plan far better.
area risk depth coupons, totals high deep (PRICE-1..10) order privacy high deep (ORD-7) cart quantity med normal search wording low light money and privacy first
Test design
Phase three, test design. Each rule becomes test conditions, then concrete test cases with data, steps and expected results. Here is one for rule price three. Log in with an empty cart. Add two Green Build Mugs at fifteen dollars and one Ship It T-shirt at twenty. Apply the coupon in lower case. Expect a subtotal of fifty, a discount of five, shipping of four ninety nine, because forty five is below seventy five, and a total of forty nine ninety nine.
req: PRICE-3
pre: logged in, cart empty
steps: 1 add 2 x Green Build Mug
2 add 1 x Ship It T-Shirt
3 apply coupon "save10"
expect: subtotal $50.00
discount $5.00
shipping $4.99
total $49.99 Traceability
Design also produces a requirements traceability matrix, or RTM. It is a simple table that links each requirement to the test cases that check it, and their status. It answers two questions a manager will ask. Which rules have no tests at all? Here, search speed, rule search five, is a gap. And which rules are at risk right now? Price three has a failing test. A spreadsheet or a test management tool both work.
req test cases status
PRICE-3 TC-PRICE3-01..04 3 pass
1 fail
PRICE-9 TC-PRICE9-01..03 pass
ORD-7 TC-ORD7-01 pass
SRCH-5 none yet GAP
gaps show what is untested;
fails show what is at risk Environment setup
Phase four, environment setup. You need the right build, running, with known data. In ShopRung you start the app, call the reset endpoint so products and coupons are back to a known state, and check the health endpoint reports up, with the version you expect. Then a quick smoke test: log in, add to the cart, place one order. If the smoke test fails, stop. Testing a broken build wastes everyone's time.
start the build under test
POST /api/test/reset
-> known products, coupons
GET /api/health
-> {"status": "UP",
"version": "1.0.0"}
smoke: log in, add to cart,
place one order
smoke fails = stop, do not test Test execution
Phase five, test execution. Run each case, compare the expected result with the actual one, and record the result with evidence. Turn on ShopRung's coupon boundary bug and run our test. Expected, a five dollar discount. Actual, a four hundred error saying the coupon needs a subtotal of at least fifty dollars. That is a fail, so you raise a defect. Each case ends as passed, failed, blocked by something else, or not run.
TC-PRICE3-01
expected: discount $5.00
actual: 400 "This coupon needs
a subtotal of at least
$50.00"
result: FAIL -> defect raised
results: pass, fail, blocked,
not run The defect loop
Execution and defects form a loop. You report the defect, the developer fixes it, and a new build arrives. Then two different things happen. Confirmation testing, also called retesting, runs the failed case again to prove the fix works. Regression testing re-runs related cases, such as the other coupon and shipping rules, to check the fix did not break something nearby. Only then is the defect closed. Interviewers often ask for exactly this difference.
- confirmation testing (retest): run the failed case again on the new build
- regression testing: re-run the related cases, PRICE-4, PRICE-9, totals, to check nothing else broke
- then close the defect
Entry and exit criteria
Entry and exit criteria stop arguments before they start. Entry criteria for execution might be: the build is deployed, the smoke test passes, the cases are reviewed and the data is reset. Exit criteria might be: every high risk case has run, there are no open critical defects, and the product owner has accepted any known issues. Notice that exit criteria are not, every test passed. They say when the remaining risk is understood and accepted.
- entry to execution: build deployed, smoke passes test cases reviewed test data reset
- exit from execution: all high-risk cases run no open critical defects known issues accepted by the product owner
Test closure
Phase six, test closure, which ISTQB calls test completion. You write a short report: what was tested and what was not, the results, the open defects and their risk, where you changed the plan, and a clear recommendation. You keep the useful testware, such as cases, data and scripts, so the next release starts ahead. And you note lessons learned. A closure report a manager can read in two minutes is worth more than a long one.
- what was tested, and not results: run, pass, fail, blocked
- open defects and their risk
- deviations from the plan
- lessons learned
- testware kept: cases, data, scripts, environment notes
- recommendation: ship or not
STLC in a sprint
Does the STLC only fit Waterfall? No. In an Agile team the same phases happen for every story, just in hours instead of weeks. Story refinement is requirement analysis. Sprint planning covers test planning. Acceptance criteria and test ideas are written before coding, which is design. The pipeline and test environment handle setup. You execute as the story lands, and the sprint review and retrospective act as closure. Same thinking, smaller and faster.
- refinement → analysis
- sprint planning → planning
- before coding → design, acceptance criteria
- CI and test env → setup
- as the story lands → execute
- review and retro → closure
- same phases, smaller, faster
Rules of thumb
A few rules of thumb. Start analysis as soon as a requirement is written, not when the code arrives. Plan by risk, not by how many pages the plan has. Make every test trace back to a rule, so gaps are visible. Reset test data before each run, so results can be trusted. Always smoke test a new build before deeper testing. And define done as risk understood and accepted, not as one hundred percent passed.
- start analysis when the requirement is written, not when the code is
- plan by risk, not by page
- every test traces to a rule
- reset data before each run
- smoke test before testing
- exit = risk understood, not "100% passed"
Common mistakes
Common mistakes. Waiting for the build before doing any testing work, which throws away the cheapest phase. Writing a long plan that nobody reads. Having no traceability, so nobody can say what is untested. Testing on dirty, shared data, so failures cannot be reproduced. Retesting the fix but skipping regression, which lets a fix break its neighbours. And skipping closure, so the same lessons are learned again and again.
- starting to test only once the build arrives
- a long plan nobody reads
- no traceability: cannot say what is untested
- testing on dirty, shared data
- retesting the fix but skipping regression
- no closure: lessons lost
Say it like this
Interviewers ask, explain the STLC. Try this. It has six phases. I analyse the requirements and ask questions early. I plan by risk. I design test cases and link them to requirements in a traceability matrix. I set up a known environment and smoke test it. I execute, raise defects, and after each fix I retest and run regression. Then I close with a short report and lessons. In Agile, the same cycle repeats for every story.
- "Six phases: analyse the requirements, plan by risk, design cases with an RTM, set up a known environment and smoke test, execute with a defect loop of retest and regression, then close with a report. In Agile it repeats per story."