less06 2 e_testermodule_5
DESCRIPTION
This is part of R12 Testing Suite for Oracle Applications or E-Business suite.TRANSCRIPT
Copyright © 2008, Oracle. All rights reserved.
Data Banks
Introduction to Oracle Application Testing Suite: e-Tester
Copyright © 2008, Oracle. All rights reserved.6 - 2
Data Banks
During recording of a visual script, the data entered into the form fields is recorded in the “Parameters” node. The recorded values are used, during playback.
A Data Bank allows you to pass data from an external file to forms on playback of a visual script. This allows you to iterate a single script with multiple input values.
Data can be generated from Notepad, Microsoft Excel, a database application, and so on.
Java applets and text matching tests can also be data banked.
Copyright © 2008, Oracle. All rights reserved.6 - 3
Data Driven Scripts
The user tests multiple input combinations by manually entering the data into the form fields.
Test Case: Login-Logout1) Home Page2) Enter Login Data & Submit3) Welcome to FMStocks
Home Page
Login Data Sets:User Name PasswordTa1 taTa2 taTa3 ta
Copyright © 2008, Oracle. All rights reserved.6 - 4
Automated Data Driven Tests
e-Tester tests multiple input combinations by automatically entering the data, from the external file, into the form fields.
Test Case: Login1) Home Page2) Enter Login Data & Submit3) Welcome to FMStocks
Home Page
Login Data Sets:User Name PasswordTa1 taTa2 taTa3 ta
Copyright © 2008, Oracle. All rights reserved.6 - 5
Think About What to Data Bank
When setting up a databank, locate where data was submitted within the script.• Look for the “Parameters” node to find all points where data was
submitted during recording of the script.
Determine which data to change, during playback.
Copyright © 2008, Oracle. All rights reserved.6 - 6
Create A Data File
The first row must contain the column headers.
Each subsequent row will contain the data sets or records.
The file must be in Comma Separated Value format (each column is separated by a comma).
The file can be created using Notepad, Excel, or a Database Export.
Copyright © 2008, Oracle. All rights reserved.6 - 7
Save The Data File
Save the file as either a .TXT or .CSV file.
Data file must be saved in the DataBank folder (located in the e-Test Suite install directory)
• ~install\ETS\e-Test\Databank
Copyright © 2008, Oracle. All rights reserved.6 - 8
Data Bank Wizard
Launch the Data Bank Wizard any one of the following:
• Click on the data bank wizard toolbar icon
• Select Edit/Data Bank Wizard…
Copyright © 2008, Oracle. All rights reserved.6 - 9
Add Variable
Variable: Temporary memory space that holds the values retrieved from the external data file.
1. Click the “Add Variable” button.
2. Enter the variable name.
Copyright © 2008, Oracle. All rights reserved.6 - 10
Add Mapping
Select the parameter, and the variable that will hold the matching data.
Click on the “Add Mapping” button.
The parameter and the variable will be joined in the mappings section.
Verify that the mappings are correct.
Copyright © 2008, Oracle. All rights reserved.6 - 11
Data Binding
1. Click the “Data Binding Tab.”
2. Click the “Select” button.
3. Choose the file to use from the DataBank folder.
4. Click Open.
Copyright © 2008, Oracle. All rights reserved.6 - 12
Add Binding
Once the Data Bank has been loaded, the headers will be listed in Data Bank Fields
Select the data bank field, and the variable to hold the data.
Click “Add Binding.”
The data bank field and the variable will be joined in the bindings section.
Verify that the bindings are correct.
Copyright © 2008, Oracle. All rights reserved.6 - 13
Overall Picture
Pages provide parameters
E-Tester (you) define variables
Databank file provides data
Page Parameters Variables Databank
Mapping Binding
Script Development
Playback
Copyright © 2008, Oracle. All rights reserved.6 - 14
Fetch Record
Fetch Record button will retrieve the next record in the data file each time it is clicked.
Use the “Fetch Record” button as a final check to verify that the data is being associated with the correct fields.
Once the data bank set-up is complete, click the OK button to save and exit.
Copyright © 2008, Oracle. All rights reserved.6 - 15
Edit & Update Databank File
The “Edit” button opens the databank file in Notepad and enables you to make changes
The “Update” button lets you update the current databank file that is selected to the databank wizard.
Copyright © 2008, Oracle. All rights reserved.6 - 16
Data Bank Node Indicators
Upon exiting the Data Bank Wizard, the Data Banked Parameters will have a new node icon.
• Checkmark: Parameter has been mapped to a variable and bound to a data field.
• Arrow: Parameter has been mapped to a variable, but has NOT been bound to a data field.
Copyright © 2008, Oracle. All rights reserved.6 - 17
Iterate
Playback the visual script with databank multiple times (iterations) by:
• Clicking on the “Iterate” toolbar icon
• Selecting “Run/Playback/Iterate…”
Copyright © 2008, Oracle. All rights reserved.6 - 18
Playback with Data Bank
To Iterate the Visual Script, using different data bank values for each iteration:• Select the Playback with
Data Bank radio button.• Click Iterate.
Copyright © 2008, Oracle. All rights reserved.6 - 19
Exercise
1. Create a script that navigates through the registration page, enter information and submit. Save the script as “registration.”
2. Create a data bank file with login info. Save the file as login.txt
3. Set up the data bank to use the data from the data bank file.
4. Iterate the script using the Data Bank.
5. Save the script.
Copyright © 2008, Oracle. All rights reserved.6 - 20
Review 5
1. What is an advantage to playing back with databank?
2. What does a databank variable do?
3. True/False When using databank, all fields must be mapped and bound to a databank file.
4. How is a script played back with databank?
5. What is “Iterate over range” in the iterate dialog?