Features Tips & Tricks

Pre-tested commit via your IDE of choice

We wrote about the pre-tested commit quite a time ago, and we are sure that many developers use the feature though we would still like to point out at some of its pros again and share the feature reviews which appeared recently.
To begin with, let’s state these quite common issues which many developers encounter every day:

  • unit tests if run locally can take very long
  • when submitted to the project repository, tests can break the build, and the team’s work can slow down

When we developed the concept of pre-tested commit we decided to have the things go its usual way: you code in the IDE but the standard scenario of testing your changes is changed. Pre-tested commit lets you run a full build with tests on some of TeamCity’s Build Agents. Builds created during pre-tested commit are tested across multiple platforms and test suites.

This is an IDE-independent operation that frees your computer’s resources and imitates checking in your changes but does not upload them into the version control until the build is successful. Meanwhile (while your build is created) you can modify the same piece of code, add new tests, and so on.

If some other team member commits changes and they conflict with yours, the IDE shows a warning, and the commit is not performed.

The build may fail, though all tests pass, and you can force commit your changes but still be sure the situation is under control because the integration plugins remember your code state when a pre-tested commit was initiated.
Performing pre-tested commit you always have clean code in the code base and spend less time to discover the integration issues and the project just moves on in its rhythm.
At the moment you can perform pre-tested commit (with slight differences) from three IDE’s:

If you are still thinking whether to upgrade to TeamCity 3.0 we want to persuade you to use it as we have expanded the support of the .NET platform developers: Subversion is now supported. IntelliJ IDEA 7.0 users can perform pre-tested commit to StarTeam and IBM Rational ClearCase (Base + UCM). And finally, we have many plans on extending the feature support.

You may also want to take a look at Roy Osherov’s TeamCity review and read the pre-tested commit description by the absolute insider – Kir Maximov – in his blog post.

Technorati tags: TeamCity, pre-tested commit JetBrains, IntelliJ IDEA, Eclispe, continuous integration, build management, agile development, MS Visual Studio 2005, MS Visual Studio 2008

image description