UFT Test Process

I think all of you familiar with Phases of Software Test Process (Manual Test Process) or STLC, they are:

1) Test Planning

2) Test Design

3) Test Execution

4) Test Closure.

Note: Software Test Process varies from one company to another and one project to another, what I mentioned is Formal Test Process.

Now I will explain UFT (Unified Functional Testing) Test Process,
Phases of UFT Test Process

I) Test Planning

Important tasks in Planning Phase:

a) Get Environment (UI design and Database) details from Development team and select appropriate Add ins

Why getting development environment details, UFT Tool is object based Test tool, based on front-end objects it can recognize the AUT, but for Database Testing no front-end object is required.

UFT has Integrated MS Access engine to perform Database operations.

If you want test Java application then Java Add in is required, if you want to test SAP application then SAP Add in is required.

In this scenario Add-in means Environment Compatibility files.
b) Analyze the AUT (Application Under Test) in terms of Object Identification.
Major challenge in UFT Test automation is Object Identification, if tool recognizes all of our Application Front-end objects like buttons, edit boxes, list boxes, links etc… then Automation is very simple, we can use UFT Tool features and VBScript features for Test Automation.

By Record / Playback, Using Object Spy and by mapping Objects in between Object Repository and The AUT, we can analyze the AUT.
c) Select Test cases / Tests for Automation.

For Selecting Tests for Automation there are no restrictions, generally 100% test automation is impractical, we try to automate maximum Tests (Not All)

Usually we select the below type of Tests for Automation:

        i) Tests that we have to execute on every build (Sanity Tests)

        ii) Tests that we have to execute on every modified build (Regression Tests)

        iii) Tests that we have to execute using multiple sets of Test data (Data Driven Tests)
d) Tool settings configuration and globalize
You take any software, you can find two types of features

    i) Constant features (That we have to use as it is)

    ii) Configurable features (We can configure according to our project)

In UFT also we have Constant and Configurable features, we have to configure them according to the Project.

In UFT Important configurable features available in Three areas,

1)    File Menu -> Settings

2)    Tools Menu -> Options

3)    Tools Menu -> Object Identification

Configuring Tool settings is ok, but what is globalizing tool settings?

 Globalizing tool settings means providing common configuration for all machines in a Project.

Note: UFT Tool is I-Tier Application; It doesn’t have client/server architecture.
e) Automation Framework Implementation (Optional)

Implementing Automation Framework Implementation is optional, but it is important.

Without using any Automation Framework also we can design and execute tests, but Automation Framework is a Systematic approach to automate software test process.

II) Generating basic Tests

we have two methods in UFT to generate Tests or Test Scripts, one is Object Repository based Test design another is Descriptive programming.
i) Object Repository based Test Design
(In Object Repository based Test design we have two sub methods,)

         1) Recording (It uses local object repositories)

        2) Keyword driven methodology (It uses shared object repository)

What is Keyword driven methodology?

Generating tests manually using Keywords (ex: Test Objects, Utility objects, Functions, methods etc…)
ii) Descriptive Programming / Programmatic descriptions

        1) Static Programming (Enter or provide objects information (Properties and values) directly in Statements or steps)

        2) Dynamic Programming (Creating Description objects and using description objects generating tests)

Note: We can follow either Recording or Keyword driven methodology or static programming or dynamic programming for generating tests.

And UFT follows Hybrid approach for generating tests, means some tests using Objects repository and remaining tests using descriptive programming.

In a Test also we can use object repository based test design for some statements, descriptive programming for some statements.

Hybrid Approach

        High level

        Low level

OR            DP

Parent Object + Child Object -Correct

DP            OR

Parent Object + Child Object -Incorrect

III) Enhancing Tests

Try to increase the usage of VBScript features, Why?

a) Script features are faster in execution than Tool features

b) Script features won't corrupt

c) Script logic doesn't have any limitations

d) All Script features can be used internally as well as externally.

1) Inserting Checkpoints (9+3) (UFT)

2) Inserting Output value (7)

3) Inserting Transactions (Start and End) (UFT) / Timer Function (VBS)

4) Generating steps using Step Generator

5) Inserting Flow Control Statements (VBS)

        a) Conditional Statements

                1) If statement

                2) Select Case statement

        b) Loop Statements

                1) For...Next

                2) While...Wend

                3) Do While / Until...Loop

                4) For Each...Next

6) Calling Actions, Function (UFT, VBS)

Two Types of Functions in VBScript

    i) Built-in Functions

        a) Array Functions

         b) String Functions

         c) I/O Functions

         d) Conversion Functions

         e) Date & Time Functions

         f) Math Functions

         g) Miscellaneous

    ii) User defined Functions

Two types of User defined functions in VBScript

         a) Sub Procedures (Public (Internal, external) , Private)

         b) Function Procedures (Public (Internal, external) , Private)

7) Regular Expressions (VBS)

It is formula for matching patterns

Usage of Regular Expressions     

    i) To handle dynamic objects

     ii) For search operations

8) Environment Variables

 Two types of Environment Variables

    i) Built-in

    ii) User defined

Advantages of Environment Variables

     i) Centralized maintenance of variables
    ii) Tests portability

9) Adding Comments (Optional)


    i) To make the code Readable

     ii) To make the code disable from execution

10) Parameterization (UFT, VBS)

    What is Parameterization?

    Advantages of Parameterization

    What is Data Driven Testing?

    Why Data Driven Testing?

    How to Parameterize?

We can use either VBScript variables or Constants or Data Table parameters or Arguments

or Environment variables or Action Parameters or Dictionary items

11) Synchronization (UFT, VBS)

    What is Synchronization?
     Why Synchronization?

     When Synchronization is required?

     How to Synchronize?

        Insert wait statement (VBS)
        Insert Synchronization point (UFT)
        Increase Tool default Time (UFT)

12) Using Automation Objects (VBScript)

    i) File System Object Model

         a) What is Computer File System?

         b) Examples for File System operations

         Create a folder

         Copy a folder

         Delete a folder

        Create a Text file

        Copy a Text file

        Delete a Text file

         Read Data

        Write data

        compare data

         Search operations Etc...

             c) How end user performs File System operations?
            d) How to perform automatic File System operations

 Class Value for creating File System Object - ("Scripting.FileSystemObject")

    ii) Excel Application Object

 It is used to perform operations on Excel Application / excel files


Excel Application

Excel File / Workbook

Excel Sheet / Worksheet

Class Value for creating Excel Application Object- ("Excel.Application")

    iii) Word Application Object

 It is used to perform operations on Word Application / documents

Class Value for creating Word Application Object- ("Word.Application")

    iv) Database Objects

         1) Database Connection Object

         It is used to connect to Databases

Class Value for creating Database Connection Object- ("Adodb.Connection")

        2) Database Recordset object

         It is used to perform operations on Database Tables

 Class Value for creating Database Recordset Object- ("Adodb.Recordset")

    v) Dictionary Object

     It is used to define Key, value pairs

 Class Value for creating Dictionary Object- ("Scripting.Dictionary")

13) Error Handling (UFT, VBS)

 Handling expected and unexpected Errors

        Use Conditional statements with Exist property

        Use Some Built functions

        Use Option explicit statement

        Use Exit statement

        Use On Error Resume next statement

        Recovery Scenarios (UFT)
IV) Running and Debugging Tests

Debugging Tests

        What is Debugging?

        When debugging is required?

        How to debug?

Running Tests

        Single Test Run

        Batch Testing

                a) Using "Test Batch Runner" Tool

                b) Using AOM Script

                c) Using driver script

                d) Using Quality Center/ALM Tool
V) Analyzing Test Result
UFT Result window:

UFT provides Test result for every test iteration.

What is Test Iteration?

Cycle on execution, suppose one test is there, if we execute that tests 10 times then UFT provides 10 test results.

Exporting Test Result: We can use Excel format for exporting Test Result
Defining Test Result:
User (Tester) can define Test Results using Reporter utility objects.
Why Tester need to define Test Results?
Generally UFT tool provides test result for every test iteration if we use UFT Tool features like Checkpoints, Transaction points, Synchronization point, Out put values etc…, if we use our own logic like Conditional statements, loop statements user defined functions etc… then we need to define Test Result.

Status of Test Result:

(UFT supports 4 types of Status for Test Result)

        Pass (If expected = Actual then Pass)
        Fail (If expect <> Actual then Fail)
        Done (If there is no verification point, only plain execution then Done status)
        Warning (Problems during test execution then Warning status)
Deleting Test Result:

We can delete Test Results using Test Results Deletion Tool.
VI) Reporting Defects

Functional Test Automation          Defect Management


i) UFT                                      Manual (using Excel)


ii) UFT                                     Bugzilla/Jira


iii) UFT                                    QC/ALM


Post a Comment