I have a C# solution that contains automated UI tests. Running those UI tests is a task of a TFS build configured with a C.I. trigger. This automation solution publish test case results using the TFS API with a screenshot attached to each step of the test case.
When I commit again in the repo, since the build has a C.I. trigger, it will run again the tests, and I would like to be able to retrieve the previous screenshot that was generated during the previous build for the test point being executed.
Given my c# solution knows the test case/test plan/test point ID and the branch currently used for the build, what would be the most efficient way to retrieve those captures ?
If anybody has some sample code (I can use the REST or the old API), that would be greatly appreciated :)
I think I may have succedeed to achieve what I want with the following code :