How can I generate an HTML report for Junit results?

前端 未结 7 1508
囚心锁ツ
囚心锁ツ 2020-11-27 02:57

Is there a way to (easily) generate a HTML report that contains the tests results ? I am currently using JUnit in addition to Selenium for testing web apps UI.

PS: G

7条回答
  •  野性不改
    2020-11-27 03:14

    You can easily do this via ant. Here is a build.xml file for doing this

     
            
                    Generate the HTML report from JUnit XML files
            
    
            
                    
                    
                    
                    
                            
                                    
                            
                            
                    
            
    
    

    This will find files with the format TEST-*.xml and generate reports into a folder named unitTestReports.

    To run this (assuming the above file is called buildTestReports.xml) run the following command in the terminal:

    ant -buildfile buildTestReports.xml
    

提交回复
热议问题