Testing
Testing
This chapter describes how AEE is verified.
Unit tests
The SQF physics models are mirrored in Python and validated with unittest. Six suites cover 170 tests across every module: ballistics, thermal (air density, WBGT, heat index, wind chill), mobility (SAE J1349 power, slip traction, Nash cascade, NRMM, compass), physiology (hypoxia TUC, UV), radio (Friis, ITU-R P.531), environmental (Q10 CBRN, Rothermel, Stefan), and atmos (LWC icing, CAPE, EDR, WMO trend). Each test covers reference values, edge cases (zero, extremes, clamp bounds), and monotonicity.
The single-command runner executes every suite plus the physics validation harness:
python3 tools/run_tests.py # full sweep
python3 tools/run_tests.py --fast # unit suites onlyThe unit tests run in the pre-commit hook, so a formula regression cannot be committed.
Server installation
The test needs an Arma 3 dedicated server installation. It is not bundled with the repository. The dedicated server is free to download:
steamcmd +login anonymous +force_install_dir <path> +app_update 233780 validatePoint the test at that installation with the ARMA3_SERVER_ROOT environment variable. Alternatively, copy or install the server into tests/docker/server (the default location). The script checks for the arma3server_x64 binary and stops with instructions if it is missing.
The container mounts the server directory read-write. The server writes its profile state to a tmpfs, so no root-owned files appear in the repository.
Headless dedicated-server test
The primary verification runs the mod on an Arma 3 dedicated server in Docker. It uses the brettmayson/arma3server image. The test mission aee_test.Stratis runs ten phases:
| Phase | Checks |
|---|---|
| 1 | Settings registered |
| 2 | Functions compiled and resolvable |
| 3 | Core state in physical ranges |
| 4 | Compat gating (no ACE3) |
| 5 | Determinism (temperature delta over 5 s) |
| 6 | Module coverage (state surface of every subsystem, 45 variables) |
| 7 | AI-unit dependent functions |
| 8 | Koppen classifier (17 biome codes) |
| 9 | Edge cases (boundary positions, nil/garbage inputs, extreme values, rapid state changes) |
| 10 | Performance gate (core functions within per-call budget: 1 ms on-demand, 5 ms for the 5 s update loop) |
tools/docker_test.shThe script builds the mod, assembles @aee, downloads CBA if needed, runs the server, captures the RPT output, and verifies the phase results.
Baseline comparison
Run once without the mod to compare mission boot and engine weather:
tools/docker_test.sh --baselineThe phases fail in the baseline because no AEE mod is loaded. That is the expected reference.
Map rotation
The --maps mode runs the mission on several worlds and asserts each resolves to its Koppen biome:
tools/docker_test.sh --maps| World | Expected biome |
|---|---|
| Stratis | Csa |
| Tanoa | Af |
| Enoch | Dfb |
Host-mod compatibility
The --hosts mode loads each supported host mod with AEE and asserts the compat integration produces state. Host mods are not committed to the repository; download them from the Steam Workshop and extract them into tests/docker/mods/:
| Host | Workshop folder | Workshop item |
|---|---|---|
| ACE3 | tests/docker/mods/@ace |
463939057 |
| ACRE2 | tests/docker/mods/@acre2 |
751965892 |
| TFAR | tests/docker/mods/@tfar |
894678801 |
| KAT Advanced Medical | tests/docker/mods/@kat_adv_medical |
2020940806 |
| ACM | tests/docker/mods/@acm |
333310405 |
tools/docker_test.sh --hostsThe mode reports a PASS or FAIL per host. Missing mods are listed instead of run.
ACM ships uppercase PBO filenames. The Arma Linux server canonicalises them to lowercase internally and then cannot open the uppercase file on a case-sensitive filesystem. The harness creates lowercase symlink aliases for the ACM PBOs before the host test, so ACM loads correctly on Linux.
Visual verification
The dedicated server has no renderer, so visual effects cannot be verified headless.
The dedicated server has no renderer. Visual effects (heat shimmer, HUD, particles, sound) are verified at the state-variable level in phase 6 and phase 7. Pixel-level visual QA needs a licensed game client.