> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blocklight.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Dry-Run Testing

> Backtest your rules against real blockchain transactions

Backtest your rules against real blockchain transactions to verify they work correctly.

```bash theme={null}
# Test all rules against a transaction (default behavior)
# Uses all rule directories: rules/default, rules/custom, and rules/testing (if exists)
./blocklight dry-run \
  --tx 0x9e5c7835e4fcd9a289820c4e42c623c4ab80bd50896b4e5b27e3c18f79be6341 \
  --network ethereum

# Test a specific rule against a transaction
./blocklight dry-run \
  --tx 0xabc123... \
  --rule rules/custom/test_rule.yaml \
  --network ethereum

# Test all rules in a specific directory only
./blocklight dry-run \
  --tx 0xabc123... \
  --rules rules/custom/ \
  --network ethereum
```

## Output Shows

* Which rules matched and why
* **References** from matched rules (if the rule has `references` field)
* Execution time
* Summary statistics

## Rule Directories

By default, `dry-run` uses **all available rule directories**:

* `rules/default` - Default detection rules
* `rules/custom` - Your custom rules (if directory exists)
* `rules/testing` - Testing rules (if directory exists, only in dry-run)

**Important:** Rules in `rules/testing/` are **NEVER** loaded in production (when running `blocklight start`). They are automatically included in `dry-run` for testing purposes.

If you specify `--rules` or `--rule`, only that specific directory or file will be used instead of all directories.

<Tip>
  Test new rules against known exploits before going live. Verify false positive rates. Use `rules/testing/` for safe experimentation.
</Tip>
