Skip to content

AI Drafts, Testers Judge: Catching Bugs While the Fix Is Small

How we ship · 16 min read
By Dapton Technologies·Updated

Our QA flow, sprint by sprint: test plans, unit and feature tests in CI, Playwright journeys, exploratory, accessibility and speed checks, and evals for AI.

Most buyers meet testing at the very end. A build arrives, someone clicks around, and a long list of problems lands just before launch. By then every fix is expensive, and the launch date starts to slide.

We work the other way round. We test inside every sprint, so you see problems while a fix is still small. A sprint is a short, fixed block of work that ends with software you can try. Below is our QA (quality assurance) flow across a whole project.

For each phase: what we do, what you receive, and where AI helps or a person decides. The examples are illustrative, not client results.

Why test in every sprint instead of at the end?

Because a bug is cheapest to fix while the change is still fresh in someone's mind. A wrong rule caught in review is a small edit. The same rule found after launch means a support ticket, a hotfix and an awkward email to your customers.

So testing is part of each sprint's definition of done. A feature is finished when its tests pass, a tester has tried it, and the bugs found are closed or agreed with you. Code that merely compiles does not count.

QA across one sprint. The same seven steps repeat every sprint, so problems surface while the change is still fresh.

Step 1: How do we plan tests before any code is written?

We write a short test plan for each feature before it is built, tied to its acceptance criteria. AI drafts the first list of test ideas from those criteria, and a tester edits it.

An acceptance criterion is a rule that says when a feature is done. For example: 'A signed-in customer can apply one discount code per order.' Each criterion turns into one or more test cases. If a criterion is vague, we find out now, while changing it costs a conversation instead of a rebuild.

Our test plans are short and live in your repository or tracker, next to the work. Each one covers the same ground:

  • What this sprint covers, and what we are leaving out on purpose.
  • The risks, ranked. Money, sign-in, personal data and anything hard to undo go to the top.
  • The acceptance criteria, each linked to the test cases that prove it.
  • The browsers and devices we agreed with you, based on who actually uses your product.
  • The test data we need, such as a customer with an expired card or an order with many items.
  • Entry checks, meaning what must be true before testing starts, such as the feature running on staging.
  • Exit checks, meaning what must be true before the feature counts as done.

AI is good at the first draft. Given the criteria, it lists the happy path, the edge cases and the odd inputs. It suggests things people forget: an empty cart, a code typed in lower case, the same order open in two tabs. A tester then cuts the list, ranks it by risk and adds what only someone who knows your business would think of.

Here is one finished test case, written for this article.

test-case-TC-14.txt (illustrative)
Test case TC-14  (illustrative)
Feature:    Discount codes at checkout
Criterion:  One code per order; an expired code shows a clear message
Risk:       High (changes the amount charged)

Preconditions
  - Signed-in test customer with 2 items in the cart
  - Code SPRING10 active, code WINTER5 expired

Steps
  1. Open the cart and enter SPRING10
  2. Enter WINTER5 as a second code
  3. Remove SPRING10, then enter WINTER5 again

Expected
  1. Total drops by 10%; the code shows under the total
  2. "Only one code per order" message; total unchanged
  3. "This code has expired" message; full price shown

Runs on:    Chrome desktop, Safari on iPhone
Automated:  feature test + Playwright journey

The usual mistake is planning tests after the build. Then the tests describe what the code does, rather than what you asked for.

What you receive: a test plan you can read and comment on before the work starts.

Step 2: Which unit and feature tests block a bad merge?

Unit tests check the small rules inside the code, and feature tests check a whole feature with its data. Both run in CI on every change, and a failing test blocks the merge.

A unit test checks one small piece of logic on its own, such as how a price is rounded or who may edit an order. On JavaScript and TypeScript projects we use a runner such as Vitest or Jest. On other stacks we use that language's usual test runner.

A feature test, sometimes called an integration test, checks a feature together with its database and its API. Outside systems, such as a payment provider, get stand-ins called test doubles.

We spend test effort where a mistake would hurt most:

  • Prices, taxes, discounts and totals.
  • Permissions, meaning who can see and change what.
  • Dates, time zones and anything that runs on a schedule.
  • The rule behind every acceptance criterion.

We skip tests for trivial code, such as a function that only hands back a stored value. The practical test pyramid article on Martin Fowler's site makes the same case: test public behavior, and leave code without logic alone. We don't chase a coverage percentage either.

For screens, we follow Testing Library's idea: the closer a test is to real use, the more you can trust it. So a test finds a button by its label, clicks it and checks what the user sees.

How the CI gate works

CI, short for continuous integration, is a service that builds and tests every change automatically. Each change arrives as a pull request: a proposed edit that others review before it joins the main code. On GitHub we protect the main branch and mark our test jobs as required status checks. GitHub then refuses the merge until every required check has passed.

The CI gate. Checks run from fastest to slowest. One red check blocks the merge, and a green run still goes to an engineer.

The checks run fastest first, so a quick failure saves the slow ones. When everything is green, an engineer still reads the change for intent, risk and security.

AI-written tests get a reviewer

AI drafts many of our unit and feature tests. An engineer reviews each one before it joins the suite, and asks three questions. Does it check the rule in the acceptance criterion? Does it fail when the code is wrong? We break the code on purpose once to see it go red. And does it check behavior, or only repeat what the code already does?

The trap we avoid is a test nobody has seen fail. It can pass for years while checking nothing.

What you receive: tests in your repository, in the same pull request as the code they check, and a pass or fail on every change.

Step 3: How do we test APIs without touching real customer data?

We test each API on its own and add contract tests where two systems must agree. All of it runs on test data in separate environments, apart from your live customers.

An API is how two pieces of software talk, such as your app and its server. API tests send requests and check the replies. Is the data right? Does bad input get a clear error? Is a user without permission refused?

A contract test checks that two systems still agree on the shape of the messages between them. Pact, a popular open-source tool, works from the caller's side. The app that calls the API records what it expects, and the API is checked against that record. If the server team renames a field the app relies on, the test fails before release. We add contract tests when you have a mobile app, partner integrations or more than one team working on an API.

Test data is planned like code. We keep seed data, a starting set of fake customers, orders and products, in your repository. Any test environment can be reset to that known state. Each test creates the records it needs or starts from that state.

We also keep environments apart. Staging is a private copy of the live setup, and it is where release checks happen. Production is your live product, and real customer data stays there. When a bug only shows up with real data, we agree with you how to reproduce it safely, for example on a copy with names, emails and payment details removed.

What you receive: API and contract tests running in CI, staging access, and seed data in your repository.

Step 4: How do we keep Playwright browser tests stable?

We use Playwright to run your most important journeys in real browsers on every change. We keep the set small, keep each test independent, and treat a flaky test as a bug with an owner.

An end-to-end test drives the product the way a visitor does: open the page, fill in the form, press the button, check what appears. Playwright is an open-source tool from Microsoft. It runs these tests in Chromium, Firefox and WebKit, the engines behind Chrome, Firefox and Safari.

Browser tests are slower and harder to maintain than unit tests, so we choose them with care. We pick the journeys that must never break, for example:

  • Sign up, sign in and password reset.
  • Search, add to cart and checkout on a store, with the payment provider in test mode.
  • Creating, editing and sharing the main thing your product is for.
  • Any journey a past bug has broken.

Stable browser tests follow a few rules from Playwright's own best practices. Each test runs in a fresh browser context with its own cookies, storage and data. Tests find elements the way people do, by role and visible label. Checks wait for the page to reach the expected state instead of pausing for a fixed time. Third-party sites get prepared responses, because nobody controls their pop-ups.

What we do with a flaky test

A flaky test passes and fails on the same code. Google's testing team wrote that, even at their scale, new flaky tests appear about as fast as old ones get fixed. Martin Fowler warns that unchecked flaky tests can ruin a whole regression suite, because people stop trusting a red build.

In CI we allow one automatic retry and record a trace on it. A trace is Playwright's recording of the run: each step, the page, the network calls and the console. A test that only passes on a retry gets investigated. The usual causes are shared data, a missing wait, a slow outside service or a clock. If the fix has to wait, the test goes on a quarantine list with a named owner, and the list appears in the test report. We never delete a flaky test quietly, and we never let retries hide it.

AI-assisted repairs, approved by a person

Browser tests break when a button gets a new label or a step moves, even when nothing is wrong. Playwright now ships three test agents for this work. A planner explores the app and writes a test plan. A generator turns the plan into tests. A healer replays a failing test and proposes a fix. We use AI the same way.

A person reviews every repair. A test that repairs itself can also repair away a real bug. So every change to a test goes through a pull request. A tester checks that the test still proves what the acceptance criterion says, and we review every test that ends up skipped.

What you receive: browser journeys in your repository, run on every change, with traces for any failure.

Step 5: How does every fixed bug make the regression suite stronger?

Regression testing reruns earlier checks to make sure old features still work. Every bug we fix leaves a test behind, so the suite grows with your product.

It works like this. A bug is reported. Before the fix, the developer writes a test that reproduces it, and the test fails. Then they fix the cause, and the test passes. From then on it runs on every change, and if the mistake comes back, CI blocks it.

Illustrative counts. Tests written with new features grow the suite, and each fixed bug adds one more test that never goes away.

The fast part of the suite runs on every change. The full suite, including every browser journey on every agreed browser, runs before each release.

The mistake we avoid is fixing the symptom and moving on. Without a test, the bug can quietly return.

Step 6: Why does a person still test by hand?

Because scripts only check what someone told them to check. A tester who uses the product like a curious customer finds the problems nobody thought to write down.

Exploratory testing means learning about the product, designing tests and running them all at once. The tester picks the next move based on what the last one showed. We run it in sessions. Each session has a charter, a one-line mission, and a time box set in advance. An example charter: 'Explore checkout on a slow mobile connection to find where a customer could lose their order.'

After a session, the tester notes what they covered, what they found and what still worries them. Good finds become automated tests.

What our testers look for that scripts tend to miss:

  • Steps done out of order, done twice, or undone with the back button.
  • Odd input: very long names, accents and emoji, pasted text, a zero or a negative number.
  • A slow or dropped connection in the middle of a payment or an upload.
  • Small phones, large text settings, dark mode and a rotated screen.
  • Error messages that blame the user or don't say what to do next.
AI drafts, a person judges. AI takes the repetitive drafting, and people make every call about what counts as done.

AI helps here too. It suggests inputs to try and reads logs to point at the part of the system that failed. It cannot tell whether a screen feels confusing, or whether a message would worry your customer. That takes a person who understands who your users are.

What you receive: session notes, and every bug logged with steps to reproduce.

Step 7: How do we test accessibility beyond an automated scan?

An automated scan runs on every change, and before each release a person checks key pages with a keyboard and a screen reader. WCAG 2.2 is the standard we test against.

WCAG, the Web Content Accessibility Guidelines, comes from the W3C, the web's standards body. Version 2.2 added practical rules. Keyboard focus must not hide behind a sticky header. Buttons and links must be big enough, or spaced apart. Anything you drag needs a simple click alternative. Signing in must not depend on remembering or solving a puzzle.

The automated part runs axe-core, an open-source accessibility engine, inside our Playwright tests. It catches missing labels, low contrast, duplicate IDs and broken roles. Playwright's own documentation is clear that scans find only some problems, and that many can only be found by hand. The W3C says the same about evaluation tools in general.

So a person works through the key pages. First with the keyboard only. Can you reach every control, see where the focus is, and get out of every menu? Then with a screen reader such as VoiceOver or NVDA, on the screens that matter most. Do the headings make sense in order? Are errors read out? Does each button say what it does?

What you receive: the scan in CI, and each manual finding logged with its page, the WCAG rule it breaks and its fix.

Step 8: How do we make sure pages stay fast on real phones?

We run Lighthouse on key pages and check Core Web Vitals on real devices before each release. When a project expects heavy traffic, we add load checks too.

Lighthouse is Google's free audit tool. It scores a page for performance, accessibility, best practices and SEO. On web builds we target a Lighthouse score of 90 or more, and most of our sites score above 95.

Core Web Vitals are Google's three measures of how a page feels to use. Largest Contentful Paint measures loading. Interaction to Next Paint measures how quickly the page responds to a tap or click. Cumulative Layout Shift measures how much the page jumps around while it loads. Google's guidance is to judge each one at the 75th percentile of real visits, on mobile and desktop separately.

Lab scores and real visits often differ, so we also test on a mid-range phone with a slowed-down connection.

Load testing sends many simulated users at once to see where the system slows or fails. A sale launch or a ticket release usually needs it. We agree the target with you and run it on staging.

AI helps read performance traces and point at slow spots, such as an oversized image or a slow database query. A person decides which fix is worth making.

Step 9: How do we test AI features that never answer the same way twice?

We test AI features with evals: a set of real examples, a way to grade each answer, and a person who reviews samples. The evals run again on every prompt, model or data change.

An AI feature can answer differently each time, so an eval, short for evaluation, gives it a repeatable test. Anthropic's guidance starts with success criteria that are specific and measurable. OpenAI's guidance warns against what it calls "vibe-based evals", meaning a feature that merely seems to work.

  1. We collect real examples from your business: typical cases, hard cases and the ones that must never go wrong.
  2. For each example, we write down what a good answer looks like.
  3. We pick a grader for each check. Code checks what code can check, such as a format, a required field or a number. Another AI model, given a written rubric, grades tone and whether the answer is backed by your documents.
  4. A person grades a sample of answers, so we know the AI grader agrees with people.
  5. We agree the bar with you: how often it must be right before it goes live, and what it does when it is unsure. Usually it hands the case to a person.
  6. We run the evals on every change to the prompt, the model or the data, and compare each run with the last one.

We also test how AI features go wrong. Can someone hide an instruction in an uploaded document? Does it invent an answer when information is missing? Like Anthropic's engineers, we keep these cases in a regression set that must keep passing.

After launch we track answer quality, running cost and the cases handed to people. Bad answers from real use become new eval cases.

What you receive: the eval set in your repository, results for each change, and an eval report before go-live.

Step 10: What happens to a bug, and who says a release is ready?

Every bug we find is logged, owned, fixed and retested before it is closed, and each fixed bug gets a test so it cannot return. A release goes out only when the readiness checklist passes and a named person signs it off.

Triage: severity and owner

Triage means sorting new bugs by how much they hurt. Each bug gets steps to reproduce, what should happen, what did happen and a severity.

  • Critical means people cannot sign in, pay or save their work, or data is wrong or at risk. The release waits for the fix.
  • Major means a key flow works badly, such as a wrong total or a broken filter. We fix it before release unless you agree otherwise, with a workaround.
  • Minor means a cosmetic slip that stops nobody. Many are fixed at once. Some are scheduled for a later sprint, and we tell you which.

Every bug gets a named owner in the current sprint. The developer fixes the cause, not just the symptom, and adds the test that proves it. Then someone other than the developer retests the fix and the screens around it. Fresh eyes catch what the author's eyes skip.

Sometimes a minor bug ships as a known issue. That only happens when you agree to it. Known issues go in the release notes with a workaround and a plan.

The release gate

Before a release we run the full regression suite and a fixed checklist on staging. A named person on your project signs off, then the pipeline ships it.

An illustrative release readiness board. The release ships only after every check is ticked and a named person signs off.

Here is the release readiness checklist we work from. Your project may add items to it.

  1. Every acceptance criterion in the release has a passing test or a recorded manual check.
  2. Unit and feature tests pass in CI on the release build.
  3. The Playwright journeys pass on every agreed browser.
  4. No test is skipped or quarantined without a named owner and a reason in the report.
  5. API and contract tests pass against the release version of each service.
  6. The full regression suite has run, including every test added for a fixed bug.
  7. Exploratory sessions are done for each new feature, with notes attached.
  8. Key journeys are checked by hand on the agreed devices.
  9. The accessibility scan passes, and keyboard and screen-reader checks are done on key pages.
  10. Lighthouse and Core Web Vitals checks meet the agreed targets on key pages.
  11. Load checks pass, if the project needs them.
  12. AI features meet the agreed eval bar, and a person has reviewed a sample of answers.
  13. No critical or major bugs are open, unless you have agreed to a known issue.
  14. Database changes have been tried on staging, and there is a way to roll back.
  15. Error monitoring and alerts are switched on for the new release.
  16. Release notes list what changed, what was fixed and any known issues.
  17. A named person has signed off.

The test report you receive

With each release you get a short test report. It lists what ran, what passed, what we found and what is still open. It names the browsers and devices covered and who signed off.

Which testing mistakes cost teams the most?

Most expensive testing problems come from timing and trust: testing too late, and trusting checks nobody has looked at.

  • Testing only at the end. We test in every sprint instead.
  • Letting a retry turn a red build green. A test that only passes on a retry gets investigated.
  • Accepting AI-written tests unread. An engineer reviews every one.
  • Editing a test to make it pass. When a test fails, we fix the code. If the test itself was wrong, a reviewer agrees before it changes.
  • Treating a scan as an accessibility check. A person tests with a keyboard and a screen reader as well.
  • Shipping an AI feature on the strength of a demo. Evals run on real examples before go-live.

Common questions

Do you replace manual testers with AI?

No. AI takes the drafting and the repetitive checks off our testers' desks. They spend that time exploring, judging usability and checking accessibility. A person sets the severity of each bug and signs off each release.

Can testing guarantee my software has no bugs?

No honest team can promise that. Testing lowers risk and finds many problems early. Our commitment is about process. Every bug we find is logged, owned, fixed and retested before it is closed, and each fixed bug gets a test so it cannot return.

Who owns the tests when the project ends?

You do. The tests, test plans, seed data and CI setup live in your repository from the first sprint. Your next team can run them on day one.

Can you add testing to a product that has none?

Yes. We start with the journeys that would hurt most if they broke and put them under browser tests in CI. Then we add unit tests around the code you change next. Our AI code audit does this for products built quickly with AI tools or by a freelancer.

Want to see how this would work on your product? Tell us what you are building and what worries you most about the next release. We will walk you through the test plan we would start with.

Documentation and references

Software testingQA engineeringAI in testingManual testingTest automationAccessibility testing
Need help building this for your product?

Working with Software testing and QA engineering? Tell us what you’re building and our engineers will tell you how they would approach it.

Talk to our team →

More from the blog