我们正在使用柑橘框架测试肥皂样品wsdl。以下是测试用例的定义。
@Test
@Parameters("context")
@CitrusTest
public void secondSoapTest(@Optional @CitrusResource TestContext context){
author("Adhi");
name("Soap test");
soap(action -> action
.client("https://graphical.weather.gov:443/xml/SOAP_server/ndfdXMLserver.php")
.send()
.soapAction("LatLonListCityNames")
.payload(
"<todo:getTodoListRequest
xmlns:todo=\"https://graphical.weather.gov:443/xml/SOAP_server\">\r\n" <todo:displayLevel>3</todo:displayLevel>\r\n</todo:getTodoListRequest>"));
soap(action -> action.client("https://graphical.weather.gov:443/xml/SOAP_server/ndfdXMLserver.php")
.receive()
.name("test")
);
我收到以下异常,而不是响应。
11:31:36,572 DEBUG port.LoggingReporter| TEST STEP 2: receive
11:31:36,572 DEBUG ngCorrelationManager| Get correlation key for 'citrus_message_correlator_todoSoapClient'
11:31:36,572 DEBUG citrus.RetryLogger| Correlation key not available yet - retrying in 300ms
11:31:36,872 DEBUG citrus.RetryLogger| Correlation key not available yet - retrying in 300ms
11:31:37,185 DEBUG citrus.RetryLogger| Correlation key not available yet - retrying in 300ms
11:31:37,500 DEBUG citrus.RetryLogger| Correlation key not available yet - retrying in 100ms
11:31:37,602 INFO port.LoggingReporter|
11:31:37,602 ERROR port.LoggingReporter| TEST FAILED Soap test <com.citrus.test> Nested exception is:
com.consol.citrus.exceptions.TestCaseFailedException: Failed to get correlation key for 'citrus_message_correlator_todoSoapClient'
at com.consol.citrus.TestCase.executeAction(TestCase.java:241)
at com.consol.citrus.dsl.runner.DefaultTestRunner.run(DefaultTestRunner.java:198)
at com.consol.citrus.dsl.runner.DefaultTestRunner.soap(DefaultTestRunner.java:549)
at com.consol.citrus.dsl.testng.TestNGCitrusTestRunner.soap(TestNGCitrusTestRunner.java:375)
at com.citrus.test.SoapRunnerTest.secondSoapTest(SoapRunnerTest.java:94)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)