testng本地构建allure测试报告

根据github的testng-example配置后,再增加一下配置
主项目pom.xml 增加以下内容



                org.apache.maven.plugins

                maven-site-plugin

                3.3

                

                    zh_CN

                

            

子项目


                org.apache.maven.plugins
                maven-surefire-plugin
                2.22.0
                
                    -Dfile.encoding=UTF-8
                    
                    
                    
                    UTF-8

                    
                        ${project.basedir}/TestNG/${xmlFileName}
                    

                    
                        
                            usedefaultlisteners
                            false
                        

                        
                            allure.results.directory
                            ${project.build.directory}/allure-results
                        
                        
                            allure.link.issue.pattern
                            https://example.org/issue/{}
                        

                    
                
                
                    
                        org.aspectj
                        aspectjweaver
                        ${aspectj.version}
                    
                
            

执行命令:

mvn clean test -DxmlFileName=healthcheck.xml
mvn io.qameta.allure:allure-maven:serve

你可能感兴趣的:(testng本地构建allure测试报告)