Troubleshooting
Common issues and their solutions when using cargo-ninety-nine.
Installation Issues
no test runner available
error: no test runner available: install cargo-nextest or use cargo test
Cause: Neither cargo-nextest nor cargo test was found on the system PATH.
Solutions:
- Install cargo-nextest:
cargo install cargo-nextest - Verify Rust toolchain is installed:
rustup show - Ensure
~/.cargo/binis in your PATH
binary discovery failed
error: binary discovery failed: ...
Cause: cargo test --no-run failed to compile or list test binaries.
Solutions:
- Run
cargo test --no-runmanually to see the full compiler output - Fix any compilation errors in your project
- Ensure you are running from the project root (or use
--project-dir)
Configuration Issues
failed to parse config
error: failed to parse config: ...
Cause: The .ninety-nine.toml file contains invalid TOML syntax or unrecognized fields.
Solutions:
- Validate your TOML syntax: check for unclosed quotes, missing brackets, or incorrect indentation
- Re-generate a fresh config:
cargo ninety-nine init --force - Compare against the default config shown in the Configuration Reference
postgres backend selected but no config
error: invalid configuration: postgres backend selected but no [storage.postgres] config provided
Cause: storage.backend is set to "Postgres" but the [storage.postgres] section is missing.
Solution: Add the PostgreSQL configuration:
[storage]
backend = "Postgres"
[storage.postgres]
connection_string = "host=localhost dbname=ninety_nine user=postgres"
pool_size = 4
Test Execution Issues
Tests not discovered
Symptom: cargo ninety-nine test reports 0 tests found.
Causes and solutions:
- No test targets: Ensure your project has
#[test]functions or files intests/ - Filter too restrictive: Remove or widen your filter expression
- Wrong project directory: Use
--project-dir /path/to/project - Benchmark-only binaries: Only
#[test]functions are discovered, not benchmarks
Test timeouts
Symptom: Tests that normally pass are reported as Timeout.
Causes and solutions:
- Default timeout too low: The default is 300 seconds. For long-running tests, increase it in config:
[detection] # Timeout is controlled via the execution config - CI resource constraints: CI environments often have fewer resources. Check
memory_gbandcpu_countin the environment report - Test contention: Reduce
parallel_runsto lower resource contention:[detection] parallel_runs = 1
All tests show as flaky
Symptom: Every test gets a non-trivial flakiness score.
Causes and solutions:
- Too few iterations: With only a few runs, the Bayesian prior has outsized influence. Increase
min_runs:[detection] min_runs = 20 - Confidence threshold too low: Raise the threshold to require stronger evidence:
[detection] confidence_threshold = 0.99 - Systemic failures: If tests are failing due to environment issues (missing database, network), fix the root cause rather than tuning thresholds
Storage Issues
SQLite database locked
Symptom: storage error: database is locked
Causes and solutions:
- Concurrent access: Another
cargo-ninety-nineprocess may be running. WAL mode should handle most concurrent access, but heavy parallel writes can still lock - NFS/network filesystem: SQLite does not work reliably over network filesystems. Use a local path or switch to PostgreSQL
- Stale lock: If the process crashed, the lock file may remain. Delete
ninety-nine.db-walandninety-nine.db-shmnext to the database
PostgreSQL connection failures
Symptom: postgres storage error: connection refused or similar
Solutions:
- Verify PostgreSQL is running:
pg_isready - Check connection string format:
host=localhost port=5432 dbname=ninety_nine user=postgres password=... - Ensure the database exists:
createdb ninety_nine - Check network/firewall settings for remote connections
- Verify pool size is reasonable for your connection limits
Data retention and database size
Symptom: Database growing too large.
Solution: Configure retention_days to automatically purge old data:
[storage]
retention_days = 30 # default: 90
Data is purged at the end of each test run.
Filter DSL Issues
filter parse error
Symptom: error: filter parse error: ...
Common mistakes:
- Missing parentheses on predicates: Use
flaky()notflaky - Wrong operator syntax: Use
&for AND,|for OR,!for NOT - Unclosed parentheses: Ensure every
(has a matching) - Invalid regex in test(): The pattern must be a valid Rust regex
Valid examples:
flaky()
test(.*timeout.*)
package(auth) & !quarantined()
(flaky() | test(.*race.*)) & package(core)
CI Integration Issues
Workflow not triggering
Symptom: Generated CI workflow never runs.
Solutions:
- GitHub Actions: Ensure the workflow file is at
.github/workflows/. Check that scheduled triggers are on the default branch - GitLab CI: Ensure the pipeline is configured to run on schedules. Check that
rulesallow scheduled execution
CI environment not detected
Symptom: is_ci shows false in CI.
Cause: The CI provider’s environment variable is not set or not recognized.
Recognized variables:
| Variable | Provider |
|---|---|
GITHUB_ACTIONS | GitHub Actions |
GITLAB_CI | GitLab CI |
JENKINS_URL | Jenkins |
CIRCLECI | CircleCI |
TF_BUILD | Azure DevOps |
BUILDKITE | Buildkite |
Export Issues
Empty export files
Symptom: Export produces a file with no test data.
Cause: No flakiness scores have been computed yet.
Solution: Run cargo ninety-nine test at least once before exporting. Scores are computed and stored during the test run.
JUnit XML not recognized
Symptom: CI system does not parse the JUnit XML output.
Solution: Ensure the export path matches what your CI expects. For GitHub Actions:
- uses: dorny/test-reporter@v1
with:
artifact: ninety-nine-report
name: Flaky Tests
path: report.xml
reporter: java-junit
Getting More Information
Enable verbose output for detailed tracing:
cargo ninety-nine --verbose test
This sets the tracing subscriber to debug level, showing:
- Binary discovery details
- Test listing parsing
- Individual test execution results
- Storage operations
- Bayesian computation details