Execution time of tests in unit test class via maven surefire-report in a single file in summarized format

前端 未结 3 1574
悲&欢浪女
悲&欢浪女 2021-01-02 16:03

Can anyone let me know how can I get the time taken by each of the unit tests in a unit test class in a single file via maven-surefire? I have seen my tar

3条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-02 16:36

    You can use surefire-report-plugin for aggregation the results (but it still won't been sorted)

    mvn surefire-report:report -DlinkXRef=false -Daggregate=true
    

    or

    mvn surefire-report:report-only -DlinkXRef=false -Daggregate=true
    

    if you've already build the project with surefire plugin.

    This will generate surefire-report.html in your root target directory where you can find time stats for each module and each test suite.

提交回复
热议问题