Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding error message for RFT users #9841

Merged
merged 2 commits into from
Mar 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Tasks/RunDistributedTestsV1/RunDistributedTests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,6 @@ Function Override-TestSettingProperties
return $hasOverridenProperties
}

# Error out unless there is a workaround
$supportrft = Get-VstsTaskVariable -Name 'RFTSupport' -AsBool
if(-not $supportrft)
{
throw "This task and its companion task (Visual Studio Test Agent Deployment) are now not supported. 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 phase 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. Visit https://aka.ms/testingwithphases for more information."
}

Write-Warning "This task and it’s companion task (Visual Studio Test Agent Deployment) are now deprecated and will stop working on 10-March-2019. 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 phase 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. Visit https://aka.ms/testingwithphases for more information."
Write-Verbose "Entering script RunDistributedTests.ps1"
Write-Verbose "TestMachineGroup = $testMachineGroup"
Expand Down Expand Up @@ -190,6 +183,13 @@ $checkTestAgentCompatScriptLocationMemberExists = CmdletHasMember "CheckTestAge
$checkCustomSlicingEnabledMemberExists = CmdletHasMember "CustomSlicingEnabled"
$taskContextMemberExists = CmdletHasMember "TaskContext"

# Error out unless there is a workaround
$supportrft = Get-TaskVariable -Context $distributedTaskContext -Name "RFTSupport"
if ($supportrft -notlike 'true')
{
throw "This task and its companion task (Visual Studio Test Agent Deployment) are now not supported. 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 phase 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. Visit https://aka.ms/testingwithphases for more information."
}

if($overrideRunParams -and $runSettingsFile -and (Test-Path $runSettingsFile))
{
if (([string]::Compare([io.path]::GetExtension($runSettingsFile), ".testsettings", $True) -eq 0))
Expand Down
2 changes: 1 addition & 1 deletion Tasks/RunDistributedTestsV1/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"version": {
"Major": 1,
"Minor": 150,
"Patch": 1
"Patch": 2
},
"deprecated": true,
"runsOn": [
Expand Down
2 changes: 1 addition & 1 deletion Tasks/RunDistributedTestsV1/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"version": {
"Major": 1,
"Minor": 150,
"Patch": 1
"Patch": 2
},
"deprecated": true,
"runsOn": [
Expand Down