Create a test for two web applications

As for Groovy classes under the Include/scripts/groovy/myPackage, you can create a jar which contains the classes. See the following post and try.