VisualStudioTestPlatformInstaller@1 - Visual Studio test platform installer v1 task
Raksts
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.
Syntax
YAML
# Visual Studio test platform installer v1# Acquire the test platform from nuget.org or the tool cache. Satisfies the ‘vstest’ demand and can be used for running tests and collecting diagnostic data using the Visual Studio Test task.- task:VisualStudioTestPlatformInstaller@1 inputs:# Package settings packageFeedSelector:'nugetOrg'# 'nugetOrg' | 'customFeed' | 'netShare'. Required. Package Feed. Default: nugetOrg.#versionSelector: 'latestPreRelease' # 'latestPreRelease' | 'latestStable' | 'specificVersion'. Required when packageFeedSelector = nugetOrg || packageFeedSelector = customFeed. Version. Default: latestPreRelease.#testPlatformVersion: # string. Required when versionSelector = specificVersion. Test Platform Version. #customFeed: # string. Required when packageFeedSelector = customFeed. Package Source. #username: # string. Optional. Use when packageFeedSelector = customFeed. User Name. #password: # string. Optional. Use when packageFeedSelector = customFeed. Password. #netShare: # string. Required when packageFeedSelector = netShare. UNC Path.
YAML
# Visual Studio Test Platform Installer v1# Acquires the test platform from nuget.org or the tools cache. Satisfies the ‘vstest’ demand and can be used for running tests and collecting diagnostic data using the Visual Studio Test task.- task:VisualStudioTestPlatformInstaller@1 inputs:# Package settings packageFeedSelector:'nugetOrg'# 'nugetOrg' | 'customFeed' | 'netShare'. Required. Package Feed. Default: nugetOrg.#versionSelector: 'latestPreRelease' # 'latestPreRelease' | 'latestStable' | 'specificVersion'. Required when packageFeedSelector = nugetOrg || packageFeedSelector = customFeed. Version. Default: latestPreRelease.#testPlatformVersion: # string. Required when versionSelector = specificVersion. Test Platform Version. #customFeed: # string. Required when packageFeedSelector = customFeed. Package Source. #username: # string. Optional. Use when packageFeedSelector = customFeed. User Name. #password: # string. Optional. Use when packageFeedSelector = customFeed. Password. #netShare: # string. Required when packageFeedSelector = netShare. UNC Path.
Specifies the feed where the task fetches the Visual Studio Test Platform NuGet package.
nugetOrg - Official NuGet: Acquires the test platform package from NuGet. This option requires internet connectivity on the agent machine.
customFeed - Custom feed: Acquires the test platform package from a custom feed or a package management feed in Azure DevOps or TFS.
netShare - Network path: Installs the test platform from a network share. The specified Microsoft.TestPlatform.nupkg version must be downloaded from NuGet and placed on a network share that the build/release agent can access.
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.
customFeed - Package Source string. Required when packageFeedSelector = customFeed.
Specifies the URL of a custom feed or a package management feed in Azure DevOps or TFS that contains the test platform package. Public and private feeds can be specified.
username - User Name string. Optional. Use when packageFeedSelector = customFeed.
Specifies the user name to authenticate the feed specified in the Package Source argument. This input is not required if the password input uses a personal access token (PAT).
password - Password string. Optional. Use when packageFeedSelector = customFeed.
Specifies the password or personal access token (PAT) for authenticating the feed specified in the customFeed input.
netShare - UNC Path string. Required when packageFeedSelector = netShare.
Specifies the full UNC path to the Microsoft.TestPlatform.nupkg file. The specified Microsoft.TestPlatform.nupkg version must be downloaded from NuGet and placed on a network share that the build/release agent can access.
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.
Piezīme
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.
Pievienojieties meetup sērijai, lai kopā ar citiem izstrādātājiem un ekspertiem izveidotu mērogojamus AI risinājumus, kuru pamatā ir reālas lietošanas gadījumi.