Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

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. One 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.
  3. A single machine running the JMeter GUI that you use to control the machines running 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 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.

Note that if the GUI is running multiple remote servers, it can easily become a bottle-neck, especially if a lot of listeners are being used. Remove all unnecessary listeners before running stress tests.

...

  1. Install Petstore application on a local Tomcat server.
  2. Start JMeter
  3. Click the Add button to add the following user defined variables to the Test Plan node:
    1. server: localhost
    2. port: 8080
    3. protocol: http
  4. Add a Thread Group to the Test Plan setting:
    1. Number of Threads: 2
    2. Clear the forever checkbox
    3. Loop Count: 1
  5. Add Config Element > HTTP Cookie Manager to Thread Group
  6. Add Pre Processors > User Parameters to Thread Group
  7. Click Add User to add an additional user to the User Parameters
  8. Click Add Variable and set name to category, User_1 to DOGS and User_2 to FISH
  9. 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
  10. Click the Add button to add a parameter to the request:
    1. Name: category_id
    2. Value: ${category}
  11. Add Listener > View Results Tree to Thread Group
  12. Save
  13. Run > Start

When you view the results in the View Results Tree, you can see the ${category} value was replaced with the value from the User Parameters. Each thread will use the category from the User Parameter setting automatically. If there are more than two threads, they will reuse the values in these settings, so the third thread would use DOGS.

...

  1. Load Test Plan created in previous FAQ question
  2. Add Post Processor > Regular Expression Extractor to thread Group with following values:
    1. Reference Name: product
    2. Regular Expression: product_id=(\w*-\w*-\w*) 
    3. Template: $1$ 
    4. Match No.: 0  (Setting this parameter to 0 returns a random match)
  3. Copy the HTTP Request we created in the previous question and paste to the thread group after the previous HTTP Request
  4. Change the following values:
    1. Path: /estore/control/product 
    2. Add Parameter and set name to product_id , value to to ${product }
  5. Save Test Plan
  6. Run > Start

When you view the results in the View Results Tree, you can see the ${product} value was replaced with the value extracted by the regular expression.

...

For example, you could define the TestPlan variable:

THREADS ${__P(threads,10) }

and then use{{ ${THREADS}}} in the ThreadGroup test element.

...

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

*Answer:*The   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.

...

I'm having difficulty getting JMeter to work with SSL (HTTPS). What's the problem?

...

*Answer:* Check out the documentation [item 21.2.4|http://jakarta.apache.org/jmeter/usermanual/get-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\]_.

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



I'm having difficulty building Jmeter from NetBeans IDE. It is looking for a org.apache.log.Hierarchy, which log util is it looking for?

Answer: Make sure to mount all of the jars in the lib folder.

...

Can JMeter record HTTPS requests using the recording proxy?

*Answer:*  Yes, in JMeter 2.4. JMeter now uses its own dummy certificate which the browser needs to be configured to accept.

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

*Answer:*  You can display your server's response text in the View Results Tree listener.

Is there a JMX Schema/DTD available?

*Answer:*  No. Don't plan on having one either at this point. Changes would be too frequent to realistically keep up with.

What happens with redirects when asserting HTTP responses?

*Answer:*  Assertions aren't smart enough to do the right thing with redirected requests - currently the 302 response would be asserted against. You can get around this by recording your test plans and leaving "follow redirects" off.

...

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: How the Java launcher finds user classes

...

What Pattern matching (regexen) does JMeter support?

*Answer:*  JMeter includes the pattern matching software Apache Jakarta ORO.

...

Currently I am using WAS 5.0 Application Server . For “Monitor Results” , JMeter shows the example for TOMCAT 5.0 WebServer.

Info

...

titleFollowings from JMeter doc

...

Add the HTTP Request to the Thread Group element (

...

Add → Sampler → HTTP Request). Then, select the HTTP Request element in the tree and edit the following properties):

Change the Name field to "Server Status". Enter the IP address or Hostname Enter the port number Set the Path field to "/manager/status" if you're using Tomcat. Add a request parameter named "XML" in uppercase. Give it a value of "true" in lowercase. Check "Use as Monitor" at the bottom of the sampler


“””””
Please let me know how I can set “Monitor Results” of JMeter in WAS5.0.

...

You can uncomment those lines (remove # character) and restart jmeter :

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

...