JetBrains / meta-runner-power-pack

A set of Meta-runners for TeamCity
Apache License 2.0
257 stars 125 forks source link

xUnit.net + dotCover meta-runner does not capture HTML report artifacts #137

Open MitchMcHenry1 opened 5 years ago

MitchMcHenry1 commented 5 years ago

When "Export dotCover report" is enabled and report type is HTML, the html file (dotCoverReport.html) is captured in the artifacts, but the folder containing all the reports assets (css, images, js, etc.) is not.

To have a functional html report we need to capture the assets folder as well. This worked for me:

Write-Output "##teamcity[publishArtifacts '$dotCoverReportFile']"

if ($dotCoverReportType.ToUpper() -eq 'HTML') {
    $dotCoverReportFolder = $dotCoverReportFile.Substring(0, $dotCoverReportFile.LastIndexOf('.'))
    Write-Output "##teamcity[publishArtifacts '$dotCoverReportFolder\ => $dotCoverReportFolder']"
}