Forum Discussion
SmartBear_Suppo
Alumni
14 years agoHi Nico,
Thanks for clarifying. Hm...
For mocks that need to "live" only during the execution of the single TestCase I suggest you use an external TestRunListener that implements the beforeRun / afterRun events to start/stop the Mock (see http://soapui.org/Developers-Corner/ext ... -in-soapui) - you could set a TestCase property in the project file when creating the test to indicate to the listener which Mock to run (if there are several in the project).
If your Mock needs to live for longer than a single TestCase I'm not sure - perhaps you could use the toolrunner to generate a war from your Mock and deploy that automatically to a local Tomcat!? All this would have to be done from the kdt-framework I guess.. alternatively the framework could simple start the MockService itself by directly loading the project and invoking the corresponding APIs (if it is written in Java...)
Does that give you any ideas?
regards!
/Ole
SmartBear Software
Thanks for clarifying. Hm...
For mocks that need to "live" only during the execution of the single TestCase I suggest you use an external TestRunListener that implements the beforeRun / afterRun events to start/stop the Mock (see http://soapui.org/Developers-Corner/ext ... -in-soapui) - you could set a TestCase property in the project file when creating the test to indicate to the listener which Mock to run (if there are several in the project).
If your Mock needs to live for longer than a single TestCase I'm not sure - perhaps you could use the toolrunner to generate a war from your Mock and deploy that automatically to a local Tomcat!? All this would have to be done from the kdt-framework I guess.. alternatively the framework could simple start the MockService itself by directly loading the project and invoking the corresponding APIs (if it is written in Java...)
Does that give you any ideas?
regards!
/Ole
SmartBear Software