dstest-0.1.5 is not a library.
dstest
Deterministic Simulation Testing for containerised services.
Write Lua scripts to define, control, and verify chaos experiments on Docker containers with reproducible fault injection.
Installation
From crates.io:
# Run a script file
# Or use REPL mode: type your script interactively, press Ctrl+D to execute
Or build from source:
Quick Start
# Run a script file
|
# Or use REPL mode: type your script and press Ctrl+D to run it
Overview
dstest lets you write Lua scripts that define test subjects (Docker containers), inject faults (pause, kill, resource deprivation), and verify service resilience. All experiments are deterministic when seeded, making them reproducible across runs.
Examples
httpbin.lua- HTTP analysis: status/body assertions, latency timing, fault recoverypg.lua- PostgreSQL lifecycle: connect, create table, insert, query, closeoracle.lua- Fault injection with oracle predicates and invariants
Documentation
See DOCS.md for the full Lua API reference.
AI Assistant Support
This repo includes an AI skill (SKILL.md) that teaches assistants how to work with dstest.
To use with your agent:
# Claude Code / Opencode
# Other agents (e.g., ~/.agents/skills/)
Then instruct your assistant to "use the dstest skill" when writing or debugging chaos experiments.
Requirements
- Docker daemon running
- Rust 1.85+ (uses 2024 edition)
License
MIT