Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: converted to 1.6 markup

The JMeter FAQ

...

Table of Contents

How to do remote testing the 'proper way'?

...

  1. Your application server. You shouldn't run anything on this machine that you wouldn't have running on it in your proposed or actual production environment (if you are running anything else, including JMeter, you will be adding load to the server and thus tainting your results).
  2. Wiki MarkupOne or more machines running jmeter-server (the \["JMeterEngine"\]). You want these machines to be reasonably close (network wise) to the application server. By "reasonably close" I mean on the same Ethernet segment or at least with no low speed links between them. The JMeter User Manual provides reasonable information about doing this.unmigrated-wiki-markup
  3. A single machine running the JMeter GUI that you use to control the machines running the \["JMeterEngine"\]. \\the JMeterEngine.

While you are developing your scripts and for only moderate levels of user testing (assuming you are "close" to the application server) you do not need to involve any JMeterEngine machines.
The reason you have these are Wiki MarkupWhile you are developing your scripts and for only moderate levels of user testing (assuming you are "close" to the application server) you do not need to involve any \["JMeterEngine"\] machines. The reason you have these are to:

  1. Eliminate the impact of slow network connections when you are not "close" to the application server.
  2. Execute more test threads than your local machine is capable of handling.

...

Answer: Quick answer: They appear as an error because 302 != 200, at least in v 1.8.1.

Wiki MarkupLong answer: try using v1.9RC1, the code in \[http://cvs.apache.org/viewcvs.cgi/jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler.java?rev=1.40&content-type=text/vnd.viewcvs-markup HTTPSampler\] seems to take into account the result code for the redirect instead of the redirect result Long answer: try using v1.9RC1, the code in HTTPSampler seems to take into account the result code for the redirect instead of the redirect result code.

How do I parameterize my JMeter test cases?

...

Note: if only one user (i.e. User_1) is defined, the value will be used for all threads. Functions ARE supported here. See later FAQs for more information.more information.

The following example parameterizes the pet category from the Java Pet Store. Thanks to jWebHosting.net for allowing us to run the example on their Wiki MarkupThe following example parameterizes the pet category from the \[http://java.sun.com/blueprints/code/index.html#java_pet_store_demo/ Java Pet Store\]. Thanks to \[http://www.jwebhosting.net/ jWebHosting.net\] for allowing us to run the example on their server.

  1. Start JMeter
  2. Click the Add button to add the following user defined variables to the Test Plan node:
    1. server: www.jboss.jwebhosting.net
    2. port: 80
    3. protocol: http
  3. Add a Thread Group to the Test Plan setting:
    1. Number of Threads: 2
    2. Clear the forever checkbox
    3. Loop Count: 1
  4. Add Config Element > HTTP Cookie Manager to Thread Group
  5. Add Pre Processors > User Parameters to Thread Group
  6. Click Add User to add an additional user to the User Parameters
  7. Click Add Variable and set name to category, User_1 to DOGS and User_2 to FISH
  8. Add Sampler > HTTP Request to Thread Group with the following settings:
    1. Server Name or IP: ${server}
    2. Port Number: ${port}
    3. Protocol: ${protocol}
    4. Path: /estore/control/category
  9. Click the Add button to add a parameter to the request:
    1. Name: category_id
    2. Value: ${category}
  10. Add Listener > View Results Tree to Thread Group
  11. Save
  12. Run > Start

...

How do I use external data files to define variables in my Test scripts?

...

*Answer:*The \[http://jakarta.apache.org/jmeter/usermanual/component_reference.html#CSV_Data_Set_Config CSV Data Set Config\] element is the best way to do this, as it can create multiple variables from a single data :*The CSV Data Set Config element is the best way to do this, as it can create multiple variables from a single data file.

*Answer:*Another way to do this is to create a User Parameters Pre-Processor in which you list all the values that you want to read from files. You can then use the variable names later in the script.

...

Wiki Markup
*Answer:* Check out the documentation  \[[item 2.2.4|http://jakarta.apache.org/jmeter/usermanual/get-started.html item 2.2.4\-started.html].  _\[A lot of people struggle with this, either because of private certs or whatever - I'm looking for a page that details common trip-ups and solutions for them. - MikeStover\]_

...

Can JMeter record HTTPS requests using the recording proxy?

Wiki Markup*Answer:*No. JMeter would never be able to decipher the encrypted requests the browser sends. SSL Proxies create a tunnel from the browser to the destination server but do not and cannot read the messages. Check out \[http://www.badboy.com.au/ BadBoy\] for a possible . Check out BadBoy for a possible solution.

How can I display the response text my assertation runs against?

...

I've set the CLASSPATH, but JMeter is not picking up my Jars

...

*Answer:*The CLASSPATH variable is ignored when using the -jar flag. For some further information on this, see:\[http://java.sun.com/j2se/1.4.2/docs/tooldocs/findingclasses.html#userclass How the Java launcher finds user classes \]when using the -jar flag. For some further information on this, see:How the Java launcher finds user classes

JMeter currently knows to look for jars/classes in two places only:

  • Wiki Markuplib/ext, where the \["ApacheJMeter"\]_\*.jar files live
  • lib, where the 3rd party jar files live

Additional jars should normally be placed in the lib directory; however, if you have written an add-on for JMeter itself, that should be put in the lib/ext directory.

Wiki MarkupIf you want your jar file to be available to all Java applications, it can be placed in the \[http://java.sun.com/j2se/1.4.2/docs/tooldocs/findingclasses.html#extclass JVM extensions directory\]

Another possible solution is to take a copy of the jmeter startup script, and replace:

...

No Format
 org.apache.jmeter.NewDriver 

Wiki Markupafter adding \["ApacheJMeter"\].jar to the classpath

What Pattern matching (regexen) does JMeter support?

...

*Answer:*JMeter includes the pattern matching software \[http://jakarta.apache.org/oro/ Apache Jakarta ORO\].

See RegularExpressions for more details and examples

...

No Format
# Save test plans and test logs in 2.0 format
#file_format=2.0
# Just test plans (jmx)
#file_format.testplan=2.0
# Just test logs (jtl)
#file_format.testlog=2.0

Wiki MarkupYou can also take a look at this \[http://marc.theaimsgroup.com/?l=jmeter-dev&m=113344943605787&w=2 mail archive\] from dev list.

More informations about: JmxTestPlan or JtlTestLog

...