是否有具有更好设施的 WCF 测试客户端应用程序的替代方案?

发布于 2024-11-26 00:47:10 字数 87 浏览 0 评论 0原文

我使用wcf test client来测试我的wcf服务,但它有一些不足。是否有具有更好设施的 WCF 测试客户端应用程序的替代方案?

I use wcf test client for testing my wcf services, but it has some shortages. Is there an alternative for WCF Test Client application with better Facilities?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

旧人哭 2024-12-03 00:47:10

是的,有一个更好的应用程序,具有更大的功能集,称为 SoapUI,但它没有与 Visual Studio 及其更大的功能集成希望您了解 Web 服务。 SoapUI 可能是测试 Web 服务的领先工具,它有免费版本,但它与 MS 技术无关,因此它可能不支持仅 WCF 的功能(如 duplex、net.tcp 等)。

无论如何,如果您愿意要为您的服务提供测试工具,没有什么比创建测试(MS 测试、NUnit 或任何其他框架)并简单地使用代理来测试您部署的服务更容易的了。

Yes there is better application with much bigger feature set called SoapUI but it is not integrated with Visual Studio and its bigger feature set expect that you understand web services. SoapUI is probably leading tool for testing web services and it has free edition but it is not related to MS technologies and because of that it probably doesn't support WCF only features (like duplex, net.tcp, etc.)

Anyway if you want to have testing tool for your service there is nothing more easier then creating test (MS test, NUnit or any other framework) and simply use a proxy to test your deployed service.

2024-12-03 00:47:10

我正在使用 WCF Storm,它让我可以在 XML 中保存带有大量参数的大型方法。因此,我以后只需将其复制粘贴回来即可轻松加载它们。但是,该软件(目前为 2.5.0 阶段)还没有完成……快捷方式是违反直觉的,并且有时会导致递归问题。尽管如此,它仍然是一个很棒的应用程序,提供的功能超出了默认的 Wcf 测试客户端。

I am using WCF Storm which let me save big methods with a lot of parameters in XML. So I can easily load them back later by simply copy-pasting it back. But, the software (at the current stage 2.5.0) lacks of finish... shorcuts are something counter intuitive and recursive cause sometime problem. Still, it's a great application that offer more than the default Wcf Test Client.

单挑你×的.吻 2024-12-03 00:47:10

根据您的评论,我建议使用单元测试框架,例如 MSTestNUnit

在测试中,您可以像平常一样设置服务实例,然后像在生产代码中一样调用它们并验证结果。

另请注意,您不必启动整个服务主机来执行此操作,您只需创建一个实现服务契约的类的实例并直接调用它即可。这样做和托管服务有一些区别(托管时,参数总是序列化的,也就是说,它们通过值传递,而不是通过引用传递),但这通常并不重要。

Based on your comments i suggest using an unit testing framework such as MSTest or NUnit

In your tests you can setup instances of your service as you would normally, then call them as you would in your production code and verify the results.

Note also that you dont have to launch a whole service host to do this, you can simply make an instance of the class that is implementing your service contract and call it directly. there are some differences to doing this and hosting the service (when hosting, arguments are always serialized, that is, they are passed by value, not by reference) but it usually doesnt matter.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文