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 a -CoverageFile for Convert-CodeCoverage #6

Open
Jaykul opened this issue May 4, 2018 · 1 comment
Open

Add a -CoverageFile for Convert-CodeCoverage #6

Jaykul opened this issue May 4, 2018 · 1 comment

Comments

@Jaykul
Copy link
Member

Jaykul commented May 4, 2018

As a module author
In order to understand my code coverage
I need to use CodeCov.io and other such tools


Basically I just want to overwrite Pester's coverage file with one based on the modified output of Convert-CodeCoverage. If that's already possible by piping this to some Pester functions, can you put an example of how to do it in the help for Convert-CodeCoverage so others can figure out how -- or better yet, just add a parameter and do it yourself...

@Jaykul Jaykul added this to the 1.2.0 milestone Oct 5, 2019
Jaykul added a commit that referenced this issue Dec 19, 2019
Addresses #6 by adding coverage.xml when you run test.ps1
@johlju
Copy link
Contributor

johlju commented Jun 19, 2022

There is code here that might help with this issue. Happy to see this functionality be implemented in ModuleBuilder instead so that we can just call a command from the task. Anyway, hope anything can be reused or used as an inspiration.

https://github.com/gaelcolas/Sampler/blob/bc25ba558383d3ddba7ded9a2e51233f2bc9d4e7/.build/tasks/JaCoCo.coverage.build.ps1#L328-L457

The main activities the task does:

  • Coverts hits and misses using this modules' ConvertTo-SourceLineNumber (but uses the alias Convert-LineNumber)
  • Create a new JaCoCo file from the converted coverage.
  • Updated the JaCoCo statistics in the new JaCoCo file.

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

No branches or pull requests

2 participants