Skip to content

Tests and checks ​

What CI runs ​

Every pull request must pass:

  1. Backend tests: domain, integration, architecture and plugin
  2. Admin panel: lint, typecheck, unit tests, end-to-end tests
  3. Client portal: lint, typecheck, unit tests

Backend tests ​

Run all backend tests inside the API container (from the docker/ directory):

bash
./scripts/manage.sh test

Five test projects:

Innovayse.Hostpanel.Domain.Tests: unit tests for domain logic.

Innovayse.Hostpanel.Integration.Tests: one file per use case at Integration.Tests/<Feature>/<UseCase>Tests.cs. UseCaseShapeTests fails if a use case handler has no matching test file. This suite starts its own database container, so no external database is needed. CI shards it across parallel runners; if you add a new top-level feature folder, add it to a shard in scripts/check-integration-shards.sh.

Innovayse.Hostpanel.Architecture.Tests: enforces structural rules:

Test classWhat it checks
PortPlacementTestsAll I<Port> interfaces are in Application/Common/Interfaces/
DatabaseIdentifierNamingTestsAll table, column and key names are PascalCase
UseCaseShapeTestsEvery handler has a matching integration test file
ResourceCoverageTestsEvery error code has a sentence in ErrorMessages.resx

ModelDiffBaselineTests lives in Integration.Tests/Persistence and checks that the EF model matches the latest migration.

Innovayse.CWP.Tests, Innovayse.Inecobank.Tests: tests for the bundled plugins.

Admin panel ​

Run from the admin/ directory:

bash
npm run lint
bash
npm run lint:i18n
bash
npm run typecheck
bash
npm test -- --maxWorkers=2
bash
npm run e2e

Client portal ​

Run from the client/ directory. On a laptop, limit test workers to 2 to avoid memory pressure.

bash
yarn lint
bash
yarn lint:i18n
bash
yarn typecheck
bash
yarn test --maxWorkers=2
bash
yarn e2e

The lint script includes the layer check (client/scripts/check-layers.mjs).

Before opening a pull request ​

  • Branch from develop, not from another feature branch.
  • Run the backend formatter. See rules/dotnet-format.md for the exact command.
  • Include tests for every change in the same pull request.
  • Follow the commit message style in rules/project.md.
  • See Contributing for the full pull request checklist.
Was this page helpful?

Released under the AGPL-3.0 License.