Jmeter+ant Generation Report (Ubuntu environment)

Source: Internet
Author: User
Tags xsl xsl file

(1) Installing Ant

Download http://ant.apache.org/, unzip the ant installation package, copy the apache-ant-1.9.4 to/opt,

Set Environment variables:

Ant_home= "/opt/apache-ant-1.9.4"

Add $ant_home/bin to Path:

When you are finished, enter ant-version in the terminal, if prompted:

Apache Ant (TM) version 1.9.4 compiled on April 29 2014

The installation was successful.

Errors that occurred during the installation process:

There are hints when using ant:

Unable to locate Tools.jar. Expected to find it In/usr/lib/jvm/jre1.7.0_60/lib/tools.jar

Workaround:

Locate the/lib/toos.jar in the JDK's installation directory, and then copy it to the error path/usr/lib/jvm/jre1.7.0_60/lib

(2) using Ant

Open Eclipse, build a Java project to run the ant script, a sample ant run script and an HTML document for the demo tutorial under the Extras folder of the JMeter installation directory. We copy this build.xml directly to Eclipse's new project directory. Open the Ant Control Panel with Windows--Show View--"Other"--"ant". Add the Build.xml through the "Add Buildfiles" button.

To modify the Build.xml, the following three items are jmx file path, jmeter installation path, generate report

style= "${jmeter.home}/extras/jmeter-results-detail-report${style_version}.xsl" > //Style under Xlst, Here is an XSL file to parse the generated JTL file into HTML format

Testplan = "${testpath}/get class interface Test 2.JMX" //The JMX name that is written here for testing

When you want to test multiple JMX files, you can directly import a folder's JMX file for testing:

Then run the script to generate an HTML report:

Jmeter+ant Generation Report (Ubuntu environment)

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.