3
votes

I am pretty new to Azure Devops. Currently i am trying to run The Automated Selenium (C#) testcases from Test Plans in Azure Devops.

I am referring to the following link to set up the Release Plan to Run Automated Tests from Test Plan https://docs.microsoft.com/en-us/azure/devops/test/run-automated-tests-from-test-hub?view=azure-devops

I am able to link the Release Pipeline with the testplan and execute the test by creating a new Release. But when the testcases are executed from testplan, Below error is displayed. Its able to identify the Automated test. But in the second stage (Validating Stage) below error is displayed.

The error:

Validating stage:The selected stage does not have the right version or settings of the Visual Studio Test task to run tests.

Steps Followed:

  • Created a TestPlan under TestPlan in Azure Devops
  • Added the testsuite and the testcases. Associated the Automated testscripts with the testcase.
  • Created a Release Plan from the Run automated tests from Test Manager template.

Task Added to the Release Pipeline:

  • Visual Studio Test Task

Configuration of Visual Studio Test Task:

  • Select tests using: TestPlan
  • Test suite: Autopopulated the Tetplan to which the Release Plan is linked
  • Test configuration: 1 - Windows 10 (default value)
  • Search folder: $(Agent.ReleaseDirectory)

The Build Artifacts for the Build Pipelines publish the Build artifacts in the $(Agent.ReleaseDirectory) folder.

Agent Used: Self Hosted Agent.

To run the automated testSripts by selecting the test cases from Test Plan.

2
Does your self-hosted agent have the right tools installed?bryanbcook

2 Answers

3
votes

Follow the instructions here https://docs.microsoft.com/en-us/azure/devops/test/run-automated-tests-from-test-hub?view=azure-devops

Note: For Visual Studio Test Task in release pipeline, Under the test selection group, for Select test using option, select "Test run" by default Test Assembies are selected

enter image description here

2
votes

The documentation indicates you should verify that Select tests using is set to Test run. You can modify the setting and try again.