开发者

Mock web service

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

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.

Notes:

  • The testing tool will be a desktop application.

  • 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).

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?

Thanks in advance,


I found a solution in Java 6

web-services-without-ee-containers

thanks


The best solution is to let application X talk to Web service Y using an interface, such as IWebServiceY.

Coupled with Dependency Injection, this allows you to inject a mock of IWebServiceY into application X instead of the real, web service-based implementation of Web Service Y.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜