Re: Tool to detect who broke a particular test
| Newsgroups | gmane.comp.java.junit.user |
|---|---|
| Message-ID | <CA+BycFoOpV5BdKUdvbQfJxPG0v2hjJ2wm_4GVKpy7OOMzo3Tsg@mail.gmail.com> |
With all respect, I feel like you are trying to solve the wrong problem. For me the question are "how could I run my unit tests much, much more frequently?" and "how could I teach my devs to run the unit tests before they commit the code?". Once you solve this your problem vanishes. Cheers! 2014-06-07 17:07 GMT+00:00 [email protected] [junit] < [email protected]>: > > > 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: 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 > > > > -- Regards / Pozdrawiam Tomek Kaczanowski http://practicalunittesting.com