views:

527

answers:

6

I would like to do some integration testing of a web service from within NUnit or MBUnit. I haven't delved into this too deeply yet, but I am pretty sure I will need to spin up WebDev.WebServer.exe within the "unit test" to do this. (I know it's not really a unit test).

Yes, I can test the underlying objects the web service uses on their own (which I am), but what I am interested in testing in this cases is that the proxies are all working and handled as expected, etc.

Any advice?

A: 

Not sure what you're asking. If you're looking to do this without some sort of webserver in between your test and the service, you're going to be disappointed.

If that's not what you're asking... maybe some clarification?

DannySmurf
A: 

I found this post and this one which have some solutions on how to start up WebDev.WebServer.exe from within a unit test. Looks like I'll need to do something along these lines.

Until I get that going, I found that what works is to simply run the web service project within VS, let the WebDev server start up that way, and then run the unit tests. Not ideal, but it's OK for now.

jeremcc
Cool. Very interesting post you're linking to. I didn't know this was possible ...
Riri
+3  A: 

I've had lots of success doing web testing with Selenium

I've used it on Linux and Windows for automated web testing of just about anything.

+2  A: 

I asked the same thing (I think ...) I got a tip on SoapUI. It looks promising but I haven't had time to test it yet.

Riri
That does look very promising. I'll try it at some point and accept this answer if it works.
jeremcc
It just works. For a operation, a test-case, load tests and automated testing exporting results to JUnit-Style report.
Eduardo Santa
+1  A: 

Hi

There is XMLunit (http://xmlunit.sourceforge.net/), for java and Ms.NET. it's could be interesting to check it out some specifications of WS, like wsdl:type, for example!

Cheers! Orlando Agostinho Lisbon/Portugal

oagostinho
A: 

You may want to give Ivonna, an addon built on top of Typemock a try.

The good part about Ivonna is that you don't need to launch webserver for your test, but downside part is that it's not free.

Ngu Soon Hui