chaos
Seeded simulation fuzzer and device monkey with automatic bug shrinking.
Game-agnostic chaos and soak testing CLI that fuzzes headless game simulation drivers over JSON lines, shrinks failing input sequences to minimal repros, and drives real Android/iOS builds.
git clone https://github.com/BestRoiMedia/chaos.gitWhy we built it
Manual QA rarely catches rare state-machine edge cases or softlocks buried 300 frames into a run. We needed a single fuzzer that can hammer headless game logic at thousands of steps per second, shrink any failure down to a deterministic 4-step repro, and still fall back to real device taps when no headless driver exists.
Architecture & how it works
In SIM mode, chaos.py spawns a game's driver executable and exchanges newline-delimited JSON commands (hello, reset, step, quit) with weighted action selection and coverage key tracking. When a crash, timeout, or rule violation occurs, it delta-shrinks the input sequence into a replayable REPRO JSON. In DEVICE mode, it drives Android over adb or iOS simulators via launch files and an XCUITest monkey while scanning device logs for crash signatures.
Key capabilities
- Deterministic headless simulation fuzzing with seeded RNG and action weights
- Automatic delta shrinking of failing runs into minimal replayable REPRO files
- Cross-language driver kits for Swift, Kotlin, and C# plus an XCUITest iOS monkey
- Device mode supporting Android adb tap/drag regions and iOS simulator log scanning
- Single structured JSON verdict on stdout with PASS/WARN/FAIL exit codes
Usage example
python3 chaos/chaos.py run ./game/chaos.json --runs 200 --steps 400 --seed 42
python3 chaos/chaos.py replay ./game/Builds/chaos/repro_001.json
python3 chaos/chaos.py device ./game/chaos.json --platform android --minutes 5