Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for coverage reports #465

Merged
merged 1 commit into from Nov 25, 2020
Merged

Conversation

turbolent
Copy link
Member

When running tests it is useful to know what parts of the program where covered. Add support for a coverage to the interpreter. Start with measuring line hits. This can be extended in the future.

Copy link
Contributor

@janezpodhostnik janezpodhostnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be amazing for a lot of things, not just coverage reports. Debugging for instance.

@turbolent do you thing we should put a coverage report collector on the fvm (that saves coverage reports to the account itself) and just always track line hits on the testnet?

@turbolent
Copy link
Member Author

@janezpodhostnik Yeah, I think that would be great! This PR is quit low-level, but the FVM package, or even higher up the emulator, could generate reports (JSON, HTML, etc.) from this. I guess it could be just an fvm.Option and then a configuration flag in the emulator.

@turbolent turbolent merged commit 1e3be7b into master Nov 25, 2020
@turbolent turbolent deleted the bastian/coverage-report branch November 25, 2020 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants