How can I start all mock services when SoapUI starts?

Are there any command line options or other ways for all mock services to start when soap ui starts?

+4
source share
5 answers

Since mockServices is a Map, this will also work:

project.mockServices.each () {entry → entry.value.start ()}

+5
source

You can automate this with Groovy Script.

  • Double-click on the project (inside the Navigator panel)
  • Click the Download Script tab
  • As an example, you can use the script:

    project.getMockServiceByName("name_of_your_mock_service_01").start(); project.getMockServiceByName("name_of_your_mock_service_02").start();

+3
source

Equally looked for rest. To do this, use this instead, from the test suite of scripts. Just in case, when someone lands here during a search, as I landed. It can also be used from a project level or test case, modifying it accordingly.

  testSuite.project.getRestMockServiceByName("Service1").start() 
+2
source

As defined in the soapUI support forum, you can add the following code as a "load script" for your project:

 for( mockService in project.mockServiceList ) { def windowReference = com.eviware.soapui.support.UISupport.showDesktopPanel( mockService ) mockService.start() com.eviware.soapui.SoapUI.desktop.minimize( windowReference ) } 

SoapUI Support Help Forum:
http://forum.soapui.org/viewtopic.php?f=5&t=1138

0
source

I use this Groovy - script to run all the layout services in the project (configured on the "Download Script" tab - in the project view.

 mockServicesCount = project.getMockServiceCount() for (i in 0..(mockServicesCount-1)) { project.getMockServiceAt(i).start(); i++; } 
0
source

All Articles