RE: Tool to detect who broke a particular test
| Newsgroups | gmane.comp.java.junit.user |
|---|---|
| Message-ID | <B8D164BED956C5439875951895CB4B22266A9CB6@CAFRFD1MSGUSRIA.ITServices.sbc.com> |
This is exactly what continuous integration servers like Bamboo and Jenkins provide. It’s not effective to try to duplicate that functionality at the JUnit level. From: [email protected] [mailto:[email protected]] Sent: Saturday, June 07, 2014 10:08 AM To: [email protected] Subject: [junit] Tool to detect who broke a particular test Hi@all i'd like to discuss an idea i had for a legacy project i was working for. We had the problem that a large number of developers were working on the same code base, and the unit tests ran only once a night as a nightly build with a huge load of unit tests and a large set of integration tests. Every night a number of tests broke. And due to the large number of commits during the day it was hard to detect who broke which test. I know that the problem here is the test and project setup and module size, but due to other limitations we were not able to change this in a useful amount of time. So, i sat down and wrote a small library to fill the missing gap. Basically it is a simple Java VM agent. The agent instruments the loaded classes and unit tests and adds logging capability to every affected class. For every successful test it creates a log per test method with the affected classes. For every negative test, it just logs which class changed since the last positive result. It connects with the VCS(Git, SVN) to get the latest revision and author for a given Java class, so it is easy to find who broke a test. The project is still in an early stage, but working. The sources are available here: mirkosertic/WhoBrokeIt<https://github.com/mirkosertic/WhoBrokeIt> [image]<https://github.com/mirkosertic/WhoBrokeIt> mirkosertic/WhoBrokeIt <https://github.com/mirkosertic/WhoBrokeIt> WhoBrokeIt is a simple library to detect which VCS commit broke a particular unit test. View on github.com <https://github.com/mirkosertic/WhoBrokeIt> Preview by Yahoo The next features I would like to implement are multi-module builds and CI system integration. But first of all i would like to hear opinions about this tool, and of course if anybody is interested to contribute, he or she is very welcome! Kind regards, Mirko