Skip to main content
Built by Best ROI MediaMITWave 1 · LiveBestRoiMedia/chaos

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.

View on GitHub ↗
Quick clonegit clone https://github.com/BestRoiMedia/chaos.git
GitHub repositoryBestRoiMedia/chaos
Module path_tools/chaos/
LicenseMIT
Release waveWave 1
LanguagesPython · Swift · Kotlin · C#

Why 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

Run chaos soak test and replay a shrunk bugPython
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
Exit code 1 indicates a bug or rule violation was found; 0 indicates PASS/WARN.