Writing Tests¶
The easiest way to get started is to use the interactive CLI:
uv run eest make test
and modify the generated test module to suit your needs.
For help deciding which test format to select, see Types of Tests, in particular Deciding on a Test Type. Otherwise, some simple test case examples to get started with are:
- tests.berlin.eip2930_access_list.test_acl.test_account_storage_warm_cold_state.
- tests.istanbul.eip1344_chainid.test_chainid.test_chainid.
Key Resources¶
- Coding Standards - Code style and standards for this repository
- Adding a New Test - Step-by-step guide to adding new tests
- Writing a New Test - Detailed guide on writing different test types
- Using and Extending Fork Methods - How to use fork methods to write fork-adaptive tests
- Gas Optimization - Optimize gas limits in your tests for efficiency and compatibility with future forks.
Advanced Topics¶
- Opcode Metadata and Gas Calculations - Calculate gas costs and refunds using opcode metadata (advanced feature for gas-focused tests)
Please check that your code adheres to the repo's coding standards and read the other pages in this section for more background and an explanation of how to implement state transition and blockchain tests.