Invoke-​Operation​Validation

Invokes Operation Validation Framework tests.

Syntax

Invoke-OperationValidation
      [-Confirm]
      [-IncludePesterOutput]
      [-ModuleName <String[]>]
      [-TestType <String[]>]
      [-WhatIf]
      [<CommonParameters>]
Invoke-OperationValidation
      [-Confirm]
      [-IncludePesterOutput]
      [-TestInfo <PSObject[]>]
      [-WhatIf]
      [<CommonParameters>]
Invoke-OperationValidation
      [-Confirm]
      [-IncludePesterOutput]
      [-WhatIf]
      [-testFilePath <String[]>]
      [<CommonParameters>]

Description

The Invoke-OperationValidation cmdlet invokes Operation Validation Framework tests for a specified module.

Examples

Example 1: Invoke an Operation Validation test

PS C:\> 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.

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-IncludePesterOutput

Includes Pester test output. The default is $False.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ModuleName

Specifies an array of names of modules.

Type:String[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-TestInfo

Specifies a custom object that specifies the path to the file and the name of the test to run.

Type:PSObject[]
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-TestType

Specifies an array of test types. Valid values are Simple, Comprehensive, or both. The default is "Simple,Comprehensive".

Type:String[]
Parameter Sets:Simple, Comprehensive
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-testFilePath

Specifies the path of an Operation Validation Framework test file.

Type:String[]
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Inputs

You can pipe the output of Get-OperationValidation to this cmdlet.

Outputs

PSCustomObject

The PSCustomObject describes whether the validation was successful.