← All articles
Development · 9 min read

Shift-left in practice: testing in every sprint and every commit

Why late testing makes bugs expensive, and the exact pipeline we use so every change is checked within minutes.

In many projects testing starts when development is “finished”. A pile of bugs then appears right before the deadline, and the team chooses between delaying the release and shipping problems. Shift-left testing moves quality activities to the beginning of the process, so problems are found when they are cheapest to fix.

Why it pays off

A wrong assumption caught while discussing a requirement costs a five-minute conversation. The same assumption found by a customer costs a hotfix, support time, a release and sometimes lost revenue. The exact multiplier varies by project, but the direction never does: the later a defect is found, the more people and steps it touches.

What shift-left looks like in our sprints

WhenQA activity
Backlog refinementQA reviews user stories and asks “how will we test this?”; acceptance criteria are written down
DesignQA reviews mockups for states: empty, loading, error, long text, mobile
DevelopmentDevelopers write unit tests; QA prepares checklists and test data in parallel
Pull requestAutomated checks run; a second person reviews code and tests
Story doneQA tests the story on a preview environment, not at the end of the sprint
Before releaseAutomated regression + short exploratory session on risky areas

The pipeline

CommitLint + unitBuildAPI testsE2E smokeDeploy
Every commit goes through the same automated gates; a red gate stops the change.

Here is a simplified version of the CI workflow we use for web projects:

name: ci
on: [pull_request]
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with: { node-version: 20 }
      - run: npm ci
      - run: npm run lint
      - run: npm test -- --coverage        # unit tests
      - run: npm run build
      - run: npm run test:api              # API tests against a test DB
      - run: npx playwright install --with-deps
      - run: npx playwright test --grep @smoke

The whole run takes minutes, so developers get feedback while the change is still fresh in their heads. Longer suites (full end-to-end regression, visual and load tests) run nightly.

Definition of Done

  • Acceptance criteria met and checked by someone other than the author
  • Unit tests written for new logic; all automated checks green
  • Tested on supported browsers/devices for UI changes
  • No open critical or major bugs for the story
  • Docs and release notes updated
“Works on my machine” is not done. Done means tested, reviewed and releasable.

Keeping automated tests trustworthy

An automated suite that fails randomly is worse than none: people learn to ignore red builds. We fight flaky tests with stable selectors (roles and test IDs instead of CSS paths), explicit waits for conditions instead of fixed sleeps, isolated test data, and a rule that a flaky test is fixed or quarantined within a day.

The result

Fewer surprises before releases, predictable deadlines, and a product users can trust. That is why QA is part of our name and our process from the first day, not an extra service at the end.