I want to test a web application using JMeter.
I want to know how to transfer parameters from one http request to other, my web app has a login page and I have send my username and password, I am facing problem in this.
Step to implement the logic for passing the variable value to another Thread Group: Add a 'Regular Expression Extractor' post-processor as a child element of 1.1 HTTP Request (Fetcher) and fetch the value in a variable (say employeeID) Add a 'BeanShell Assertion' and write ${__setProperty(valueToPass,${employeeID})}
You should add multiple "Thread Group" into a "Test Plan". Inside "Test Plan" Unselect "Run thread groups consecutively". Inside every "Thread Group" configure "Number of Threads(users)" as "1", "Ramp-Up Period" as "0", "Loop Count" as "1". Now, add "HTTP Request" into each "Thread Group".
Testing of login in jmeter, the proper way to pass the parameter via text or csv file, do the following steps as,
1.Create a text file (or csv file) containing the user names and passwords, separated by commas. Put this in the same directory as your test plan as,
2.Add a CSV DataSet configuration element to the test plan. Name the variables USER and PASS. also,Add a path to the filename in that element (I made sure to check the file path) as,
3.Replace the login name with ${USER} and the password with ${PASS} on the Log in (HTTP Request) Sampler as,
Hope this will help you,
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With