qtp automation - keyword driven framework
DESCRIPTION
QTP Automation FrameworkTRANSCRIPT
April 18, 2023
Description
Purpose
Automate regression test cases for Bespoke application using QTP so that Test cycle execution time is reduced.
Project / Context
Test Automation of a .Net application in Quick Test Professional using a Keyword Driven Framework.
Description
April 18, 2023
Process Adopted Framework Architecture Life Cycle Components of the Framework Keyword Driven Actions Sample Test Case Output File Naming Conventions Strategic Benefits Why this is a best practice Adaptability
Agenda
April 18, 2023
1. Conducted feasibility study to find whether it is technically possible to
automate the application.
2. Identified regression test case suit from manual test cases.
3. Analyzed test cases in detail.
4. Decided keyword driven framework as the right approach to
successfully automate the regression test suit.
Process Adopted
April 18, 2023
Test Case Specific
Functions
Global Function Library
Driver Script
Core Script
Reporting Script
Components Of the Framework
April 18, 2023
1. Core Script: This automatically executes end-to-end business test scenarios/test cases in the batch file.
2. Driver Script: This executes the test. It reads the keyword test data step-by-step and executes those steps in the application using the automation scripting logic.
3. Global Function Library: This consists of reusable common library functions for test initializations, keyword driven actions and utility. This scripts the relevant actions that can be reused across the different test scenarios. For example: Click, Select, Set and so on.
4. Test Case Specific Function Library: This performs specific functions of test case. The functions defined here are mostly non reusable and are dedicated to a particular part of the application/ functionality.
5. Reporting: This is a centralized reporting function that is writes output logs.
Components Of the Framework
April 18, 2023
Keyword Driven Actions
Object Type Associated Actions Associated Verify Actions
EditBox EditBox_Input EditBox_Default,EditBox_Enabled, EditBox_Disabled
Combobox Combobox _Select Combobox_Values, Combobox_Enabled,Combobox_Disabled
RadioButton RadioButton_Select N/A
CheckBox Checkbox_Check Checkbox_Checked,Checkbox_Unchecked, CheckboxEnabled
Keyword Driven Actions
The above table depicts sample keyword driven actions defined within the framework.
April 18, 2023
Sample Test CaseSample Test Case
This is an example of a sample test case written in MS Excel. Each row depicts one step in executing the test.
April 18, 2023
Output File naming ConventionsOutput File naming Conventions
The output naming conventions help in determining whether the particular functionality has passed or failed. The file name has the suffix passed or failed to inform the status of the test case.
April 18, 2023
Sample Output Log FileSample Output Log File
The log file contains the result for each action, whether it has passed or a failed in the action. If a step has failed, the reason for failure appears after the failed step.
April 18, 2023
Strategic Benefits
Reduced Technical Resource
This figure depicts that as the new test cases are added in the framework, the need for specialized automation tester becomes less compared to a typical automation script. New automation test cases can also be written by the tester who has no automation experience.
April 18, 2023
Why this is a best practice
Benefits• Optimizes test cycle execution time• Maximizes reuse and thereby reduces the test suite building and
maintenance efforts significantly • Eliminates object repository limitations through descriptive
programming approach • Produces reliable results• Helps non-developers to build new test scenarios
Justification
Automation of manual test cases not only optimizes the execution time, it also eliminates any possible human errors.
Why this is a best practice