Forum Discussion

JustinM89's avatar
JustinM89
Contributor
8 years ago

Maintain HTTP session from Groovy

I am using a Groovy script to run a test case from another test suite. It's getting to the test case and running it, but it fails on the first step and I'm certain that the problem is that it's not maintaining the session. I know when you add a call test step there's a checkbox you can check to maintain the session, but I don't have that luxury because I'm doing this from within a Groovy script.

 

Is there anyway to set this maintain session option with code? I've tried using testCase.setKeepSession(true) on the test case I'm calling, but that doesn't seem to work.

 

EDIT -- I think the option I'm looking for is to copy the session to and from the test case I'm calling

1 Reply

  • SmartBearAmber's avatar
    SmartBearAmber
    SmartBear Alumni (Retired)

    If you're using the Pro version of SoapUI, I would recommend using the Run Test Case test step instead of groovy script.