"Junit_ant" generates test reports using the eclipse's own Junit and Ant

Source: Internet
Author: User

Generate test reports using the JUnit and ant that comes with eclipse

1. Click the project you want to test, right-click, select Export

2. On the pop-up page, click General, select Ant Buildfiles, click Next

3. On the next page, select the project you want to test, fill in the Ant profile name, Build.xml, test Report generated folder, such as reports, click Finish, you will generate an ant Build.xml file in the root directory.

4. Create a new folder in the root of the project, report (this folder will be built on its own and will not be generated automatically)

5. Right-click on the Build.xml file, in Run as, select the second, select the default target, the class to be tested, and Junitreport, click Run to generate JUnit's test report in the Reports folder.

Result: The order of execution is compiled first, then run Testadd, and the result is written to the report folder.

But according to their own experiments, this way can only run in eclipse, for example, when Jenkins calls the Build.xml file, only run the target under the default, this time will have to modify the configuration file, the Testadd and Junitreport Target is added in.

"Junit_ant" generates test reports using the eclipse's own Junit and Ant

Related Article

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.