replaying a junit/testng result

I'm trying to run some junit tests on a box that is outside of control from teamcity.   I want to make the results of those tests show up in a teamcity build configuration.   I've gotten teamcity to display the reports within a new tab for the build configuration -- however despite my best efforts at trying to fool teamcity into grabbing the results I keep failing.

I really want teamcity to parse & understand the results -- so that it can display failures/success and not just display an "as-is" html report from junitreport.  

What I tried doing was simplying capturing stdout from my own invocation of junit (via ant) and then echoing that back within a build.xml that teamcity executed when the test was complete.  Unfortunatly not everything that teamcity needs is on stdout.  Does teamcity mine the TEST*xml file?  does it modify the output of junit some other way?    How does it even know what directory has the output of junit?  

Thanks for help anyone can offer.  Unfortunatly in our companies situation we simply can't run a subset of our tests on the same boxes as buildagents.  So getting this to work is important.


Comment actions Permalink

Hi Eric,

Take a look on XML Report processing Build Feature which allows to import test results from xml files.
I think it will solve your problem.

Comment actions Permalink

Thanks!  Don't know how I mised that feature!    I tried it out and it works fine... most of the time.   Is it possible that teamcity checks the datestamp of the XML and only parse it when the date changes?  In particular when I manually kick off the configuration, (which won't change the xml file in my case),  it doesn't seem to see the results.

Comment actions Permalink

As i remember this feature checks file timestamp before starting first step and then check if file was modified, if so - parse it.

You can add first build step which will remove old xml file.


Please sign in to leave a comment.