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

[Enhancement] - Test Coverage #74

Open
gavinharris-dev opened this issue Apr 4, 2023 · 2 comments
Open

[Enhancement] - Test Coverage #74

gavinharris-dev opened this issue Apr 4, 2023 · 2 comments

Comments

@gavinharris-dev
Copy link
Contributor

I really do not know if this is even possible, however it would be amazing if there was a way to get test coverage reports from the Tx::finalize method some how.

Ideal would be to get an object returned showing % Stmts, % Branch, % Funcs, % Lines, Uncovered Line #s.

This would have to only be during a test executing, perhaps an additional flag to Program::compile, as I'm thinking we'd need to somehow track the generated Plutus Code back to Helios code?, and also an additional parameter to Tx::finalize where you'd need to provide the trace-back symbols?

@christianschmitz
Copy link
Contributor

There is already code-mapping from Helios-generated Uplc back to Helios, so a test coverage report could build on that.

  • line-coverage is pretty easy
  • statement (and other expressions) could would currently require taking the raw test-coverage report (eg. the line-coverage), and feeding it back to the Helios AST. That would require some restructuring

@gavinharris-dev
Copy link
Contributor Author

Line coverage would be amazing!

BTW: Only raised as I think this would be a great road map item.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants