Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: [Original edit by Philippe] Fix to big 52336

...

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

  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: www.jboss.jwebhosting.netlocalhost
    2. port: 808080
    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

...