Udostępnij za pośrednictwem


Metoda TestRunConfiguration.SetTestEnvironment —

Uruchom środowisko testowe w test przy użyciu tych zestawów badania ustawienia i kontroler, który obsługuje środowisko testowe.

Przestrzeń nazw:  Microsoft.VisualStudio.TestTools.Common
Zestaw:  Microsoft.VisualStudio.QualityTools.Common (w Microsoft.VisualStudio.QualityTools.Common.dll)

Składnia

'Deklaracja
Public Sub SetTestEnvironment ( _
    controllerName As String, _
    testEnvironmentName As String _
)
public void SetTestEnvironment(
    string controllerName,
    string testEnvironmentName
)
public:
void SetTestEnvironment(
    String^ controllerName, 
    String^ testEnvironmentName
)
member SetTestEnvironment : 
        controllerName:string * 
        testEnvironmentName:string -> unit 
public function SetTestEnvironment(
    controllerName : String, 
    testEnvironmentName : String
)

Parametry

  • controllerName
    Typ: System.String
    Nazwa kontrolera, obsługującego środowisko testowe.Jeśli jest null, testy są uruchamiane lokalnie.
  • testEnvironmentName
    Typ: System.String
    Nazwa środowiska testowego, aby użyć.Zerowy lub pusty usuwa wszelkie więzi wszelkich środowiska testowego z ustawień testu.

Wyjątki

Wyjątek Warunek
Common_TestSettings_SetTestEnvironment_ControllerNullEnvironmentNotNull

controllerNamejest zerowy lub pusty, ale testEnvironmentName nie jest.

Zabezpieczenia programu .NET Framework

Zobacz też

Informacje

TestRunConfiguration Klasa

Przestrzeń nazw Microsoft.VisualStudio.TestTools.Common