QA Interview Hub · Knowledge base · Quizzes · Українська

QA Fundamentals › Test documentation

How to estimate testing time: techniques and range

A testing time estimate is a forecast with uncertainty, not a promise, so a range and its assumptions are given. ISTQB CTFL 4.0 names four techniques: ratio-based, extrapolation, Wideband Delphi and three-point estimation. For three-point, the PERT expected value is (minimum + 4 × most likely + maximum) / 6. Retests and data preparation are underestimated most often. When an assumption breaks, the estimate is revisited instead of silently cutting testing.

QA Fundamentals · Documentation

At planning someone asks "how many days for testing". How much of the answer is calculation and how much hope?

A team plans a sprint and QA says "three days" for a task. A week later it turns out the requirements were incomplete, the first retest failed and the environment was down for a day. Three days became eight, and next time the manager no longer trusts QA's numbers. An estimate is needed for the test plan, but it must be built so that it can be explained, not just "felt". This lesson is about estimation techniques; the situation "the manager asks how long it takes" is covered in the situational questions chapter.

How it works and why. An estimate is a forecast with uncertainty, not a promise. ISTQB CTFL 4.0 names four techniques. Ratio-based: take the historical ratio of testing effort to development on similar projects and apply it to the new development. Extrapolation: from data gathered early in the current project (the part already done, the last iterations), forecast the rest. Wideband Delphi: several experts estimate independently, then discuss the differences openly and estimate again; in Agile a close variant is planning poker. Three-point estimate: for each piece of work give a minimum, a most likely and a maximum. All of them answer the same question: what data the number rests on. The more data, the narrower the range.

One number or a range

A guess

"Three days"

No breakdown and no assumptions. When requirements are incomplete the number breaks and the reason is invisible.

An estimate

2–12 days, expected 5

A breakdown into parts, a range and a list of assumptions the result depends on.

Figure 1. A range is not a weakness but honesty: it shows how far the estimate can be trusted.

Example: a three-point estimate. We take the PERT formula (applied to the three-point estimate), where the most likely value has weight 4:

a (min)         = 2 days
m (most likely) = 4 days
b (max)         = 12 days
E = (a + 4m + b) / 6
  = (2 + 16 + 12) / 6 = 5 days
spread ≈ (b - a) / 6 ≈ 1.7

The expected value is 5 days, but the spread shows that 3 and 7 are both realistic. So the manager is told not "five days" but "from two to twelve, we expect five if the requirements are ready by tomorrow and the environment is stable". The assumptions are recorded in the test plan: if one is broken, the estimate is revisited instead of being silently exceeded.

What usually goes into the work: requirements analysis and questions; test design and data preparation; execution; retests after fixes; regression of the affected area; reporting. Retests and data are most often underestimated: one cycle of fixes is rarely the last.

Limits and alternatives. No technique helps if there is no data: in a new domain the first estimate is always rough and is refined when a fact appears (extrapolation after the first day of execution). The "testing to development" ratio becomes wrong if the nature of the work changed (for example a lot of automation or, on the contrary, little new code but a lot of regression). Triangulation, that is comparing two ways (a breakdown into parts and the history of similar tasks), shows whether the estimate is plausible. An estimate must not be a bargain either: "we will do it in two days because the manager wants it" means it is no longer an estimate but a scope cut, and that is discussed directly: what exactly we are not checking.

Typical mistakes.

  • Naming one number with no range and no assumptions.
  • Not adding retests: the estimate covers only the first pass.
  • Estimating only your own testing and forgetting data preparation and waiting for the environment.
  • Adjusting the number to the manager's wish instead of cutting scope.
  • Not comparing the estimate with the fact after the task: without that the next estimate will not get better.

Check yourself

Three estimates in days: 2, 4 and 12. What does the PERT formula give and what must not be told to the manager?

Answer

The expected value (2 + 4·4 + 12) / 6 = 5 days. You must not say only "5 days": the maximum is twelve, so name the range and the assumptions the result depends on.

Two earlier similar tasks in this project took 3 and 5 days. Which technique do you use and how do you check the result?

Answer

Extrapolation from the current project data: about 4 days. I check it with a breakdown into parts: if the sum of the parts differs a lot, I look for what makes the task new. After finishing I compare the fact with the estimate and record the difference.

In an interview. Junior: I estimate testing by splitting the task into analysis, test design, execution, retests and regression, and comparing with how long similar tasks took. Middle/Senior: I give a range with a minimum, a most likely and a maximum, calculate the expected value with PERT and name the assumptions explicitly. For a team estimate I use Wideband Delphi or planning poker, and with history, extrapolation. An estimate is a forecast: when an assumption is broken I revisit it and say so, instead of silently shortening testing.

More articles in this chapter