Currently I am using Azure DevOps as my platform for maintaining tests and testdata (using the parameters feature). We also have Test Automation in place with the testcases written in Selenium for .NET5 (soon to be .NET6). To know which variables are set we do a call with the WorkItemTrackingHttpClient to Azure DevOps with the testcase ID to retrieve the parameter values. This works great untill you have multiple iterations in the testcase, we can use a foreach loop but when 1 of the for instance 3 iterations fails. The whole testcase fails and I have to check the logs to see which iteration failed.
I did investigate extending ITestDataSource and although I was able to make this work from the MSTest side of things, it was unable to report the status back to Azure DevOps.
The GetData
of the custom datasource called that same WorkItemTrackingHttpClient as before.
The .trx-file shows:
testcasename (iteration 1) - Passed
testcasename (iteration 2) - Failed
In the testrun the outcome is shown as Unspecified
.
Has someone managed to get the integration between Azure DevOps Testcases and MSTest of that Testcase (from a pipeline) to work?
Note: this used to work with .NETFramework but is no longer supported/working in .NET Core;
[DataSource("Microsoft.VisualStudio.TestTools.DataSource.TestCase", "https://dev.azure.com/organization;project", "87880", DataAccessMethod.Sequential)]