Brant
Brant

Reputation: 15344

Can I run all SoapUI mock services in a workspace from the command line?

I have a SoapUI workspace with ~15 projects, each with a variety of interfaces and mock services. I want to deploy these mock services somewhere so that other developers can test against them.

SoapUI's command-line runner can run all the mock services in a single project, but not all the services in an entire workspace like the GUI can. Is there any way to replicate this behavior of the SoapUI GUI without resorting to running the GUI headlessly?

Because of the number of services involved, I'd rather not resort to combining everything into one uber-project. I also considered using the wargenerator tool to create a separate web application for each project, but this seems like overkill. Surely there must be a way to host all the mock services in a single web app, like the GUI can?

Upvotes: 1

Views: 1854

Answers (1)

SiKing
SiKing

Reputation: 10329

I think you will find that both the CLI testrunner as well as the Maven plugin do not have workspace as one of their parameters. So what you want does not exist.

However, I think it should be trivial to use a scripting language of your choice to iterate over all the *-soapui-project.xml files and fork into the background a command to start all mock services in that project.

Be aware that multiple services on the same port is not supported when running mock services from the command line. Only the one you started first will respond. The -p parameter can be used as a workaround to deploy services on different ports (see soapui.org for details).

Upvotes: 2

Related Questions