12 years ago
Stopping a REST Mock Service
I'm interesting in setting up a groovy script so that my REST Mock Service will stop as soon as it has returned the entire sequence of responses that I've provided it, but unfortunately I'm not that strong of a coder and I'm new to scripting in SoapUI on top of that.
So far I've placed the following groovy script in the "OnRequest Script", but it's no surprise that it's failing with a bunch of exceptions:
if ('${#MockService#Count}' < '${#MockService#NumOfRequests}')
{
'${#MockService#Count}'++
}
else
project.getMockServiceByName("RF Code Mock Service").getMockRunner().stop()
Any help you guys can provide me will be appreciated.
So far I've placed the following groovy script in the "OnRequest Script", but it's no surprise that it's failing with a bunch of exceptions:
if ('${#MockService#Count}' < '${#MockService#NumOfRequests}')
{
'${#MockService#Count}'++
}
else
project.getMockServiceByName("RF Code Mock Service").getMockRunner().stop()
Any help you guys can provide me will be appreciated.