Zero percent coverage
See original GitHub issuenode: 10.1.0 npm: 5.6.0 truffle: 4.1.8
Unable to get any reported coverage of a contract implementation, although it does show 100% of the interface is covered.
Contract is setup similar to:
βββββββββββββ βββββββββββ
β Interface β β Library β
βββββββββββββ€ βββββββββββ
β +methodA β β
βββββββββββββ β
β β
β β
β β
ββββββββββββββββ β
β Contract β β
ββββββββββββββββ€ β
β +libraryProp βββββββ
β +methodA β
ββββββββββββββββ
After installing, and running, solidity-coverage
we get the following:
---------------------|----------|----------|----------|----------|----------------|
File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines |
---------------------|----------|----------|----------|----------|----------------|
contracts/ | 0 | 0 | 0 | 0 | |
Contract.sol | 0 | 0 | 0 | 0 |... 411,412,414 |
Interface.sol | 100 | 100 | 100 | 100 | |
---------------------|----------|----------|----------|----------|----------------|
All files | 0 | 0 | 0 | 0 | |
---------------------|----------|----------|----------|----------|----------------|
On the first run weβre also experiencing the following error:
Event trace could not be read.
Error: ENOENT: no such file or directory, open './allFiredEvents'
Exiting without generating coverage...
To work around this we do a % touch ./allFiredEvents
, and then re-run ./node_modules/.bin/solidity-coverage
.
Also, after adding some more in-depth code/tests, we also start running into:
Error: VM Exception while processing transaction: out of gas
...
although regular unit tests run just fine. Also, the coverage is still generated
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Code Coverage is showing 0% for java projects - SonarQube
Hi, We have recently upgraded our sonar application from 7.1 to 7.9.6 (LTS in 7.x). We have observed that code coverage is showing...
Read more >Code Coverage percentage is 0% in SonarQube Dashboard
We are trying to run theCode Coverage Pipeline job in Jenkins then we are getting the below error and the Coverage is showing...
Read more >code coverage shows zero percentage - SonarQube
code coverage shows zero percentage - SonarQube ... Code coverage for both front end code(JavaScript) & back end code(java) shows 0%.
Read more >Test coverage overview
Test coverage reports tell you what percentage of your code is covered by your test cases. Test execution reports tell you which tests...
Read more >MUnit Test Coverage is getting calculated as zero percent ...
When using a Mock operation in MUnit tests, the coverage is getting calculated as zero percent (0.00%) for custom connector downloaded from Exchange....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok great - you just need to capture the process ID of the testrpc-sc instance youβre launching in the container and kill it explicitly when the test run stops (or detect an existing instance and use that instead of launching a new one). Thereβs an example of doing this in a shell script at zeppelin-solidity here.
Oh sorry - I just read the whole note -
solidity-coverage
should be killing the testrpc successfully if youβre not launching it separately. Are you using the latest version?@juztin Sweet, thanks.