Product Documentation

New-EnvTestDiscoveryTargetDefinition

Sep 29, 2015

Creates a new EnvTestDiscoveryTargetDefinition object

Syntax

New-EnvTestDiscoveryTargetDefinition -TestId <String> [-TargetIdType <String>] [-TargetId <String>] [-AdminAddress <String>] [<CommonParameters>]

New-EnvTestDiscoveryTargetDefinition -TestSuiteId <String> [-TargetIdType <String>] [-TargetId <String>] [-AdminAddress <String>] [<CommonParameters>]

Detailed Description

Creates a new EnvTestDiscoveryTargetDefinition object that can be piped into Start-EnvTestTask to define one or more targets of execution, optionally including root objects for discovery.

Parameters

-TestId<String>

Test identifiers. If specified, do not specify -TestSuiteId.

Required? true
Default Value Empty
Accept Pipeline Input? false

-TestSuiteId<String>

Test suite identifiers. If specified, do not specify -TestId.

Required? true
Default Value Empty
Accept Pipeline Input? false

-TargetIdType<String>

Describes the type of corresponding object passed with -TargetId

Required? false
Default Value Empty
Accept Pipeline Input? false

-TargetId<String>

The Ids that object tests or test suites will target. By default, other components are queried for objects related to these.

Required? false
Default Value Empty
Accept Pipeline Input? false

-AdminAddress<String>

Specifies the address of a XenDesktop controller the PowerShell snap-in will connect to. You can provide this as a host name or an IP address.

Required? false
Default Value Localhost. Once a value is provided by any cmdlet, this value becomes the default.
Accept Pipeline Input? false

Return Values

Citrix.EnvTest.Sdk.EnvTestDiscoveryTargetDefinition

Defines a target of a task

Examples

-------------------------- EXAMPLE 1 --------------------------

$singleSimpleTestTaskTarget = New-EnvTestDiscoveryTargetDefinition -TestId Monitor_RegisteredWithConfigurationService 
$singleSimpleTestTaskTarget | Start-EnvTestTask

Create a discovery target definition with a single test and no target object, then start a task based on it.

-------------------------- EXAMPLE 2 --------------------------

$singleSimpleTestSuiteTaskTarget = New-EnvTestDiscoveryTargetDefinition -TestSuiteId Infrastructure 
$singleSimpleTestSuiteTaskTarget | Start-EnvTestTask

Create a discovery target definition with a single test suite and no target object, then start a task based on it.

-------------------------- EXAMPLE 3 --------------------------

$singleTestSuiteTaskTarget = New-EnvTestDiscoveryTargetDefinition -TestSuiteId Catalog -TargetIdType Catalog -TargetId $(Get-BrokerCatalog).Uuid 
$singleTestSuiteTaskTarget | Start-EnvTestTask

Create a discovery target definition with a single test suite and a catalog target object, then start a task based on it.

-------------------------- EXAMPLE 4 --------------------------

$singleSimpleTestSuiteTaskTarget = New-EnvTestDiscoveryTargetDefinition -TestSuiteId Infrastructure 
$singleTestSuiteTaskTarget = New-EnvTestDiscoveryTargetDefinition -TestSuiteId Catalog -TargetIdType Catalog -TargetId $(Get-BrokerCatalog).Uuid 
@($singleSimpleTestSuiteTaskTarget, $singleTestSuiteTaskTarget) | Start-EnvTestTask

Create two different discovery target definitions, put them in an array, then start a task based on both.