Forum Discussion

Lavalyte's avatar
Occasional Contributor
8 years ago

Deployed mock server script directory

This is related to my previous question...


If you create and deploy a mock server war, is there a directory you can add to the deployment where soapui will pick up groovy scripts that contain classes and methods that can be called by the deployed mock scriptlets?



3 Replies

  • Lavalyte's avatar
    Occasional Contributor

    One suggestion I've seen is to compile groovy code into a jar and include that in the deployed war.

    Has anyone done that with open source soap UI?

    • rupert_anderson's avatar
      Valued Contributor



      Yes, that works in SoapUI O/S.


      As a quick test with version 5.2.1, I created a test Groovy library jar as per:



      When generating the mock using 'deploy as war' I ticked the 'Include external Jar Files' option as below:


      This resulted in my soapuilib-1.0-sample.jar being copied into the mock war's WEB-INF/lib folder along with all the other jar files.


      In my mock response script I was able to call the custom jar e.g.



      Requests to the mock when deployed on Tomcat 8 were successful.





      • Lavalyte's avatar
        Occasional Contributor



        I'd done a similar test myself.

        It would be nice if this was bound at the project level rather than the installation level.