RunVisualStudioTestsusingTestAgent@1 - Run functional tests v1 task
RunVisualStudioTestsusingTestAgent@1 and its companion task (Visual Studio Test Agent Deployment) are deprecated. Use the Visual Studio Test task instead. The VSTest task can run unit as well as functional tests. Run tests on one or more agents using the multi-agent job setting. Use the Visual Studio Test Platform task to run tests without needing Visual Studio on the agent. VSTest task also brings new capabilities, such as automatically rerunning failed tests.
Syntax
# Run functional tests v1
# Deprecated: This task and it’s companion task (Visual Studio Test Agent Deployment) are deprecated. Use the 'Visual Studio Test' task instead. The VSTest task can run unit as well as functional tests. Run tests on one or more agents using the multi-agent job setting. Use the 'Visual Studio Test Platform' task to run tests without needing Visual Studio on the agent. VSTest task also brings new capabilities such as automatically rerunning failed tests.
- task: RunVisualStudioTestsusingTestAgent@1
inputs:
# Setup Options
testMachineGroup: # string. Required. Machines.
dropLocation: # string. Required. Test Drop Location.
# Execution Options
testSelection: 'testAssembly' # 'testAssembly' | 'testPlan'. Required. Test Selection. Default: testAssembly.
#testPlan: # string. Required when testSelection = testPlan. Test Plan.
#testSuite: # string. Required when testSelection = testPlan. Test Suite.
#testConfiguration: # string. Required when testSelection = testPlan. Test Configuration.
sourcefilters: '**\*test*.dll' # string. Required when testSelection = testAssembly. Test Assembly. Default: **\*test*.dll.
#testFilterCriteria: # string. Optional. Use when testSelection = testAssembly. Test Filter criteria.
#runSettingsFile: # string. Run Settings File.
#overrideRunParams: # string. Override Test Run Parameters.
#codeCoverageEnabled: false # boolean. Code Coverage Enabled. Default: false.
#customSlicingEnabled: false # boolean. Distribute tests by number of machines. Default: false.
# Reporting Options
#testRunTitle: # string. Test Run Title.
#platform: # string. Platform.
#configuration: # string. Configuration.
#testConfigurations: # string. Test Configurations.
#autMachineGroup: # string. Application Under Test Machines.
# Run Functional Tests v1
# Deprecated: This task and it’s companion task (Visual Studio Test Agent Deployment) are deprecated. Use the 'Visual Studio Test' task instead. The VSTest task can run unit as well as functional tests. Run tests on one or more agents using the multi-agent job setting. Use the 'Visual Studio Test Platform' task to run tests without needing Visual Studio on the agent. VSTest task also brings new capabilities such as automatically rerunning failed tests.
- task: RunVisualStudioTestsusingTestAgent@1
inputs:
# Setup Options
testMachineGroup: # string. Required. Machines.
dropLocation: # string. Required. Test Drop Location.
# Execution Options
testSelection: 'testAssembly' # 'testAssembly' | 'testPlan'. Required. Test Selection. Default: testAssembly.
#testPlan: # string. Required when testSelection = testPlan. Test Plan.
#testSuite: # string. Required when testSelection = testPlan. Test Suite.
#testConfiguration: # string. Required when testSelection = testPlan. Test Configuration.
sourcefilters: '**\*test*.dll' # string. Required when testSelection = testAssembly. Test Assembly. Default: **\*test*.dll.
#testFilterCriteria: # string. Optional. Use when testSelection = testAssembly. Test Filter criteria.
#runSettingsFile: # string. Run Settings File.
#overrideRunParams: # string. Override Test Run Parameters.
#codeCoverageEnabled: false # boolean. Code Coverage Enabled. Default: false.
#customSlicingEnabled: false # boolean. Distribute tests by number of machines. Default: false.
# Reporting Options
#testRunTitle: # string. Test Run Title.
#platform: # string. Platform.
#configuration: # string. Configuration.
#testConfigurations: # string. Test Configurations.
#autMachineGroup: # string. Application Under Test Machines.
Inputs
testMachineGroup
- Machines
string
. Required.
A comma separated list of machine FQDNs or IP addresses, which may include the port number. The maximum is 32 machines or 32 agents. The list items can be:
- The name of an Azure Resource Group.
- A comma-delimited list of machine names. Example:
dbserver.fabrikam.com,dbserver_int.fabrikam.com:5986,192.168.34:5986
- An output variable from a previous task.
dropLocation
- Test Drop Location
string
. Required.
Specifies the location on the test machine(s) where the test binaries have been copied by a Windows Machine File Copy or an Azure File Copy task. System stage variables from the test agent machines can be used to specify the drop location. Examples: c:\tests
and %systemdrive%\Tests
.
testSelection
- Test Selection
string
. Required. Allowed values: testAssembly
(Test Assembly), testPlan
(Test Plan). Default value: testAssembly
.
Specifies how tests are run: using test assemblies or Test Plan.
testPlan
- Test Plan
string
. Required when testSelection = testPlan
.
Specifies a test plan that is already configured for this organization.
testSuite
- Test Suite
string
. Required when testSelection = testPlan
.
Specifies a test suite from the selected test plan.
testConfiguration
- Test Configuration
string
. Required when testSelection = testPlan
.
Specifies a test configuration from the selected test plan.
sourcefilters
- Test Assembly
string
. Required when testSelection = testAssembly
. Default value: **\*test*.dll
.
Specifies the test binaries to run tests on. Wildcards can be used. For example, **\*test*.dll;
for all .dll
files containing test
in the file name.
testFilterCriteria
- Test Filter criteria
string
. Optional. Use when testSelection = testAssembly
.
The filter that specfies the tests to execute within the test assembly files. Works the same way as the /TestCaseFilter
option in vstest.console.exe
. Example: Owner=james&Priority=1
.
runSettingsFile
- Run Settings File
string
.
Specifies the file path to the runsettings
or testsettings
file to use with the tests.
overrideRunParams
- Override Test Run Parameters
string
.
Specifies the override parameters that are defined in the TestRunParameters
section of the runsettings
file or the Properties
section of the testsettings
file. Example: AppURL=$(DeployURL);Port=8080
.
Note
The properties specified in the testsettings
file can be accessed via TestContext
using Test Agent 2017 Update 4 or higher.
codeCoverageEnabled
- Code Coverage Enabled
boolean
. Default value: false
.
Specifies if Code Coverage is enabled for the task.
customSlicingEnabled
- Distribute tests by number of machines
boolean
. Default value: false
.
When the value of this boolean is set to true
, the tests are distributed based on the number of machines provided instead of the number of test containers.
Note
Tests within a .dll
might also be distributed to multiple machines.
testRunTitle
- Test Run Title
string
.
Specifies a name for the test run.
platform
- Platform
string
.
Specifies the platform against which the tests should be reported. If you have defined a variable for platform
in your build task, use the variable as the value.
configuration
- Configuration
string
.
Specifies the configuration against which the tests should be reported. If you have defined a variable for configuration
in your build task, use the variable as the value.
testConfigurations
- Test Configurations
string
.
Optional. Associates a test case filter against a test configuration ID. Syntax: <Filter1>:<Id1>;DefaultTestConfiguration:<Id3>
. Example: FullyQualifiedName~Chrome:12
.
autMachineGroup
- Application Under Test Machines
string
.
A comma separated list of machines, output variables, or machine group names on which server processes, such as W3WP.exe
, are running.
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.
Requirements
Requirement | Description |
---|---|
Pipeline types | YAML, Classic build, Classic release |
Runs on | Agent |
Demands | None |
Capabilities | This task does not satisfy any demands for subsequent tasks in the job. |
Command restrictions | Any |
Settable variables | Any |
Agent version | 1.104.0 or greater |
Task category | Test |