0.7.0
Hello!
Solidity-Coverage has undergone a major re-design in 0.7.0.
Its core remains the elegant solidity instrumentation logic which JoinColony engineer @area first worked out in 2016. But the mechanics of collecting your tests' execution trace and the tool's integration with the Ethereum development stack have been re-written to fix a host of problems that have built up over the last two years. Beginning with this release, you'll
- be able to use any Ganache version you want
- slot coverage into your other tooling as a plugin with much less configuration.
- run into far fewer cases where normally working tests fail when being covered
- be able to build your own coverage application using the tool's API.
We've also focused on improving error reporting and making overall performance smoother. It's been beta tested for several months on many of Ethereum's largest projects and everything looks good :)
Documentation
- Installation for Buidler and Truffle
- Options and other instructions
- A guide to upgrading from 0.6.x to 0.7.x
- Some notes on advanced use cases
🐘 What's coming... 🐘
Another major phase of development is scheduled for the next couple of months. We'll be implementing a set of new, solidity-specific coverage measurements which engineers have proposed over the years to increase the precision of the reports you get:
- Per-function modifier coverage , which treats modifiers as branches in the code for each function, e.g for each method qualified by the modifier
Ownable
, measure whether it was called by owners and non-owners (Proposed by Zeppelin engineer Nicolas Venturo in solidity-coverage #286) - Public variable coverage, which treats public variables as methods (since getters are implicitly generated for them) and provide a way for developers to track changes in their contracts' public API. (Proposed by Zeppelin engineer Nicolas Venturo in solidity-coverage #281)
- && / || conditional coverage: , which treats conjoined conditions as distinct execution branches. This precision in branch coverage reporting is available for Java with the cobratura coverage tool - Solidity could benefit from it too. (Proposed by Gnosis engineer Richard Meissner in solidity-coverage #175)
- Documentation coverage, which measures Natspec comment-to-parameter mappings and provides a way to track documentation completeness
- CI integrations for the above Where additional coverage measurements can't be adequately represented by Istanbul/Coveralls we'll add support for them with a githooks/CI integration that tracks pull-request changes relative to their target branch.
Thanks for trying this out!
Please open issues/ask for help if you run into trouble installing or see problems ;)