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 choose Add Output.
  2. Choose HTTP traffic and click Next.
  3. Choose the browser request that you want to stub and click Next.
  4. Choose Both > Stub Request/Response in the left panel.
  5. Choose Browser Stub from any folder in the right panel and 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: