· projects  · 2 min read

SoapUI Containerization

Docker and SoapUI were not technologies that I had prior experience in.

For my task, I was to containerize SoapUI in an OpenShift environment by taking a SoapUI runner, and incorporating it inside of a Docker container, and I did just that!

https://github.com/ddavison/docker-soapui

What does it do?

By containerizing SoapUI and its runner, this allows you to have a portable SoapUI installation that lets you run your SoapUI projects anywhere!

Included in this docker container, is the following:

  • A Centos operating system
  • A Python interpreter
  • A Java JDK
  • A SoapUI Installation

This container utilizes the standard Python library to launch a simple http server that will listen on port 3000 for POST requests. These POST requests would contain pertinent information for your SoapUI tests. That would include:

  • The URL to test against
  • The Suite to run
  • The SoapUI Project XML

Tutorial

Currently I use this setup in an OpenShift configuration to listen on a URL

http://soapui.apps.example.demo

Which will accept said POST requests, and run any SoapUI tests fired at it.

Steps

Pull the Docker Image

docker pull ddavison/soapui

Run the Docker Container

docker run -it -p 3000:3000 ddavison/soapui

Curl the Service

curl -F "project=@/path/to/soapui-project.xml" -F "suite=YourSuite" http://localhost:3000

After running the SoapUI tests, there are different HTTP status codes associated with the run.

CodeMessageDescription
200OKAll SoapUI Tests ran successfully and passed
550Test Failure(s)You have failures in the SoapUI Test suite / cases. You can check the content of the request to determine what failed
551No SuiteYou did not specify the suite POST parameter with the name of the suite you wanted to run
552No SoapUI ProjectYou did not specify the ‘project’ POST parameter with the proper SoapUI XML data. Remember: This needs to be the actual file itself sent as multipart/form-data. E.g:
curl -F “[email protected]” …
500Internal Server ErrorAn exception occured while running the SoapUI Tests
Back to Blog

Related Posts

View All Posts »