IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Testing modules > Component testing > Manage test suites > Editing test suites > Create and managing test cases > Manage test data
Specifying variable values
In the test data table of the test suite editor, variables are automatically set to their default values. However, you can specify a wide variety of alternate values for the variables.
Before you use the test data table to specify variable values, you should read the topic "Test Data Table view." This topic provides detailed information on the Test Data Table view and the test data table, such as information on setting single or multiple values using pop-up menu items.
To specify variable values:
Procedure
- In the test suite editor, click the Test Cases tab to open the Test Cases page.
- In the Test Cases area, select the test case for which you want to specify variable values.
- At the bottom of the test suite editor, click the Test Data Table tab. The Test Data table view opens.
- Click the Default tab to open the default test variation pane or click the tab of another test variation to open its pane. The test data table is displayed in the pane. It is similar to the value editor in the test client, but it has an In column and an Expected column rather than a Value column. The In column is where you specify input or request values and the Expected column is where you specify output or response values.
- In the test data table, you can simply type some values for a selected variable by completing the following steps:
- In the In column or the Expected column, click the field cell where you want to specify a new value.
If you specify a value for a variable that is not used in any of the steps defined in the test case (such as an Invocation, Wait for Time, Wait On, Verify Event, or Emulator Definition step), the variable will not be initialized when the test case is run and a value of null will be returned for the variable.
- Press the Enter key or simply being typing some characters. A text box automatically opens, as shown in the following figure:
- In the text box, type the new value that you want to assign to the variable. If the format of the value is Java Expression, then content assist is available. (Specifying a reference to another element in the table can only be accomplished in the Java expression format.) You can press Alt+Enter at any time to add additional input lines. (If you decide that you do not want to retain the new value that you are specifying in the text box, you can press the Esc key to discard the new value.) Additional information about Java expressions is found in the topic Java expressions.
- Press Enter or simply click another cell to save your new value.
For example, in the following figure, the value Tools has been typed in as the value for the first description attribute:
- If you want to specify values for arrays, right-click the name of each array field in the Name column and select Add Elements to open the Add Element window, then specify a value for the selected field in the Enter the number of new elements to add field and click OK.
For example, in the figure, the items array field was right-clicked and Add Elements was selected, then values were specified for the individual fields under the items[0] element (such as the value 5 that is specified for the quantity attribute).
Example
You can use the keyboard to rapidly navigate through field cells.For example, you can use Tab, Page Down, Page Up, and arrow keys.