Invoke-OperationValidation

Invokes Operation Validation Framework tests.

Syntax

Invoke-OperationValidation
      [-TestInfo <PSObject[]>]
      [-IncludePesterOutput]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Invoke-OperationValidation
      [-testFilePath <String[]>]
      [-IncludePesterOutput]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
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.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required: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
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ModuleName

Specifies an array of names of modules.

Type:String[]
Position:Named
Default value:None
Required: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
Required:False
Accept pipeline input:True
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
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-TestType

Specifies an array of test types. Valid values are:

  • Simple
  • Comprehensive

The default is Simple,Comprehensive.

Type:String[]
Accepted values:Simple, Comprehensive
Position:Named
Default value:None
Required:False
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
Required:False
Accept pipeline input:False
Accept wildcard characters:False

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.