test
Execute forge test with zksync support, filtering by test name, contract, or file path, and selecting a foundry profile.
Instructions
Run tests in a foundry-zksync project (forge test --zksync). Check foundry.toml for [profile.X] sections — if the test directory differs per profile (e.g. profile 'zksync' has test = 'zksync/tests'), pass the correct profile argument.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectPath | Yes | Absolute path to the foundry project directory | |
| profile | No | Foundry profile to use (maps to FOUNDRY_PROFILE env var). Selects a [profile.<name>] section from foundry.toml, e.g. 'zksync', 'ci', 'production'. | |
| filter | No | Regex passed to --match-test to filter which test functions run | |
| contractFilter | No | Regex passed to --match-contract to filter which test contracts run | |
| pathFilter | No | Glob passed to --match-path to filter which test files run, e.g. 'test/unit/*' | |
| verbosity | No | Verbosity level (0-5), maps to -v through -vvvvv. Higher = more trace output |