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

Potential feature: Export NUnitResults #19

Open
mkellerman opened this issue Jan 22, 2018 · 1 comment
Open

Potential feature: Export NUnitResults #19

mkellerman opened this issue Jan 22, 2018 · 1 comment

Comments

@mkellerman
Copy link

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
@sit-md
Copy link

sit-md commented Nov 9, 2018

I would also like to see this feature implemented

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