dstest-0.1.4 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:
Or build from source:
Quick Start
|
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
basic.lua- Minimal HTTP checksoracle.lua- Oracle predicates for automated verificationresponse-time.lua- Response time validationmulti-service.lua- Fault injection across multiple containersfault-accumulation.lua- Stacking faults without clearinghttp-assertions.lua- Custom HTTP status/body assertionsparameter-sweep.lua- Running experiments with different seedslogs.lua- Fetching and analyzing container logsinspect.lua- Container state verification after faultsexec.lua- Running commands inside containerstiming.lua- High-precision latency measurementstcp.lua- Testing non-HTTP service connectivity
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