• Embed Doc
  • Readcast
  • Collections
  • CommentGo Back
Download
 
Typical Architecture of Automation FrameworksAn Automation Framework primarily comprises of elements like:
A) Function LibraryB) Object RepositoryC) DatabaseD) Application Scenario FilesE) Initialization VB ScriptF) Sequence FileG) Driver ScriptH) Test Case List File
A) Function Library:
While creating automation framework the entire coding is done by using VB script functions that are user defined. We store these VB script functions in function library files with (*.vbs) extension. Apart from Driver Scripts, there is no need of doing any script creation beyond the function library.
Every application consists of following two types of function libraries
1) Containing common functions that are not dependent on the application functions.2) Containing functions, which are specific, the application.The script designer strives to utilize the common functions, which are independent of the application, to themaximum possible extent. However there is no hard & fast rule to always use common functions only. Whenever there is absolute necessity of using some functions, which are essential for the application, the same are createdon the spot & are stored in the concerned function library.“ExecuteScenarioFile” is a function present in our common function library & is called from the Driver Script or from outside the function library. This function is used for accessing the keywords, various objects and all other parameters from the Scenario File. This is also used to call other relevant functions as well from the functionlibrary.The function library files with (*.vbs) extension are stored in the Function Library folder.
B) Object Repository:
Every application being automated contains a single / unique object repository file. The object repository fileswith (*.tsr) extension are stored in the Object Repository folder.
C) Database:
MS Access database module of MS Office is used to store all the test data. While designing the structure of thedatabase the designer tries to keep one independent table for every screen of the application. Test Case ID fieldis usually designated as the primary key for every table. Test Case ID is unique for every record used by theprogram for iteration. Test Case ID identifier is quite helpful in navigating through some particular type of datastored in the table. QTP establishes a link with database by building its system DSN and using the same DSN in
 
the script. As a best practice, every application should have an independent database file; however for the sakeof conserving the space on the hard disc, multiple applications can share the same database.The MS Access database files with (*.mdb) extension are stored in the Database folder.
D) Application Scenario Files:
This is a typical MS Excel spreadsheet file, which contains records with information on different keywords,objects & many other parameters representing a test scenario. QTP accesses the information from thisapplication scenario file & performs the defined actions over the application. The MS Excel spreadsheet fileserves the purpose of test case documentation as well & there remains no need to create another set of testcase documentation. The application scenario files are the most versatile features of keyword driven framework.The subject matter experts (SME’s) who usually don’t have much of programming knowledge are able to easilyuse these application scenario files for creating automated tests by making quick selection of keywords from thedropdown lists.We can save tremendous amount of automation effort by creating maximum number of common which can bereused again & again thereby getting the maximum benefit.The application scenario files with (*.xls) extension are stored in the application folder corresponding to theparticular application.
E) Sequence File:
These are initialization settings files for the Driver QTP Script and are similar to the conventional configurationfiles. This is also a typical MS Excel spreadsheet file, which contains records with information like:1) Name of Application Scenario file2) Name of Object Repository3) Name of Function Library4) List of Test Cases to be executed5) Details of Data Source6) Details of script development work area7) Details of script execution work areaEvery application carries a “Run” or “Ignore” flag specifying the application scenario being executed. Thissequence file in the form of spreadsheet is used by the Initialization VB Script uses & decides as to whichapplication & which scenario is to be executed, for getting the information on the concerned Application Scenariofile & for doing the initialization settings for the application.The Sequence File with (*.xls) extension are stored directly in the root folder.
F) Initialization VB Script:
Initialization is the starting point for the execution of a script. QTP gets launched by Initialization VB Script & thework area is set either as development or production depending upon the inputs from the user. We can use thesame Initialization VB script for doing the initialization settings for multiple web applications.It carries out the following settings for the Driver Script.1) Setting the Work Area according to user input.2) Setting the application scenario file for the current run.3) Setting the object repository.4) Setting the function libraries.5) Setting the data source.6) Setting the test case list.
of 00

Leave a Comment

You must be to leave a comment.
Submit
Characters: ...
You must be to leave a comment.
Submit
Characters: ...