Testing

[ AxiomCore · Documentation ]

Testing

Choose the right AxiomCore check, from offline contract validation to live request tests, simulations, UI suites and CI gates.

AxiomCore checks answer different questions: is the contract valid, does a running API meet its declared expectations, does a client handle every declared response, does managed logic retry and clean up correctly, and what does a change do to consumers. This page maps each question to a command and shows the loop that runs the same commands locally and in CI.

Choose a check

Need to checkCommandStatusGuide
Source, domain and security modelsaxiom check, axiom eval, axiom domain validate, axiom security checkAlphaCI checks
A running API against declared expectationsaxiom testAlphaContract tests
Managed retry, cancellation and expiry with logical timeaxiom scenarioExperimentalContract tests
A client without a live serviceaxiom mock --profile contractAlphaMocks
Managed server behavior with explicit fixturesaxiom serve --mock, axiom mockExperimentalServer simulation
Acore UI forms, queries, state and cleanupaxiom ui testAlphaFrontend tests
Consumer impact of a changeaxiom diff, axiom inspect diffAlphaCI checks

What each check proves

Each check exercises a different layer. Every one is useful; none replaces a real request through the backend and database, or a run on a mounted native target.

CheckRunsDoes not prove
Contract mockDeclared endpoint MockConfig responsesPrivate actions, guards or providers
Server simulationReal routing, authentication, guards, validation and transport, with fixture repliesNative or sandbox action bodies and production providers
Scenario (compiler-host)The compiled managed host with scripted read replies and logical timePersistence, transport or native OS behavior
UI application suite (compiler-host)Reference semantics, or the generated web and native adaptersA mounted browser, emulator or simulator
Browser database previewSimulated storage and historyNative migrations or persistence
axiom testLive HTTP and WebSocket requests to the suite's base URLAnything about targets it did not call

The local and CI validation loop

The same checks run before review and again in CI
The same checks run before review and again in CI
Diagram source
flowchart TD
  A[Edit source] --> B[Fast checks: eval, check, ui check]
  B --> C[Build the artifact]
  C --> D[Tests: axiom test, ui test, scenario]
  D --> E[Semantic diff and lock verification]
  E --> F[Open a pull request]
  F --> G[CI reruns the same commands]
  G --> H[Retain artifact, lock, diff and results]
  H --> I[Release in a separate authorized job]

Run the smallest check for what you changed, then the consumer check that can reveal integration failures. CI repeats exactly those commands with pinned versions, keeps the evidence, and only then lets a separate job release.

ChangeFast checkConsumer check
Contract sourceaxiom eval axiom.acoreaxiom build, axiom test, semantic diff
Domain semanticsaxiom domain validate axiom.acoreBuild and domain review
Security semanticsaxiom security check axiom.acoreStrict build or release gate where enabled
Acore UIaxiom ui check main.acore --target webaxiom ui test and a target host run
Contract lockaxiom contract verifyaxiom contract check-source main.acore
Package lockaxiom packages verifyPackage-backed source check or build
Database contractaxiom database check database/schema.acoreaxiom database status ... --check

Host-independent UI checks

Terminal
axiom run main.acore --target web --once
axiom run main.acore --target android --once
axiom run main.acore --target ios --once

--once compiles and exits, which suits CI machines without an emulator. It does not replace an emulator, simulator or browser interaction test.

Keep the evidence

  • Keep the source, dependency manifest, committed lock, semantic diff and test result that belong to the same candidate.
  • Reject a pipeline that pulls an unpinned latest package between checking and building.
  • Use synthetic data and test the relevant failure paths.
  • For an environment-specific failure, attach axiom doctor --json after reviewing the local project path it contains. Never attach credentials or secret-bearing runtime configuration.

Next steps