Open fulldecent opened 4 years ago
Pasting all the notes I have on this in case this sits for a while.
Damiano Shehaj 10:49 AM UTC, 24 Dec 2019 I mean your PR will work if you change this line. https://github.com/captainheart/specron-example/commit/49293ba097929c3f060975c330bc72c1126c0450
The gist is to let specron
framework to test against coverage enabled ganache server of solidity-coverage
.
This 'special' ganache server generates coverage report file during the test and it can be published to coveralls.io
.
Why coveralls?
TLDR: We recommend Coveralls for the accuracy of its branch reporting.
https://github.com/sc-forks/solidity-coverage/blob/beta/docs/faq.md#continuous-integration
Most of my changes are in this commit https://github.com/captainheart/specron-framework/commit/ab992d12068e10c1f7cfe7b6297e5adb0f33e646
This provider points to coverage enabled ganache server of solidity-coverage
which runs in background.
I used static member variable in order to preserve coverage setting (port number) in the class.
If this is too hacky, we may read speocron prop of package.json
and parse process.argv
.
Tried to minimize changes to the framework.
This example requires specron cli installed globally. So we need Rush hack to use forked specron framework above.
solidity-coverage
Added .solcover.js
Added npm run test-coverage
command
There are interesting pre-release versions of solidity-coverage that supports Buidler Plugin and Coverage API. https://github.com/sc-forks/solidity-coverage/releases
This adds an option for coverage testing.
Thank you to Damiano Shehaj for help with this issue.