Reports are not generated when the build is failed in Maven Cucumber Reports

前端 未结 2 1888
旧时难觅i
旧时难觅i 2020-12-01 22:42

Reports are generating successfully when the build is successful but when there are any failed cases which cause build failure, reports are not generated.

ch

2条回答
  •  时光说笑
    2020-12-01 22:53

    There is flag present for same which is as below:

    true
    
    
    
    

    You need to set in the configuration tag as below:

     
            oasys-confirmations
            ${project.build.directory}
           ${project.build.directory}/cucumber.json
           true
    
    

    New config:

                
                    org.apache.maven.plugins
                    maven-surefire-plugin
                    2.19.1
                    
                        true
                    
                
                
                    net.masterthought
                    maven-cucumber-reporting
                    3.20.0
                    
                        
                            execution
                            verify
                            
                                generate
                            
                            
                                cucumber-jvm-example
                                
                                ${project.build.directory}
                                
                                ${project.build.directory}/
                                
                                    
                                    **/*.json
                                
                                
                                ${project.build.directory}/
                                
                                    
                                    sample.properties
                                    other.properties
                                
                                false
                                true
                            
                        
                    
                
    

    Old Config working till 3.16.0 version:

                     
                            org.apache.maven.plugins
                            maven-surefire-plugin
                            2.19.1
                            
                                true
                            
                        
                        
                            net.masterthought
                            maven-cucumber-reporting
                            3.16.0
                            
                                
                                    execution
                                    verify
                                    
                                        generate
                                    
                                    
                                        >cucumber-jvm-example
                                        ${project.build.directory}
                                        ${project.build.directory}/cucumber.json
                                        true
                                    
                                
                            
                        
    

    NOTE If you get same problem After this configuration then
    1. Run RunnerFile Normally TestNG
    2. Run Pom.xml as Maven install. 3. Check target folder there is a TagName.html file open it and view the result.

提交回复
热议问题