A team is preparing a self-hosted Windows agent to execute compiled functional tests with VSTest@3. The necessary application dependencies and .NET runtime are present, but the Visual Studio test platform is missing. Installing Visual Studio is prohibited. The team will configure VSTest@3 to use the platform installed by a preceding task.
Which preparation task should you add?
Install the test platform with the Visual Studio Test Platform Installer task, then configure VSTest@3 to use it. This supplies the test tooling while respecting the restriction on installing Visual Studio.
- Not correct: Add a .NET Core task that restores dependencies to the job. Restoring project dependencies leaves the test platform missing from the agent.
- Not correct: Add a Publish Pipeline Artifact task for the application to the job. Publishing the application artifact leaves the test platform missing from the agent.
- Not correct: Add a .NET Core task that publishes the application to the job. Publishing the application leaves the test platform missing from the agent.
- Correct: Add the Visual Studio Test Platform Installer task to the job. The source recommends the test-platform task for running tests on an agent without requiring a Visual Studio installation.