Forum Discussion

helgi's avatar
helgi
Occasional Contributor
9 years ago
Solved

TestCase works in SoapUI gui, but not via testrunner.sh

Hi!

 

I have soap request that works in SoapUI gui, I also added it into test case, that works in gui also.

But when I'm running it via testrunner.sh, I'm getting next error:

./testrunner.sh -s"TestSuite 1" -c"TestCase 1" /home/helgi/soap/test/soapui-project.xml
================================
=
= SOAPUI_HOME = /home/helgi/SmartBear/SoapUI-5.2.1
= JAVA = /home/helgi/SmartBear/SoapUI-5.2.1/jre/bin/java
= JAVA_OPTS = -Xms128m -Xmx3948m -Dsoapui.properties=soapui.properties -Dgroovy.source.encoding=iso-8859-1 -Dsoapui.home=/home/helgi/SmartBear/SoapUI-5.2.1/bin -Dsoapui.ext.libraries=/home/helgi/SmartBear/SoapUI-5.2.1/bin/ext -Dsoapui.ext.listeners=/home/helgi/SmartBear/SoapUI-5.2.1/bin/listeners -Dsoapui.ext.actions=/home/helgi/SmartBear/SoapUI-5.2.1/bin/actions
= /home/helgi/SmartBear/SoapUI-5.2.1/jre/bin/java -Xms128m -Xmx3948m -Dsoapui.properties=soapui.properties -Dgroovy.source.encoding=iso-8859-1 -Dsoapui.home=/home/helgi/SmartBear/SoapUI-5.2.1/bin -Dsoapui.ext.libraries=/home/helgi/SmartBear/SoapUI-5.2.1/bin/ext -Dsoapui.ext.listeners=/home/helgi/SmartBear/SoapUI-5.2.1/bin/listeners -Dsoapui.ext.actions=/home/helgi/SmartBear/SoapUI-5.2.1/bin/actions -cp /home/helgi/SmartBear/SoapUI-5.2.1/jre/lib/jfxrt.jar:/home/helgi/SmartBear/SoapUI-5.2.1/bin/soapui-5.2.1.jar:/home/helgi/SmartBear/SoapUI-5.2.1/lib/* com.eviware.soapui.tools.SoapUITestCaseRunner -sTestSuite 1 -cTestCase 1 /home/helgi/soap/test/soapui-project.xml
=
================================
2016-06-17 11:47:08,190 [main] WARN  com.eviware.soapui.analytics.AnalyticsManager - Error generating Analytics session ID - returning empty String
java.lang.NullPointerException
        at com.eviware.soapui.analytics.AnalyticsManager.makeUserId(AnalyticsManager.java:140)
        at com.eviware.soapui.analytics.AnalyticsManager.<init>(AnalyticsManager.java:30)
        at com.eviware.soapui.analytics.AnalyticsManager.getInstance(AnalyticsManager.java:35)
        at com.eviware.soapui.analytics.Analytics.getAnalyticsManager(Analytics.java:16)
        at com.eviware.soapui.analytics.AnalyticsHelper.InitializeAnalytics(AnalyticsHelper.java:39)
        at com.eviware.soapui.tools.SoapUITestCaseRunner.main(SoapUITestCaseRunner.java:118)
Configuring log4j from [/home/helgi/SmartBear/SoapUI-5.2.1/bin/soapui-log4j.xml]
11:47:08,509 INFO  [DefaultSoapUICore] initialized soapui-settings from [/home/helgi/soapui-settings.xml]
11:47:08,532 INFO  [HttpClientSupport$Helper] Initializing KeyStore
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.
11:47:09,000 INFO  [PluginManager] 0 plugins loaded in 1 ms
11:47:09,000 INFO  [DefaultSoapUICore] All plugins loaded
SoapUI 5.2.1 TestCase Runner
11:47:09,559 INFO  [WsdlProject] Loaded project from [file:/home/helgi/soap/test/soapui-project.xml]
11:47:09,566 INFO  [SoapUITestCaseRunner] Running SoapUI tests in project [test-query]
11:47:09,566 INFO  [SoapUITestCaseRunner] Running TestCase [TestCase 1]
11:47:09,570 INFO  [SoapUITestCaseRunner] Running SoapUI testcase [TestCase 1]
11:47:09,574 INFO  [SoapUITestCaseRunner] running step [heartbeatRequest - Request 1]
11:47:10,364 DEBUG [HttpClientSupport$SoapUIHttpClient] Attempt 1 to execute request
11:47:10,365 DEBUG [SoapUIMultiThreadedHttpConnectionManager$SoapUIDefaultClientConnection] Sending request: POST /webserv/heartbeat HTTP/1.1
11:47:10,538 DEBUG [SoapUIMultiThreadedHttpConnectionManager$SoapUIDefaultClientConnection] I/O error closing connection
javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
        at sun.security.ssl.SSLSocketImpl.checkEOF(Unknown Source)
        at sun.security.ssl.SSLSocketImpl.checkWrite(Unknown Source)
        at sun.security.ssl.AppOutputStream.write(Unknown Source)
        at org.apache.http.impl.io.AbstractSessionOutputBuffer.flushBuffer(AbstractSessionOutputBuffer.java:131)

Is it possible to make it working in command line also?

 

Thanks.

Oleg.

  • I found solution!

    Looks like testrunner doesn't use parameters from vmoptions.

    So I added next parameters into testrunner.sh:

    JAVA_OPTS="-Xms128m -Xmx3948m -Djava.util.Arrays.useLegacyMergeSort=true -Dsun.security.ssl.allowUnsafeRenegotiation=true -Dsun.net.http.allowRestrictedHeaders=true -Dsoapui.https.protocols=SSLv3,TLSv1,TLSv1.1,TLSv1.2 -Dhttps.protocols=SSLv3,TLSv1,TLSv1.1,TLSv1.2 -Dsun.security.ssl.allowLegacyHelloMessages=true -Dsoapui.properties=soapui.properties -Dgroovy.source.encoding=iso-8859-1 -Dsoapui.home=$SOAPUI_HOME/bin"

    And it works now!

     

    Thanks.

    Oleg.

3 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3
    When you run the saopui which "soapui-settings.xml" file is used? Please use the same file while running it from testrunner.sh. For more details, check the utility help for the respective option
    • helgi's avatar
      helgi
      Occasional Contributor

      Hi Rao.

       

      Thank you for your reply!

      I changed command to:

      ./testrunner.sh -s"TestSuite 1" -c"TestCase 2" -t/home/helgi/soapui-settings.xml /home/helgi/soap/test/soapui-project.xml

      And error is still the same.

       

      Also while running test case from gui in console I see next:

      0000: 15 03 03 00 30 D6 19 9C   2A D3 5E 50 DC BD 16 8F  ....0...*.^P....
      0010: 31 4A CA 7C AE BC 34 68   AF 73 FA 7A B2 A7 DA F3  1J....4h.s.z....
      0020: E4 00 42 BB F7 21 84 E6   82 51 3E 3D A4 4B 67 C2  ..B..!...Q>=.Kg.
      0030: E6 76 D4 2F 5F                                     .v./_
      Thread-24, called closeSocket(selfInitiated)
      12:49:07,146 DEBUG [SoapUIMultiThreadedHttpConnectionManager$SoapUIDefaultClientConnection] Connection shut down
      Thread-24, called close()
      Thread-24, called closeInternal(true)

      And in result I see expected response, so it works correctly in gui, but not via testrunner.

       

      Thanks.

      Oleg.

      • helgi's avatar
        helgi
        Occasional Contributor

        I found solution!

        Looks like testrunner doesn't use parameters from vmoptions.

        So I added next parameters into testrunner.sh:

        JAVA_OPTS="-Xms128m -Xmx3948m -Djava.util.Arrays.useLegacyMergeSort=true -Dsun.security.ssl.allowUnsafeRenegotiation=true -Dsun.net.http.allowRestrictedHeaders=true -Dsoapui.https.protocols=SSLv3,TLSv1,TLSv1.1,TLSv1.2 -Dhttps.protocols=SSLv3,TLSv1,TLSv1.1,TLSv1.2 -Dsun.security.ssl.allowLegacyHelloMessages=true -Dsoapui.properties=soapui.properties -Dgroovy.source.encoding=iso-8859-1 -Dsoapui.home=$SOAPUI_HOME/bin"

        And it works now!

         

        Thanks.

        Oleg.