I am using a custom SDK with the following method:
public Optional<User> retrieveUser(HttpServletRequest request, HttpServletResponse response)
in the jmeter, I am using JSR223 sampler to access this method:
all the imports here
.
Optional<User> userProfile = new SdkClass().retrieveUser(request,response);
where request and response are HttpServletRequest and HttpServletResponse
In the step before JSR223, I have an HTTPRequest Sampler where the user logs in and a cookie gets created. My question is that how do I pass the request and response to
new SdkClass().retrieveUser(request,response); ?
The request should have the cookie that was created in the previous step