Thursday, 13 September 2012

Maven generate HTML Junit report

  • add to pom.xml
  • 
        org.apache.maven.plugins
        maven-surefire-plugin
        
            true
        
    
    
    
        org.jvnet.maven-antrun-extended-plugin
        maven-antrun-extended-plugin
        
            
                test-reports
                test
                
                    
                        
                            
                                
                            
                            
                        
                    
                
                
                    run
                
            
        
        
            
                org.apache.ant
                ant-junit
                1.8.4
            
            
                org.apache.ant
                ant-trax
                1.8.0
            
        
    
    
  • Don't bind the AntRun plugin to the test phase, move the configuration outside the execution and call mvn antrun:run on the command line to generate the reports when wanted.
  • Or use the testFailureIgnore option of the test mojo and set it to true in the surefire plugin
  • Use maven command arguments
  • $mvn test -Dmaven.test.failure.ignore=true
    

2 comments:

  1. A true friend is one who overlooks your failures and tolerates your success! See the link below for more info.


    #failures
    www.ufgop.org

    ReplyDelete
  2. I really enjoyed reading your article. I found this as an informative and interesting post, so i think it is very useful and knowledgeable. I would like to thank you for the effort you have made in writing this article.


    edupdf.org

    ReplyDelete