Forum Discussion

RPfrimmer's avatar
RPfrimmer
Occasional Contributor
13 years ago

Maintaining HTTP Sessions when RunTest case test step

Hi All,

I'm running into an issue that I'm not sure how to handle.

The as part of the session management for the web services I'm working against, it requires the HTTP session to be maintained throughout the entire test case I'm building.

I found the option "Maintain HTTP Session" in the test case options and initially this has worked great, but I've run into a bit of a hiccup.

In order to try to make building future test cases more streamlined I started to build modular test cases that would be called from other test cases to minimize the effort of having to add all the same steps over and over.

I've run into an issue where it appears that when the main test case calls the modular piece, it is not maintaining the same HTTP session. It looks like the modular piece initiates its own HTTP session.

Does anyone know a way around this? or am I fated to have to add all the test steps manually every time I need them?

Rob

4 Replies

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi Rob,

    there is an option for propagating the HTTP Session in the Run TestCase Options dialog - do you have that checked ok?

    regards!

    /Ole
    SmartBear Software
  • RPfrimmer's avatar
    RPfrimmer
    Occasional Contributor
    As mentioned in my post above, I tried using the Maintain HTTP Session. But the session is only maintained for the main test case, when it uses the 'Run TestCase' test step the a new session is created, it doesn't maintain the same session that was created by the main test case.
  • Nisha_Shah's avatar
    Nisha_Shah
    Occasional Contributor
    I too have run into this issue in the past (soapUI-Pro 3.6.1), and would be interested to know how to fix it. I am currently using soapUI-Pro 4.0.1.

    Thanks,
    Nisha
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    Please try updating to soapUI Pro 4.5, as it seems to work for me there. I've set up a test with two TestCases, where each uses a HTTP Request TestStep, and one uses a Run TestCase step to run the other TestCase. With "Maintain HTTP Session" enabled for both TestCases, a single session is used.

    Regards,
    Dain
    SmartBear Software