Mikrom ships three categories of tests — Rust unit tests, Rust integration tests, and SvelteKit frontend tests — plus optional opt-in suites for NATS, PostgreSQL, and Ceph integration scenarios. All Rust test targets useDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/mikronita/mikrom/llms.txt
Use this file to discover all available pages before exploring further.
cargo-nextest for parallelism and structured output. The sections below describe how to run each category and what infrastructure each one requires.
Integration tests start Docker containers for Postgres and NATS automatically when you run
make test-integration. Make sure Docker is running and ports 5432 and 4223 are free before invoking that target.Make Targets
| Target | What it runs | Infrastructure needed |
|---|---|---|
make test | Unit tests across all workspace crates (--lib) | None |
make test-integration | Integration tests for mikrom-api (auth and app lifecycle) | Docker (Postgres + NATS test container) |
make test-all | All unit tests + all integration tests | Docker |
make test-verbose | Unit tests with --nocapture output | None |
make test-one NAME=<test> | Single test by name | None |
make test-cli | mikrom-cli unit tests only | None |
make test-coverage | Full suite with LLVM coverage report (requires cargo-llvm-cov) | None |
Running the Full Test Suite
Start Docker (for integration tests)
Make sure Docker is running. The integration test target manages the container lifecycle automatically, but Docker itself must be available:
Run unit tests
cargo nextest run --lib across the entire workspace. No database, no NATS, no Docker required.Run integration tests
postgres and nats-test from the test Docker Compose profile, then runs the integration_auth_tests and integration_app_lifecycle_tests test binaries in mikrom-api with TEST_NATS_URL=nats://localhost:4223.Rust Tests vs Frontend Tests
- Rust Tests
- Frontend Tests
Unit tests
Run all library unit tests without any external services:Integration tests
Integration tests formikrom-api require a live Postgres database and a NATS instance. The Makefile starts both automatically using the test Docker Compose profile:nats-test service runs on port 4223 (mapped from NATS internal port 4222) so it does not conflict with the development NATS instance on 4222.Opt-in NATS and PostgreSQL suites
Some integration tests are annotated#[ignore] and skipped in the standard runs. Enable them through the Dagger-backed ci-external-tests profile:Ceph integration tests
Agent RBD tests require a live Ceph cluster and are permanently ignored unless you explicitly opt in:API Test Database (TestDb)
mikrom-api repository tests and some handler tests use the TestDb helper defined in src/test_utils.rs. The helper:
- Creates an isolated ephemeral database named with a unique suffix per test binary.
- Runs all SQLx migrations against that database.
- Drops the database on teardown so tests do not accumulate state.
TEST_DATABASE_URL is not set):
docker-compose.yml uses credentials mikrom / mikrom_password and exposes port 5432, which matches the default TEST_DATABASE_URL exactly.
eBPF Validation
The eBPF program inmikrom-agent-ebpf is validated as part of make ci-full. No separate make target exists for eBPF-only validation — it is included in the release build step that ci-full runs after ci-fast. See CI Profiles for details.
NAT64/DNS64 Smoke Validation
Host and VM-level NAT64/DNS64 connectivity is validated through a manual checklist rather than an automated test suite. The checklist lives atdocs/nat64-dns64-smoke-checklist.md in the repository and covers:
- Host network namespace NAT64 forwarding rules
- DNS64 resolver responses for workload hostnames
- IPv4-mapped address reachability from inside a microVM
mikrom-network, mikrom-dns, or the microVM boot configuration.
Coverage Reports
Generate an HTML coverage report for the full workspace usingcargo-llvm-cov:
target/llvm-cov/html/index.html. Install the tool first if it is not present: