0

For one of my project the TestResults.zip file is publishing on url https://dev.azure.com/MyProject/Project/_TestManagement/Runs?runId=8309822&_a=runCharts.

I want to change storage location for TestResults.zip file from above given URL to my own defined repository location.(Like: Myproject/target/surefire-reports.zip) How to do that?

Because in my azure pipeline the test are running and when it comes to create a zip for TestResults it's storing in given above URL and i want to store in one of my project sub-module under target directory so that i can create a zip file.

Please help me to resolve this issue.

Many Thanks

1 Answers1

0

How to modify the repository / storage location for Test Results in azure pipeline

It is not recommended to publish the test results to the repo.

If you still want do that, you could use git command line to submit the test file to the repo in the pipeline after the test task, like:

cd $(System.DefaultWorkingDirectory)

copy Path\surefire-reports.zip target

cd target

git add surefire-reports.zip

git commit -m "Add a test file"

git push https://PATn@dev.azure.com/YourOrganization/YourProject/_git/xxx.test HEAD:master

You could check the similar thread for some more details.

Leo Liu
  • 71,098
  • 10
  • 114
  • 135
  • 1
    Hi Leo Liu-MSFT - Thanks for your response. Really appreciated. If it's not recommended and though I tried copying reports file from (Module1/target/surefire-reports/TEST.xml) into another module Module2/target/ because i am not knowing how to fetch / copy the TestResults_build_id.zip file from the corresponding dev.azure url into local directory? is there any other way except modifying the dev.azure? – PRADEEP TIWARI Aug 30 '21 at 11:52
  • @PRADEEPTIWARI, You could use the copy task and `Publish Build Artifacts` task to publish the file `TestResults_build_id.zip` to the Azure Pipelines. Or if you are using the self-hosted agent, you could publish it to your local folder directory. https://stackoverflow.com/questions/65409889/azure-devops-copy-additional-files-to-published-artifacts-not-reflecting – Leo Liu Sep 01 '21 at 01:58