2

I have a project opened in azuer-devops but I'm only using the boards for it's control. The sources are in our local SVN and should not be connected to azure.

I would like to have my tests defined in azure and publish my results (trx?) when I run them so we can all see the evolution in the boards. Is that possible? Can I use the test section of azure without sharing the code?

PS: If SO is not the place for such a question, can someone redirect me?

javirs
  • 1,049
  • 26
  • 52
  • So, how did you run the test? If you want to run the test in Azure DevOps pipeline, then you have to get the sources to agent server first... – Andy Li-MSFT Oct 26 '18 at 05:48
  • I cannot give them the sources. So I run it in my visual studio, in my computer – javirs Oct 26 '18 at 10:00

1 Answers1

3

If you mean run the test locally with VisualStudio and generate the test results (TRX), then you can use the Publish Test Results task to only publish the test results to Azure Pipelines. After that you can see the results in Azure DevOps.

  1. Add the test results (TRX) to source control
  2. Add a Publish Test Results task, set the search folder to find the TRX file

Reference this answer : Publishing test results through command line test runner in VSTS

Andy Li-MSFT
  • 28,712
  • 2
  • 33
  • 55
  • Yes, this is exactly what I mean. Do you have some link on how to ? and .. should I first create the tests in azure to accommodate the upload file or .. how does it work ?? – javirs Oct 26 '18 at 10:01
  • Im sorry but I still don't get it. Im aware my problem is not this particular question is that I don't understant the overall procedure. But maybe you help me on that. So I create this task in devops. Then I go to my visual studio (that is totally disconnected from DevOps) and ... what will happen ? – javirs Oct 31 '18 at 08:51
  • In particular your first step says "add TRX to source control". But my source is NOT connected to DevOps. Are in our local SVN. – javirs Oct 31 '18 at 08:54
  • I mean just copy and add the TRX file itself to source control (source is not necessary) then publish the result file (TRX) to Azure DevOps. – Andy Li-MSFT Oct 31 '18 at 09:42
  • You will not believe it but .. my company moved from TRX to NUnit while we talked ... Thanks for the details ! – javirs Oct 31 '18 at 15:08
  • this works, however, how to get it to publish results when no errors occur? it seems only when an error exists, then an attachment for the individual test is copied and capable of being seen in Azure. – serup Mar 25 '22 at 15:04