Custom Test Integration in TeamCity

I am trying to automate the launch of some tests (in my own test infrastructure) using TeamCity.

We do not use java or ant, but I can generate junit test results from a perl script:

run_tests.pl 

Creates junit result files (junit1.xml, junit2.xml, etc.).

I included this in Jenkins before by running it as a command line and giving it a path to junit files.

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

So, is it possible to run a command from ant for this? Or is there an easier way to achieve what I want (junit results or other test results are reported to teamcity)?

+6
source share
1 answer

Well, I found a good way to do this. The main thing you need is the processing of an XML report, so you do not need ant or junit tasks http://confluence.jetbrains.net/display/TCD7/XML+Report+Processing .

Summary:

  • Create junit1.xml files using the command line build step.
  • Add assembly function for your XML report assembly configurations. Processing
  • Set report type ant JUnit
  • Add monitoring rule +: junit * .xml
+7
source

Source: https://habr.com/ru/post/913521/


All Articles