Dela via


VisualStudioTestPlatformInstaller@1 - Visual Studio test platform installer v1 task

Use this task to acquire the Microsoft test platform from nuget.org or a specified feed, and add it to the tools cache. The installer task satisfies the vstest demand, and a subsequent Visual Studio Test task in a build or release pipeline can run without needing a full Visual Studio install on the agent machine.

Inputs

versionSelector - Version
string. Required. Allowed values: latestPreRelease (Latest Pre-Release), specificVersion (Specific Version). Default value: latestPreRelease.

Installs the latest version or a specific version of the Visual Studio Test Platform. If you use the test platform installer to run Coded UI tests, the chosen Visual Studio Test Platform must match the major version of the Visual Studio installation that built the test binaries. For example, if the Coded UI test project was built using Visual Studio 2017 (version 15.x), you must use Test Platform version 15.x.


testPlatformVersion - Test Platform Version
string. Required when versionSelector = specificVersion.

Specifies the version of Visual Studio Test Platform to install on the agent. Available versions can be viewed on NuGet.


Task control options

All tasks have control options in addition to their task inputs. For more information, see Control options and common task properties.

Output variables

None.

Remarks

Note

If you are using a hosted agent, check the software table for the agent you are using to see if Visual Studio is installed. If Visual Studio is installed, you don't need to run the Visual Studio test platform installer task.

Use this task to acquire the Microsoft test platform from nuget.org or a specified feed, and add it to the tools cache. The installer task satisfies the vstest demand, and a subsequent Visual Studio Test task in a build or release pipeline can run without needing a full Visual Studio install on the agent machine.

Note

  • The Visual Studio Test Platform Installer task must appear before the Visual Studio Test task in the build or release pipeline.
  • The Test platform version option in the Visual Studio Test task must be set to Installed by Tools Installer.

See Run automated tests from test plans.

Requirements

Requirement Description
Pipeline types YAML, Classic build, Classic release
Runs on Agent, DeploymentGroup
Demands None
Capabilities Running this task satisfies the following demands for any subsequent tasks in the same job: VsTest
Command restrictions Any
Settable variables Any
Agent version 2.103.0 or greater
Task category Tool