如何测试WCF服务客户端 [英] How to test WCF Service Client

查看:72
本文介绍了如何测试WCF服务客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我们有Service Wrapper项目聚合所有服务(本地)客户端,我们在MVC中消费。



我的问题是我想测试我的ServiceWrapper客户端方法。



有没有办法测试客户端方法。

Hi,
We have Service Wrapper project to aggregate all service(local) clients and we are consuming in MVC.

My problem is I want to test my ServiceWrapper client methods.

Is there any way to test client methods.

推荐答案

您可以创建一个新的测试项目并在其中创建单元测试类来测试每个WCF客户端方法。



请注意,您应该在应用程序中复制从WCF客户端项目的App.config中调试项目WCF设置的.config。
You could create a new "Test project" and create unit tests classes inside it for testing each WCF client method.

Note that you should copy in the app.config of the "test projects" the WCF settings from the App.config of your "WCF client project".


这篇关于如何测试WCF服务客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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