Export Teamcity Test Results out to a fileshare

I need to export the test results of a build run from teamcity to a fileshare location.

I can see the stats in the teamcity (Number if Test cases passed, failed), but i need to do this in an automated way so that I don't have to go everytime and look into teamcity for a bild run.

If I can get the data about the count of test cases, i can dasplay charts from there.

I know we can import the data into teamcity, but is there a way to export the data out of teamcity.

I have already read this, but did not understand much.
http://confluence.jetbrains.com/display/TCD4/Build+Artifact

If i can get a powershell script to do this it would be awesome.

1 comment
Comment actions Permalink

Hello,

you have several options here.

1. The simplest way is to use TeamCity REST api to get build results, please see the documentation here http://confluence.jetbrains.com/display/TW/REST+API+Plugin.


2. use TeamCity artifact to get test result file
If you run your tests within builds, you can configure your TeamCity build to create artifact out of the test results. For example for your program "myProgram" your build test (like junit etc) is configured to create a test result file to a folder "myProgram\test". On the build configuration screen/general setting you can then specify artifact paths like myProgram\test\** => test. After the build run you can find the test result file in the following directory:
 TeamCity Data Directory/artifacts/<project name>/<build configuration name>/<internal_build_id>/myProgram/test

3. download csv files with test results from the test tab in TeamCity UI.

regards

Zdenek

0

Please sign in to leave a comment.