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 ...

Get SoapUI Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.