Running mocks and tests using Groovy scripts

As you might imagine, running SoapUI mocks and tests in Groovy is quite similar to running the same in Java, but is arguably more elegant in terms of syntax and usage, and can also leverage Grape (The Groovy Adaptable Packaging Engine or Groovy Advanced Packaging Engine) dependency management to allow scripts to download their dependencies when run—see http://groovy.codehaus.org/Grape for more info. This recipe starts with a simple Groovy equivalent of the java RunMockAndTest class from the previous recipe and then shows how Grape can be used to supply all its library dependencies. This recipe is similar in concept at the beginning, and probably a little briefer in places than the Java and JUnit one. ...

Get SoapUI Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.