Integration tests cover critical workflows
Why it matters
Unit tests verify individual functions in isolation; they cannot catch bugs that only appear when multiple units interact — a misconfigured middleware, a mismatched API contract between frontend and backend, or an authentication check that passes locally but fails in a real browser session. ISO 25010:2011 §6.5.5 requires verification at the workflow level. For user-facing applications, the most costly bugs are the ones that break the critical path — signup, login, checkout — while all the unit tests are green.
Severity rationale
Medium because without integration tests, the most visible user-facing workflows — auth, data submission, core product actions — have no automated verification that they work end-to-end.
Remediation
Start with the most important user journey. For a web app with authentication, a Playwright test covers the full stack in one shot:
// tests/auth-flow.test.ts
import { test, expect } from '@playwright/test'
test('user can sign in and access dashboard', async ({ page }) => {
await page.goto('/login')
await page.fill('[name=email]', 'test@example.com')
await page.fill('[name=password]', 'testpassword')
await page.click('[type=submit]')
await expect(page).toHaveURL('/dashboard')
await expect(page.locator('h1')).toContainText('Welcome')
})
For API routes, use supertest or route-handler integration tests. Aim for at least three workflow-level tests covering: authentication, primary data submission, and the application's core action.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Code Quality Essentials Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- iso-25010:2011 · maintainability.testability — Maintainability — Testability
Taxons
History
- 2026-04-18·v1.0.0·Initial import from code-quality-essentials·automated