Testing Webservices with NUnit
Posted by archworx on July 1, 2007
Because NUnit is an exe and you sometimes you need to access web.config and objects that are only present in a web context, you will need to do the following:
– Open the command prompt and cd to C:\Program Files\Microsoft Visual Studio 8\VC, or in Visual Studio 2005 Command Prompt, type wsdl url (where url is the WSDL URL). A C# file will be generated with the name of the webservice. You can add some command line arguments to change the file name or the language. Just type wsdl without any arguments to show the help.
– Move the file to your test project and use it. It will call the webservice🙂
There’s a great article about Implementing Service-Oriented Integration with ASP.NET .. check it out.