3

I have implemented a mock service.it mock a async soap web service with call back result.When a request arrive with a unique id, mock service provide a response ("Prossesing") and store the requestid in a context like this (within Script):

context.put("requestid",mockerequest.requestid)

A call back is fired (from AfterScript) with stored requestid after few millisecond to show async behavior, using ThreadSleep .

From context, requestid is extracted like this,which is passed with callback result :

context.get("requestid")

It works fine with a single call. But when repeated requests are performed during load test, requestid in the context is changed(next request is changing current requestid ) and a callback is fired with a wrong request id.It now problem to test multiple request in one go.

Do SoapUI support any kind of session variable, where value will be preserved for each session to avoid this problem ?

mnhmilu
  • 2,327
  • 1
  • 30
  • 50
  • Way after the facts, but when I started out with SoapUI I had somehting similar with parallel requests. Also I was copying around some session headers to have a continued session over test steps. Thing is though that SoapUI takes care of that for you if you want. There's an option in the TestCase settings that says 'Keep HTTP session'. Successive requests in the same testcase will basically behave like those same successive requests in a browser. By extension you can copy sessions to and from test cases when you call to a test case, making this feature useful for functional testing. – Matthias dirickx Feb 01 '19 at 16:52

0 Answers0