New-PesterOption
Contributions are welcome in Pester v4-repo.
SYNOPSIS
Creates an object that contains advanced options for Invoke-Pester
SYNTAX
New-PesterOption [[-TestSuiteName] <string>] [[-ScriptBlockFilter] <hashtable[]>]
[-IncludeVSCodeMarker] [-Experimental] [-ShowScopeHints]
DESCRIPTION
By using New-PesterOption you can set options what allow easier integration with external applications or modifies output generated by Invoke-Pester. The result of New-PesterOption need to be assigned to the parameter 'PesterOption' of the Invoke-Pester function.
EXAMPLES
EXAMPLE 1
$Options = New-PesterOption -TestSuiteName "Tests - Set A"
Invoke-Pester -PesterOption $Options -Outputfile ".\Results-Set-A.xml" -OutputFormat NUnitXML
The result of commands will be execution of tests and saving results of them in a NUnitMXL file where the root "test-suite" will be named "Tests - Set A".
PARAMETERS
-Experimental
Enables experimental features of Pester to be enabled.
Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-IncludeVSCodeMarker
When this switch is set, an extra line of output will be written to the console for test failures, making it easier for VSCode's parser to provide highlighting / tooltips on the line where the error occurred.
Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-ScriptBlockFilter
Filters scriptblock based on the path and line number. This is intended for integration with external tools so we don't rely on names (strings) that can have expandable variables in them.
Type: System.Collections.Hashtable[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 1
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-ShowScopeHints
EXPERIMENTAL: Enables debugging output for debugging tranisition among scopes. (Experimental flag needs to be used to enable this.)
Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-TestSuiteName
When generating NUnit XML output, this controls the name assigned to the root "test-suite" element. Defaults to "Pester".
Type: System.String
DefaultValue: Pester
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 0
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
None
You cannot pipe input to this command.
OUTPUTS
System.Management.Automation.PSObject
NOTES
RELATED LINKS
VERSION
This page was generated using comment-based help in Pester 4.10.1.