模拟Web服务 [英] Mock web service

查看:90
本文介绍了模拟Web服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有两个组件:企业应用程序X和Web服务Y

We have two components: enterprise application X, and Web service Y

我们想制作我们的(自动)测试工具,该工具将仅测试应用程序X(与Y交互), 并且我们没有可用的Web服务.

We want to make our (automated) testing tool that will test application X (that interact with Y) only, and we have not the web service Y available.

注意:

  • 测试工具将是一个桌面应用程序.

  • The testing tool will be a desktop application.

我们不想使用其他外部工具,例如SoapUI-用于测试(因为我们想通过运行一个应用程序来自动化测试).

We Don't want to use another external tools-e.g. SoapUI- for testing (as we want to automate the testing by running one application).

问题是:我们如何在测试-desktop-应用程序中模拟Web服务Y? 通过Socket编程或任何其他方法/库对它进行模拟是否容易?

The question is: How we can mock the web service Y in our testing -desktop- application? Does it is easy to mock it by Socket programming, or any other method/library?

预先感谢

推荐答案

我在Java 6中找到了解决方案

I found a solution in Java 6

谢谢

这篇关于模拟Web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆