How to retrieve the unit test results of a build in TFS using Rest API?
The build definition uses VNext (Visual Studio 2015 Update 3).
var vssConnection = new VssConnection(_configurationSpec.TeamProjectCollection,
new VssClientCredentials());
_buildClient = vssConnection.GetClient<BuildHttpClient>();
You can try to get the logs of the related step by using this Rest API in a powershell script.
It will return logs1, logs2 corresponds step1, step2.
For example:
Just need to get the log of step 4 "Test Assemblies..."
The test result of the build is stored in test runs, so you need to get the test run of the build first and then retrieve the test result from the test run. Following is the code sample: