0

I have integrated TeamCity with other tools like FxCOP,MSTEST,Jasmine now I want the Test results from MSTEST to be accessible using TeamCity inbuilt REST Apis. Can anyone please post the REST api which can give me the complete TEST results as XML from MSTEST.

Thanks.

With Best Regards, Sajesh nambiar

sajesh Nambiar
  • 689
  • 2
  • 10
  • 25

1 Answers1

2

You should be able to move these reports to the artifacts directory and then use the artifacts API (http://confluence.jetbrains.com/display/TCD8/REST+API#RESTAPI-Artifacts) to return the reports.

For example to access an MSTest report you can add the following line to you Artifact Paths:

%teamcity.build.checkoutDir%\**\*.trx =>

This will copy all files with the extension trx to artifacts directory (any sub-directories they are contained also be copied). You can then use the following REST API URL to download the report/s (replacing the <...> placeholders with actual values):

http://<TEAMCITY LOCATION>/httpAuth/app/rest/builds/<BUILD ID>/artifacts/content/<REPORT PATH>

For example with the following URL,

http://teamcity:1234/httpAuth/app/rest/builds/5678/artifacts/content/testResults/MSTest.trx

It will return the file with the artifact path testResults/MSTest.trx for the build id 5678 from the TeamCity server located at http://teamcity:1234.

Castrohenge
  • 8,525
  • 5
  • 39
  • 66