Mock Services

PDF Print E-mail
Friday, 21 August 2009 08:21
User Rating:  / 17
Rate this article: PoorBest 

 

Web Service Mocking is a very useful tool in your testing arsenal. It's the solution to the question "How do I create tests for a Web Service when there is no Web Service to write test against?". Web Service Mocking will come in handy here. It allows you to create a simulation or approximation of the Web Service before the actual Web Service goes live. In this tutorial we will learn:

  1. Creating a MockService
  2. Editing a MockService
  3. Invoking a MockService
  4. Customizing a MockResponse

Creating a new Project

  1. Start a new soapUI project using the following wsdl
    http://www.webservicex.net/CurrencyConvertor.asmx?WSDL

    New MockService Project
    TIP:
    The currencyConverter Web Service is working very hard. If you see the Loading Definition Window running infinitely, the Web Service might be down. To verify if the Web Service is working, copy the URL to the address bar of your favourite browser and test the Web Service. If your browser does not respond, the Web Service is down.
  2. The CurrencyConvertor project node should be visible in the Navigator.

We're now ready to Create the MockService

 


Go to Article Page: 1 2 3 4 5 Go to Next Page
Last Updated on Wednesday, 21 July 2010 09:50