简体   繁体   中英

WCF Service Testing

How can I test a WCF Service?

I tried soapUI, it works but I don't feel PRO when using third-party software when Visual Studio may have something to solve this problem.

I saw once, an web api stuff (don't really remember) that has a built-in client. And that was awesome!

Is there a way to have such a client on a WCF Service (file.svc) or test by adding some query string to the URL?

Something Like this:

http://localhost:56458374/Service.svc/Operation?value1=5&value2=6

You can always open up a project (unit test project) and add a reference to the WCF service - VS generates a fully functional client for you which you can then use for tests anyway you want.

Another option: Depending on the data types you use in the Service (not all are supported like Stream etc.) you can use the WCF Test Client .

WCF Test Client should you let you do that. In fact if you create a new project based on the WCF template. Hitting F5 will automatically do it

:

我发现这个msdn视频,当我开始使用wcf时...还有一些情况下如何测试你的服务。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM