jUnit test successfull locally, fails on TeamCity server


My company recently started using TeamCity, and it's doing wonders for our productivity. However, a small problem has appeared: Two jUnit tests which run successfully without errors locally on the development computers are failing on the TeamCity server. We have checked the version control, and the server has the same version of the files as the various other development computers.

Does anyone have any idea what might possibly be wrong? Alternatively, is there a way to skip these tests when new versions of the code is being commited to the server?

Thanks :-)

Comment actions Permalink

As you didn't provide any exception, can rely only on my space wisdom connection to help you. For example, base directories on the local machines and on the server could mismatch. Then, on the build sever relative paths to referenced resources could fail. And the way to run test also matter - there could be classpath issues. I have to provide more info to get something concrete.
Regarding disabling tests - you can add @Ignore annotation on tests, either with utilize test failures muting feature (Teamcity 6.5) - http://confluence.jetbrains.net/display/TCD65/Muting+Test+Failures

Best regards, Alex

Comment actions Permalink


Also Build fails in TeamCity but not locally article may give you some ideas.


Please sign in to leave a comment.