06 August 2007 - 1.7.5 | home user-guide eclipse jbossws intellij netbeans maven 1.X/2.X PDF files forums bugs sourceforge

Home
Getting Started

- Functional Tests
- Load Tests
- Mocking
- Sample Project

User Guide

- Overview
  - Tabbed Desktop
  - License Management
  - Preferences
  - XPath Selection
  - Script Library
- Workspaces
- Projects
- Interfaces
  - Interface Viewer
- Operations
- Working with Requests
  - Form Editor
  - 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

## Getting Started with Functional Testing

Now that you have imported some WSDLs and tries some requests its time to create your first TestCase. In soapUI, functional testing can be used to validate required functionality both for each web service invocation on its own (="unit testing") or for a number of requests sequence (="integration testing"). Further, you can add scripts (using the Groovy Language) that can enhance your tests in any way you want, for example interact with a database or perform complex test-flow logic.

We will continue where we left off in the first "Getting Started" document where we just had created a project and imported the Amazon Web Service. The next step is to create a TestSuite/TestCase and add some TestSteps:

### Create a TestCase from some request

Once you have some requests working as you want, you can create a testcase that verifies their behaviour Select the second toolbar button in the request editor window ("Add this request to a test-case"). If there are no testsuites/testcases in your project, soapUI will prompt you for names of these, start out by specifying something like "Amazon TestSuite" and "Amazon TestCase" soapUI will prompt you for the name of your test request, call it "Step 1" Corresponding testsuite/testcases will be created and the request will be added as a Test-Request which is a copy of the original request (so you can keep playing with that without changing the test request) A test-request-editor almost identical to the previous request-editor will be opened with your new test request; it differs by adding assertions functionality Read more about testsuites/testcases in the User Guide |

### Add Assertions

Now that you have your first test-request you should add some assertions to verify that it works correctly Select the second toolbar button in the request editor window ("Add an assertion to this test-request"). Start by adding a "Schema Compliance" assertion, this will check that the response is compliant with the associated WSDL/Schema definition. The assertion will be shown in the assertion list under the request/response editors (see image below) Post the request with the green submit-button, soapUI will run the request and validate the response. If all goes well the test-request should be shown with a green background in the navigation tree Read more about assertions in the User Guide |

### Now run your test!

Once you have all the test- request and their assertions you want you can run the entire testcase Double-click on the test-case node in the left navigation pane, this will open the test-case runner. Run all tests by selecting the green-arrow button labeled "Run this testcase", soapUI will submit each test-request and validate accordingly, the results will be displayed during the execution. Run your tests from the command-line using one of the command line tools available. |

Next: Getting Started with LoadTesting