This topic provides a small example of performing two main things:
Creating a basic project based on a sample plugin and trying it.
Customizing the plugin action, adding features, and installing the updated plugin.
A Basic Project
Customize the Plugin
To create a basic plugin, use the maven archetype to generate a basic plugin project.
1. Browse to the project directory (where you want to create the plugin project).
2. Open the command prompt.
3. Run the command.
mvn archetype:generate -DarchetypeGroupId=com.smartbear.maven.archetypes -DarchetypeArtifactId=soapui-plugin-archetype -DarchetypeCatalog=soapui/repository/maven2
This will download and install the maven archetype and start the generation of the plugin project. You will be prompted for a number of properties – set these as follows:
The default project is generated by maven:
4. Open the
5. Open the command prompt.
6. Run the command:
Maven builds the plugin and packages it for installation:
Use the Plugin Manager to install the plugin file.
See Install Plugin From File for more information.
To see the installed action, right-click -an open project- in your SoapUI workspace.
The plugin action is at the bottom of the menu:
Use the Plugin Manager to uninstall the plugin file.
See Remove plugin for more information.
The basic sample plugin does not do anything useful, it only displays a 'hello' message. We now want to change the plugin to perform a search in our project, and open the list with the search results in the selected project.
Open the project in your java development environment.
Find the Maven generated file -
The default implementation of the
perform method just shows a "Hello from..." message in a pop-up window.
Let's change the
perform method to
prompt for a regular expression search string (
match item names using the search string;
display the results in
We have changed some of the metadata in the constructor.
PluginConfig.java file has been updated accordingly:
And, we have also changed the metadata in the
<name>SoapUI Search Plugin</name>
We need to build a plugin file to be installed:
Open the command prompt.
Run the command:
Maven builds the plugin and packages it for installation.
With the plugin installed, you now have a new option on the context menu:
It prompts as follows when selected:
It uses the specified regular expression to find items in the selected project and to display them:
Double-clicking an item in this window opens the corresponding desktop panel for editing.