|
| 1 | +--- |
| 2 | +external help file: OperationValidation-help.xml |
| 3 | +Module Name: OperationValidation |
| 4 | +online version: |
| 5 | +schema: 2.0.0 |
| 6 | +--- |
| 7 | + |
| 8 | +# Get-OperationValidation |
| 9 | + |
| 10 | +## SYNOPSIS |
| 11 | +Retrieve the operational tests from modules |
| 12 | + |
| 13 | +## SYNTAX |
| 14 | + |
| 15 | +### ModuleName (Default) |
| 16 | +``` |
| 17 | +Get-OperationValidation [[-Name] <String[]>] [-TestType <String[]>] [-Version <Version>] [-Tag <String[]>] |
| 18 | + [-ExcludeTag <String[]>] [<CommonParameters>] |
| 19 | +``` |
| 20 | + |
| 21 | +### Path |
| 22 | +``` |
| 23 | +Get-OperationValidation [-Path] <String[]> [-TestType <String[]>] [-Version <Version>] [-Tag <String[]>] |
| 24 | + [-ExcludeTag <String[]>] [<CommonParameters>] |
| 25 | +``` |
| 26 | + |
| 27 | +### LiteralPath |
| 28 | +``` |
| 29 | +Get-OperationValidation [-LiteralPath] <String[]> [-TestType <String[]>] [-Version <Version>] [-Tag <String[]>] |
| 30 | + [-ExcludeTag <String[]>] [<CommonParameters>] |
| 31 | +``` |
| 32 | + |
| 33 | +## DESCRIPTION |
| 34 | +Modules which include a Diagnostics directory are inspected for |
| 35 | +Pester tests in either the "Simple" or "Comprehensive" subdirectories. |
| 36 | +If files are found in those directories, they will be inspected to determine |
| 37 | +whether they are Pester tests. |
| 38 | +If Pester tests are found, the |
| 39 | +test names in those files will be returned. |
| 40 | + |
| 41 | +The module structure required is as follows: |
| 42 | + |
| 43 | +ModuleBase\ |
| 44 | + Diagnostics\ |
| 45 | + Simple # simple tests are held in this location |
| 46 | + (e.g., ping, serviceendpoint checks) |
| 47 | + Comprehensive # comprehensive scenario tests should be placed here |
| 48 | + |
| 49 | +## EXAMPLES |
| 50 | + |
| 51 | +### EXAMPLE 1 |
| 52 | +``` |
| 53 | +Get-OperationValidation -Name OVF.Windows.Server |
| 54 | +``` |
| 55 | + |
| 56 | +Module: C:\Program Files\WindowsPowerShell\Modules\OVF.Windows.Server\1.0.2 |
| 57 | + Version: 1.0.2 |
| 58 | + Type: Simple |
| 59 | + Tags: {} |
| 60 | + File: LogicalDisk.tests.ps1 |
| 61 | + FilePath: C:\Program Files\WindowsPowerShell\Modules\OVF.Windows.Server\1.0.2\Diagnostics\Simple\LogicalDisk.tests.ps1 |
| 62 | + Name: |
| 63 | + Logical Disks |
| 64 | + |
| 65 | + |
| 66 | + Module: C:\Program Files\WindowsPowerShell\Modules\OVF.Windows.Server\1.0.2 |
| 67 | + Version: 1.0.2 |
| 68 | + Type: Simple |
| 69 | + Tags: {} |
| 70 | + File: Memory.tests.ps1 |
| 71 | + FilePath: C:\Program Files\WindowsPowerShell\Modules\OVF.Windows.Server\1.0.2\Diagnostics\Simple\Memory.tests.ps1 |
| 72 | + Name: |
| 73 | + Memory |
| 74 | + |
| 75 | + |
| 76 | + Module: C:\Program Files\WindowsPowerShell\Modules\OVF.Windows.Server\1.0.2 |
| 77 | + Version: 1.0.2 |
| 78 | + Type: Simple |
| 79 | + Tags: {} |
| 80 | + File: Network.tests.ps1 |
| 81 | + FilePath: C:\Program Files\WindowsPowerShell\Modules\OVF.Windows.Server\1.0.2\Diagnostics\Simple\Network.tests.ps1 |
| 82 | + Name: |
| 83 | + Network Adapters |
| 84 | + |
| 85 | + |
| 86 | + Module: C:\Program Files\WindowsPowerShell\Modules\OVF.Windows.Server\1.0.2 |
| 87 | + Version: 1.0.2 |
| 88 | + Type: Simple |
| 89 | + Tags: {} |
| 90 | + File: Services.tests.ps1 |
| 91 | + FilePath: C:\Program Files\WindowsPowerShell\Modules\OVF.Windows.Server\1.0.2\Diagnostics\Simple\Services.tests.ps1 |
| 92 | + Name: |
| 93 | + Operating System |
| 94 | + |
| 95 | +### EXAMPLE 2 |
| 96 | +``` |
| 97 | +$tests = Get-OperationValidation |
| 98 | +``` |
| 99 | + |
| 100 | +Search in all modules found in $env:PSModulePath for OVF tests. |
| 101 | + |
| 102 | +### EXAMPLE 3 |
| 103 | +``` |
| 104 | +$tests = Get-OperationValidation -Path C:\MyTests |
| 105 | +``` |
| 106 | + |
| 107 | +Search for OVF modules under c:\MyTests |
| 108 | + |
| 109 | +### EXAMPLE 4 |
| 110 | +``` |
| 111 | +$simpleTests = Get-OperationValidation -ModuleName OVF.Windows.Server -TypeType Simple |
| 112 | +``` |
| 113 | + |
| 114 | +Get just the simple tests in the OVF.Windows.Server module. |
| 115 | + |
| 116 | +### EXAMPLE 5 |
| 117 | +``` |
| 118 | +$tests = Get-OperationValidation -ModuleName OVF.Windows.Server -Version 1.0.2 |
| 119 | +``` |
| 120 | + |
| 121 | +Get all the tests from version 1.0.2 of the OVF.Windows.Server module. |
| 122 | + |
| 123 | +### EXAMPLE 6 |
| 124 | +``` |
| 125 | +$storageTests = Get-OperationValidation -Tag Storage |
| 126 | +``` |
| 127 | + |
| 128 | +Search in all modules for OVF tests that include the tag Storage. |
| 129 | + |
| 130 | +### EXAMPLE 7 |
| 131 | +``` |
| 132 | +$tests = Get-OperationValidation -ExcludeTag memory |
| 133 | +``` |
| 134 | + |
| 135 | +Search for OVF tests that don't include the tag Memory |
| 136 | + |
| 137 | +## PARAMETERS |
| 138 | + |
| 139 | +### -Name |
| 140 | +One or more module names to inspect and return if they adhere to the OVF Pester test structure. |
| 141 | + |
| 142 | +By default this is \[*\] which will inspect all modules in $env:PSModulePath. |
| 143 | + |
| 144 | +```yaml |
| 145 | +Type: String[] |
| 146 | +Parameter Sets: ModuleName |
| 147 | +Aliases: ModuleName |
| 148 | + |
| 149 | +Required: False |
| 150 | +Position: 1 |
| 151 | +Default value: * |
| 152 | +Accept pipeline input: False |
| 153 | +Accept wildcard characters: False |
| 154 | +``` |
| 155 | +
|
| 156 | +### -Path |
| 157 | +One or more paths to search for OVF modules in. |
| 158 | +This bypasses searching the directories contained in $env:PSModulePath. |
| 159 | +
|
| 160 | +```yaml |
| 161 | +Type: String[] |
| 162 | +Parameter Sets: Path |
| 163 | +Aliases: |
| 164 | + |
| 165 | +Required: True |
| 166 | +Position: 1 |
| 167 | +Default value: None |
| 168 | +Accept pipeline input: True (ByPropertyName, ByValue) |
| 169 | +Accept wildcard characters: True |
| 170 | +``` |
| 171 | +
|
| 172 | +### -LiteralPath |
| 173 | +One or more literal paths to search for OVF modules in. |
| 174 | +This bypasses searching the directories contained in $env:PSModulePath. |
| 175 | +
|
| 176 | +Unlike the Path parameter, the value of LiteralPath is used exactly as it is typed. |
| 177 | +No characters are interpreted as wildcards. |
| 178 | +If the path includes escape characters, enclose it in single quotation marks. |
| 179 | +Single quotation |
| 180 | +marks tell PowerShell not to interpret any characters as escape sequences. |
| 181 | +
|
| 182 | +```yaml |
| 183 | +Type: String[] |
| 184 | +Parameter Sets: LiteralPath |
| 185 | +Aliases: PSPath |
| 186 | + |
| 187 | +Required: True |
| 188 | +Position: 1 |
| 189 | +Default value: None |
| 190 | +Accept pipeline input: True (ByPropertyName) |
| 191 | +Accept wildcard characters: False |
| 192 | +``` |
| 193 | +
|
| 194 | +### -TestType |
| 195 | +The type of tests to retrieve, this may be either "Simple", "Comprehensive", or Both ("Simple,Comprehensive"). |
| 196 | +"Simple, Comprehensive" is the default. |
| 197 | +
|
| 198 | +```yaml |
| 199 | +Type: String[] |
| 200 | +Parameter Sets: (All) |
| 201 | +Aliases: |
| 202 | + |
| 203 | +Required: False |
| 204 | +Position: Named |
| 205 | +Default value: @('Simple', 'Comprehensive') |
| 206 | +Accept pipeline input: False |
| 207 | +Accept wildcard characters: False |
| 208 | +``` |
| 209 | +
|
| 210 | +### -Version |
| 211 | +The version of the module to retrieve. |
| 212 | +If not specified, the latest version |
| 213 | +of the module will be retured. |
| 214 | +
|
| 215 | +```yaml |
| 216 | +Type: Version |
| 217 | +Parameter Sets: (All) |
| 218 | +Aliases: |
| 219 | + |
| 220 | +Required: False |
| 221 | +Position: Named |
| 222 | +Default value: None |
| 223 | +Accept pipeline input: False |
| 224 | +Accept wildcard characters: False |
| 225 | +``` |
| 226 | +
|
| 227 | +### -Tag |
| 228 | +Executes tests with specified tag parameter values. |
| 229 | +Wildcard characters and tag values that include spaces |
| 230 | +or whitespace characters are not supported. |
| 231 | +
|
| 232 | +When you specify multiple tag values, Get-OperationValidation executes tests that have any of the |
| 233 | +listed tags. |
| 234 | +If you use both Tag and ExcludeTag, ExcludeTag takes precedence. |
| 235 | +
|
| 236 | +```yaml |
| 237 | +Type: String[] |
| 238 | +Parameter Sets: (All) |
| 239 | +Aliases: |
| 240 | + |
| 241 | +Required: False |
| 242 | +Position: Named |
| 243 | +Default value: None |
| 244 | +Accept pipeline input: False |
| 245 | +Accept wildcard characters: False |
| 246 | +``` |
| 247 | +
|
| 248 | +### -ExcludeTag |
| 249 | +Omits tests with the specified tag parameter values. |
| 250 | +Wildcard characters and tag values that include spaces |
| 251 | +or whitespace characters are not supported. |
| 252 | +
|
| 253 | +When you specify multiple ExcludeTag values, Get-OperationValidation omits tests that have any |
| 254 | +of the listed tags. |
| 255 | +If you use both Tag and ExcludeTag, ExcludeTag takes precedence. |
| 256 | +
|
| 257 | +```yaml |
| 258 | +Type: String[] |
| 259 | +Parameter Sets: (All) |
| 260 | +Aliases: |
| 261 | + |
| 262 | +Required: False |
| 263 | +Position: Named |
| 264 | +Default value: None |
| 265 | +Accept pipeline input: False |
| 266 | +Accept wildcard characters: False |
| 267 | +``` |
| 268 | +
|
| 269 | +### CommonParameters |
| 270 | +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). |
| 271 | +
|
| 272 | +## INPUTS |
| 273 | +
|
| 274 | +## OUTPUTS |
| 275 | +
|
| 276 | +## NOTES |
| 277 | +
|
| 278 | +## RELATED LINKS |
| 279 | +
|
| 280 | +[Invoke-OperationValidation]() |
| 281 | +
|
0 commit comments