Estimating test effort
How long the testing will take, asked at the worst possible moment. Breaking the work down, sizing it against something you have actually done before, and stating the assumption that would make the number wrong. Roughly right and explicit beats precise and quietly optimistic.
Test estimation is predicting how much effort the testing will take, usually before anyone knows quite what is being built.
Three techniques cover almost all real situations.
- Analogous estimation. Compare with something you have actually done. "The last payment feature took three days, this looks similar but simpler, so two."
- Three-point estimation. Give an optimistic, a likely and a pessimistic number, then weight them. It is honest about uncertainty instead of hiding it.
- Percentage of development effort. Testing takes a rough share of build effort, often a quarter to a third. Crude, and useful when nothing else is available.
The thing that makes an estimate useful is not the number. It is the assumption stated beside it, because that is what people can check and challenge.
The terms you will hear
- Analogous estimation. Estimating by comparison to past work. Also called comparative estimation.
- Three-point estimation. Optimistic, most likely and pessimistic, usually weighted (O + 4M + P) / 6.
- Percentage of development. Testing effort as a share of build effort.
- Buffer, or contingency. Deliberate slack for the unknown, stated openly rather than hidden inside tasks.
- Assumption. The condition your number depends on. The most valuable line in any estimate.
- Elapsed versus effort. Two days of work can take a week when you are waiting on data. Say which one you mean.
Why it matters
Because the number gets used whether it was any good or not.
For example, somebody asks in a planning meeting how long gift-card testing will take. You say a week, meaning a week of your effort, assuming the test data arrives on time. That becomes "testing is done next Friday" in a plan, the data arrives three days late, and the conversation on Friday is about testing being late.
Nothing about that is an estimation failure. It is an assumption that was never written down.
How to produce one in thirty minutes
- List the work, not the feature. Story testing, exploratory sessions, the regression pack, re-testing fixes, the summary. These have very different sizes.
- Size each piece against something real. The last comparable release, with the actual hours if you recorded them.
- Use a range where you are unsure. Two to four days is honest. Three days flat, when you mean two to four, is not.
- Add re-testing time explicitly. Fixes need re-running, and this is the line most people forget. A third of the story testing time is a reasonable start.
- State the assumptions. Data ready by a date, environment stable, no more than a handful of defects, nobody on leave.
- Say what would change it. "If the money maths turns out to be wrong, add two days." That sentence is what turns an estimate into a conversation.
- Record the actuals. Even roughly. The cycle log already has the timings, and two of those make your next estimate defensible.
An estimate without its assumptions is a number somebody else will use against you. With them, it is a plan you can revise in public.
A worked estimate
For example, here is one for the gift-card release, produced in about half an hour.
RELEASE gift cards, 6 stories ESTIMATED BY Priya, 24 August
BREAKDOWN COMPARISON OPT LIKELY PESS
story testing, 6 stories last release: 5 stories
took 2.5 days 2.0 2.5 4.0
exploratory, 3 charters 90 min each + writeup 0.5 0.75 1.0
regression pack, 84 cases last full run 3h40m 0.5 0.5 1.0
re-testing fixes last release: 6 defects,
half a day 0.25 0.5 1.5
summary and sign-off always about 2 hours 0.25 0.25 0.25
three-point total (O + 4M + P) / 6 = 4.6 days
rounded and stated as a range = 4.5 to 5 days effort
ELAPSED, NOT EFFORT
5 days effort, but Priya is on leave 2 and 3 September, so the
elapsed window is 1 to 4 September. That is why the plan moves the
regression pack to the 1st.
ASSUMPTIONS (the important half)
1 test data seeded by 31 August. Half a day late costs half a day.
2 feature complete on staging by 1 September.
3 no more than about 8 defects. Beyond that, re-testing grows fast.
4 the money maths is the risk. If partial redemption is wrong,
add 2 days.
WHAT ACTUALLY HAPPENED (recorded afterwards)
story testing 2.5 days, exploratory 0.75, regression 0.5,
re-testing 0.75 (6 defects, 2 needed two rounds), summary 0.25
total 4.75 days against an estimate of 4.5 to 5. data was half a
day late, exactly as assumption 1 predicted.The last block is what makes the next estimate credible. One recorded release turns estimation from a feeling into arithmetic, and the assumption that came true is the strongest argument you have for stating them.
How to show you know it
- A breakdown rather than a number. Five lines beats "about a week".
- A stated assumption that later came true. The most persuasive thing in this whole topic.
- A recorded actual against an estimate. Two of these and people start trusting your numbers.
- A range you refused to collapse. Holding "two to four days" under pressure is a professional skill, and it beats a precise number you cannot meet.
Questions
What if I have nothing to compare against?
Use percentage of development effort as a first pass, say plainly that it is a rough figure, and record the actuals so the next one is better. The first estimate on a new team is always the weakest.
How do I handle pressure to give one number?
Give the likely number and the assumption in the same sentence. "Three days, if the data is ready on Monday." That is one number and it protects you.
Should I include time for writing test cases?
Yes, and for writing the plan and the summary too. Documents are work, and leaving them out is a common reason estimates run over.
Do agile teams estimate testing separately?
Often not, because testing is inside the story points. You still need your own view of the testing effort, particularly for the regression cycle and the release work, which usually sit outside a story.