Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can i start all mock services when SoapUI starts?

Tags:

soapui

Are there any command line parameters, or other ways, so that all the mock services start up when soap ui is started?

like image 692
Brijesh Bharadwaj Avatar asked Jan 14 '13 15:01

Brijesh Bharadwaj


People also ask

What is mock response in SoapUI?

A mock service imitates a real REST or SOAP API – it contains definitions for operations that clients call, receives requests, and returns simulated responses. Note: In the SoapUI documentation, mocking can also be called isolation, virtualization, or simulation. All these terms refer to the same SoapUI feature.


2 Answers

Since the mockServices is a Map this will also work:

project.mockServices.each() { entry -> entry.value.start() }

like image 99
user2726132 Avatar answered Jan 04 '23 10:01

user2726132


You can automate this with the help of a Groovy Script.

  1. Double click on the Project (inside the Navigator pane)
  2. Open the tab "Load Script"
  3. Following script can be used as an example:

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

like image 24
Kris Avatar answered Jan 04 '23 11:01

Kris