Forum Discussion

Brandon_C's avatar
Brandon_C
Occasional Contributor
15 years ago

Mock service - groovy script start/stop

Is there away to start/stop a mock service via groovy script as one of the groovy test steps?

2 Replies

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hello,

    something like this you can put in setup script of test case:


    testCase.testSuite.project.getMockServiceByName("Test").start()



    where "Test" is name of my mock service.

    Does it helps,
    robert
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hello,

    I forgot stoping :


    testCase.testSuite.project.getMockServiceByName("Test").getMockRunner().stop()



    robert