Skip to content

Solidity-coverage recognizes not a single line of tested code? #330

@itinance

Description

@itinance

Hi everybody :)

I've done solidity-coverage on my project but it won't track any single line of code. Has anybody faced the same issue yet?

In my tests, I adopted the approach from OpenZeppelin-ETH to use mocks of my contracts, that inherits from the base contracts encapsulating the initialize-method into a constructor like here: https://github.com/itinance/ncd-token/blob/master/contracts/mocks/NCDTokenSaleImpl.sol.

Of the xxx-Impl-Files 100% coverage was recognized. But the underlying NCDTokenSale-file as example (like all the others) there were zero lines recognized in coverage although plenty of tests (58) were ran.

This is how it looks like:

Screenshot 2019-07-01 22 30 16

The files with red colors are the files with code, the green lines are the files consisting only as a proxy with inheriting from the actual contracts.

Anything I can do here without rewriting any tests to use no Mock-contracts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions