0
votes

I am new to JMETER , I am trying to record my web application and correlate JSESSION IDs and other details.

JSESSION ID , i want to capture from previous request and send as parameter in next request.

But in the next request parameters tab is disabled. I see in some posts that body should be empty to have parameters tab. In the attached screenshot , if I make body empty , how do I pass the parameters.can anyone please help me . I am not able to proceed further

enter image description here

1
What/How do you want to send the parameters? if it's inside JSON you don't need Parameters tab, if it's query parameters you don't need Parameters tab, explain what/how you want to send parametersuser7294900
From the previous response, i created a variable using reg exp extractor - JSESION . so now i want to send the value of the variable JSESION in this request in JSON format( as shown above screenshot) . how do I do that.where should i give this variable JSESION? please helpchaatat
Use ${JSESION}user7294900
I updated body data with below {"sessionId":"","ipAddress":"","autoLogin":"N","numberLoginAttempts":0,"cookie":"${JSESSION}"} Also I tried {"sessionId":"","ipAddress":"","autoLogin":"N","numberLoginAttempts":0,"cookie":${JSESSION}} both are throwing errors.chaatat
Please check if you have removed the text from body tab and there is no white space which is not allowing you to move to parameters tab.Zohair

1 Answers

0
votes

If you're testing a REST API and want to parameterize the contents of your payload you can just inline the relevant JMeter Function and/or Variable directly into the request body like:

{"sessionId":"","ipAddress":"","autoLogin":"N","numberLoginAttempts":0,"cookie":"JSESSIONID=${JSESION}"}

If you will still be experiencing problems use Debug Sampler and View Results Tree listener combination in order to check that:

  1. Your JSESION variable exists
  2. It has expected value