QTP VBScript new series + Interview Question Bank on QTP for enrichment of Knowledge in QTP

This Site has been brought to you by HP Certified Expert of QTP.

Exciting new articles for October:

1) QTP Tip:Deselect all Radio Buttons

2) HP QTP Crypt Object

3)Adding Hyperlinks in Excel Spreadsheet

Best of Luck Friends ! ! !

Expert QTP

All Articles are Copyright Protected. These are Free for Reading & Personal Use. Reproduction in Any Form without the Permission is Illegal & Strictly Prohibited.

Copyright © 2009 ExpertQTP

Google Search

Tuesday, September 2, 2008

Introduction to Test Automation Framework

Judiciously testing all possible permutations of such components creates a highly complex testing situation with hundreds or thousands of testing scenarios. Under such situations there comes a need for automating the testing process with the help of automation framework approach, which can help in achieving detailed testing with great reduction in testing time.

It can never be a workable idea to automate all the test cases. Hence it is important to scientifically understand the areas which can be automated. Remember that an ad-hoc approach to test automation can in fact, lead to longer testing time and poor quality irrespective of the name & fame of the testing tool selected by you.

Now let us understand what is ‘Test Automation Framework’?

Test Automation Framework is a set of assumptions, concepts and practices which provide necessary support for the automated software testing.

The main advantage of such a framework is the low cost for maintenance. If there is change to any test case then only the test case file needs to be updated and the Driver Script and Startup script will remain the same. There's no need to update the scripts in case of changes to the application.

Types of Automation Framework:

1) Modularity driven framework:
It requires the creation of small, independent scripts that represent modules, sections, and functions of the application-under-test. These small scripts are then used in a hierarchical fashion to construct larger tests, realizing a particular test case. It applies the principle of abstraction or encapsulation in order to improve the maintainability and scalability of automated test suites.

2) Data driven framework: It involves bunch of several interacting test scripts clubbed with their related data results. In this framework, variables are used for both input values and output verification values: navigation through the program, reading of the data sources, and logging of test status and information are all coded in the test script. It is quite suitable framework for use in RFT using Data-pools. This approach reduces coding effort to a great extent in case of large test cases, which otherwise could be quite time-consuming & cumbersome.

3) Keyword driven framework: It involves automated tests, which have inherent reusability and therefore ease of maintenance of tests that have been created at a high level of abstraction. It divides test creation into two stages like

a) Planning Stage: Involving analysis of the requirements for the application to determine which operations and objects have to be tested. E.g. an application having web based questionnaire will require a large amount of text entries.

b) Implementation Stage: It differs according to the tool or framework used. Generally automation engineers implement a framework that provides keywords like "check" and "enter". Testing engineers (who don’t have to know the coding) write the test cases based on the keywords defined in the planning stage that have been implemented by the engineers. The test is executed using a driver who reads the keywords and executes the corresponding code.

Keyword Driven Framework methodology requires more planning and a longer initial time-investment than going directly to the test creation stage and recording a test, it does make the test creation and test maintenance stages more efficient and keeps the structure of individual tests more readable and easier to modify.

4) Hybrid framework: Is a combination of three frameworks. This type of frameworks evolve over a passage of time and across multiple projects. It is the most successful automation frameworks, which generally accommodates both Keyword-driven testing as well as Data-driven testing. This allows data driven scripts to take advantage of the powerful libraries and utilities that usually accompany a keyword driven architecture.

In this case, the framework utilities can make the data driven scripts more compact and less prone to failure. The utilities can also facilitate the gradual and manageable conversion of existing scripts to keyword driven scripts as & when required. On the other hand, the framework can use scripts to perform some tasks that might be too difficult to re-implement in a pure keyword driven approach, or where the keyword driven capabilities are not yet in place.

Ten Steps for Test Automation Framework Methodology:

1) Identification of the Scope of Testing: Company oriented, Product oriented, Project Oriented.

2) Identification of the Needs of Testing: Identify Types of testing e.g. FT, Web Services etc. and application / modules to be tested.}

3) Identification of the Requirements of Testing:
Find out the nature of requirements, identify type of actions for each requirement & identify high priority requirements.

4) Evaluation of the Test Automation Tool: Evaluation checklist, Identify the candidate tools available in the market, Sample run, rate & select the tools, Implementation & Training

5) Identification of the Actions to be automated: Actions, Validations & requirements supported by the Tool

6) Design of the Test Automation Framework: Framework guidelines, validations, Actions Involved, Systems involved, Tool Extensibility Support, Customs messages & UML Documentation.

7) Design of the Input Data Bank: Types of Input file. Input files – Categorization & Design of file prototypes.

8) Development of the Automation Framework: Development of script based upon framework design, Driver scripts, Worker Scripts, Record / Playback, Screen / Window / Transaction, Action / Keyword & Data Driven.

9) Population of Input Data Bank: Different Types of data Input, Populate data from different data sources, Manual input of data and Parent – Child data hierarchy.

10) Configuration of the Schedulers: Identify scheduler requirements & configure the schedulers.

Benefits of Test Automation Framework Approach:
Test Automation Framework built with systematic approach yields following benefits:

# Ensures consistency
# Significant reduction in the amount of code to develop & maintain thereby reducing the testing cycle time.
# Comprehensive coverage against requirements.
# Use of a "Common Standard" across the organization / Product team / Project team
# Maximizes reusability of test scripts ( Utility Functions)
# Provides a structured for test library having systematic maintenance of automation scripts
# Data Pooling
# Protects non-technical testers from the code

Key Word: QTP, Automation, Automation Framework,

No comments:

Copyright © 2009 ExpertQTP