Apache JMeter comes with startup scripts to help you run the application. They are located in the directory /bin and are called jmeter for UNIX systems and jmeter.bat for Windows systems. Make sure the file
ApacheJMeter.jar
andjmeter.properties
is located in the same directory and type jmeter [properties file] to start.Since those scripts assumes you have your classpath already setup and the java interpreter in your path. It this is not the case, setup you Java environment first and edit the script to match your system.
In addition to the standard Java libraries that come with the JRE, you may need to download three other API's:
- XML: xerces from Apache, or JAXP from sun or any other SAX 1.0 compliant XML Parser.
To enable XML (which is necessary for saving your test samples and test scripts), add the xerces.jar (Xerces) or jaxp.jar & parser.jar (JAXP) to your classpath or $JAVA_HOME/jre/lib/ext directory.Currrently, jmeter.properties is set to use the parser in xerces by default. To change to Sun's parser, be sure to change the line in jmeter.properties that instructs JMeter which SAX parser to use. This line looks like this:
xml.parser=org.apache.xerces.parsers.SAXParser
Mail: Java Mailtm API as well as the javax.activation API from Sun.
To enable the MailVisualizer, add mail.jar and activation.jar from Sun's JavaMail download to your classpath or $JAVA_HOME/jre/lib/ext directory.JSSE: JSSE is available from sun.
JSSE is an SSL encryption provider that is used to enable JMeter to test websites using the https protocol.To turn SSL support on, make sure all the jars that come with JSSE are in your classpath (jsse.jar, jnet.jar, jcert.jar), and modify jmeter.properties to instruct JMeter which SSL Provider you are using. For JSSE, set the line as follows:
ssl.provider=com.sun.net.ssl.internal.ssl.Provider
If you don't like script you can use the command line as follows
UNIX: <java interpreterer> <options> -classpath $CLASSPATH:ApacheJMeter.jar org.apache.jmeter.Driver [properties file]
Windows: <java interpreter> <options> -classapth %classpath%;ApacheJMeter.jar org.apache.jmeter.Driver [properties file]where options are usually not needed.
In case you use the Java 2 platform you can type
java -jar ApacheJMeter.jar
or double click on the file.
If you wish to modify the properties with which JMeter runs you need to either modify the jmeter.properties inside of the /bin directory or create your own copy of the jmeter.properties and specify it in the command line (above).
Properties to modify
- timer.* These properties define the implementations of the org.apache.jmeter.timers.Timer interface that you wish to be available to JMeter.
- visualizer.* These properties define the implementations of the org.apache.jmeter.visualizers.Visualizer interface that you wish to be available to JMeter.
- controller.* These properties define the implementations of the org.apache.jmeter.samplers.SamplerController interface that you wish to be available to JMeter.
- xml.parser The class name of the XML Parser implementing the org.xml.sax.Parser interface.
- xml.handler.* The class names of the implementations of org.xml.sax.DocumentHandler interface that JMeter should be able to user
- user.dir The directory JMeter should default to on startup as the working directory
- threads.max The maximum number of threads that can be selected for a single threadgroup
Copyright (c) 1998-99 The Java Apache
Project.
$Id: running.html,v 1.10 2000/09/08 01:57:55 mstover Exp $