QA Engineer Interview Question

What is the test pyramid, and does it still hold up for how software is built today?

What the interviewer is probing, how to structure your answer, and a spoken example you can adapt.

Quick answer

The pyramid says have many fast unit tests, fewer integration tests, and a small number of end to end tests, because cost and flakiness rise as you move up while feedback speed drops. It still holds as a cost model. What has changed is that with distributed services the middle layer matters more, so contract and integration tests often deserve a bigger share than the classic shape suggests.

Why interviewers ask this

This is a strategy question, and the interviewer wants to know whether you can reason about test distribution rather than recite a diagram. A good answer explains why the shape exists (cost, speed, and reliability, not dogma) and shows you have an opinion about where it bends. Candidates who defend rigid percentages usually have not maintained a large suite through a redesign.

How to structure your answer

  • Describe each layer and its relative count.
  • Explain the cost and speed reasoning behind the shape.
  • Say where the shape bends for modern architectures.
  • Give your own rule for deciding which layer a test belongs in.

Example answer

Spoken example, first person

The shape comes from economics. A unit test runs in milliseconds, fails for exactly one reason, and almost never lies to you. An end to end test runs in minutes, depends on a browser, a network, and six services, and when it goes red you spend twenty minutes finding out whether the product is broken or the environment was. So you want lots of the cheap ones and only enough of the expensive ones to prove the pieces are wired together. Where I have seen the classic shape bend is on distributed systems. If a service is mostly orchestration, unit testing it heavily just tests your own mocks, so I push weight into integration and contract tests, which gives a shape closer to a diamond. My rule for placing a test is to ask what is the smallest thing that could break this behavior, and test at that level. If the risk is a calculation, unit. If the risk is two services disagreeing about a payload, contract. I keep end to end for a handful of journeys that must never silently break.

Walking into this interview soon? GhostPilot listens to your live call, spots the question the moment it is asked, and puts a structured answer on your screen in real time. Try it on your next mock, or grab a $29 Session Pass, no subscription, for the real thing.

See how it works

Follow-up questions to expect

  • How many end to end tests would you consider too many?
  • What is the ice cream cone anti pattern and how does a team end up there?
  • Where do contract tests sit in that model?

Related qa engineer questions

Your interviewer will ask their own version of this. Paste your actual job description into the free Question Predictor and get the 20 questions that role is most likely to ask, with what each one is really probing.

Predict my questions

Rehearse the hard questions before they are asked

Practise with a live copilot, then walk in ready. A $29 Session Pass gets you through the interview with no subscription and no lock-in.

Get GhostPilot