views:

6601

answers:

7

I've used this tool that microsoft ships with visual studio because it's quick and dirty

http://msdn.microsoft.com/en-us/library/bb552364.aspx

But it's kinda clunky and hard to work with. Are there any other useful test clients out there that you use and don't require creating a new visual studio project and compiling code?

EDIT: I'm looking more for a graphical test tool that I can use to do quick ad-hoc tests of systems in our different environments without having to write a bunch different tests.

+5  A: 

SoapUI is another web service testing tool. I strongly recommend it.

Darin Dimitrov
I'm looking for more than just web services, we're using a lot of net.tcp bindings in WCF
Nick
Just add an additional basicHttpBinding endpoint to your service and feed it to SoapUI.
Darin Dimitrov
that wouldn't be testing the netTcpBindings we have which is the whole purpose
Nick
use WCFStorm (http://www.wcfstorm.com) It was made for testing WCF services and can handle netTcpBindings with ease.
+2  A: 

You're not going to find any better tool for creating automated tests of WCF servcies than to use your favorite unit test framework and write tests. The test client, nor soapUI will create a test that can run in a Continuous Integration scenario.

John Saunders
@John, I am using SoapUI in continuous integration builds every day: http://www.soapui.org/userguide/commandline/functional.html
Darin Dimitrov
Thanks for posting that. If you use jUnit to test WCF services, then you should blog that somewhere. Most people would not use Java to test .NET code.
John Saunders
I didn't mention I use JUnit. With SoapUI you can write web tests and define expectations. These tests can be run on the command line and the results will be written to a standard text file which can be interpreted during the build.
Darin Dimitrov
I followed the URL you posted, and it looked like it created jUnit tests. Again, I would love to see an article or blog post on this. I recommend soapUI for "playing around" with services; I'd be glad to recommend it for testing, if I saw how that could be done.
John Saunders
A: 

Well I end up writing unit tests in MS test. Before each test the service is hosted by the test assembly, and ripped down afterwards. Sure it's not unit testing, so purists will shudder, but it does mean I can run tests as often as I like.

blowdart
Together with conventional "service unit tests" that call the service interfaces directly, mocking out the domain tier, we also have "service self-host tests" that host the service in the unit test framework but which also mock out the domain tier. These are kind of a mix between integration tests and unit tests - but they prove our marshalling and serialization is working properly, something otherwise tricky to pull off.
Jeremy McGee
A: 

If you need to test the client logic: You can use mocking/Isolation framework to stub the actual calls to the server and use a unit testing framework to write proper Unit Tests.

Testing the server logic can be even easier - all you need is to test the call to the business logic and stub calls to external components (i.e. database).

There is no actual benefit of unit testing the full interaction between the client to the server because you know that WCF works instead add integration testing of the entire environment on a dedicated server/clients.

Dror Helper
+4  A: 
What do you mean? WCF services _are_ web services. soapUI will work with any WCF service that uses basicHttpBinding. It can probably do better than that, but I haven't had time to work with it yet.
John Saunders
Yes I meant soapUI will only work with a WCF service configured with basicHttpBinding (or maybe it will also work the other Http-based binding, i don't know) because that way the WCF service wil behave just like an ASMX service. However, I dont think it will work for bindings like netTcpBinding etc
@Unknown- did you write this tool? You seem to mention it a lot.
RichardOD
+1  A: 

I didn't mean to imply that soapUI does not work for a WCF service exposed using basicHttpBinding. Using basicHttpBinding would work because the service would be functioning as a legaxy ASMX web service. However, if one is to switch the binding (or use multiple bindings) to netTcpBinding for example, i dont think it would still be possible to invoke the methods of that service using soapUI. The scenario I'm describing is quite common wherein you have a WCF service exposed on the web using basicHttpBinding endpoint for maximum interoperability, and another endpoint as netTcpBinding(for max performance) used only internally.

+1  A: 

There is this new test client called SOA Cleaner, I recommend you try it. It supports WCF. can be found at: http://xyrow.com.

Clangon
Can you say more about it? What's good about it? What's bad?
John Saunders
It's a .NET application. It's very simple and light wighted; deosn't need any installation.
Clangon