Wednesday, April 23, 2008

Getting test results faster

Have you ever paid attention on how fast you can get results of building your changes from TeamCity? I mean if a test failed you do not need to wait while the whole build finishes, TeamCity will notify you immediately. You can say "So what? It's quite natural to expect this feature from an automated build system". I agree, but show me any other continuous integration server which offers similar functionality. Most of them (if not all) require you to specify paths to test results files (usually in JUnit format) and in turn it means that you have to wait while build finishes (what if tests in your build run 40 minutes?). Not to mention that sometimes you have to modify your build script to produce test results in required format.

This is a great feature and we are going to improve it further. First of all we are going to force your build to run recently failed tests before any other tests. This should help you if you are fixing broken tests. TeamCity will try to do this transparently, but in some cases (for example, if you have your own test runner) it can't be done. For these cases we'll provide list of tests via property or via file and you will be able to modify your test runner to support this feature too.

At the moment this feature is already working on our internal server. Currently it is supported for Ant and IPR runners and for JUnit and TestNG frameworks. We hope to add support for other frameworks and runners before the first EAP.

A further improvement would be to run new and modified tests first. This should be especially useful for personal builds. Since TeamCity tracks changes for every build we can determine whether modified files are test cases or not. We do not have a working code for this feature yet but we hope to add it to the first EAP too.

By the way we are going to release first EAP of Calcutta (TeamCity 4.0 codename) at the next week. I hope you'll find time to install it and try these new features.

No comments: