Russell Gallop
Russell Gallop

Reputation: 1699

Integrate non-standard tests into TeamCity

I am trying to automate running some tests (in my own test infrastructure) with TeamCity.

We are not using java or ant but I can generate junit test results from a perl script:

run_tests.pl

Which generates junit result files (junit1.xml, junit2.xml etc.).

I have integrated this into Jenkins before by running it as a command line and giving it the path to the junit files.

In TeamCity it appears that due to the closer integration with ant and junit I need to run run_tests.pl from a ant junit task.

So how can I run a command from ant to do this? Or is there an easier way to achieve what I want (junit or other test results reported in teamcity)?

Upvotes: 6

Views: 2556

Answers (1)

Russell Gallop
Russell Gallop

Reputation: 1699

Okay, found a good way to do this. The key thing you need is XML Report processing so you don't need ant or junit tasks http://confluence.jetbrains.net/display/TCD7/XML+Report+Processing.

Summary:

  • Create your junit1.xml files using a command line build step
  • Add a build feature to your build configurations of type XML report processing
  • Set report type to be ANT JUnit
  • Add a monitoring rule of +:junit*.xml

Upvotes: 7

Related Questions