Glenn_Halstead
16 years agoOccasional Contributor
Set Mock response from groovy script that talks to JMS?
Hi Folks,
I'm new to SoapUI and am not a java guy (yet). I'm picking up some work from one of our test teams to bring the testing into our BAU test environment.
We use JMS and the guy who developed the tests has used a groovy step in the test cases to send the response to MQ and get the response back. The response can then be programatically checked in the groovy step.
I want to get the response back into SoapUI world so I can use SoapUI TestRequest assertions rather than java assertions. This is valuable to me as I intent to use Hudson to run the SoapUI test cases and parse their output to update our live web reporter tool. I'd rather have standard SoapUI output rather than java stack traces.
I tried to take the code from the groovy test step and put it into the MockService but I get a problem with the very first command (import com.sky.mq.java.MQManager) which works fine in the groovy test step. Is the mock groovy scope more limited that the test step groovy scope?
I'm thinking I could put the response into a testsuite / project / global property and expand that property in the mock response but can't see how to set a global property.
sooo.... lots of ideas, not much knowledge at this stage. Can anyone help?
thanks
Glenn
I'm new to SoapUI and am not a java guy (yet). I'm picking up some work from one of our test teams to bring the testing into our BAU test environment.
We use JMS and the guy who developed the tests has used a groovy step in the test cases to send the response to MQ and get the response back. The response can then be programatically checked in the groovy step.
I want to get the response back into SoapUI world so I can use SoapUI TestRequest assertions rather than java assertions. This is valuable to me as I intent to use Hudson to run the SoapUI test cases and parse their output to update our live web reporter tool. I'd rather have standard SoapUI output rather than java stack traces.
I tried to take the code from the groovy test step and put it into the MockService but I get a problem with the very first command (import com.sky.mq.java.MQManager) which works fine in the groovy test step. Is the mock groovy scope more limited that the test step groovy scope?
I'm thinking I could put the response into a testsuite / project / global property and expand that property in the mock response but can't see how to set a global property.
sooo.... lots of ideas, not much knowledge at this stage. Can anyone help?
thanks
Glenn