Search This Blog

Wednesday, May 18, 2016

Example implementation of small automation framework for SoapUI


Basic design of the framework:

1. There is a separate Common.xml SoapUI project. With that implementation Common.xml must be placed in the same location as the actual test project of SoapUI.
2. Inside that project there is a Test Suite that contains Test Case which further contains Groovy steps.
3. In the groovy steps there can be a logic that is common (similar, the same) for multiple actions. It allows for centralizing the code a little bit and theoretically easier maintenance.
4. To use the methods inside our "libraries" we need to programatically load the Common.xml project , which is done in 'Setup script' of each SoapUI Test Case.

Code to load the Common.xml project is as follows:


5. In Common.xml let's have "SSL" Groovy and RunProcess steps, which serve for us as libraries with methods. Of course we can have many additional or different functionality depending on what specific project we do tests for. These libraries are listed and described below in one-by-one manner.


6. Below is the implementation of SSL, where we can find utility methods to programatically alter the SSL keystore in Test Step, or SSL TrustStore in the SoapUI project:



7. Below is the implementation of RunProcess, where we can find utility methods to run the shell commands. It can be used to do the message signing purpose where the signing is being done with conflicting wss4j-2.x library. That library is in conflict with wss4j-1.x library use by SoapUI.