@@ -118,10 +118,14 @@ Additional module directories may be added. If you wish to check both
118
118
$env:psmodulepath and your own specific locations, use
119
119
*,<yourmodulepath>
120
120
121
- . PARAMETER Type
121
+ . PARAMETER TestType
122
122
The type of tests to retrieve, this may be either "Simple", "Comprehensive"
123
123
or Both ("Simple,Comprehensive"). "Simple,Comprehensive" is the default.
124
124
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
+
125
129
. EXAMPLE
126
130
PS> Get-OperationValidation -ModuleName C:\temp\modules\AddNumbers
127
131
@@ -348,13 +352,47 @@ Invoke the operational tests from modules
348
352
. DESCRIPTION
349
353
Modules which include Diagnostics tests are executed via this cmdlet
350
354
351
- . PARAMETER testFilePath
355
+ . PARAMETER TestFilePath
352
356
The path to a diagnostic test to execute. By default all discoverable diagnostics will be invoked
353
357
354
358
. PARAMETER TestInfo
355
359
The type of tests to invoke, this may be either "Simple", "Comprehensive"
356
360
or Both ("Simple,Comprehensive"). "Simple,Comprehensive" is the default.
357
361
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
+
358
396
. EXAMPLE
359
397
PS> Get-OperationValidation -ModuleName OperationValidation | Invoke-OperationValidation -IncludePesterOutput
360
398
Describing Simple Test Suite
@@ -391,7 +429,7 @@ function Invoke-OperationValidation
391
429
{
392
430
[CmdletBinding (SupportsShouldProcess = $true , DefaultParameterSetName = " FileAndTest" )]
393
431
param (
394
- [Parameter (ParameterSetName = " Path" , ValueFromPipelineByPropertyName = $true )][string []]$testFilePath ,
432
+ [Parameter (ParameterSetName = " Path" , ValueFromPipelineByPropertyName = $true )][string []]$TestFilePath ,
395
433
[Parameter (ParameterSetName = " FileAndTest" , ValueFromPipeline = $true )][pscustomobject []]$TestInfo ,
396
434
[Parameter (ParameterSetName = " UseGetOperationTest" )][string []]$ModuleName = " *" ,
397
435
[Parameter (ParameterSetName = " UseGetOperationTest" )]
@@ -497,9 +535,9 @@ function Invoke-OperationValidation
497
535
return
498
536
}
499
537
500
- if ($testFilePath )
538
+ if ($TestFilePath )
501
539
{
502
- foreach ($filePath in $testFilePath ) {
540
+ foreach ($filePath in $TestFilePath ) {
503
541
write-progress - Activity " Invoking tests in $filePath "
504
542
if ( $PSCmdlet.ShouldProcess ($filePath )) {
505
543
$testResult = Invoke-Pester $filePath - passthru - quiet:$quiet
0 commit comments