---
title: Testing Matrix
summary: Reference tables for test scope, dependencies, local and CI execution triggers, and passing criteria.
owners:
  - architecture-enabling-team
badges:
  - content: Reference
    backgroundColor: blue
    textColor: blue
---

For commands, filters, and troubleshooting, see [[doc|development/005-testing]]. Frontend-specific guidance is in [[doc|frontend/004-testing-and-quality-gates]].

## Test layers

| Layer                       | Scope                                                                                        | Dependencies                                              | Local trigger                                                                      | Pull request trigger                          | Nightly trigger | Pass criteria                                                            |
| :-------------------------- | :------------------------------------------------------------------------------------------- | :-------------------------------------------------------- | :--------------------------------------------------------------------------------- | :-------------------------------------------- | :-------------- | :----------------------------------------------------------------------- |
| Backend unit                | Nine service unit-test projects; domain and application behavior                             | In-memory doubles; no containers                          | `mise run test:unit`                                                               | Backend changes: Sonar analysis test job      | None scheduled  | All selected tests pass; no unexpected skips                             |
| Architecture                | Service boundaries, dependency direction, and structural conventions                         | In-memory reflection checks; no containers                | `mise run test:unit`                                                               | Backend changes: Sonar analysis test job      | None scheduled  | No architecture rules violated                                           |
| Message contracts           | Consumer message expectations and provider compatibility across seven contract-test projects | Generated Pact files and test doubles; no containers      | `mise run test:contracts`                                                          | Backend changes: Sonar analysis test job      | None scheduled  | Consumer contracts generate and all selected provider verifications pass |
| Backend integration         | Dedicated service tests against a composed backend and real dependencies                     | No dedicated `.IntegrationTests` projects currently exist | Not available                                                                      | Not configured                                | Not configured  | Not applicable until this layer is added                                 |
| Frontend unit and component | UI and client logic across the frontend applications                                         | Happy DOM, Testing Library, and MSW; no containers        | `bun run test` in the frontend workspace                                           | Frontend changes: affected test tasks         | None scheduled  | All affected tests pass                                                  |
| Frontend end-to-end         | Browser user journeys and accessibility assertions                                           | Playwright browser and an available target application    | `bun run e2e` when a journey changes                                               | Not run by the shared PR test job             | None scheduled  | Every selected journey and accessibility assertion passes                |
| Documentation               | MDX/frontmatter lint, formatting, fitness rules, and static build                            | Bun dependencies; no containers                           | `bun run check`, `bun run fitness`, `bun run build` in the documentation workspace | Documentation changes: documentation workflow | None scheduled  | All checks pass and the site builds                                      |

## Backend inventory

| Suite                  | Current scope                                             | Docker required |
| :--------------------- | :-------------------------------------------------------- | :-------------- |
| Unit tests             | Nine service test projects                                | No              |
| Architecture tests     | One repository-wide architecture suite                    | No              |
| Message contract tests | Seven contract-test projects; consumer and provider cases | No              |
| Integration tests      | No dedicated backend integration-test projects            | Not applicable  |

## Trigger notes

| Trigger      | What runs                                                                                                                                                 |
| :----------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Local        | Choose the task matching the changed layer; use targeted project or tree-node filters during iteration.                                                   |
| Pull request | Path-filtered CI runs applicable backend, frontend, or documentation checks. Backend test execution is part of the analysis workflow for backend changes. |
| Nightly      | No scheduled nightly run is configured for these test layers.                                                                                             |
