We use Maven2, IntelliJ and TeamCity
When we commit our code we use the Remote Run feature from the TeamCity plugin in the IntelliJ IDEA. TeamCity is configured to do a clean checkout of the code, build it, run the unit tests and then ONLY commit when all tests succeed.
The other day we had a compilation error in one of the testcases: a dependency was left out of the pom.xml by mistake. The build failed and stopped at that point:
: Compiler (<1s)
: Compilation failure
: C:\BuildAgent\work\Server\Vlafo_HEAD_continuous_build\olympus\verbintenissen\src\test\java\be\vlafo\verbintenissen\test\IMBBetalenConstraintsUnitTestCase.java:[19,31] package be.vlafo.financien.test does not exist
: C:\BuildAgent\work\Server\Vlafo_HEAD_continuous_build\olympus\verbintenissen\src\test\java\be\vlafo\verbintenissen\test\IMBBetalenConstraintsUnitTestCase.java:[50,32] cannot find symbol
: symbol : class MockBetaling
: location: class be.vlafo.verbintenissen.test.IMBBetalenConstraintsUnitTestCase
: For more information, run Maven with the -e switch
: Total time: 1 minute 44 seconds
: Finished at: Thu Jan 17 15:21:17 CET 2008
: Final Memory: 28M/63M
: Number of processed tests: 0
: Build finished
But: TeamCity STILL committed the code.
How is this possible?
It's like the system considers the tests gave no errors when no test got to run because of a failed build.
Message was edited by: