This topic explains how to stub test requests/responses for web scenarios.

Sections include:

Understanding Stubs for Web Scenarios

Testing applications with dynamic data can cause many false positives, creating extra overhead for the developers and QA who have to determine which failures are real, and which are  “noise.” To solve this, SOAtest has the ability to “stub” data that is sent back to the client. Stubbing helps to ensure that any changes to the client-side code do not affect the final resultant html page.

A stub is static data that SOAtest saves when recording a functional test scenario through a web site. Since the data that will be fed to the client is unchanging, any new errors that occur while processing the data can be attributed to changes in the client-side JavaScript that processes the data.

Creating Stubs

While recording a web scenario, SOAtest keeps track of each request made by the client, as well as the response.

To create a stub, complete the following:

  1. Right-click the test from which you would like to return the static data and select Add Output from the shortcut menu.

  2. In the wizard that opens, choose HTTP traffic, then click Next.
  3. In the next page, choose the browser request that you want to stub.
  4. In the left panel, select Both - Stub Request/Response.
  5. In the right panel, select any Browser Stub.
  6. Click Finish.

Configuring the Browser Stub Tool

To configure a Browser Stub tool that has been added to an functional test:

  1. Double-click the Stub Request/Response for <URL> node that was added to the test.
  2. In the Browser Stub test configuration panel, you can modify the following options: