Skip to content

Commit ebffe74

Browse files
authored
Suggest correction to docs for displaying Pester coverage in TeamCity (pester#325)
The currently documented properties NumberOfCommandsAnalyzed and NumberOfCommandsExecuted appear to actually need to be CommandsAnalyzedCount and CommandsExecutedCount At least in current versions. This may have been right once, but now throws an error using latest Pester and a fairly recent TeamCity installation.
1 parent f5238ab commit ebffe74

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/usage/test-results.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ Code coverage metrics are not included in the NUnit xml report so it is necessar
5555

5656
```powershell
5757
$testResults = Invoke-Pester -OutputFile Test.xml -OutputFormat NUnitXml -CodeCoverage (Get-ChildItem -Path $PSScriptRoot\*.ps1 -Exclude *.Tests.* ).FullName -PassThru
58-
Write-Output "##teamcity[buildStatisticValue key='CodeCoverageAbsLTotal' value='$($testResults.CodeCoverage.NumberOfCommandsAnalyzed)']"
59-
Write-Output "##teamcity[buildStatisticValue key='CodeCoverageAbsLCovered' value='$($testResults.CodeCoverage.NumberOfCommandsExecuted)']"
58+
Write-Output "##teamcity[buildStatisticValue key='CodeCoverageAbsLTotal' value='$($testResults.CodeCoverage.CommandsAnalyzedCount)']"
59+
Write-Output "##teamcity[buildStatisticValue key='CodeCoverageAbsLCovered' value='$($testResults.CodeCoverage.CommandsExecutedCount)']"
6060
```
6161

6262
## [AppVeyor](https://appveyor.com)

0 commit comments

Comments
 (0)