I'm new to JMeter and want to know how to pass session-id to all httpRequests.
I have tried with cookieManager and then HttpRequest is having session-id but response shows "session expired".
Cookie manager and Post Processor will solve the problem.
For example-
below opensrm is transaction controller
Add HTTP Cookie Manager and add Post Processor in the request to extract the result as below.
Below is a Boundary extractor I used to extract the value of the session ID from the response.
Refer this for Boundary Extractor
Now we will use this variable to initialize cookie in Cookie Manager
sessionID is a variable used to store extracted session id from the response in Boundary extractor.
For how to use HTTP Cookie manager https://jmeter.apache.org/usermanual/component_reference.html#HTTP_Cookie_Manager
FYI: Cookie manager should be used where ever the session id is used in requests.