Define Variable as Part of Test Plan

Q

How to define a variable as part of my JMeter Test Plan?

✍: FYIcenter.com

A

You can follow this tutorial to define a variable as part of your Test Plan.

1. Run JMeter and create a test plan called Get-Exchange-Rate.jmx.

2. Click to open the test plan properties panel.

3. Click "Add" to define a new variable:

Name: hostname
Value: api.fixer.io

4. Add a thread group and child HTTP Request sampler with these properties:

Name: Latest Exhange Rate
Protocol: https
Server Name: ${hostname}
Method: GET
Path: /latest

5. Save the test plan and run it. JMeter will make HTTP request of GET https://api.fixer.io/lastest.

The picture below shows you how to define a variable as part of the test plan properties:
Variable as Part of Test Plan

 

Define Variable as Part of Post-Processors

What Are User Defined Variables

Variables and Functions in JMeter

⇑⇑ Apache JMeter Tutorials

2018-08-06, 381👍, 0💬