gordonad / powermock

Automatically exported from code.google.com/p/powermock
0 stars 0 forks source link

Test coverage report generation takes more than an hour rendering unit testing with powermock unproductive #122

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. pertest forking 
<build>
  <plugins>
     <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
            <forkMode>pertest</forkMode> 
        </configuration>
      </plugin>
     </plugins>
  </build>

2. Now with this it takes 20 times the time it usually takes to build. So
if you modify a line of code then you wait for more than an hour to see the
result.
3. I think youu closed issue 21 as fixed. This needs to be fixed else
productivity comes down and this it is useless to have PowerMock.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by dabasvi...@yahoo.co.uk on 18 Jun 2009 at 2:22

GoogleCodeExporter commented 9 years ago
That's really sad! Unfortunately I think it's a combination of Cobertura and
PowerMock that is to blame, not PowerMock or Cobertura independently. Maybe you 
could
try to use another code coverage tool and see it it works better because I've
currently no idea how we could fix this.

Original comment by johan.ha...@gmail.com on 18 Jun 2009 at 4:39

GoogleCodeExporter commented 9 years ago

Original comment by johan.ha...@gmail.com on 2 Jul 2009 at 7:46

GoogleCodeExporter commented 9 years ago
I tried workaround but the coverage results are not consistent. Some times it 
skips
the class or few methods. Can we please fix it?

Original comment by rohit.c.joshi@gmail.com on 3 Aug 2009 at 8:10

GoogleCodeExporter commented 9 years ago
If you have any idea on how to solve this it would be very appreciated. If you 
have
time could you please try and see if you get the same results using PowerMock
1.3-SNAPSHOT (i.e. checkout the source from trunk and build it using mvn 
install).
We've changed some classloading stuff so it would be interesting to see if it 
affects
this issues as well.

Original comment by johan.ha...@gmail.com on 4 Aug 2009 at 7:46

GoogleCodeExporter commented 9 years ago
Cobertura have fixed this issue with their 1.9.3 release last September. 
However, the
latest cobertura-maven-plugin is 2.3 which uses 1.9.2 version of Cobertura. I 
have
documented a fix here:
http://www.jsfblog.info/2010/02/cobertura-code-coverage-with-maven-and-powermock
/ or
you can try a snapshot of the cobertura-maven-plugin which uses 1.9.3 version of
Cobertura.

Original comment by annihil...@gmail.com on 11 Feb 2010 at 10:17

GoogleCodeExporter commented 9 years ago
This is excellent news. Thank you so much for your help! I'll try it out as 
soon as 
I'll get back from my vacation.

Original comment by johan.ha...@gmail.com on 12 Feb 2010 at 10:32

GoogleCodeExporter commented 9 years ago
Could this be considered as a fixed? What do you think?

Original comment by johan.ha...@gmail.com on 10 Mar 2010 at 1:32

GoogleCodeExporter commented 9 years ago
Yes, I think so, since the issue was actually a Cobertura problem, and not 
PowerMock.
The tests ran fine when we used Emma for code coverage, so I think this 
confirms that
the problem was not with PowerMock.

Original comment by annihil...@gmail.com on 10 Mar 2010 at 2:06

GoogleCodeExporter commented 9 years ago
Great! Thanks a lot for your help with this. I've added a link to your blog 
from the 
FAQ.

Original comment by johan.ha...@gmail.com on 10 Mar 2010 at 2:14