Skip to content

Potential feature: Export NUnitResults #19

Description

@mkellerman

Having the NUnit Results would allow us to use this module to not only generate the HTML report, but also, the NUnit results we import back into Jenkins.

Adding a parameter like so:
Invoke-PSCodeHealth -Path '.\coveralls' -TestsPath '.\coveralls' -HtmlReportPath "$env:USERPROFILE\Desktop\Report.html" -NUnitPath ".\NUnitResults.xml"

Expected Behavior

A NUnit Results file should be created in $NUnitPath path.

Current Behavior

An non-standard object is returned from Invoke-PSCodeHealth, that cannot be easily exported to JSON/XML to be used by other services.

Possible Solution

In: PSCodeHealth/PSCodeHealth/Private/Metrics/Get-FunctionTestCoverage.ps1
Line 54: Add a check for the NUnitPath, if a path is provided, then add:
-OutputFile "$NUnitPath" -OutputFormat "NUnitXml"

or Create a more extensive NUnit result file from all the metrics gathered from PCHealthCheck

Could use -PesterNUnitXmlPath to export just Pester, so we dont think it's the actual HealthCheck report.

Your Environment

  • Module version used: 0.2.9

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions