Use data in a business process test
Relevant for: business process testing
This task provides general information for how to work with parameters, and iterations in business process tests.
Note: This task is part of a higher-level task. For details, see Manage BPT tests and flows.
Design data
Consider the following before using parameters:
-
Determine which parameters are linked.
-
Determine which parameters should be available at the component, flow, and test levels.
-
Determine how may times each component, flow, and business process test should run, and with what parameter values.
Create parameters and set default values
-
In the Solution Explorer, select the test, flow, or component to which you want to add a parameter.
-
In the Properties pane, open the Test Parameters or Parameters tab .
-
In the Test Parameters/Parameters, tab, click the Add button and specify the type of parameter to add (either input or output).
-
In the parameters grid, enter the parameter details. You can enter a default value or leave the field blank.
If you enter a default value, you can use the default value in the event a value is not supplied for the test run, or you can use the default value as an example for the type of value that can be provided (for example, a phone number example could be ###-##-####).
Use component parameters in component steps
For details on using the parameters as step values, see Parameterize values for operations or local objects.
Link parameters
-
In the document pane, select a business process test or flow.
-
In the business process test or flow tab, select a flow or component.
-
In the Properties pane, open the Test Parameters or Parameters tab.
-
Select the parameter you want to link.
-
In the Value cell of the parameter, click the Link button. The Select Link Source dialog box opens.
-
In the left pane of the Select Link Source dialog box, select the test or flow from which you want to use a parameter.
-
In the right pane of the Select link Source dialog box, select the parameter to which to link.
The parameter name is displayed with a link icon in the value column indicating the link.
Tip: You can also automatically link component parameters if they share the same name as a test or flow parameter. In the BPT Testing tab of the Options dialog box (Tools > Options > BPT Testing tab), select the Always link to existing test parameters option.
Promote parameters
Do one of the following:
In the Options dialog box |
|
In the Properties pane |
In the Parameters tab, click the Promote Parameters button . The selected parameter is promoted to the next level and the parameter value is linked to the value of the newly created parameter. |
In the Toolbox pane | In the title node, click the down arrow and then click the Promote parameters to test level button . |
Add iterations for a component or flow
Before you can set parameter values for each iteration of a component or flow, you must add iterations to the test for each component you want to run in iterations:
-
In the document pane, select the component or component group for which to add iterations.
-
If necessary, open the Data pane.
-
In the Data pane, click the Add button and select one of the following to add an iteration:
Add New Iteration: Adds a new iteration without any values for the component/group parameters. Copy Iteration. Copies the values for the component/group parameters from the previously entered iteration. Create Iteration with Default Values Adds a new iteration with the default values entered for the parameter in the Test Parameters/Parameters tab in the Properties pane. The new iteration and parameter values (if selected) are added as an additional row in the Data pane.
Set data values for the parameters for each iteration
-
In the document pane, select a flow, component, or group.
-
In the Data pane, click in the Value cell for the parameter name. All parameters for the selected flow, component, or group are displayed in separate columns with the parameter name as column headers.
Note: Make sure that you have also selected the correct row for the parameter - each separate row is its own iteration.
-
Enter the parameter value for the selected parameter.
When the test runs, the entered parameter value is used for each iteration.
Export component parameters to an Excel
When your business process test, flow, or components contain component parameters, you can export these parameters to an Excel file. This enables many users to set values for these parameters in and run their tests with the modified data.
-
In the document pane OR the Solution Explorer, select the business process test or flow for which you want to export the component iteration values.
-
In the toolbar, select the Export test iteration values into Excel Document button .
-
In the Save dialog box, specify a location in which to save the modified Excel.
-
Click Save. OpenText Functional Testing confirms the successful export of the Excel file.
-
Edit the parameter values as needed. Each component containing parameters has its own Excel sheet.
Note: If a component does not contain parameters, the Excel does not contain a sheet for that component.
Import parameter iteration values from an Excel
If you previously exported your parameter iteration values to Excel, you can modify the parameter values in the Excel file and then import that Excel file back into the business process test. This enables you to use different data in different test runs to check how your application performs with different data.
-
In the document pane OR the Solution Explorer, select the business process test or flow for which you want to import the component/flow parameter iteration values.
-
In the toolbar, select the Import Excel values to parameter iteration values button .
-
In the Open dialog, specify a location from which to import the modified Excel.
-
Click Open. OpenText Functional Testing confirms the successful import of the Excel file. The component parameter iteration values are now displayed in the Data pane for the component parameters and iterations.