simulation/README.md
Simulation tests are black box tests that validate complex multi-component scenarios against a Cadence cluster. They enable systematic testing of workflows that would otherwise require manual sanity checks.
Each suite of simulation tests:
See individual subdirectory READMEs for specific test details.
Running the tests requires that the developer has
# Run a basic replication test
./simulation/replication/run.sh --scenario default
# Run a matching performance test
./simulation/matching/run.sh --scenario throughput
# Run a history analysis test
./simulation/history/run.sh --scenario default
Some contributors may require a custom dockerfile to be passed to allow the simulation tests to build locally.
Add your dockerfile to docker/github_actions/ with a custom suffix, and then pass the --dockerfile-suffix paramater to use it:
# For a file named Dockerfile.local in docker/github_actions:
./simulation/replication/run.sh --scenario default --dockerfile-suffix .local
Any time you are writing code that is complex, touches multiple components, or requires manual testing to sanity check its behaviour it is a candidate for a simulation test. To add a new simulation:
{type}/testdata/{type}_simulation_{name}.yamlconfig/dynamicconfig/{type}_simulation_{name}.yml (if needed)./simulation/{type}/run.sh --scenario {name}.github/workflows/{type}-simulation.ymlNote: only replication simulations run in GitHub Actions currently. To add a new replication scenario to CI, update the matrix in .github/workflows/replication-simulation.yml.