OpenZeppelin Test Environment is a blazing fast test library for smart contracts. We use it internally at OpenZeppelin and managed to drop our Contracts tests suite CI time from 21 minutes to 12 minutes and bootstrap time from 50 seconds to 5 seconds .

We are happy to announce we are looking to expand its feature set. After careful examination of the community’s feedback and brainstorming new ideas we are pleased to present the new planned features.

Test suites and code coverage are the bread and butter of smart contracts testing. Solidity Coverage is a well-established library for code coverage in smart contracts tests, but it is certainly a missing link in developer experience provided by Test Environment. After multiple requests by the community, we are proposing to add support for it to Test Environment. If you are tracking coverage of your contracts, let us know in this thread!

Ganache Fork

With DeFi protocols being on fire there is more and more need to test code in integration as opposed to testing in isolation. Unfortunately, recreating a mainnet environment locally can prove to be difficult. Nevertheless, Ganache provides an option to fork a chain and use it for test purposes. This approach allows running tests on other protocols such as Maker, Compound, and Uniswap without complicated local test setups. Yet another reason to test on mainnet is to make sure your upgrade process goes swiftly.

At the moment Test Environment has barebones configuration when it comes to running Ganache. We are looking at supporting the fork option as well as some other options, so you can easily run your test suite on a mainnet fork if needed.

Finally

We are committed to providing the best developer experience. If you want to see these features implemented, please let us know your use case and how you are handling this currently, so we can build a solution that caters for your needs!

If you want to learn more about Test Environment, check out the GitHub page and follow our progress.