Another JUnit question and an Ivy question

Our new (Ivy-based) build system is used primarily by the developers on their desktops, and then for migration builds, etc. I just loaded it up as a Teamcity configuration and ran it successfully, but TC didn't recognize the JUnit results. This is my first time trying to use Junit within TC, and I am wondering if we are either pulling in a JUnit-related jar that instead the agent should provide during the build, or if I need to point TC to the test results as artifacts, or what. Is there anything I should look for in the build that would help me troubleshoot? Is there anything that TC should provide that I should specifically NOT look to pull in from Ivy during the build if we're inside a TC agent?

Also, is it possible to use TC as a more-generic Ivy repository, and have it serve dependencies that it doesn't build itself? If so, how?


Comment actions Permalink

How do you start your JUnit tests? Do you use Ant, what version of Ant? If you are using Ant please submit your task where you start your tests.
As for Ivy integration improvements we would appreciate if you submit a feature request to our tracker ( with more detailed description of your use case.

Pavel Sher

Comment actions Permalink

We are using Ant, either version 1.7.0 or 1.7.1 when called from the command line or whichever version is built into Teamcity (the job configuration is an Ant runner). The tasks look like this:

<junit dir="$"

Unit test report for '${}' project has been stored in @{data-dir} directory. Cause: For error messages, check the log files in @{data-dir} directory. Test coverage report for '${}' project has been stored in ${} directory. ]]>

The build output looks like this:
test (8s)
: test-unit-macro (8s)
: sequential (8s)
: test-macro (8s)
: sequential (8s)
: junitreport (<1s)
: Processing /agent-owner/buildAgent/work/63266fdaa5a943e3/entities/target/test-data/unit-tests/TESTS-TestSuites.xml to /agent-owner/buildAgent/temp/buildTmp/null135481421
: Loading stylesheet jar:file:/agent-owner/apache-ant-1.7.1/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl
: Transform time: 847ms
: Deleting: /agent-owner/buildAgent/temp/buildTmp/null135481421
: echo (<1s)
: Unit test report for 'entities' project has been stored in /agent-owner/buildAgent/work/63266fdaa5a943e3/entities/target/test-data/unit-tests directory.
: cobertura-report (7s)
: Cobertura 1.9 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
: Cobertura: Loaded information on 217 classes.
: Report time: 6897ms
: echo (<1s)
: Test coverage report for 'entities' project has been stored in /agent-owner/buildAgent/work/63266fdaa5a943e3/entities/target/test-reports/test-coverage-report directory.

I have logged Tracker enhancement request TW-6001 for my Ivy question.

Edited by: Mark Bickford on Oct 27, 2008 11:36 AM (add Tracker number)

Comment actions Permalink

What version of TeamCity do you use? Could you please create the simplest possible build.xml and a test where this bug reproduces?

Pavel Sher

Comment actions Permalink

I'm sorry it took me a while to get back to you. We are on TC 3.1.2, and with a recent change to our build script the problem is no longer appearing. Thanks for your help!


Please sign in to leave a comment.