Forum Discussion
Run Automation testcase from TestPlan having multiple test configuration assigned
Hello Everyone,
I have a requirement wherein I need to run automated testcase(from Test Plan using build and Release pipeline), which takes the Test suite configuration value as input to the Test case.
For the single assigned configuration, I achieved it by calling Azure DevOps APIs from the NUnit test and passing the values from the response to the testcase.
But when I assign 2 configuration values to the same testcase, it creates 2 instances in Execution Tab as below:
When I run the 2 instances by clicking on "Run for web application", only the first instance is executed and second instance remains in "In Progress" forever.
In the release pipeline, I get this in the logs:
Is there a way to execute both the instances of the same testcase in one go?
1 Reply
How about using RunAutomatedTest API:
1. Use the RunAutomatedTest API
- Query all test points for the test case using the Test Point API.
- For each test point (i.e., each configuration), trigger a test run using the Run Create API.
- This ensures each configuration instance is executed independently.
2. Use YAML Pipeline with Test Plan Integration
If you're using a release pipeline, you can integrate with Azure Test Plans using the VsTest task:- task: VSTest@2 inputs: testSelector: 'testPlan' testPlan: '<TestPlanId>' testSuite: '<TestSuiteId>' testConfiguration: '<ConfigurationId>' searchFolder: '$(System.DefaultWorkingDirectory)'To run multiple configurations, you can loop through them or define multiple VSTest tasks with different testConfiguration values.