Showing results for 
Search instead for 
Did you mean: 

how to share session id to other request

Occasional Contributor

how to share session id to other request

i want to share session id to different request 

Tags (3)

Re: how to share session id to other request



I suppose session ID = token.

  1. Create a property for the session ID under the Project level.
  2. Use groovy test step to process it if your session ID comes as part of a response data and store it to the Project Property. Ex. trim the part you need. You may refer to the code sample I have here.
  3. In the Headers tab of the test case, click the + icon for "Add a custom HTTP header to this session".
  4. Specify the name of your session ID variable.
  5. For the value on the right side, instead of writing or hardcoding the whole token, call the project property. Ex.

     Header: myToken

     Value: ${#Project#cleanedToken}

 6. Sessions usually expire after a period of time, I would suggest you select the test case on the navigator tree on the left side of SoapUI, right-click and select Options. When Test Case options pops-up make sure Basic tab is selected and check Session: Maintain HTTP session to avoid timeout.




"an Engineer without a degree, a QA tester without any official certification (just yet ;-) ) "
Community Hero
New Here?
Join us and watch the welcome video:
Watch the new interview
Top Kudoed Authors