Forum Discussion

sralpert's avatar
sralpert
Occasional Contributor
16 years ago

Still can't pass cookies along!

soapUI 3.0.1 community edition
In a TestSuite I have marked maintain http session
http log shows as part of first request:
SET-COOKIE: CSPSESSIONID-SP-57772-UP-csp-finv43q-=00100001000022jbXyeu0000005W2dc98YDWOPURSnC8IGqw--; path=/csp/finv43q/;[\r][\n]

but second test case (to same server) shows no cookies.  I tried to interject in between the groovy script:

def state = context.getProperty( com.eviware.soapui.model.testsuite.TestRunContext.HTTP_STATE_PROPERTY )
assert state != null : "Missing HttpState.."
def cookies = state.cookies
assert cookies.length > 0 : "Missing cookies.."
for( c in 0..cookies.length-1 )
log.info cookies[c].name + " = " + cookies[c].value

but testcase log shows:

java.lang.AssertionError: Missing cookies... Expression: (cookies.length > 0) Missing cookies... Expression: (cookies.length > 0)

I did check maintain http session on the groovy step as well.

What am I missing?

tnx, steve
No RepliesBe the first to reply