26
Copyright © 2008, Oracle. All rights reserved. Advanced Data banking Introduction to Oracle Application Testing Suite

Less07 2 e_testermodule_6

Embed Size (px)

Citation preview

Page 1: Less07 2 e_testermodule_6

Copyright © 2008, Oracle. All rights reserved.

Advanced Data banking

Introduction to Oracle Application Testing Suite

Page 2: Less07 2 e_testermodule_6

Copyright © 2008, Oracle. All rights reserved.7 - 2

Advanced Data banking

In order to save time, e-Tester provides the ability to automatically create variables, add mappings, create a data file, and add bindings.

• Auto Map: Data bank feature that creates variables for each parameter in the Visual Script and maps each variable to its respective parameter.

• Auto Bind: Data bank feature that creates a data file (containing headers for each variable and the recorded data for each mapped variable) and binds each data bank field to its respective variable.

Page 3: Less07 2 e_testermodule_6

Copyright © 2008, Oracle. All rights reserved.7 - 3

Open the Data Bank Wizard.

Click on the Auto Map button.

A variable will be created for each unique parameter listed. Each parameter will be mapped to a variable.

Auto Map

Page 4: Less07 2 e_testermodule_6

Copyright © 2008, Oracle. All rights reserved.7 - 4

Auto Map

Auto Map will generate a variable and mapping for every parameter in the visual script.

Some data is not necessary for navigations. The unnecessary variables and mappings should be eliminated

Eliminating unnecessary variables/mappings will:

• Reduce the size and complexity the Data Bank file and the Data Bank associations

• Make the script easier to debug for future test runs

Page 5: Less07 2 e_testermodule_6

Copyright © 2008, Oracle. All rights reserved.7 - 5

Auto Bind

Add variables and mappings.

Click on the Auto Bind button.

A Data Bank file will be created, and saved in the DataBank directory. The file is named with the script name.

The Data Bank fields will be bound to the variables.

Page 6: Less07 2 e_testermodule_6

Copyright © 2008, Oracle. All rights reserved.7 - 6

Databank Recommendations

Auto mapping and auto binding should only be used when there are several fields that are to be databanked

Think about what is happening on the backend when setting up databank.

You may only have to databank a handful of fields in a given situation.

Page 7: Less07 2 e_testermodule_6

Copyright © 2008, Oracle. All rights reserved.7 - 7

Synthesize

Synthesize enables you to add/edit data in a databank file to fit a defined pattern.

Page 8: Less07 2 e_testermodule_6

Copyright © 2008, Oracle. All rights reserved.7 - 8

Synthesize

Enter name for “header” of data file

Define a pattern• # for number• % for letter• ? For letter or number

Define algorithm and other fields

Click “Insert” to add another field

Page 9: Less07 2 e_testermodule_6

Copyright © 2008, Oracle. All rights reserved.7 - 10

Synthesize

Define the number of rows of data to generate in the data file

Specify the file name to save the data to

Sample generates a set of data based on the current settings and values.

Cannot edit synthesized data (through wizard) once wizard is closed. Data must be manually manipulated

Page 10: Less07 2 e_testermodule_6

Copyright © 2008, Oracle. All rights reserved.7 - 11

Exercise

Open the Registration script

Create a data file using the Synthesize feature with all the fields

Databank all the fields

Page 11: Less07 2 e_testermodule_6

Copyright © 2008, Oracle. All rights reserved.7 - 12

Review 6

1. How many databank files can you attach to a script?

2. How many parameters can you databank within a script?

3. Why wouldn’t you want to run the default content comparison tests on a page, following a Data Banked form submission?

4. Can you map multiple parameters of the same name to the same variable? If so, when would this be useful?

Page 12: Less07 2 e_testermodule_6

Copyright © 2008, Oracle. All rights reserved.

Data Bank “Issues”

Introduction to Oracle Application Testing Suite: e-Tester

Page 13: Less07 2 e_testermodule_6

Copyright © 2008, Oracle. All rights reserved.7 - 14

Potential Data Bank Problems

Navigations may break when using a data bank

• Failed navigations are due to dynamically changing HTML

• EXAMPLE:– During record, the user searched for “dogs” and clicked on

the search result link “I-love-dogs.com”– During playback, e-Tester searched for the Data Bank value

“cats” and the link “I-love-dogs.com” was not contained in the search results.

Page 14: Less07 2 e_testermodule_6

Copyright © 2008, Oracle. All rights reserved.7 - 15

Identify The Failure

Look in the Summary column of the Results Log to identify the failure.

The example above Failed to Navigate on page 5, due to the link not being found.

Page 15: Less07 2 e_testermodule_6

Copyright © 2008, Oracle. All rights reserved.7 - 16

View The Actions

Look at the Address/Properties, for the page that failed, to determine what actions were needed to navigate.

The action recorded, in the example above, clicked on the link with the text “Oracle”

Page 16: Less07 2 e_testermodule_6

Copyright © 2008, Oracle. All rights reserved.7 - 17

View The Differences

View the textual differences, on the page prior to the one that failed, to determine what content changed on the web page.

Page 17: Less07 2 e_testermodule_6

Copyright © 2008, Oracle. All rights reserved.7 - 18

Match The Failures And Differences

Compare the failure to the content differences found to see if they match.

In the example above, the recorded html (blue) contained the link “TER” and the tested html (red) contained the link “MSFT.” The summary column shows that the navigation failed because the “TER” link was not found.

Page 18: Less07 2 e_testermodule_6

Copyright © 2008, Oracle. All rights reserved.7 - 19

Understand What Happened

After concluding that the navigation failed due to a change in the page content, it is important to understand what happened.

• The HTML changed due to a data banked form submission.

• The result links changed due to a data banked form submission.

• The link that e-Tester used to navigate during record did not exist upon playback.

Page 19: Less07 2 e_testermodule_6

Copyright © 2008, Oracle. All rights reserved.7 - 20

Solutions To Data Bank Problems

Potential solutions to problems caused by using a data bank include:

• Re-record the navigation

• Modify the navigation

Page 20: Less07 2 e_testermodule_6

Copyright © 2008, Oracle. All rights reserved.7 - 21

Resolution Considerations

When deciding which solution to use there are a few things to consider:

• Re-record the navigation: This resolution will only correct the problem for the current data record, not for all records in the Data Bank file.

• Modify the navigation: This the easiest and fastest resolution.

Page 21: Less07 2 e_testermodule_6

Copyright © 2008, Oracle. All rights reserved.7 - 22

Modifying Navigations

There are two ways to modify navigations:

• Modify the action

• Modify the object’s location criteria

Page 22: Less07 2 e_testermodule_6

Copyright © 2008, Oracle. All rights reserved.7 - 23

Modify The Action

To modify the Action:• Open the Address Properties• Double-click on the action to

be modified (this will open the “Event Properties”)

• Edit the Object Path

Page 23: Less07 2 e_testermodule_6

Copyright © 2008, Oracle. All rights reserved.7 - 24

Location Criteria

e-Tester locates objects, used for navigation, based on the following criteria (in this order):

• The type of object selected

• An obtainable attribute of the object

• The object’s position in relation to other objects in the same collection.

Page 24: Less07 2 e_testermodule_6

Copyright © 2008, Oracle. All rights reserved.7 - 25

Location Criteria

Below is an example of an object path:

• Object Type = link

• Obtainable Attribute = text (“TER”)

• Object Position = index 15 (16th link in collection)

Page 25: Less07 2 e_testermodule_6

Copyright © 2008, Oracle. All rights reserved.7 - 26

Think About Location Criteria

In some cases, the second location criteria, object attribute, is dynamic. In these cases, navigation will fail if an object with the specified attribute can not be found.

If the object attribute is dynamic, and the object position is static, it makes sense to switch the order of the location criteria.

Page 26: Less07 2 e_testermodule_6

Copyright © 2008, Oracle. All rights reserved.7 - 27

Modify Location Criteria

To modify the location criteria:• Open Address/Properties…• Check the Base Final Event

on Index checkbox.

• Note: This is usually not necessary if eTester is allowed to use the index as a secondary attribute