Skip to main content
Version: V2-Next

Test Levels & Matrix

This page describes the test levels and test types of CIVITAS/CORE and the mandatory tests for each component. It is part of the Testing Concept.

Test Levels​

Each level has its own purpose, owner, and pass or fail criteria.

Test levelPurposeTypical tools and artifactsPrimary environment
Unit testBusiness logic and small, isolated unitsJUnit, Mockito, VitestLocal, CI
API testEndpoints, status codes, and flowsBruno, HTTP clients, tests based on OpenAPILocal, CI
Integration testInteraction of several componentsTestcontainers, Docker Compose, real servicesLocal, CI
E2E (developer)Happy path with reusable preconditionsPlaywright, Bruno, test libraryLocal, CI, Develop
E2E (community) / UATReal functional processes, including side effectsCommunity use cases, manual testsStaging
System testThe platform as a wholeCI with VCluster, Robot FrameworkCI, VCluster
Security testVulnerabilities and misconfigurationsAutomated security checks, penetration testSecurity test environment
Usability testClarity and ease of useUX reviews, manual scenariosStaging, demo environment
Documentation reviewClarity and completeness of the documentationReview checklists, functional reviewInternal, community

Unit Tests​

Unit tests are the first line of defense. They are fast, need no external infrastructure, and test one functional or technical decision precisely. They are especially important for backend business logic, adapter logic, state machines and command builders, frontend component logic, and validation and transformation rules.

API Tests​

API tests check endpoints, payloads, response codes, and repeatable flows from a functional perspective. They do not replace integration tests that involve several components. The Bruno collections for the Portal Backend are in api/portal-backend in the civitas-core-platform repository.

Integration Tests​

Integration tests are most valuable where several systems interact:

  • Portal Backend and Config Adapter.
  • Frontend and authentication.
  • Backend and database.
  • Adapters and external target systems.
  • Orchestration and event handling.

They expose typical interface risks: incorrect payloads, unclear state transitions, incompatible versions, missing infrastructure assumptions, and incorrect assumptions about authentication or authorization.

Contract Tests​

Contract tests protect critical interfaces. They check the compatibility between producing and consuming systems before defects reach E2E or system tests. They verify the minimum expectations for payloads, status codes, fields, and error behavior. They are relevant for these interfaces:

  • Portal Backend and Config Adapter.
  • Frontend and Backend.
  • Backend and event or saga processing.
  • Adapters and external target systems.
  • Authentication and authorization.

System Tests​

System tests check the platform as a complete system. They show whether the parts work together, even when each part works on its own. CI with VCluster is the mandatory environment. It is isolated, reproducible, close to the real platform topology, and independent of lengthy manual setup.

System tests follow a Hero Case. It covers the CIVITAS/CORE feature set on the happy path. E2E tests cover side effects.

End-to-End Tests​

End-to-end tests have two parts because they pursue different goals. Both use a small set of core use cases: ideally one to three central ones that cover as many aspects of the platform as possible. New cases are added iteratively. Stable tests matter more than many tests.

Developer E2E: happy path with preconditions. The developer E2E suite covers the happy path. Developers can test a feature without setting up the full chain of preconditions by hand. The preconditions are provided automatically. When a feature is complete and stable, it becomes a precondition for the following tests. See Test Library.

Community E2E (Quality Assurance Working Group). The community E2E suite covers complete functional processes, including side effects. It is close to real use and therefore valuable for functional acceptance. The happy path alone is not enough: follow-on effects and interactions must be visible. The use cases come from the community, which defines the functionally relevant processes. The manual process is described in User Acceptance Tests.

Smoke Tests​

Smoke tests are short, fast stability checks. They show whether a build or a deployment is basically usable. They check that a new environment starts, that core services and connections work at a basic level, and they reveal obvious configuration errors early. They do not replace functional tests, but they must pass before deeper tests start.

Security Tests​

Security tests check the platform for vulnerabilities, misconfigurations, and unintended access:

  • Automated security checks.
  • Access control checks.
  • Configuration checks.
  • An external penetration test by Port Zero.

They run where real risks arise. They therefore cover the interaction of authentication, permissions, data access, and operational settings, not only individual components. For secure development practice, see the Secure Development Guide.

Documentation Review​

Documentation is part of the test strategy because it directly affects usability. A review checks functional correctness, sufficient completeness for the target audience, consistency with the implementation and the environment, and usability for the community and internal users.

Flaky Tests​

An unstable test is a quality defect. The target state handles flaky tests separately:

  • Identify unstable tests explicitly.
  • Analyze the root cause promptly.
  • Quarantine or deactivate a test only as a temporary measure.
  • Return the test to the regular run after the cause is fixed.
  • Check regularly for recurring instability.

This keeps the test pipeline meaningful.

Test Matrix by Component​

Each core component has an explicit test matrix. It is the reference for planning, implementation, and review, and it prevents implicit gaps in test coverage.

ComponentMandatory test typesQuality goal
portal-backendUnit, API, integration, and contract tests; system-level smoke checks; relevant E2E flow stepsCorrect business logic, stable API, robust persistence, correct integration with Config Adapter and authentication
portal-frontendUnit and component tests; authentication and backend contracts; Playwright E2E; selected community flowsStable user guidance, consistent interaction, correct authentication, reliable E2E flows
authzUnit and integration tests; Playwright E2E; permission contractsCorrect access decisions, stable role logic, reproducible 401/403 and permitted-access cases
config-adapterUnit tests; adapter integration tests; contract tests; saga state machine tests; orchestrated end-to-end scenariosDeterministic event processing, idempotent adapter logic, correct orchestration, reliable external integrations
model-forgeUnit tests; adapter integration tests; contract testsCorrect business logic, stable API, robust persistence, correct model handling
Deployment and infrastructureDeployment validation, smoke tests, system tests, connectivity checksStable deployment, reachable core components, correct connectivity, reliable operation

The mandatory environments for each component follow from Test Environments.