# Testing

> Functional tests, test-count gates, and mutation testing.

Run the product's tests from a clone of [open-max](https://github.com/Max17190/open-max):

```sh
cargo test --workspace --locked
scripts/check-test-count.sh
```

## Functional tests and CI

CI runs functional tests under cargo-nextest and checks the test count on Linux and macOS. The count excludes ignored tests and has a separate floor for each platform. The scripts and [development reference](https://github.com/Max17190/open-max/blob/main/docs/development.md) record the current floors and targets.

The thesis tests check claims such as prompt size, process cleanup, and rendering cost. Tests that measure a bound print a `MEASURE` line. Read the test's conditions before comparing results across machines.

## Mutation testing

Scheduled and manual mutation runs make small changes to the code and check whether the tests catch them. These longer runs are separate from ordinary pull-request checks. A missed mutation identifies behavior the tests did not detect.

Start with a passing workspace test suite before running a targeted mutation check. The [testing reference](https://github.com/Max17190/open-max/blob/main/docs/testing.md) gives the commands, outcome definitions, score calculation, and instructions for reading a run.

See [Development](https://useopenmax.dev/docs/development) for the repository layout and build commands.
