Forum Discussion

Paul_Wheeler's avatar
Paul_Wheeler
New Contributor
15 years ago

MockResponse step does not receive response when run from TestRunner

I have a test case (using a MockResponse step) that works when run through the GUI but not when run using TestRunner or from the command line. The MockResponse step (called Receive Auth Fail) times out waiting for the response, but my application under test appears to have successfully sent the SOAP message. I'm using soapUI Pro 3.0.1 (haven't tried upgrading to the 3.5 beta). Pretty sure I'm not doing anything wrong, but this is the first time I've really tried to use TestRunner.

The output from TestRunner is:

Running soapUI TestRunner for [CallCarilBizEng]
directory: C:\Program Files\eviware\soapUI-Pro-3.0.1\bin\.
command: cmd.exe /C testrunner.bat -sLogonRequest S:\IntegrationsWorking\CarillionMonteray\Test\soapUI\CallCarilBizEng-soapui-project.xml
soapUI Pro 3.0.1 TestCase Runner
Configuring log4j from [C:\Program Files\eviware\soapUI-Pro-3.0.1\bin\soapui-log4j.xml]
12:58:58,734 INFO  [SoapUI] Added [file:/C:/Program%20Files/eviware/soapUI-Pro-3.0.1/bin/ext/postgresql-8.3-604.jdbc3.jar] to classpath
12:58:58,734 INFO  [SoapUI] Added [file:/C:/Program%20Files/eviware/soapUI-Pro-3.0.1/bin/ext/postgresql-8.3-604.jdbc4.jar] to classpath
12:58:58,734 INFO  [SoapUI] Added [file:/C:/Program%20Files/eviware/soapUI-Pro-3.0.1/bin/ext/sqljdbc.jar] to classpath
12:58:58,968 INFO  [DefaultSoapUICore] initialized soapui-settings from [C:\Documents and Settings\paulw\soapui-settings.xml]
12:58:59,265 INFO  [SoapUIProGroovyScriptEngineFactory] Setting Script Library to [C:\Program Files\eviware\soapUI-Pro-2.0.2\bin\scripts]
12:58:59,265 INFO  [DefaultSoapUICore] Adding listeners from [C:\Program Files\eviware\soapUI-Pro-3.0.1\bin\listeners\demo-listeners.xml]
12:58:59,703 INFO  [WsdlProject] Loaded project from [file:S:/IntegrationsWorking/CarillionMonteray/Test/soapUI/CallCarilBizEng-soapui-project.xml]
12:59:00,078 INFO  [SoapUIProTestCaseRunner] Running soapUI tests in project [CallCarilBizEng]
12:59:00,078 INFO  [SoapUIProTestCaseRunner] Running TestSuite [LogonRequest], runType = SEQUENTIAL
12:59:00,078 INFO  [SoapUIProTestCaseRunner] Running soapUI testcase [No Custom From Tag]
Progress: 1 - Loading Definition from cache
12:59:00,140 DEBUG [AbstractDefinitionContext] Loading Definition...
12:59:00,156 DEBUG [AbstractWsdlDefinitionLoader] Returning baseInputSource [file:/S:/IntegrationsWorking/CarillionMonteray/CarilMonBizEngSvc/src/tibco/CarilMonBizEngSvc/Cognito/Service/ExtSvcIfaces/CogMobDataEngItf.wsdl]
Retrieving document at 'file:/S:/IntegrationsWorking/CarillionMonteray/CarilMonBizEngSvc/src/tibco/CarilMonBizEngSvc/Cognito/Service/ExtSvcIfaces/CogMobDataEngItf.wsdl'.
12:59:00,250 DEBUG [WsdlInterfaceDefinition] Loaded WSDL: ok
12:59:00,265 INFO  [SchemaUtils] Added default schema from file:/C:/Program%20Files/eviware/soapUI-Pro-3.0.1/lib/soapui-3.0.1.jar!/com/eviware/soapui/resources/xsds/xop.xsd with targetNamespace http://www.w3.org/2004/08/xop/include
12:59:00,281 INFO  [SchemaUtils] Added default schema from file:/C:/Program%20Files/eviware/soapUI-Pro-3.0.1/lib/soapui-3.0.1.jar!/com/eviware/soapui/resources/xsds/XMLSchema.xsd with targetNamespace http://www.w3.org/2001/XMLSchema
12:59:00,281 INFO  [SchemaUtils] Added default schema from file:/C:/Program%20Files/eviware/soapUI-Pro-3.0.1/lib/soapui-3.0.1.jar!/com/eviware/soapui/resources/xsds/xml.xsd with targetNamespace http://www.w3.org/XML/1998/namespace
12:59:00,281 INFO  [SchemaUtils] Added default schema from file:/C:/Program%20Files/eviware/soapUI-Pro-3.0.1/lib/soapui-3.0.1.jar!/com/eviware/soapui/resources/xsds/swaref.xsd with targetNamespace http://ws-i.org/profiles/basic/1.1/xsd
12:59:00,281 INFO  [SchemaUtils] Added default schema from file:/C:/Program%20Files/eviware/soapUI-Pro-3.0.1/lib/soapui-3.0.1.jar!/com/eviware/soapui/resources/xsds/xmime200505.xsd with targetNamespace http://www.w3.org/2005/05/xmlmime
12:59:00,312 INFO  [SchemaUtils] Added default schema from file:/C:/Program%20Files/eviware/soapUI-Pro-3.0.1/lib/soapui-3.0.1.jar!/com/eviware/soapui/resources/xsds/xmime200411.xsd with targetNamespace http://www.w3.org/2004/11/xmlmime
12:59:00,312 INFO  [SchemaUtils] Added default schema from file:/C:/Program%20Files/eviware/soapUI-Pro-3.0.1/lib/soapui-3.0.1.jar!/com/eviware/soapui/resources/xsds/soapEnvelope.xsd with targetNamespace http://schemas.xmlsoap.org/soap/envelope/
12:59:00,312 INFO  [SchemaUtils] Added default schema from file:/C:/Program%20Files/eviware/soapUI-Pro-3.0.1/lib/soapui-3.0.1.jar!/com/eviware/soapui/resources/xsds/soapEncoding.xsd with targetNamespace http://schemas.xmlsoap.org/soap/encoding/
12:59:00,328 INFO  [SchemaUtils] Added default schema from file:/C:/Program%20Files/eviware/soapUI-Pro-3.0.1/lib/soapui-3.0.1.jar!/com/eviware/soapui/resources/xsds/soapEnvelope12.xsd with targetNamespace http://www.w3.org/2003/05/soap-envelope
12:59:00,328 INFO  [SchemaUtils] Added default schema from file:/C:/Program%20Files/eviware/soapUI-Pro-3.0.1/lib/soapui-3.0.1.jar!/com/eviware/soapui/resources/xsds/soapEncoding12.xsd with targetNamespace http://www.w3.org/2003/05/soap-encoding
12:59:00,328 INFO  [SchemaUtils] Loading schema types from [file:/S:/IntegrationsWorking/CarillionMonteray/CarilMonBizEngSvc/src/tibco/CarilMonBizEngSvc/Cognito/Service/ExtSvcIfaces/CogMobDataEngItf.wsdl]
12:59:00,359 INFO  [SchemaUtils] Getting schema file:/S:/IntegrationsWorking/CarillionMonteray/CarilMonBizEngSvc/src/tibco/CarilMonBizEngSvc/Cognito/Service/ExtSvcIfaces/CogMobDataEngItf.wsdl
12:59:00,578 DEBUG [AbstractDefinitionContext] Loaded Definition: ok
12:59:00,687 INFO  [JettyMockEngine] Started mockService [Receive Auth Fail] on port [18010] at path [/Cog/Svcs/Itfs/MobDataEngSvc/Soap/Cog/MobDataEngItf]
12:59:00,750 INFO  [WsdlMockRunner] Mounted WSDL for interface [MobDataEngItfHTTPBinding] at [/Cog/Svcs/Itfs/MobDataEngSvc/Soap/Cog/MobDataEngItf?WSDL]
12:59:00,750 INFO  [SoapUIProTestCaseRunner] running step [ReceiveMobDataOp - LogonRequest - No Custom From tag]
12:59:01,265 DEBUG [SoapUIMultiThreadedHttpConnectionManager] HttpConnectionManager.getConnection:  config = HostConfiguration[host=http://sloth:18099], timeout = 0
12:59:01,265 DEBUG [SoapUIMultiThreadedHttpConnectionManager] Allocating new connection, hostConfig=HostConfiguration[host=http://sloth:18099]
12:59:01,312 DEBUG [SoapUIMultiThreadedHttpConnectionManager] Freeing connection, hostConfig=HostConfiguration[host=http://sloth:18099]
12:59:01,312 DEBUG [SoapUIMultiThreadedHttpConnectionManager] Notifying no-one, there are no waiting threads
Progress: 1 - Loading Definition from cache
12:59:01,328 DEBUG [AbstractDefinitionContext] Loading Definition...
12:59:01,328 DEBUG [AbstractWsdlDefinitionLoader] Returning baseInputSource [file:/S:/IntegrationsWorking/CarillionMonteray/CarilMonBizEngSvc/src/tibco/CarilMonBizEngSvc/Cognito/Service/ExtSvcIfaces/CogMobDataEngPushItf.concrete.wsdl]
Retrieving document at 'file:/S:/IntegrationsWorking/CarillionMonteray/CarilMonBizEngSvc/src/tibco/CarilMonBizEngSvc/Cognito/Service/ExtSvcIfaces/CogMobDataEngPushItf.concrete.wsdl'.
12:59:01,359 DEBUG [WsdlInterfaceDefinition] Loaded WSDL: ok
12:59:01,359 INFO  [SchemaUtils] Loading schema types from [file:/S:/IntegrationsWorking/CarillionMonteray/CarilMonBizEngSvc/src/tibco/CarilMonBizEngSvc/Cognito/Service/ExtSvcIfaces/CogMobDataEngPushItf.concrete.wsdl]
12:59:01,359 INFO  [SchemaUtils] Getting schema file:/S:/IntegrationsWorking/CarillionMonteray/CarilMonBizEngSvc/src/tibco/CarilMonBizEngSvc/Cognito/Service/ExtSvcIfaces/CogMobDataEngPushItf.concrete.wsdl
12:59:01,453 DEBUG [AbstractDefinitionContext] Loaded Definition: ok
12:59:01,453 INFO  [SoapUIProTestCaseRunner] Assertion [SOAP Response] has status VALID
12:59:01,453 INFO  [SoapUIProTestCaseRunner] Assertion [Schema Compliance] has status VALID
12:59:01,453 INFO  [SoapUIProTestCaseRunner] Assertion [Not SOAP Fault] has status VALID
12:59:01,453 INFO  [SoapUIProTestCaseRunner] running step [Receive Auth Fail]
12:59:31,453 INFO  [JettyMockEngine] Stopped MockService [Receive Auth Fail] on port [18010]
12:59:31,453 INFO  [JettyMockEngine] Stopping connector on port 18010
12:59:31,453 INFO  [JettyMockEngine] No more connectors.. stopping server
12:59:31,562 INFO  [SoapUIProTestCaseRunner] Assertion [LogonState is 2 (Fail Auth)] has status UNKNOWN
12:59:31,562 INFO  [SoapUIProTestCaseRunner] Assertion [To/UA Matches] has status UNKNOWN
12:59:31,562 INFO  [SoapUIProTestCaseRunner] Assertion [ID begins with 'a_'] has status UNKNOWN
12:59:31,562 INFO  [SoapUIProTestCaseRunner] Assertion [GroupingID matches Header ID] has status UNKNOWN
12:59:31,562 INFO  [SoapUIProTestCaseRunner] Assertion [From BizEng User] has status UNKNOWN
12:59:31,562 INFO  [SoapUIProTestCaseRunner] Assertion [ActionType is 5 (One Pass Seq)] has status UNKNOWN
12:59:31,562 ERROR [SoapUIProTestCaseRunner] Receive Auth Fail failed, exporting to [C:\Program Files\eviware\soapUI-Pro-3.0.1\bin\LogonRequest-No_Custom_From_Tag-Receive_Auth_Fail-0-FAILED.txt]
12:59:31,578 INFO  [SoapUIProTestCaseRunner] Finished running soapUI testcase [No Custom From Tag], time taken: 30706ms, status: FAILED
12:59:31,578 INFO  [SoapUIProTestCaseRunner] TestSuite [LogonRequest] finished with status [FAILED] in 31500ms
12:59:31,578 ERROR [SoapUIProTestCaseRunner] java.lang.Exception: TestCase [No Custom From Tag] failed without assertions

12:59:31,578 ERROR [SoapUI] An error occured [TestCase [No Custom From Tag] failed without assertions
], see error log for details
java.lang.Exception: TestCase [No Custom From Tag] failed without assertions

at com.eviware.soapui.tools.SoapUITestCaseRunner.throwFailureException(SoapUITestCaseRunner.java:403)
at com.eviware.soapui.tools.SoapUITestCaseRunner.runRunner(SoapUITestCaseRunner.java:336)
at com.eviware.soapui.tools.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:128)
at com.eviware.soapui.tools.AbstractSoapUIRunner.runFromCommandLine(AbstractSoapUIRunner.java:72)
at com.eviware.soapui.SoapUIProTestCaseRunner.main(SourceFile:48)

The output from the soapUI GUI when I run the test suite is:

2009-12-17 13:04:52,406 INFO  [jetty] jetty-6.1.x
2009-12-17 13:04:52,406 INFO  [jetty] Started JettyMockEngine$SoapUIConnector@0.0.0.0:18010
2009-12-17 13:04:52,406 INFO  [JettyMockEngine] Started mockService [Receive Auth Fail] on port [18010] at path [/Cog/Svcs/Itfs/MobDataEngSvc/Soap/Cog/MobDataEngItf]
2009-12-17 13:04:52,437 INFO  [WsdlMockRunner] Mounted WSDL for interface [MobDataEngItfHTTPBinding] at [/Cog/Svcs/Itfs/MobDataEngSvc/Soap/Cog/MobDataEngItf?WSDL]
2009-12-17 13:04:52,546 INFO  [JettyMockEngine] Stopped MockService [Receive Auth Fail] on port [18010]
2009-12-17 13:04:52,546 INFO  [JettyMockEngine] Stopping connector on port 18010
2009-12-17 13:04:53,046 INFO  [JettyMockEngine] No more connectors.. stopping server

Thanks

1 Reply

  • I've added some more test cases so that my test suite now consists of four simple test cases that have a Test Request step followed by a Mock Response step.

    The first test case in the test suite always times out at the Mock Response step when called from TestRunner, and the others are successful. If the first two test cases are copies, the first will fail and the second will succeed.