Workarounds for test reports generated by reportng that do not follow the test execution order

Source: Internet
Author: User

Need to modify the source code of the Testresultcomparator class, the source of their own reportng official website http://reportng.uncommons.org/download, because the reportng default is sorted alphabetically by order, Now modified to be displayed in order of execution

Class TestresultcomparatorImplements comparator<itestresult> {Public Int Compare(Itestresult result1, Itestresult result2) {//sort by name show //return Result1.getname (). CompareTo (Result2.getname ()); //sorted by run time show int LONGRESULT2 = 0; if (Result1.getstartmillis ()) {longresult2 =-1;} else {longresult2 = 1;} span class= "kw" >return Longresult2;}} After the 

modification is complete, you need to compile the testresultcomparator into a class file and replace the class file with the corresponding Testresultcomparator class file in the Reportng jar package.
/span>

Workaround for test reports generated by reportng that do not follow the test execution order

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.