Invoke-OperationValidation
Invokes Operation Validation Framework tests.
Syntax
FileAndTest (Default)
Invoke-OperationValidation
[-TestInfo <PSObject[]>]
[-IncludePesterOutput]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Path
Invoke-OperationValidation
[-testFilePath <String[]>]
[-IncludePesterOutput]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
UseGetOperationTest
Invoke-OperationValidation
[-ModuleName <String[]>]
[-TestType <String[]>]
[-IncludePesterOutput]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Invoke-OperationValidation cmdlet invokes Operation Validation Framework tests for a specified module.
Examples
Example 1: Invoke an Operation Validation test
Get-OperationValidation -ModuleName "OperationValidation" | Invoke-OperationValidation -IncludePesterOutput
Describing Simple Test Suite
[+] first Operational test 20ms
[+] second Operational test 19ms
[+] third Operational test 9ms
Tests completed in 48ms
Passed: 3 Failed: 0 Skipped: 0 Pending: 0
Describing Scenario targeted tests
Context The RemoteAccess service
[+] The service is running 37ms
Context The Firewall Rules
[+] A rule for TCP port 3389 is enabled 1.19s
[+] A rule for UDP port 3389 is enabled 11ms
Tests completed in 1.24s
Passed: 3 Failed: 0 Skipped: 0 Pending: 0
Module: OperationValidation
Result Name
------- --------
Passed Simple Test Suite::first Operational test
Passed Simple Test Suite::second Operational test
Passed Simple Test Suite::third Operational test
Passed Scenario targeted tests:The RemoteAccess service:The service is running
Passed Scenario targeted tests:The Firewall Rules:A rule for TCP port 3389 is enabled
Passed Scenario targeted tests:The Firewall Rules:A rule for UDP port 3389 is enabled
This command gets the module named OperationValidation, and uses the pipeline operator (|) to
pass it to the Invoke-OperationValidation cmdlet, which runs the test.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
| Type: | SwitchParameter |
| Default value: | False |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | cf |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-IncludePesterOutput
Includes Pester test output. The default is $false.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-ModuleName
Specifies an array of names of modules.
Parameter properties
| Type: | String[] |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
UseGetOperationTest
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-testFilePath
Specifies the path of an Operation Validation Framework test file.
Parameter properties
| Type: | String[] |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
Path
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
-TestInfo
Specifies a custom object that specifies the path to the file and the name of the test to run.
Parameter properties
| Type: | PSObject[] |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
FileAndTest
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | True |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-TestType
Specifies an array of test types. Valid values are:
SimpleComprehensive
The default is Simple,Comprehensive.
Parameter properties
| Type: | String[] |
| Default value: | None |
| Accepted values: | Simple, Comprehensive |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
UseGetOperationTest
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
| Type: | SwitchParameter |
| Default value: | False |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | wi |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
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
PSCustomObject
You can pipe the output of Get-OperationValidation to this cmdlet.
Outputs
PSCustomObject
This cmdlet returns a PSCustomObject object describing whether the validation was successful.