Forum Discussion

mmoser18's avatar
mmoser18
Frequent Contributor
2 years ago

Can one explicitly stop the SOAPUI-Maven Plugin at the end of a module's build?

Referring to my other question (https://community.smartbear.com/t5/SoapUI-Open-Source-Questions/Multiple-REST-mocks-on-same-port/m-p/242192ğŸ˜ž

 

We are using the soapui-maven-plugin to mock web services as well as REST services during our unit-tests (executed on a Jenkins build server).


As we had to learn the soapui-maven-plugin only supports the mocking of a single REST service at a time. If your SOAP Project file contains multiple REST mocks then by default only the first REST service will be started, unless one specifies a particular service using the <mockService>specificServiceHere</mockService> configuration option.

 

This works OK if one builds one module only. Since our project comprises multiple modules we need to enable/mock a different REST-service for each module's unit-tests. This, however, does not work (yet). While the REST services of the first module are being served properly, any subsequent module's REST service is not started, the corresponding requests always yield "404 Not found" only and hence our unit tests fail.

 

Apparently the soapui-maven-plugin is NOT stopped and restarted with the next module's configuration but continues to run while the subsequent module is being built. It is thus still running the REST mocks for the previous module and all calls to REST to service required for the testing of subsequent modules then fail. 

 

Is there a possibility to force-stop that plugin after the end of the tests of a module so that the plugin gets restarted for each module's build (with the proper settings for that module)?

 

Hope I could make myself clear...

No RepliesBe the first to reply