Get-MtTestInventory
SYNOPSIS
Discover Pester test inventory and associated tags.
SYNTAX
Get-MtTestInventory [-Path <String>] [-ExcludePath <String[]>] [-ExcludeTag <String[]>] [-OutputType <String>]
[-ExportPath <String>] [-PassThru] [-ProgressAction <ActionPreference>] [<CommonParameters>]
DESCRIPTION
Uses Pester discovery to enumerate all tests under the provided path and returns a list of objects containing:
TestName - Name of the It test. FilePath - Full path to the test file. Describe - Name of the parent Describe block. Tags - Tags explicitly set on the test. CombinedTags - Combination of Describe and Tags (unique, case-insensitive).
EXAMPLES
EXAMPLE 1
$TestInventory = Get-MtTestInventory -Path .\ -ExcludePath .\test-results
Get an inventory of tests in the current directory and exclude anything in the 'test-results' sub-directory.
EXAMPLE 2
$TagInventory = Get-MtTestInventory
$TagInventory['CIS']
Get test test inventory and show tests with the 'CIS' tag.