Book Image

SoapUI Cookbook

By : Rupert Anderson
Book Image

SoapUI Cookbook

By: Rupert Anderson

Overview of this book

Table of Contents (19 chapters)
SoapUI Cookbook
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

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. So if you are starting here and need more details, then it might be helpful to refer to it.

Getting ready

If you don't already have it, you will need to download and install the latest version of Groovy;—if you need help with this, see http://groovy...