Missing JUnit Tests after upgrade to 6.0.1
I upgraded today from 5.* to 6.0.1 which upgraded with no problems at all.
I'm using Maven2 as the build runner, and when I run a build for unit tests which uses the surefire plugin, I don't get any test results displayed in the dashboard.
I can see it's running unit tests, and you can see them in the build log file, but there is no "Tests" tab available - it's almost as if TC is treating the unit test build as a "normal" application build.
The unit test build is marked successfull and I know that there are test failures.
Can anyone suggest where I need to look to find out what's gone wrong?
Pete
Please sign in to leave a comment.
Pete,
could you please provide the full build log.
Thank you
Thanks, I have attached it.
I did notice the following messages in the log file and these entries are NOT present when run with TC 5.* so I wonder if this is the problem. We don't do any instrumentation ourselves, so not sure where this is coming from.
[ERROR][load ] Could not load library instrument
Pete
...guessing it's something to do with this -javaagent:C:\TeamCity\buildAgent\plugins\mavenPlugin\maven-watcher\maven-watcher-agent.jar
Attachment(s):
Destin8_Destin8_Unit_Tests_V2.10_261-r9379.log.zip
Pete,
Looks like your Java (where JAVA_HOME points to) was unable to load instumentation library (<JRE home>\bin\instrument.dll) needed for executing java agents.
Could you please try another java installation or reinstall the existing one.
Ahh.
I don't have the instrument.dll library, as the JDK used for the Build is 1.4, therefore the -javaagent syntax isn't available to the JDK that's running my maven build
does that make sense?
Pete
You can build you project with any JDK you like. It's configurable in pom.xml. But Maven itself must be run with Java 1.5 or higher. If you're using the bundled Maven (2.2.1) then it even alone (without TeamCity) simply cannot run with Java older than 1.5. You probably have both installations - 1.4 and a newer one. Otherwise Maven coudn't have started. Could you please check the version of Java JAVA_HOME is pointing to.
Thanks, I'll have a look shortly.
Here's the most stupid question of the day - where do I check the JAVA_HOME setting? It's not set as an environment variable.
We're also using Maven 2.09, not the bundled one.
Pete
It's easy. If you don't have JAVA_HOME specified, then TeamCity chooses the Java that runs the agent.
Yes Maven 2.0.9 can be run with Java 1.4. But if you try to pass -javaagent key it wll immediately exit with an error. So I still think your Maven is run with Java 1.5 or higher.
If you simply run java -v in the command line what it tells?