Home > Uncategorized > SOAP UI, Regression Testing of Human based processes, using Groovy scripts or SOAP UI Steps

SOAP UI, Regression Testing of Human based processes, using Groovy scripts or SOAP UI Steps

We have been using SOAP UI for regression and load testing of workflow. SOAP UI can be downloaded for free from the soapui.org website.

Our story today is to test the absence request, which is basically a five step human workflow:

  • init process from a human task
  • create an activity task,
  • complete the activity task,
  • create a notification, and
  • dismiss the notification

The graphical BPMN looks something similar to this:

We are going to also add a new call to the authentication service, provided on the runtime, so that we can retrieve the authentication token and re-use it throughout the test case.

1. Standard SOAP UI Testing

The actual SOAP UI test case will then look like this:

Let’s go through the different steps:

  1. AuthenticateUser: Send a request to the security service and retrieve the security token
  2. CopyToken: This steps copies the token retrieve from the call to the security service to the request we are about to make to TMS.
  3. GetPipa: Send a request to TMS.getAvailableTasks, targeted for the pipa of the absence request. We retrieve only one task from this call
  4. CopyTokenAndPipaId: Similar to 2, we copy the token, and also the taskId of the pipa task, collected from 3
  5. initProcess: Send a request to TMS.initProcess that will then call the process engine to start the process accordingly.
    This steps is equivalent to the action of pressing the start button in the form manager:
  6. CopyTokenToGetTasks: Copy the security token.
  7. Delay: We need to wait for the task to be assigned to our current user, according to the process. We are now at the step describe below:
  8. GetActivityTasks: Now that the activity task “Request Manager Approval” should be in the task list, let’s retrieve its id
  9. CopyActivityTaskId: Copy token and taskId for the next request
  10. Complete: This one is called on TMP, the TaskManagementProcess, because it handles the task lifecycle.
    The endpoint for TMP can be found locally at: http://localhost:8080/ode/processes/completeTask?wsdlThis step does the same as filling the form of the activity task and using the complete button of the form manager.
  11. GetNotification: Calling TMS.getAvailableTasks this time again, but with Notification in state READY as a target.
  12. CompleteNotification: This would be the same as pressing the Dismiss buttonDismiss button in form manager

2. Testing through Groovy Scripting

SoapUI has a very detailed documentation on how to write tests using groovy scripting with SOAP UI.

This then looks like the screenshot below:

Groovy Testing SoapUI Test

Only the Groovy Script is enabled.

A quick excerpt of the groovy script looks like this:

Workflow Groovy Test Snippet

We then can go through all the same steps exposed into section 1.

3. Download and run.

The SOAP UI project for testing workflow and absence request can be found on github.

After importing, you will see a summary of the project:

Test Suite Overview

And you can run the two tests straight from the TestSuites tab.

Green Lights

Now if you feel like contributing new workflow processes, and new workflow test cases, let us know.

Categories: Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

Leave a comment