3

I am trying to figure out how to import my external test results into Azure DevOps.

This article describes how to publish the results within the same pipeline. But that's not going to help me. We do use Azure pipelines to build and deploy our solution, but the testing is run after that (in a deployed environment), so, outside of the pipeline. We can collect the results (in a Azure DevOps suitable format) and would like to feed it back into Azure DevOps release that did the deployment. All tips are welcome.

riQQ
  • 9,878
  • 7
  • 49
  • 66
Luc van Vugt
  • 314
  • 1
  • 3
  • 10
  • 2
    A similar question was posted some time ago: https://stackoverflow.com/questions/58874238/how-can-i-save-testing-results-in-azure-devops-release-pipeline/ – JukkaK Nov 27 '19 at 14:23
  • However, you'd probably need a suitable way to wait for the tests to be run before finishing the release stage. Can the test run be triggered from release pipeline? If not, valid options would probably be adding some kind of post deployment gate that waits for the test run to be completed. Haven't actually ever used those. Or a separate stage that would trigger when the test run is complete and collect the results. – JukkaK Nov 27 '19 at 14:28
  • Thanx, Jukka. The testrun takes approx 6 hours and for that reason we have de-coupled it form the pipeline. We do not want to wait, but still being able to feed the results back into Azure DevOps. The "post deployment gate" you are mentioning, is there documentation onit, or is it just a concept you thought of? – Luc van Vugt Nov 27 '19 at 15:02
  • 1
    Concepts from here: https://learn.microsoft.com/en-us/azure/devops/pipelines/release/approvals/?view=azure-devops and more specifically here: https://learn.microsoft.com/en-us/azure/devops/pipelines/release/approvals/gates?view=azure-devops . Building, say, an API just for polling for test results sounds a bit far fetched to me, so how about adding a stage after the deployment stage with a pre-approval gate with 6 hour delay before evaluation? Or a scedhuled trigger if applicable? – JukkaK Nov 27 '19 at 16:06
  • Thanx! A lot to read and learn. ;-) BTW: this 6 hours delay does that not block my agent for any other pipeline? – Luc van Vugt Nov 27 '19 at 17:23
  • 1
    Release waiting for approval should not consume an agent: https://learn.microsoft.com/en-us/azure/devops/pipelines/licensing/concurrent-jobs?view=azure-devops – JukkaK Nov 27 '19 at 18:54
  • Jukka, for a full understanding: so each stage can been seen as a separate process/release? – Luc van Vugt Nov 27 '19 at 19:25
  • From the point of consuming agents, yes; you can have loads of releases waiting for approvals and agents running active releases. Now, what I don't know and why we're still discussing in comments is this; you have finished all stages of your release, would you be able to upload test results in the way references in the first comment. I've usually had longer test runs as separate releases that are scedhuled to run during the night, so that avoids the issue of reserving an agent for several hours. – JukkaK Nov 28 '19 at 05:41
  • Hi Jukka, thanx for bearing with me. That we are still discussing this is because of me not being sure that we would not "block my agent for any other pipeline". With your last answer that's addressed. Then getting to "would you be able to upload test results in the way references in the first comment" makes sense now. Whether I will be able all now depends on trying your suggestions and see if I can get it working. I surely have enough input for. – Luc van Vugt Nov 28 '19 at 06:38
  • 1
    No problem. If you get it to work, do post an answer here detailing what you did. – JukkaK Nov 28 '19 at 07:10
  • Hi @ Luc van Vugt Did you work it out by Jukkak's suggestion. Any updates? – Levi Lu-MSFT Dec 02 '19 at 07:53
  • 1
    Hey Levi, no not yet, moet things to do. This will take a while before I get all details understood and implemented. I will post my findings once I do get it working. – Luc van Vugt Dec 02 '19 at 15:22

0 Answers0