Monday, July 15, 2019

4. GUI TESTS AND ACTIONS-1



GUI TESTS AND ACTIONS-1


Define GUI Tests?

In a GUI Test, it contains calls to actions. By default, it contains a call to a single action but we can have multiple actions and multiple action calls to new or existing actions.


Why do we need actions?

We need actions to manage our tests in a more logical, efficient and modular fashion.

What are the different types of actions?

      1. Reusable actions
      2. Non-Reusable actions
      3. External actions
      4. Nested actions

Describe Reusable Actions?

      1. All actions by default are reusable.
      2. Can be called multiple times by local tests and other tests.
      3. Can be modified only from the parent test.
      4. Can be changed into a non-resuable action.

Describe Non-Reusable Actions?

      1. Can be called only once and in the local test.
      2. Can be copied.
      3. Can be changed into a reusable action from properties.

Describe external actions?

      1. Stored with another test.
      2. Read Only from called test.

Describe Nested actions?

1. Called from another action.

Tuesday, July 2, 2019

12 Parameterization - 1 - Basics


Parameterization Basics

What is a parameter?

A parameter is a variable used to denote or represent data in our tests.

Why do we parameterize?

We do parameterization when we want multiple sets of data to be used for the same set of operations.
Suppose we want to automate an application for Localization Testing. We can use the same code and parameterize the input data for the application steps and import the different data for different language from different data table or excel file for each language.
In another example, we can use parameterization for input values for an application with same set of test data as input data. When we have one application as Web and another as Windows with same business flows.


What do we parameterize?

We use parameterization for the below reasons -:

      1. Checkpoints
      2. Object Properties for a selected step.
      3. Object Properties in the Object Repository.
      4. Operation arguments for a selected step.


What are the different types of Parameterization available in UFT?

The different types of parameterization available in UFT are -:

      1. Test and Action Parameterization.
      2. Data Table Parameterization.
      3. Environment Variable Parameterization.
      4. Random Number Parameterization.

What are the different types of Test Parameterization?

The different types of Test Parameterization are -:

      1. Input Parameterization
      2. Output Parameterization
Both the parameterization information can be added from the related Test Properties Pane.
In the Properties Pane – Parameterization tab we have options to -:

a) Add – Input/Output Parameter
b) Edit – edit information related to added parameters such as Name, Value and Type of parameter.
c) Delete – delete a parameter.
We can use these parameter values to pass to the actions present in the test and also to other tests in the same Solution.


What is Action Parameterization?

The different types of Action Parameterization are -:

        1. Input Parameterization
        2. Output Parameterization
Both the parameterization information can be added from the related Action Properties Pane.
In the Properties Pane – Parameterization tab we have options to -:

a) Add – Input/Output Parameter
b) Edit – edit information related to added parameters such as Name, Value and Type of parameter.
      1. Delete – delete a parameter.


What are the different types of Parameterization through Environment Variables?

The different types of Environment Variables are -:

      1. User-Defined Internal Environment Variables
      2. User-Defined External Environment Variables
      3. In-Built Environment Variables.


User-Defined Internal Environment Variables

In the case of User-Defined Internal Environment Variables we can set up variables from the FILE Menu-Settings option-Environment tab.
We can add the environment variables by giving the name and value of the variable from the above pane.
We can also export the User-Defined Environment variable to an XML file from the menu.


User-Definned External Environment Variables

In the case of User-Defined External Environment variable we can create an external XML file in the format accepted by UFT and import the created XML file to UFT with the options present in the menu. The XML file format should start as -:

<Environment>
<Variable>
<Name>VariableName1<\Name>
<Value>VariableValue1<\Value>
<Description>Variable Description1<\Description>
<\Variable>
<Variable>
<Name>VariableName1<\Name>
<Value>VariableValue1<\Value>
<Description>Variable Description1<\Description>
<\Variable>
<\Environment>


UFT In-Built Environment Variables

There are multiple built-in environment variables in UFT which consist of information related to the test. These are variables such as OS Name and Test Name. We can use these environment variables in our code to check with an IF structure and run the required code.


What is the Data Driver?

Data Driver in UFT is used to quickly parameterize several or all occurrences of a property of a test object, checkpoint property and method argument when they have multiple occurrences of a constant in the action.
Data Driver functions like Find and Replace All in excel.