Stub data tables

The purpose of a stub data table is to supply stub routines with data. Stub data tables define the output behavior of a stubbed method in response to certain inputs. With the stub data table, you simulate the stubbed class by specifying the actual input and return values for each stubbed method.

Because each stub data table maps to a particular method in your stub script, a separate stub data table is created for each stub method. As you work with the stub script, the stub data table view is automatically updated when you move the cursor from one method to another. When you first open your stub script, no stub data table is displayed until you move the cursor to a method in the stub script.
Note: For the stub data table and stub script to synchronize as expected, make sure that the Project > Build Automatically option is enabled.

The following screen capture shows an example of a stub data table.Illustration of a Stub Data Table

The stub data table provides content assist which automatically completes content when you press Ctrl+Space. It also automatically validates syntax and data type to guarantee that the data you enter is syntactically correct.
Note: Syntax validation is turned off automatically if a stub cannot compile.
With stub data tables you can perform the following tasks in the same way as for test data tables:

In many ways stub data tables are very similar to test data tables, but there are several differences.

Related concepts
Stub behavior
Test data tables
Related tasks
Creating stubs for Java components
Creating stubs of your EJBs
Editing stubs in a test suite
Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.