Skip to content
This repository was archived by the owner on Jun 13, 2024. It is now read-only.

Commit eca000b

Browse files
committed
Update help
1 parent f2f37b6 commit eca000b

File tree

1 file changed

+43
-5
lines changed

1 file changed

+43
-5
lines changed

Modules/OperationValidation/OperationValidation.psm1

Lines changed: 43 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,14 @@ Additional module directories may be added. If you wish to check both
118118
$env:psmodulepath and your own specific locations, use
119119
*,<yourmodulepath>
120120
121-
.PARAMETER Type
121+
.PARAMETER TestType
122122
The type of tests to retrieve, this may be either "Simple", "Comprehensive"
123123
or Both ("Simple,Comprehensive"). "Simple,Comprehensive" is the default.
124124
125+
.PARAMETER Version
126+
The version of the module to retrieve. If the specified, the latest version
127+
of the module will be retured.
128+
125129
.EXAMPLE
126130
PS> Get-OperationValidation -ModuleName C:\temp\modules\AddNumbers
127131
@@ -348,13 +352,47 @@ Invoke the operational tests from modules
348352
.DESCRIPTION
349353
Modules which include Diagnostics tests are executed via this cmdlet
350354
351-
.PARAMETER testFilePath
355+
.PARAMETER TestFilePath
352356
The path to a diagnostic test to execute. By default all discoverable diagnostics will be invoked
353357
354358
.PARAMETER TestInfo
355359
The type of tests to invoke, this may be either "Simple", "Comprehensive"
356360
or Both ("Simple,Comprehensive"). "Simple,Comprehensive" is the default.
357361
362+
.PARAMETER ModuleName
363+
By default this is * which will retrieve and execute all OVF modules in $env:psmodulepath
364+
Additional module directories may be added. If you wish to check both
365+
$env:psmodulepath and your own specific locations, use
366+
*,<yourmodulepath>
367+
368+
.PARAMETER TestType
369+
The type of tests to execute, this may be either "Simple", "Comprehensive"
370+
or Both ("Simple,Comprehensive"). "Simple,Comprehensive" is the default.
371+
372+
.PARAMETER IncludePesterOutput
373+
Include the Pester output when execute the tests.
374+
375+
.PARAMETER Version
376+
The version of the module to retrieve. If the specified, the latest version
377+
of the module will be retured.
378+
379+
.PARAMETER Overrides
380+
If the Pester test(s) include script parameters, those parameters can be overridden by
381+
specifying a hashtable of values. The key(s) in the hashtable must match the parameter
382+
names in the Pester test.
383+
384+
For example, if the Pester test includes a parameter block like the following, one or more of
385+
these parameters can be overriden using values from the hashtable passed to the -Overrides parameter.
386+
387+
Pester test script:
388+
param(
389+
[int]$SomeValue = 100
390+
[bool]$ExtraChecks = $false
391+
)
392+
393+
Overrides the default parameter values:
394+
Invoke-OperationValidation -ModuleName MyModule -Overrides @{ SomeValue = 500; ExtraChecks = $true }
395+
358396
.EXAMPLE
359397
PS> Get-OperationValidation -ModuleName OperationValidation | Invoke-OperationValidation -IncludePesterOutput
360398
Describing Simple Test Suite
@@ -391,7 +429,7 @@ function Invoke-OperationValidation
391429
{
392430
[CmdletBinding(SupportsShouldProcess=$true,DefaultParameterSetName="FileAndTest")]
393431
param (
394-
[Parameter(ParameterSetName="Path",ValueFromPipelineByPropertyName=$true)][string[]]$testFilePath,
432+
[Parameter(ParameterSetName="Path",ValueFromPipelineByPropertyName=$true)][string[]]$TestFilePath,
395433
[Parameter(ParameterSetName="FileAndTest",ValueFromPipeline=$true)][pscustomobject[]]$TestInfo,
396434
[Parameter(ParameterSetName="UseGetOperationTest")][string[]]$ModuleName = "*",
397435
[Parameter(ParameterSetName="UseGetOperationTest")]
@@ -497,9 +535,9 @@ function Invoke-OperationValidation
497535
return
498536
}
499537

500-
if ($testFilePath)
538+
if ($TestFilePath)
501539
{
502-
foreach($filePath in $testFilePath) {
540+
foreach($filePath in $TestFilePath) {
503541
write-progress -Activity "Invoking tests in $filePath"
504542
if ( $PSCmdlet.ShouldProcess($filePath)) {
505543
$testResult = Invoke-Pester $filePath -passthru -quiet:$quiet

0 commit comments

Comments
 (0)