Skip to main content

why does cobertura-maven plugin has to run all the test again ?

Today , while working i noticed that because of the cobertura plugin all our unit test in the application were running twice , once for the test phase and another one for the cobertura phase.


After some searching i found that the cobertura plugin has to instrument the byte code of the classes and hence needs to run them all over again to achieve that. Isn’t that frustrating , this means that the build time of our app suddenly doubles because we are using cobertura.


Its a known issue to the cobertura guys and is also raised as an issue with them http://jira.codehaus.org/browse/MCOBERTURA-83  since last 4 years , huh.


The only solution we could find was not to run the cobertura tasks with the normal clean install , and run it when we pass some parameter to be true.


The only downside of this refactoring was that now people will have to run the mvn clean install -Druncobertura=true before committing to check if their test covers everything or not .

Comments

Popular posts from this blog

It was a great experience to talk to a huge audience in Mumbai and Delhi about how to start your ML journey at Google Cloud Summit ’18 India
And the dinners have started #marrigeaftereffects

Fractals and Mandelbrot Set

While mathematics is in itself quite interesting and forms the basis of any modern day research, be it computational biology, machine learning or building complex structure, it can be quite a challenge to decide where to start.  That is why i decided to explore Fractals, thinking of it as a bridge between the nature and science. It brings in some really fascinating concepts which should be good enough for me as a gateway go deeper.  Fractals are in simple language never ending patterns which keep on repeating without an end, because fractals are never ending they have an infinite perimeter but finite area.  Since the patterns repeats indefinitely but if you draw a circle around the peremeter the area will remain finite.  It is like adding 1+0.1+0.01+0.001 and never making 2 This video explains the basic concept really well  Fractals are found everywhere nature in Trees, Rivers, Branching patterns, Hurricanes and Galaxies. It tries to bring order and understanding to the patterns that w