Forum Discussion

anrozo1995's avatar
Regular Visitor
3 years ago

There is any way to make mock service concurrent?


this is my code on my OnRequest Script on the mock service:

def signNum = com.eviware.soapui.SoapUI.globalProperties.getPropertyValues("signalNum").toInteger()
signalNum += 1
def signalNumS = signalNum.toString()
def signNum = com.eviware.soapui.SoapUI.globalProperties.setPropertyValues("signalNum",signalNumS)
def signal_text = mockRequest.getRequestContent ()
def date = new Date().format('yyyy-DDD-hh-mm-ss-SSS')
def myReqPath = "C:/SignalReceived-"+ signNum + "-" + date + ".xml"
def logFile = new File(myReqPath)

and It works fine until I receive 2 signals in less than 2ms... This script saves the signal with the same "signalNum" (but a different timestamp). It makes it impossible for me to process the signals from RobotFramework (doesn't matter what I do with the signals).

There is any way to make mock service concurrent? I mean, a unique thread, a queue of responses waiting to be processed one after the last response received.

greats and thnx in advance!

No RepliesBe the first to reply