Neethz
Neethz

Reputation: 31

How to run the Automated testcases from the TestPlan in AzureDevops

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:

Task Added to the Release Pipeline:

Configuration of Visual Studio Test Task:

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.

Upvotes: 3

Views: 4650

Answers (2)

Mubi Ali
Mubi Ali

Reputation: 83

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

Upvotes: 3

Cece Dong - MSFT
Cece Dong - MSFT

Reputation: 31023

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

Upvotes: 2

Related Questions