-
Notifications
You must be signed in to change notification settings - Fork 42
New SamplerJaCoCoDocument
Creates a new JaCoCo XML document based on the provided missed and hit lines.
New-SamplerJaCoCoDocument [-MissedCommands] <Object[]> [-HitCommands] <Object[]> [-PackageName] <String>
[[-PackageDisplayName] <String>] [<CommonParameters>]
Creates a new JaCoCo XML document based on the provided missed and hit lines. This command is usually used together with the output object from Pester that also have been passed through ModuleBuilder's Convert-LineNumber.
$pesterObject = Invoke-Pester ./tests/unit -CodeCoverage
$pesterObject.CodeCoverage.MissedCommands |
Convert-LineNumber -ErrorAction 'Stop' -PassThru | Out-Null
$pesterObject.CodeCoverage.HitCommands |
Convert-LineNumber -ErrorAction 'Stop' -PassThru | Out-Null
New-SamplerJaCoCoDocument `
-MissedCommands $pesterObject.CodeCoverage.MissedCommands `
-HitCommands $pesterObject.CodeCoverage.HitCommands `
-PackageName 'source'
New-SamplerJaCoCoDocument `
-MissedCommands @{
Class = 'ResourceBase'
Function = 'Compare'
HitCount = 0
SourceFile = '.\Classes\001.ResourceBase.ps1'
SourceLineNumber = 4
} `
-HitCommands @{
Class = 'ResourceBase'
Function = 'Compare'
HitCount = 2
SourceFile = '.\Classes\001.ResourceBase.ps1'
SourceLineNumber = 3
} `
-PackageName 'source'
An array of PSCustomObject that contain all the code lines that were hit.
Type: Object[]
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
An array of PSCustomObject that contain all the missed code lines.
Type: Object[]
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The display name of the package if it should be shown to the user differently, e.g. 'source' if the package name is '2.3.0'. Defaults to the same value as PackageName.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The name of package of the test source files, e.g. 'source', 'MyFunction', or '2.3.0'.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
- Add-Sample
- Convert-SamplerHashtableToString
- Get-BuildVersion
- Get-BuiltModuleVersion
- Get-ClassBasedResourceName
- Get-CodeCoverageThreshold
- Get-MofSchemaName
- Get-OperatingSystemShortName
- Get-PesterOutputFileFileName
- Get-Psm1SchemaName
- Get-SamplerAbsolutePath
- Get-SamplerBuiltModuleBase
- Get-SamplerBuiltModuleManifest
- Get-SamplerCodeCoverageOutputFile
- Get-SamplerCodeCoverageOutputFileEncoding
- Get-SamplerModuleInfo
- Get-SamplerModuleRootPath
- Get-SamplerProjectName
- Get-SamplerSourcePath
- Invoke-SamplerGit
- Merge-JaCoCoReport
- New-SampleModule
- New-SamplerJaCoCoDocument
- New-SamplerPipeline
- Out-SamplerXml
- Set-SamplerPSModulePath
- Split-ModuleVersion
- Update-JaCoCoStatistic