Forum Discussion

M_McDonald's avatar
M_McDonald
Super Contributor
16 years ago

How to detect if MockService is running

Hi -

How can I tell from a Groovy script if a MockService is already running?

Thanks.

1 Reply

  • Hello,

    Try this:

    def msList = context.getTestCase().getTestSuite().getProject().getMockServiceList()
    for( ms in msList )
    log.info "${ms} is ${ms.getMockRunner() == null ? 'not working' : 'working'} "


    Hope this example helps, let me know
    robert