3

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://learn.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.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Neethz
  • 31
  • 1
  • 3

2 Answers2

3

Follow the instructions here https://learn.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

Mubi Ali
  • 83
  • 1
  • 7
2

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

Cece Dong - MSFT
  • 29,631
  • 1
  • 24
  • 39
  • I have looked at the Define view of the test case and I don't see a way to set the test to 'Test run' -- can you be more clear? I have a test plan containing my automated tests, I have a team build pipeline. – Su Llewellyn Jan 15 '20 at 16:51
  • He's talking about the release, but this answer doesn't help. MIne is set to test run and I'm getting the same error as you. – pabrams May 04 '20 at 19:53