26 September 2007 - 1.7.6 | home user-guide eclipse jbossws intellij netbeans maven 1.X/2.X PDF files forums bugs sourceforge

Home
Getting Started
User Guide

- Overview
  - Tabbed Desktop
  - License Management
  - Preferences
  - XPath Selection
  - Script Library
- Workspaces
- Projects
- Interfaces
  - Interface Viewer
- Operations
- Working with Requests
  - Form Editor
  - Overview View
  - Outline Editor
  - Message Inspectors
  - Attachments/Inline Files
- Functional Testing
  - Getting Started
  - TestSuites
  - TestCases
    - Test Requests
      - Assertions
      - Editor Wizards
    - Property Transfers
    - Conditional Gotos
    - Groovy Scripts
      - Examples
      - GroovyUtils
    - Properties Step
    - Delay Step
    - Mock Response
    - DataSource
    - DataSource Loop
  - Property Expansion
- Load Testing
  - Getting Started
  - Limit & Strategies
  - Execution
  - Assertions
  - Diagrams
  - JMeter comparison
- Mocking
  - Getting Started
  - Mock Services
  - Mock Operations
  - Mock Responses
- Usage Scenarios
  - Data-Driven Testing
  - Template-Driven Testing
  - Interactive Testing
  - Surveillance Testing
- Tool Integrations
  - Code Generation
  - WSDL Generation
  - WS-I Tools
  - Apache Tcp-Mon
- CommandLine Tools
  - TestCaseRunner
  - LoadTestRunner
  - MockServiceRunner
  - ToolRunner
- Keyboard shortcuts

IDE/Tool Plugins
Search soapUI site
Project Documentation

- About soapUI
- Project Info
- Project Reports

## Web Service Mocking

soapUI 1.7 introduces the possibility to create Mock Implementations (called "MockServices") of any WebService from its WSDL contract. A soapUI MockService can expose an arbitrary number of operations ("MockOperations") from different WSDLs which can further be configured quite extensively in regard to which response(s) ("MockResponse") they should return, including the possibility to create custom groovy scripts for both dispatching and response creation. MockServices can be hosted/run either directly in soapUI or via the command-line MockServiceRunner and be invoked from any client (including soapUI itself of course) as usual. |

Mocking of Web Services opens for a number of interesting usage-scenarios:

- Client development / testing : create a MockService for an existing contract that returns a number of predictable results which can be used by client developers/integrators during the development phase.
- TestDriven development from WSDL contract (both server and client) : Starting from only a WSDL, generate both client and server stubs (using any of the soapUI tool integrations) together with a MockService which can be used to build entire functional TestSuites in soapUI before the actual service implementation is ready.
- Web Service rapid prototyping : Quickly create simple WSDL implementations for discovering optimal message exchanges, etc
- etc..

soapUI Pro further introduces a MockResponse TestStep which can be added to any functional TestCase to simulate the handling of a SOAP request as part of the test, which opens of testing of asynchronous Web Services, etc.

Next: Mock Services