...
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
- Install Petstore application on a local Tomcat server.
- Start JMeter
- Click the Add button to add the following user defined variables to the Test Plan node:
- server: www.jboss.jwebhosting.netlocalhost
- port: 808080
- protocol: http
- Add a Thread Group to the Test Plan setting:
- Number of Threads: 2
- Clear the forever checkbox
- Loop Count: 1
- Add Config Element > HTTP Cookie Manager to Thread Group
- Add Pre Processors > User Parameters to Thread Group
- Click Add User to add an additional user to the User Parameters
- Click Add Variable and set name to category, User_1 to DOGS and User_2 to FISH
- Add Sampler > HTTP Request to Thread Group with the following settings:
- Server Name or IP: ${server}
- Port Number: ${port}
- Protocol: ${protocol}
- Path: /estore/control/category
- Click the Add button to add a parameter to the request:
- Name: category_id
- Value: ${category}
- Add Listener > View Results Tree to Thread Group
- Save
- Run > Start
...