[ 
http://jira.codehaus.org/browse/MOJO-1299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=168708#action_168708
 ] 

Stephen Connolly commented on MOJO-1299:
----------------------------------------

OK, let me explain what this is a blocker....

We should separate running the coverage from creating the report of the 
coverage.

So I would see a emma:report reportSet that generates the emma report

while the emma:emma goal runs the coverage.

The emma:report reportSet could conditionally invoke the emma:emma goal if the 
coverage data is not available...

Thus in generating a release build... i.e. "deploy site-deploy"

You would have:

1. The tests run normally uninstrumented
2. The tests run instrumented. (either as part of the build lifecycle, or as 
part of the site lifecycle)
3. The report generated

The way I read this issue was somebody trying to stop

1. The tests run normally uninstrumented
2. The tests run instrumented. (as part of the build lifecycle)
3. The tests run instrumented. (as part of the site lifecycle)
4. The report generated

But now that I read it more closely, I see that the reporter wants to have

1. The tests run instrumented. (either as part of the build lifecycle, or as 
part of the site lifecycle)
2. The report generated

Which, IMHO, we should not fix.

Instrumentation can cause passing tests to fail and failing tests to pass...

For example,

instrumentation can cause unintended synchronization

instrumentation can interfer with JVM optimization that will cause the bytecode 
to execute in a different sequenc (but still within the JVM spec) 

IMHO, All tests should pass uninstrumented... 

HOWEVER That all your tests pass instrumented DOES NOT imply that all your 
tests pass...

> [emma-maven-plugin] Allow generating reports outside the emma:emma goal
> -----------------------------------------------------------------------
>
>                 Key: MOJO-1299
>                 URL: http://jira.codehaus.org/browse/MOJO-1299
>             Project: Mojo
>          Issue Type: Improvement
>          Components: emma
>            Reporter: Philippe Laflamme
>            Priority: Blocker
>
> Currently, the emma:emma goals generates the reports but also forces the 
> execution of a test lifecycle. This is limiting for users not wanting to run 
> the unit tests twice (once instrumented, once not instrumented). It may seem 
> like a minor issue, but we have projects with hundreds of test cases. One 
> execution takes several minutes to complete.
> The suggested improvement is to add a "report" goal that would only convert 
> the coverage.em file to a coverage.xml/index.html file (as necessary). This 
> would allow configuring everything through the <build> section like so 
> (example):
>  <build>
>     <plugins>     
>       <plugin>      
>         <groupId>org.codehaus.mojo</groupId>
>         <artifactId>emma-maven-plugin</artifactId>
>         <version>1.0-alpha-1</version>
>         <inherited>true</inherited>          
>         <executions>
>           <execution>
>             <phase>process-classes</phase>               
>             <goals>
>               <goal>instrument</goal>
>             </goals>
>           </execution>
>           <execution>
>             <phase>verify</phase>               
>             <goals>
>               <goal>report</goal>
>             </goals>
>           </execution>
>         </executions>
>       </plugin>
>       <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-surefire-plugin</artifactId>
>         <inherited>true</inherited>
>         <configuration>
>           <forkMode>once</forkMode>
>           <reportFormat>xml</reportFormat>
>           
> <classesDirectory>${project.build.directory}/generated-classes/emma/classes</classesDirectory>
>     
>         </configuration>        
>       </plugin>
>     </plugins>
>  </build>
> I can now obtain the coverage.xml file without executing the test cases twice.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to