SoapUI GUI can "run" the following objects from their respective editors.
- Project
- TestSuite
- TestCase
- Request
Details for each are included below (Execution Techniques)
References - https://www.soapui.org/docs/test-automation/running-functional-tests/
Three Test Runners are available
- Functional
- Load
- Security
TestRunner scripts are available as .SH or .BAT and can be found in the SoapUI installation bin directory. ex.
on Mac OS or linux, this would be /Applications/SoapUI-5.7.2.app/Contents/java/app/bin
loadtestrunner.sh
securitytestrunner.sh
testrunner.sh
A script is also available to run Mock services mockservicerunner.sh and toolsrunner
Run TestRunner using an outside process or application (for example, a Python script or shell script)
Requires SoapUI to be installed on that machine.
https://community.smartbear.com/discussions/readyapi-questions/soapui-testing-and-automation/212243
SOAPUI_RUNNER=${SOAPUI_HOME}/bin/testrunner.sh
SOAPUI_COMMAND="${SOAPUI_RUNNER} "${SOAPUI_TESTS_DIR}/${TEST_SUITE}" -I -f \"${RELATIVE_REPORT_DIR}\" \
-PmyCustomEndpoint=httpEndpointHere \
-PsecondParameter=secondValue \
${ANY_OTHER_PREDEFINED_SOAPUI_EXTRA_ARGS}"
echo "Running: ${SOAPUI_COMMAND}"
sh -c "${SOAPUI_COMMAND}"
// note: If used, the Interface and TestStep Requests will still need to use Property Expansions to run correctly
testrunner.bat -FPDF -e "https://bankground.apimate.eu" c:\projects\my-soapui-project.xml
[SoapUI Open Source Dockerhub page] (https://hub.docker.com/r/smartbear/soapuios-testrunner/)
The docker container has its own set of arguments.
One of those arguments is designed to encompass the normal SoapUI command line arguments.
For the official Smartbear image, this will be the -e COMMAND_LINE=" " argument
docker run -v="Project Folder":/project -v="Report Folder":/reports -v="Extensions Folder":/ext -e COMMAND_LINE="Test Runner Arguments" -it smartbear/soapuios-testrunner:latest
Another example using a 3rd party docker image
https://ddavison.io/2016/02/04/soapui-containerization.html
docker run --name soapie -d -p 3000:3000 ddavison/soapui
curl -F "[email protected]" \
-F "suite=Bank1_TestSuite" \
-F "option=-r" \
http://localhost:3000
// try this format
$ curl --form "project=@/path/to/soapui-project.xml" \
--form "suite=TestSuite" \
--form "properties=@pathToGlobalPropertiesFile" \
--form "option=-r" \
https://soapie.orb.local/
How do we get to the execution commands?
Project > Right-click > Select desired Test Runner runs all TestSuites
- ensure your os user has read + write permissions on the bin directory
Project => Groovy Groovy script must be inside a TestCase and implemented as a "Groovy TestStep". This can be any TestCase
- TODO: write a Groovy script. Place in location
Project => Editor TestSuites tab > green arrow
TestSuite => Launcher TestSuite => Groovy TestSuite => Editor
TestCase => Launcher TestCase => Groovy TestCase => Editor
Request => Launcher Request => Groovy Request => Editor