Forum Discussion

youen's avatar
16 years ago

Maven SoapUi Pluigin : launch mock and test goals on the same time

Hi,

I'am using soapui with its maven plugin to implement integration test.

To make this tests works I need the SoapUI to inject (test goal) and mock at the same time. (I am testing an ESB).

It seems it's not possible with the maven plugin.

Any idea to make it work ?

An extract of pom.xml :


eviware
maven-soapui-plugin
3.0/version>

yes
yes
src/test/resources/soapui-project.xml
target/soapui-reports
MockService1
true



mock
integration-test

mock





eviware
maven-soapui-plugin
3.0

yes
yes
src/test/resources/soapui-project.xml
target/soapui-reports



injector
integration-test

test



  • Hello,

    Well, you can not start at same time mock service and run test case this way. Better approach to this, I think is to start mocek service from startup script , which have every test case and every test suite, and that to shut it down in cleanup , which is again available in each test case and test suite.

    Here is groovy for both:



    Start :

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



    Stop:

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



    Hope this helps,let me know
    robert