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

Report coverage information with --tests #1654

Open
1 task done
rcrowe opened this issue Jun 19, 2023 · 0 comments
Open
1 task done

Report coverage information with --tests #1654

rcrowe opened this issue Jun 19, 2023 · 0 comments
Labels

Comments

@rcrowe
Copy link
Contributor

rcrowe commented Jun 19, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Feature description

When running --tests also report coverage so that we can enforce tests cover all combinations of policy evaluation.
While CEL can make that evaluation complex, even some basic output that a line is covered or not is helpful.

What would the ideal solution look like to you?

Supplying --coverage alongside --tests where coverage information is then reported in the different output formats.

Ideally, the coverage reports would be SCM change aware; for example, only files that changed in a PR via git diff would have their tests/coverage reported on. That would then allow us to enforce coverage on files changing, but that feels like a feature that would be better as part of --tests & a new feature request. I mention it here so I can describe the usecase we had envisaged for coverage reports.

Alternatively, perhaps the file path is included in the coverage report so we can filter in userland...

{
  "coverage": {
    "some/file/path.yaml": [...]
  }
}

Anything else?

No response

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

No branches or pull requests

2 participants