Forum Discussion

GTaylor's avatar
GTaylor
Occasional Contributor
12 years ago

"afterSubmit" Listener doesn't work from command-line

I have a test suite that relies on a test request that returns CDATA int the response. As per the soapui pro tutorials, I added a groovy script at the project level "SubmitListenter.afterSubmit" to remove the CDATA reference in the response. I coded all the way through the test suite with this working, but now that I want to kick off my tests from the command-line, it seems that the script is being ignored. I looked through the command-line options and nothing jumps out at me as being the option I need. Does anyone have any advice?
  • Hi GTaylor,

    I haven't been able to reproduce this problem. What version of SoapUI are you using? Please try the latest version (4.5.1) and this should not happen.

    Regards,

    Renato
    SmartBear Software
  • GTaylor's avatar
    GTaylor
    Occasional Contributor
    I am using 4.5.1, but I found out at least one issue I'm having with this test suite. When the CDATA is removed from the response message, the response was left in escaped form "<, >, "". This wasn't always the case when I was debugging the test suite. Something fishy was happening that i couldn't put my finger on. When I would start the test through the GUI, half the time it would respond correctly, and half the time it wouldn't. I would have to restart the app, or go into the project settings to disable my SubmitListner script save the project and then enable the script and save the project again for things to work correctly. I think there's something going on here that I can't explain, but my work around is to remove the CDATA and then all the escape characters as well. This seems to allow the test suite to run every time without undesired behavior.

    So, that being said, I've got things to work, but I feel there is a bug here, but I can't tell you what it is.

    Thanks for your reply.