如何从javascumbs迁移到springframework-ws-test

时间:2016-10-21 15:03:25

标签: java spring-ws

我们正在使用旧技术来测试我们的Web服务(javascumbs)。是否有一些教程如何将其迁移到springframework-ws-test?

现在我的测试看起来像:

@Test
public void testWs() throws Exception {
    MessageContext message = helper.receiveMessage("xml/file.xml");
    WebServiceMessage response = message.getResponse();
    MessageValidator validator = helper.createMessageValidator(response);
    validator.assertNotSoapFault();
    validator.assertSoapMessage();
    validator.validate("xsd/xsd1.xsd", "xsd/xsd2.xsd");
    validator.compare("xml/response.ftl");
}

我找到了一些教程here。但它看起来完全不同。我从文件加载xml,其中也包含envelop和header,在这个例子中只有request

1 个答案:

答案 0 :(得分:1)

我想说,使用docker为您的测试提供完整的环境。它将使您能够进行其他类型的测试,并将帮助您发展项目CI / CD。其中一个教程是http://blog.arungupta.me/run-javaee-tests-wildfly-docker-arquillian-cube/。仅供参考,这只是一个起点。我们正在使用此组合在我们的产品线中测试超过100个git存储库。