Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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)?

like image 567
Russell Gallop Avatar asked Apr 18 '12 12:04

Russell Gallop


People also ask

What is TeamCity in automation?

Deliver quality software faster TeamCity is a general-purpose CI/CD solution that allows the most flexibility for all sorts of workflows and development practices. The Projects Overview lets you quickly check the status of your builds, see what triggered them, download the latest build artifacts, and more.


1 Answers

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
like image 177
Russell Gallop Avatar answered Nov 11 '22 18:11

Russell Gallop