5 Defining Flows

This chapter explains how to add and update flows in the Flow Tree. This chapter contains the following sections:

5.1 Overview

Flows define the test flow and test data used to generate OpenScript scripts for testing application functionality. The Flow Tree represents a library of Flows that specify test instances.

The Flow Tree on the Flows page has the following structure:

Figure 5-1 Flow Tree Structure

Description of Figure 5-1 follows
Description of "Figure 5-1 Flow Tree Structure"

A Oracle Flow Builder administrator defines the Release, Product Family, Product, and Feature structure of the Flow Tree. Oracle Flow Builder users add Components to the tree and define the keywords and parameters that will be used to specify Component Sets and Flows that generate the OpenScript scripts used to test the application under test.

Clicking the Flows link at the top of the main window shows the Flow Tree and Search Flows options. The default Flow Tree includes two releases, Generic and R12.2, as follows:

Figure 5-2 Default Flow Tree

Description of Figure 5-2 follows
Description of "Figure 5-2 Default Flow Tree"

Generic flows consist of those component sets that group functions that can be used across all product families. Expanding the Generic tree shows the list of products and features contained in the Generic tree:

Figure 5-3 Generic Flow Tree

Description of Figure 5-3 follows
Description of "Figure 5-3 Generic Flow Tree"

Release and application specific flows are listed below the Release(s) listed in the Flow Tree. Expanding the tree shows the list of products and features in the release tree:

Figure 5-4 Release Flow Tree

Description of Figure 5-4 follows
Description of "Figure 5-4 Release Flow Tree"

Note that the list of available product and features may vary based upon your specific installation.

The Search pane of the Flow page lets you search for specific flows:

Figure 5-5 Search Flow Options

Description of Figure 5-5 follows
Description of "Figure 5-5 Search Flow Options"

You can select the Release, Product Family, Product, and Flow to narrow the search criteria. You can also use the % wildcard character in the Flow field to narrow the search:

Figure 5-6 Search Flow Options with Search Criteria

Description of Figure 5-6 follows
Description of "Figure 5-6 Search Flow Options with Search Criteria"

5.2 Adding Flows

This section explains the procedure for adding flows to the Flows Tree. Flows can be added to the Flows Tree directly in the application UI.

To add a flow to the Flows tree:

  1. Expand the Flow Tree to the product feature where you want to add the flow.

  2. Right-click the Feature name and select Create Flow from the shortcut menu

    Figure 5-7 Create Flow Option of the Shortcut Menu

    Description of Figure 5-7 follows
    Description of "Figure 5-7 Create Flow Option of the Shortcut Menu"

  3. In the Create Flow pane, enter a Flow name, Flow Type, Tags and Description.

    Figure 5-8 Create Flow Pane

    Description of Figure 5-8 follows
    Description of "Figure 5-8 Create Flow Pane"

    The flow name should be between 5 and 30 characters. The Flow name is available to create check mark appears if the name does not currently exist in the database.

  4. Click Create Structure. The Select Component or Components Set and the Flow Creation pane opens for specifying the components or component sets to add to the new flow and a new scenario is added to the flow tree. A scenario defines a specific OpenScript child script name within the overall flow. See Section 5.2.1, "Adding Scenarios to a Flow" for additional information about adding scenarios to a flow.

    Figure 5-9 Flow Creation Pane

    Description of Figure 5-9 follows
    Description of "Figure 5-9 Flow Creation Pane"

  5. Expand the Flow tree and select the scenario where you want to add components or component sets.

    Figure 5-10 Expanded Flow Creation Tree

    Description of Figure 5-10 follows
    Description of "Figure 5-10 Expanded Flow Creation Tree"

  6. Expand the Components (Approved), Components (Favourites), or Components Sets tree to view the available components or component sets.

    Figure 5-11 Select Component Set Pane Shortcut Menu

    Description of Figure 5-11 follows
    Description of "Figure 5-11 Select Component Set Pane Shortcut Menu"

  7. Right-click the component or component set to add to the Flow Creation tree and click Move (or click and drag the component or component set to the flow tree).

    Figure 5-12 Flow Creation Pane with Components Added

    Description of Figure 5-12 follows
    Description of "Figure 5-12 Flow Creation Pane with Components Added"

  8. Repeat steps 5-7 to add additional components or component sets to the Flow Creation tree as needed. Select Move Above or Move Below to add the component or component set above or below the currently selected component or component set in the Flow Creation tree.

    Figure 5-13 Select Component Pane Shortcut Menu

    Description of Figure 5-13 follows
    Description of "Figure 5-13 Select Component Pane Shortcut Menu"

  9. Right-click a component in the Flow and select Enter Test Data from the shortcut menu. You can also download a Test Data Excel file for the flow, enter the test data for the flow into the Excel file, then upload the Excel file. See Section 5.2.2, "Entering Test Data Using an Excel File" for additional information about entering test data using an Excel file.

    Figure 5-14 Flow Creation Pane Enter Test Data Shortcut Menu Option

    Description of Figure 5-14 follows
    Description of "Figure 5-14 Flow Creation Pane Enter Test Data Shortcut Menu Option"

  10. Enter the test data required for the component.

    Figure 5-15 Enter Component Test Data Window

    Description of Figure 5-15 follows
    Description of "Figure 5-15 Enter Component Test Data Window"

    The following are guidelines for entering test data for component objects:

    • Rerunable: For fields marked Rerunnable in the component code, the test data is entered as "?Value" in the Value column. For example, the test data entered for Username field would be ?RTUser. Rerunable fields are indicated with an "R" in the R (Rereunable) column in the test data entry screen.

    • Mandatory: Test data is mandatory for all fields marked as Mandatory=Yes in the component code. Mandatory fields are indicated with an asterisk in the * (Mandatory) column in test data entry screen.

    • Value field checkbox: Select the checkbox in value fields if the value is to be passed as a variable. When checked, the text field for the value changes to a list of values (LOV) listing all variable names from previous components in the flow. Variable s are appended with sequence number, for example, var1, var2, etc. If data is not provided to any field in "Enter Test Data", the code for that line would not be generated in the OpenScript script.

    • Button objects: For button object clicks, select True/False. Test data input is required only if the button object keyword is enclosed in Optional tags.

    • Checkbox objects: For checkbox object clicks, enter True to select the checkbox, False to clear the checkbox. Test data input is required only if the checkbox object keyword is enclosed in Optional tags.

    • Date fields: For date fields, Test data is entered for different date requirements as follows:

      To empty the value in a Date field enter: #EMPTY

      To specify the date format as DD_MMM_YYYY enter: #RAND(2_3_4)

      To add n days to system date enter: #SYSDATE(+n) Ex. #SYSDATE(+2)

      To subtract n days to system date enter: #SYSDATE(-n) Ex. #SYSDATE(-2)

      To use the System Date enter: #SYSDATE(0)

    • Function calls: For calls to library functions, the data entered is specific to the function called. See the library reference for additional details.

    • Link objects: For Link object clicks, select True to click the link. Test data input is required only if the link object keyword is enclosed in Optional tags.

    • Menu selection: For simple menu selections, enter the menu names separated by the pipe (|) character. For example, File|Open. Test data input is required only if the menu object keyword is enclosed in Optional tags.

    • Navigation (Forms): To handle navigation to a form from the forms navigator, enter data as follows in the Navigate component:

      Security,User,Define

    • Navigation (OAF): To handle navigation to a form or OAF page with multiple drill menus from the application home page such as: Purchasing, Vision Operations (USA)- Setup-Profile Management Configuration-Organization Encryption, enter data as follows in the Navigate component:

      Resp: Purchasing, Vision Operations (USA)

      Menu Path: Setup,Profile Management Configuration

      Menu Choice: Organization Encryption

    • Radio button objects: For Radio button object clicks, enter True to select the Radio button, False to clear the checkbox. Test data input is required only if the Radio object keyword is enclosed in Optional tags.

    • Text/Text Area objects: Enter the value to input into the text/textarea field.

    • Wait: For Wait for all objects: No test data required. Wait uses the default wait time. For Wait > Normal: No test data required. Wait uses the default wait time.

    • Webtable/Forms table-Entry: For components containing tables in forms / Web, enter test data for "Enter Line Number" or similar Display Name as the line number where values are to be entered. For example, to enter data for the 1st line in the form or table, enter 1 as the test data.

      Figure 5-16 Test Data for Webtable/Forms-Entry

      Description of Figure 5-16 follows
      Description of "Figure 5-16 Test Data for Webtable/Forms-Entry"

    • Webtable/Forms table-Verify/Update: For components that require updating a line in a table or performing an action on any element in a table, the test data entered is the unique column name.For example, if the action to perform is check the checkbox in the "Select" column for *Member = Stock, Ms.Pat, then the test data to be entered for the Search column specified as "*Member" is "Stock, Ms Pat".

      Figure 5-17 Test Data for Webtable/Forms-Verify/Update

      Description of Figure 5-17 follows
      Description of "Figure 5-17 Test Data for Webtable/Forms-Verify/Update"

    • WEBSELECTLOV Function: Test data entry for the WEBSELECTLOV Function corresponds to the following:

      Figure 5-18 Test Data Locations for WEBSELECTLOV Function

      Description of Figure 5-18 follows
      Description of "Figure 5-18 Test Data Locations for WEBSELECTLOV Function"

  11. Click Save and Close when finished.

  12. Repeat steps 9-11 to enter test data into additional components in the flow.

  13. Set the status of the flow as necessary for the current state of development:

    • Click Unlock at any time when adding components and entering test data to save and exit the Flow Creation pane. The Search pane indicates Published Flow Successfully. The Flow is set to In Progress status and can be changed and updated as necessary.

    • Click Assembled when finished entering the test data for all the components and exit the Flow Creation pane. The Search pane indicates Assembled Flow successfully. The flow is set to Assembled status. When the flow is in Assembled status, the flow cannot be updated or changed. The flow status must be changed to Stabilizing to make any updates. Change the status to Stabilizing by right clicking on the flow name in the flow tree.

      When a flow is in Assembled status, it can be evaluated by an Automation Team member who changes the status to Stabilizing. The automation user can update the flow if required. When in the Stabilizing status, the automation user generates and executes the OpenScript scripts and tests if the scripts generated from the flow are executing properly. The automation user determines if changes are required to update the components in the flow and continue stabilizing the flow. Once the automation user stabilizes the flow completely, an Automation POC verifies the flow and OpenScript scripts and changes the flow status to Completed.

      Once the flow is in Completed status, if any user clicks on Create / Update flow structure, the flow changes back to In Progress status.

5.2.1 Adding Scenarios to a Flow

When you create a flow structure, a scenario name is automatically created to define the OpenScript child script name. Each scenario in a flow corresponds to an OpenScript child script. A flow may have only one scenario or it can have multiple scenarios depending upon the flow and the automation process the flow designer is developing.

  • The number of scenarios in a flow depends upon the user/automation process the flow designer is developing.

  • If the flow is small requiring only a few steps (components or component sets) to complete the flow, only one scenario may be required which will create the MASTERDRIVE script and one OpenScript child script. There is no need to add additional scenarios to the flow.

  • If the purpose of the flow is to automate multiple functional scenarios in one flow, then the better practice is to break the flow into multiple scenarios (and create multiple OpenScript child scripts) under one flow.

  • If a flow is to automate a lengthy end-to-end scenario, the better practice is to break the flow into multiple simple scenarios to make it easier to execute and troubleshoot the OpenScript child scripts, if necessary.

  • OpenScript script code is contained in Java ".class" files. There is a technical limitation that a ".class" file cannot exceed a file size of 65536 Bytes. If a scenario in a flow is too large, it is possible for the generated OpenScript script ".class" file to exceed the file size limitation for one script. Use multiple scenarios to break up larger scenarios (and multiple generated OpenScript scripts) to avoid exceeding file size limitations.

To add scenarios to the flow tree:

  1. Open the flow tree and select the flow name.

  2. Right-click the flow name and select Add New Scenario from the shortcut menu.

    Figure 5-19 Add New Scenario Shortcut Menu

    Description of Figure 5-19 follows
    Description of "Figure 5-19 Add New Scenario Shortcut Menu"

  3. Enter a scenario name, then press the Tab key. The Scenario Name is available to create check mark appears if the name does not currently exist in the database.

    Figure 5-20 Create Scenario Options

    Description of Figure 5-20 follows
    Description of "Figure 5-20 Create Scenario Options"

  4. Click Yes.

  5. Click OK to confirm.

  6. Add components and/or component sets to the flow tree under the scenario name.

    When you generate the OpenScript scripts, each scenario name will correspond to an OpenScript child script along with the MASTERDRIVE script.

5.2.2 Entering Test Data Using an Excel File

You can enter test data for an entire flow into an Excel file and then upload the Excel file to the flow. The basic steps are as follows:

  • Download the test Data Excel file for the flow.

  • Enter the test data into the Excel file.

  • Upload the test data Excel file to the flow.

  • Populate the flow with the test data.

To enter test data for a flow using an Excel file:

  1. Create a new flow or search for an existing flow.

  2. Select Update Flow Structure.

  3. Right-click the flow name in the Flow Creation pane and select Generate & Download Flow Test Data Excel from the shortcut menu.

    Figure 5-21 Flow Creation Pane Generate & Download Excel Shortcut Menu Option

    Description of Figure 5-21 follows
    Description of "Figure 5-21 Flow Creation Pane Generate & Download Excel Shortcut Menu Option"

  4. Select Save and specify the location to save the Excel file.

  5. Edit the Excel file to enter the test data for the flow and save the Excel file.

  6. Right-click on the flow name in the Flow Creation pane and select Upload Excel and Populate Flow Test Data from the shortcut menu

    Figure 5-22 Flow Creation Pane Upload Excel Shortcut Menu Option

    Description of Figure 5-22 follows
    Description of "Figure 5-22 Flow Creation Pane Upload Excel Shortcut Menu Option"

  7. Select the Excel file for the flow test data and click Start. Close the Browse dialog box after successfully uploading the file. The data will be populated to all components in the flow.

5.3 Updating Flows

Existing flows can be updated to add or remove components or components sets from a flow or change test data.

5.3.1 Updating Flow Headers

To update a flow header:

  1. Expand the Flow Tree to the flow you want to update.

  2. Right-click the flow name and select Update Header from the shortcut menu.

    Figure 5-23 Update Header Option of the Flow Tree Shortcut Menu

    Description of Figure 5-23 follows
    Description of "Figure 5-23 Update Header Option of the Flow Tree Shortcut Menu"

  3. In the Update Flow pane, edit the Release, Product Family, Product, Flow name, Flow Type, Tags and Description.

    Figure 5-24 Update Flow Pane

    Description of Figure 5-24 follows
    Description of "Figure 5-24 Update Flow Pane"

  4. Click Save when finished to save and exit the Update Component Set pane. The Search pane indicates Updated Flow <name> Successfully.

5.3.2 Adding Components or Component Sets to an Existing Flow

To add a component or component set to an existing component set:

  1. Expand the Flow Tree to the flow you want to update.

  2. Right-click the Flow name and select Create/ Update Flow Structure from the shortcut menu.

    Figure 5-25 Create/Update Flow Structure Option of the Flow Shortcut Menu

    Description of Figure 5-25 follows
    Description of "Figure 5-25 Create/Update Flow Structure Option of the Flow Shortcut Menu"

  3. The Select Component or Components Set and the Flow Creation pane opens for specifying the components or component sets to add or update in the Flow.

    Figure 5-26 Flow Creation Pane

    Description of Figure 5-26 follows
    Description of "Figure 5-26 Flow Creation Pane"

  4. Expand the Components (Approved), Components (Favourites), or Components Sets tree to view the available components or component sets.

    Figure 5-27 Select Component Set Pane with Expanded Components Tree

    Description of Figure 5-27 follows
    Description of "Figure 5-27 Select Component Set Pane with Expanded Components Tree"

  5. Expand the Flow Creation tree to view the existing components or component sets.

    Figure 5-28 Flow Creation Pane with Components Added

    Description of Figure 5-28 follows
    Description of "Figure 5-28 Flow Creation Pane with Components Added"

  6. Select a component or component set in the Flow Creation tree where you want to add the new component or component set.

  7. Right-click the component or component set in the Select Component (Approved), Select Component (Favourites) or Component Set tree that you want to add to the Flow Creation tree and click Move Above or Move Below.

    Figure 5-29 Move Options of the Shortcut Menu

    Description of Figure 5-29 follows
    Description of "Figure 5-29 Move Options of the Shortcut Menu"

  8. Repeat step 7 to add additional components or component sets to the Flow Creation tree Component Set as needed.

    Figure 5-30 Flow Creation Pane with Additional Components Added

    Description of Figure 5-30 follows
    Description of "Figure 5-30 Flow Creation Pane with Additional Components Added"

  9. Enter Test Data into the components as needed.

  10. Click Assemble when finished to change the flow status to Assembled and unlock the flow. The Search pane indicates Assembled Flow Successfully.

  11. To change the flow to Stabilizing status, right-click the flow name in Flow Tree and select Set Status to Stabilizing.

    Figure 5-31 Flow Tree Set Status to Stabilizing Shortcut Menu Option

    Description of Figure 5-31 follows
    Description of "Figure 5-31 Flow Tree Set Status to Stabilizing Shortcut Menu Option "

5.4 Deleting Flows

To delete flows from the Flow tree:

  1. Expand the Flow Tree to the flow you want to remove from the flow tree.

  2. Right-click the Flow name and select Delete from the shortcut menu.

    Figure 5-32 Delete Flow Option of the Shortcut Menu

    Description of Figure 5-32 follows
    Description of "Figure 5-32 Delete Flow Option of the Shortcut Menu"

  3. Click Yes to confirm.

  4. Click OK.

5.5 Generating OpenScript Scripts

To generate OpenScript script code from an existing flow:

  1. Expand the Flow Tree or use the search options to select the flow to use to generate OpenScript code.

  2. Select Generate OFT Scripts from the Flow Tree shortcut menu or the search pane.

    Figure 5-33 Generate OFT Scripts Option of the Shortcut Menu

    Description of Figure 5-33 follows
    Description of "Figure 5-33 Generate OFT Scripts Option of the Shortcut Menu"

  3. Enter the Execution location folder.

  4. Enter the Normal wait time.

  5. Enter the Page wait time.

  6. Select if the script is rerunable or not.

  7. If Rerunable, select the time zone, specify the Rerun type.

  8. Select the time zone.

  9. Click Download Suite.

  10. Extract the zip file into the OpenScript repository.

  11. Start OpenScript.

  12. Open and playback the MASTERDRIVE script located in the flowname folder. The MASTERDRIVE script executes the script containing the OpenScript code for the flow. You can also open the script with the flow code in OpenScript to view the Tree View and Java Code.

5.6 Viewing OpenScript Code

To view OpenScript script code from an existing flow:

  1. Expand the Flow Tree or use the search options to select the flow to use to view OpenScript code.

  2. Select View OFT Code from the Flow Tree shortcut menu.

    Figure 5-34 View Code Window Showing OpenScript Code for a Flow

    Description of Figure 5-34 follows
    Description of "Figure 5-34 View Code Window Showing OpenScript Code for a Flow"

  3. Select the MASTERDRIVE or flow scenario name from the Select Scenario list to view the OpenScript code for the specific flow.

  4. Click the [X] button to close the code view when finished.