SoapUI command line

SoapUI is widely used in WebService functional and performance test. This post is a note on how to run SoapUI in command line with Mac environment.

Environment: MBP, SoapUI 5.3 open source version, bash.

By default, the testrunner.sh located at Applications/SoapUI-5.3.0.app/Contents/java/app/bin. Therefore, an env file with below line will add testrunner into path.

export PATH=$PATH:/Applications/SoapUI-5.3.0.app/Contents/java/app/bin

To run test suite "Suite-Pub-1" in project "GettingStarted-soapui-project.xml" and dump XUnit format report to specified folder, below bash shell command is verified.

>cat test_Suite-Pub-1_in_Getting-Started.sh
testrunner.sh -Dfile.encoding=UTF-8-I -r -j -s Suite-Pub-1 GettingStarted-soapui-project.xml -f ./reports/$(date "+%Y-%m-%d-%H-%M-%S-Proj-GettingStarted")

There is an error with soapUI 5.3 open source version on class reflection (loading) step.

Running logs:

ⓑ maxwu  01:03  ~  devel  toy-box  soapUI   master  ./test_Suite-Pub-1_in_Getting-Started.sh
================================
=
= SOAPUI_HOME = /Applications/SoapUI-5.3.0.app/Contents/java/app
=
================================
SoapUI 5.3.0 TestCase Runner
01:04:34,315 INFO [DefaultSoapUICore] initialized soapui-settings from [/Users/maxwu/soapui-settings.xml]
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
01:04:35,133 INFO [PluginManager] 0 plugins loaded in 1 ms
01:04:35,133 INFO [DefaultSoapUICore] All plugins loaded
01:04:37,319 INFO [WsdlProject] Loaded project from [file:/Users/maxwu/devel/toy-box/soapUI/GettingStarted-soapui-project.xml]
01:04:37,326 INFO [SoapUITestCaseRunner] Running SoapUI tests in project [Soap Test Project]
01:04:37,327 INFO [SoapUITestCaseRunner] Running TestSuite [Suite-Pub-1], runType = SEQUENTIAL
01:04:37,349 INFO [SoapUITestCaseRunner] Running SoapUI testcase [TC-Soap-CurrencyRate]
01:04:37,354 INFO [SoapUITestCaseRunner] running step [ConversionRate-req]
01:04:38,475 DEBUG [HttpClientSupport$SoapUIHttpClient] Attempt 1 to execute request
01:04:38,475 DEBUG [SoapUIMultiThreadedHttpConnectionManager$SoapUIDefaultClientConnection] Sending request: POST /currencyconvertor.asmx HTTP/1.1
01:04:38,843 DEBUG [SoapUIMultiThreadedHttpConnectionManager$SoapUIDefaultClientConnection] Receiving response: HTTP/1.1 200 OK
01:04:38,846 DEBUG [HttpClientSupport$SoapUIHttpClient] Connection can be kept alive indefinitely
01:04:38,942 INFO [SoapUITestCaseRunner] Assertion [SOAP Response] has status VALID
01:04:38,942 INFO [SoapUITestCaseRunner] Assertion [Response SLA] has status VALID
01:04:38,946 INFO [SoapUITestCaseRunner] Finished running SoapUI testcase [TC-Soap-CurrencyRate], time taken: 1583ms, status: FINISHED
01:04:38,947 INFO [SoapUITestCaseRunner] Running SoapUI testcase [TC-Soap-Translator12]
01:04:38,947 INFO [SoapUITestCaseRunner] running step [SOAP Req En-Ch 1.2]
01:04:40,080 DEBUG [HttpClientSupport$SoapUIHttpClient] Attempt 1 to execute request
01:04:40,080 DEBUG [SoapUIMultiThreadedHttpConnectionManager$SoapUIDefaultClientConnection] Sending request: POST /webservices/EnglishChinese.asmx HTTP/1.1
01:04:41,486 DEBUG [SoapUIMultiThreadedHttpConnectionManager$SoapUIDefaultClientConnection] Receiving response: HTTP/1.1 200 OK
01:04:41,486 DEBUG [HttpClientSupport$SoapUIHttpClient] Connection can be kept alive indefinitely
01:04:41,856 INFO [SoapUITestCaseRunner] Assertion [SOAP Response] has status VALID
01:04:41,856 INFO [SoapUITestCaseRunner] Assertion [Schema Compliance] has status UNKNOWN
01:04:41,856 INFO [SoapUITestCaseRunner] Assertion [Not SOAP Fault] has status VALID
01:04:41,856 INFO [SoapUITestCaseRunner] Assertion [XPath Match Translation Result] has status VALID
01:04:41,857 INFO [SoapUITestCaseRunner] Finished running SoapUI testcase [TC-Soap-Translator12], time taken: 2908ms, status: FINISHED
01:04:41,857 INFO [SoapUITestCaseRunner] Running SoapUI testcase [TC-Get-Translator]
01:04:41,858 INFO [SoapUITestCaseRunner] running step [HTTP Req Get Translator]
01:04:41,871 DEBUG [HttpClientSupport$SoapUIHttpClient] Stale connection check
01:04:41,873 DEBUG [HttpClientSupport$SoapUIHttpClient] Attempt 1 to execute request
01:04:41,873 DEBUG [SoapUIMultiThreadedHttpConnectionManager$SoapUIDefaultClientConnection] Sending request: GET /webservices/EnglishChinese.asmx/Translator?wordKey=string HTTP/1.1
01:04:42,350 DEBUG [SoapUIMultiThreadedHttpConnectionManager$SoapUIDefaultClientConnection] Receiving response: HTTP/1.1 200 OK
01:04:42,351 DEBUG [HttpClientSupport$SoapUIHttpClient] Connection can be kept alive indefinitely
01:04:42,380 INFO [SoapUITestCaseRunner] Assertion [XPath Match] has status VALID
01:04:42,381 INFO [SoapUITestCaseRunner] Finished running SoapUI testcase [TC-Get-Translator], time taken: 480ms, status: FINISHED
01:04:42,381 INFO [SoapUITestCaseRunner] Running SoapUI testcase [TC-Post-Translator]
01:04:42,382 INFO [SoapUITestCaseRunner] running step [HTTP Req Get Translator]
01:04:42,384 DEBUG [HttpClientSupport$SoapUIHttpClient] Stale connection check
01:04:42,386 DEBUG [HttpClientSupport$SoapUIHttpClient] Attempt 1 to execute request
01:04:42,386 DEBUG [SoapUIMultiThreadedHttpConnectionManager$SoapUIDefaultClientConnection] Sending request: POST /webservices/EnglishChinese.asmx/Translator HTTP/1.1
01:04:42,974 DEBUG [SoapUIMultiThreadedHttpConnectionManager$SoapUIDefaultClientConnection] Receiving response: HTTP/1.1 200 OK
01:04:42,975 DEBUG [HttpClientSupport$SoapUIHttpClient] Connection can be kept alive indefinitely
01:04:42,987 INFO [SoapUITestCaseRunner] Assertion [XPath Match] has status VALID
01:04:42,988 INFO [SoapUITestCaseRunner] Finished running SoapUI testcase [TC-Post-Translator], time taken: 591ms, status: FINISHED
01:04:42,992 INFO [SoapUITestCaseRunner] Running SoapUI testcase [TC-Casual]
01:04:42,992 INFO [SoapUITestCaseRunner] running step [Groovy Script1]
Hello Max!
01:04:43,362 INFO [SoapUITestCaseRunner] Finished running SoapUI testcase [TC-Casual], time taken: 369ms, status: FINISHED
01:04:43,362 INFO [SoapUITestCaseRunner] TestSuite [Suite-Pub-1] finished with status [FINISHED] in 6031ms

SoapUI 5.3.0 TestCaseRunner Summary
-----------------------------
Time Taken: 6036ms
Total TestSuites: 1
Total TestCases: 5 (0 failed)
Total TestSteps: 5
Total Request Assertions: 8
Total Failed Assertions: 0
Total Exported Results: 0
 ⓑ maxwu  01:04  ~  devel  toy-box  soapUI   master 

TODO:

  • Groovy scripting with Java.
  • Check performance test chart.
  • Sharing the free SOAP Web Interface for test practices.
  • Construct local RESTful interface with Python Django and test with Groovy suites.

Drafted Feb27. EOF