Menu

Strategy

The Developer Changed the Feature. Who Fixes the Test?

If the developer who changed the behaviour does not fix the broken test in the same pull request, you do not have a test suite. You have a backlog with a CI badge.

6 min read

Engraving: a hoodie-wearing DEV robot strolls whistling out of a door marked MERGED with a FEATURE v2 flag over its shoulder, past a toppled, sparking test robot and a NOT MY TEST sign, while a weary QA robot trudges in with a wrench and a long FIX TESTS (14) ticket; an inset shows the PR checklist with tests updated left unticked.
On this page
  1. Why “QA fixes the tests” feels efficient
  2. What actually happens when the fix is somebody else’s job
  3. Not every red test means the same thing
  4. The rule, and how to make it stick
  5. Where I would bend the rule
  6. Key takeaways

A few years ago I watched fourteen end-to-end tests stay red for nine days.

Nobody broke them by accident. On a Friday, the checkout got a redesign. Shipping options moved into a drawer, the “Continue” button became “Review order”, and the feature was merged, demoed and applauded in the sprint review. The pull request description said “UI update, no functional change”.

On Monday morning the ticket was on my board. Title: “Fix flaky checkout tests”.

They were not flaky. They were the most honest thing in the building. They were reporting, very loudly, that the checkout behaved differently than it did on Friday. And the one person who knew exactly what had changed, and why, was already two tickets further down the sprint.

I fixed them. It took me most of a week, because I had to reverse-engineer every change from a diff, a Figma file and a Slack thread. On day six, a fifteenth test went red. Everyone assumed it was “more of the checkout stuff”. It was a real bug: the shipping cost was no longer added to the total. It reached production.

That week changed how I run every team since. Whoever changes the behaviour fixes the test, in the same pull request. QA owns how the suite is designed. QA does not own everybody else’s cleanup.

Why “QA fixes the tests” feels efficient

I understand why teams end up here. It looks sensible on paper.

The QA engineer wrote the tests, so they know them best. The developer is “expensive” and should be building features. E2E tests are slow and painful to run locally, so asking developers to touch them feels like friction. And splitting the work gives a nice clean handover: dev builds, QA verifies.

All of that is true for about two sprints.

Then the math changes. The developer spent the time to understand the change once. The QA engineer now has to reverse-engineer it from a diff, a Figma file and a Slack thread, then guess whether the new behaviour is intended. That is the same work, done twice, by the person with less context, days later.

What actually happens when the fix is somebody else’s job

The broken tests do not stay broken for an hour. They stay broken for days. And while they are red, three things happen.

First, the pipeline learns to lie. Someone marks the tests as skipped “for now”, or adds a retry, or the team simply starts merging on red because “those are the checkout ones, they’re always red”. Every one of those is a decision to stop listening.

Second, real defects hide in the noise. If fourteen tests are already failing, the fifteenth failure, the one that is an actual bug, looks exactly like the other fourteen. Nobody notices until a customer does.

Third, QA turns into a repair shop. The person who should be thinking about risk, coverage and test design spends their week updating selectors and renamed button labels. That is not quality engineering. That is janitorial work with a nicer job title.

Not every red test means the same thing

“The developer fixes it” needs one refinement, because a failing test after a change can mean three different things.

What happened Example Who acts When
Intentional change Button renamed, step moved into a drawer The developer who made the change In the same pull request
Product defect Shipping cost no longer added to the total The developer, with the test as the bug report Before merge, it blocks
Unreliable test or environment Timeout on a shared staging service QA or the test platform owner Tracked, time-boxed, visible

Only the third row is genuinely QA’s problem. In my experience it is also the smallest row. Most “the tests broke again” moments are row one, and row one has an obvious owner.

The rule, and how to make it stick

A rule only works if it is written down where people trip over it. Three changes do most of the work.

  1. Put it in the Definition of Done: “Automated tests affected by the change are updated in the same pull request and pass.”

  2. Make the affected E2E tests run on the pull request, not only nightly. If the developer only finds out on Tuesday morning, you have already lost.

  3. Make the tests easy to fix. Readable test names, stable locators, one command to run a single spec locally. If fixing a test needs a QA engineer to translate it, the problem is the suite, and that one is on QA.

That last point matters. Telling developers to own test fixes while handing them a suite only its author can read is not ownership. It is punishment. The QA side of the deal is to build tests that a developer can understand in five minutes.

And QA does not disappear from the pull request. QA reviews the test change. Did the developer update the expectation because the behaviour changed on purpose, or did they just make the red go away? That review is where QA’s judgement is actually worth something.

The developer fixes the test in the same pull request

Advantages

  • The person with full context does the work, once
  • The pipeline stays trustworthy, so real failures stand out
  • QA time goes to test design and risk, not selector updates
  • Developers learn what the suite actually protects

Costs

  • Pull requests take longer at first, especially for UI changes
  • Requires a suite developers can run and read locally
  • QA has to review test changes, or expectations get bent to fit the code
  • Needs a real exception path for genuinely flaky infrastructure

Where I would bend the rule

There are honest exceptions. A big redesign that breaks half the suite at once can be split: the developer ships the feature behind a flag, and the test rework happens as a planned, owned task before the flag flips. Planned, owned and finished before release. Not “someone will get to it”.

And if your E2E suite takes forty minutes and cannot run on a laptop, fix that first. You cannot ask people to own something they cannot run. But that is a reason to fix the suite, not a reason to keep the handover.

Decision

The call

The developer who changes the behaviour updates the affected tests in the same pull request. QA reviews the test change, owns the test design and the flaky-infrastructure path, and makes the suite readable enough that this is a reasonable thing to ask.

Key takeaways

Key takeaways

  • A test that fails after an intentional change is an unfinished pull request, not a QA ticket.
  • Whoever changes the behaviour has the context to fix the test. Handing it to someone else doubles the work and delays it by days.
  • Separate intentional change, product defect and unreliable test. Only the last one belongs to QA.
  • Write the rule into the Definition of Done and run affected tests on the pull request.
  • QA’s side of the deal: a suite developers can read, run and fix in minutes, and a review of every changed expectation.

So, in your team: when the feature changes and the tests go red, whose board does the ticket land on?

Enjoyed this? Get the next one by email.

Subscribe to newsletter