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

Creating a custom TestStep (Factory) plugin to check whether a file exists


In this recipe we will put our plugin skills to work to create a custom TestStep to check whether a file exists. The file check TestStep will accept a property with the path to a file and then pass or fail depending on whether the file actually exists in that location.

Getting ready

This recipe builds on the Developing a Groovy plugin with custom Action using Gradle recipe, so if you haven't done it, then you might find it a helpful reference.

The code for this recipe can be found in the plugins/soapui-file-check-plugin/ folder in the chapter 11 samples. The FileCheckPluginProject project can also be found there.

How to do it...

To do this we're going to start from the soapui-sample-plugin Gradle project:

  1. Add a new custom TestStep (FileCheckTestStep.groovy)

  2. Add a new custom Factory to create the item for FileCheckTestStep Model (FileCheckTestStep.groovy)

  3. Add a new factories.xml configuration file for our custom Factory.

  4. Add...