Skip to content

Add a -CoverageFile for Convert-CodeCoverage #6

Description

@Jaykul

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...

Activity

  1. added this to the 1.2.0 milestone on Oct 5, 2019
  2. johlju commented on Jun 19, 2022

    @johlju
    Contributor

    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions