How to send parameters from one HTTP request to another in jmeter

I want to test a web application using JMeter.

I want to know how to transfer parameters from one HTTP request to another, my web application has a login page, and I send my username and password, I encountered a problem with this.

+6
source share
2 answers

Testing the input to jmeter, the correct way to pass the parameter through text or csv file, follow these steps as,

1. Create a text file (or csv file) containing usernames and passwords separated by commas. Put this in the same directory as your test plan, as

enter image description here

2. Add the CSV DataSet configuration item to the test plan. Name the variables USER and PASS. Also, add the path to the file name in this element (I have sure to check the path to the file) as

enter image description here

3. Fill in the username with $ {USER} and password with $ {PASS} in the login sampler (HTTP Request) as, enter image description here

Hope this helps you

+11
source

If your site requires login, you need to get some authentication information. This is usually handled by cookies. You need to look into the HTTP Cookie Manager , this will allow you to save cookie information through requests.

0
source

Source: https://habr.com/ru/post/956144/


All Articles