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

QA Fundamentals › Processes and Agile

What is shift-left and how can QA give early feedback?

Shift-left means moving testing activities as early as possible in the life cycle, because a defect is cheaper to fix where it was introduced. QA reviews requirements and mockups, asks concrete questions at refinement, records the answers in acceptance criteria, prepares test ideas before the code and tests the API against its specification. It does not cancel later checks: shift-right complements it with production monitoring and gradual rollouts.

QA Fundamentals · Processes and Agile

Users found a requirements bug in production. Where could QA have spotted it much earlier?

The requirement says: "Transfer limit 50,000 UAH per day". The developer implemented "less than 50,000", the tests passed, and only in production did customers transferring exactly 50,000 get a decline. In the bug tracker the ticket looks like a code error, but in fact the requirement was ambiguous, and the question "inclusive or not" could have been asked in five minutes at refinement. This lesson is about shift-left: what it is, which QA actions belong to it and why it does not cancel later checks.

How it works and why. Shift-left means moving testing activities as early as possible in the development life cycle. The idea rests on an ISTQB testing principle: early testing saves time and money. A defect is born where the mistake was made (a requirement, a mockup, code), and the longer it lives, the more people and artefacts are built on it: code, tests, documentation, release plans. A fix at an early stage touches one paragraph of text, while a late one needs changes to code and tests, retesting and a release.

Where to look for defects

The cost of fixing a defect grows →SpecsDesignCodeTestsProdShift-left: look for defects earlierRequirement review, questions, AC, API before UI
Figure 1. The further right a defect is found, the more it costs to fix. Shift-left moves checks to the left, to where the defect is born.

What exactly QA does on the left is shown in the table:

ActivityWhenWhat it finds
Review of requirements and mockups (static testing)Before developmentAmbiguities, contradictions, gaps, unverifiable wording
Questions at refinement, acceptance criteria in Given/When/ThenBacklog refinementBoundary values, negative scenarios, undefined rules
A joint talk of PO, developer and QA about examples ("three amigos")Before codeDifferent people understanding one requirement differently
Test ideas and test cases before the code is readyIn parallel with developmentThe developer sees what will be checked and takes it into account
A testability review: logs, element ids, data, environmentDesign and developmentA feature that is hard to verify
API tests against the specification while there is no UIIn parallel with the backendContract and logic errors without UI influence
Review of unit tests, pair testing with a developerDuring developmentCoverage gaps, logic-level errors

Example: a requirement before and after QA's questions. The initial requirement and the questions QA asks while the code is not written yet:

Requirement (before): "Transfer limit: 50,000 UAH per day."

QA questions at refinement:
  1. "Per day": a calendar day or the last 24 hours? Which time zone?
  2. Is 50,000 inclusive? What about an amount of exactly 50,000.00?
  3. Do cancelled and declined transfers count towards the sum?
  4. A limit per user or per card?
  5. What does the user see on exceeding it: the text and the remaining limit?

The five questions take a few minutes of talking to the PO, and they close five potential bugs: a different reading of "day", the 50,000 boundary, counting of declined transfers, the level of the limit and the error text. After the answers the requirement becomes verifiable:

Requirement (after the PO's answers):
  - A limit of 50,000.00 UAH per user per calendar day (Kyiv time).
  - Only successful transfers count towards the sum.
  - A transfer after which the daily sum would exceed 50,000.00 is rejected.
  - Message: "Daily limit exceeded. Available: X UAH".

Test ideas before any code: 49,999.99, 50,000.00 (allowed),
50,000.01 (rejected); two transfers summing to 50,000.00; a transfer
at 23:59:59 and at 00:00:01; a declined transfer does not reduce the limit.

Now the developer implements the rule with the boundary in mind, and the test ideas give examples on which they can check themselves before handing over to QA. The defect "less than instead of less than or equal" is not born at all. The same question at the testing stage would require finding the bug, filing a report, fixing it, retesting and possibly shipping a hotfix.

Limits and alternatives. Shift-left does not cancel later checks. Some defects appear only at integration, under load, on real data or with real users, and cannot be found on paper. So next to it there is shift-right: monitoring in production, gradual rollouts (canary, feature flags), analysis of complaints and metrics. This is a complement, not a competition: on the left we prevent, on the right we quickly detect what still slipped through. There is also a risk of overdoing it: if QA reviews everything without exception, they become a bottleneck and the team stops thinking about quality on its own. It is better to teach the team to ask "how will we verify it?" and to share the checks: the developer writes unit tests, QA focuses on risks and scenarios. Finally, shift-left needs time for refinement and a PO who answers questions: without that the practice turns into an extra queue.

Common mistakes.

  • Waiting for a ready build before starting: questions about requirements then come on day eight, when resolving them is expensive.
  • Asking vague questions ("what if something goes wrong?") instead of concrete ones ("what about an amount of exactly 50,000.00?"): a concrete one can be answered in a minute.
  • Not recording the answers in acceptance criteria: an agreement made in conversation is forgotten, and the same dispute returns at testing.
  • Thinking shift-left is only writing test cases in advance: the core of it is early questions and the review of requirements, not a document.
  • Cancelling later testing "because we already checked the requirements": early checks reduce risk but do not guarantee the absence of defects in code and integration.
  • Ignoring shift-right: without monitoring in production, the defects that slipped through are found by users.

Check yourself

The team says: "There is no UI yet, nothing to test". Name three QA actions that can be done right now and what each gives.

Answer

Reviewing requirements and mockups: I find ambiguities and gaps before code. Test ideas and acceptance criteria: the developer sees the expected result and checks themselves. API tests against the specification or a mock server: I check logic and contract without the UI. I can also prepare test data and agree on the environment so that no time is lost once the build is ready.

Why does shift-left not mean "we test only at the start", and what complements it?

Answer

Because early checks find defects in requirements and design, but not those that arise at integration, under load or on real data. Later testing stages find those. It is complemented by shift-right: monitoring in production, gradual rollouts, analysis of complaints, which quickly reveal what slipped through.

In an interview. Junior: Shift-left is testing as early as possible. I review requirements and mockups before development, at refinement I ask about boundary and negative scenarios, write test cases in advance so the developer sees what will be checked, and test the API while there is no UI. Middle/Senior: A defect is cheaper where it is born, so at refinement I ask concrete things: what about the boundary amount, which time zone, what counts towards the limit. I record the answers in acceptance criteria and give the test ideas to the developer before the code. Shift-left does not cancel later stages: integration, load and trials on real data remain, and next to it I add shift-right (monitoring, feature flags, gradual rollouts). I make sure it does not turn QA into a bottleneck: the team itself should ask "how will we verify it?".

More articles in this chapter