Using SoapUI in a Gitlab pipeline

To use SoapUI in a gitlab pipeline, you can use the official image provided by smartbear: smartbear/soapuios-testrunner.

The above-mentioned image is meant for execution of using the docker run command. As such, it has an ENTRYPOINT predefined which executes SoapUI. We will have to override this in order to allow our custom commands. This can be done in gitlab with the image.entrypoint key; a associated value of [""] means: start a shell here. We can then use this shell to execute our script.

The working directory of the script will be where the content of the git repository is located. This is not the same location as SoapUI. We can access SoapUI with an absolute path, then. Note that SOAPUI_DIR is an environment variable predefined in the docker image.

stages:
  - test

test:
  stage: test
  image:
    name: smartbear/soapuios-testrunner
    entrypoint: [""]
  script:
    - /usr/local/SmartBear/$SOAPUI_DIR/bin/testrunner.sh ./test-soapui-project.xml

More information

React: Event ListenersDisplay contents