Вы находитесь на странице: 1из 9

Keyword Driven Architecture

Applicati
on
Scenario

Driver
Test Scripts Test Case
Scripts
File

Function
Object Libraries

Repositor
y

Utility
Databa Functi
se on

Keyword-driven testing and table-driven testing are interchangeable terms that refer to an application-
independent automation framework.

This framework requires the development of data tables and keywords, independent of the test
automation tool used to execute them and the test script code that "drives" the application-under-test and
the data.

Keyword-driven tests look very similar to manual test cases. In a keyword-driven test, the functionality of
the application-under-test is documented in a table as well as in step-by-step instructions for each test.

Application Scenario File

• Consists details of all the Test scenarios to be automated


• User will be able to select a specific scenario to execute based on turning on or off a flag in
the Control File

• Control File is in the form of an excel worksheet and contains columns for Scenario ID,
Execute (Y/N), Object Repository Path, Test Case File Path

Test Case File

• Contains the detailed steps to be carried out for the execution of a test case

• It is also in the form of an excel sheet and contains columns for Keyword, Object Name,
Parameter

Function Libraries files

• It includes all the function defined for the keywords which is used across the application for
test case creation.

• It includes common function which is used across the application.

Object Repositories

• Its repository which holds the information of all object to be used in application.

• Each application has separate shared object repository.

Startup Script

• The Startup script is utilized for the initialization and reads the control files

• It then calls the driver script to execute all the scenarios marked for execution in the control
file

Driver Script

• It Reads the Test Case files. Checks the keywords and calls the appropriate script functions
based on specific keyword.

• Error Handling is taken care of in the driver script.

Utility Scripts
• Perform generic tasks that can be used across applications.

Key Benefits:

1. 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.
2. No need to update the scripts in case of changes to the application.

Data Driven Architecture

Test Function
Data Library

Test
Driver
Functio
Script SUT
Test
Functio
Object n2
Reposito Test
ry Functio

Data Driven is a framework where data files are used for test input and output values while Test case
logic resides in Test Scripts. Data files could be like Excel files, CSV files, ADO objects, ODBC Sources
etc.
Navigation through the program, reading of the data files and logging of the test status and information
are all coded in the test script.

This approach reduces coding effort to a great extent in case of large test cases.

Data Files

• This section is the input data repository for the scripts and this include data file which
contains the application related test data which is used while scripting.

Function Library

• This folder contains Common.vbs file which contains the reusable functions that are used
across all the modules.

Object Repository

• This section contains different repository file used in various scripts for the specific module.

Scripts

These scripts will take care of the individual test cases as per the requirements identified and
other items mentioned below:

 Launching of the application


 Associate Libraries
 Associate the Object Repository.
 Data Sheet
 Execution of the Test Cases
 Logging of the Test Results

Results

This section is the output of the test script exaction and this may include.

• Details of the Test Cases Verification Points


• Expected Output
• Actual Output
• Script Execution Status
Key Benefits:

1. Data is separated from the script so Incase the data changes no need to change the script.
2. Maintenance cost is reduced marginally

Modular Framework Architecture


Modular framework divides the functionality into functions/modules that are coded as reusable
functions/actions.

These functions/actions still make use of the data sheets for storing the input and output values.

The test scripts are written later which make use of these functions/actions.

Driver:

• This is the engine of the test automation suite.

• This script is responsible for controlling the execution flow.


• Typically this driver script internally calls one or more scripts.

• These verification scripts are the ones, which perform the application testing.

Initialization Script:

• Initialize the WR/QTP runtime environment.

• Load project related GUI Map / Object Repository.

• Load project related Library.

• Initialize the global variables.

Configuration Files:

• The config file will contain details related to how to execute the test cases i.e. module wise or all.
In addition it could contain other details used by the driver script.

Test Script:

• These scripts will be used to cover the test cases in the module. In addition it would also make
available the data file required by the script, load the module specific Object Repository and also
load the module/test specific library.

Key Benefits:

• Scripts can be developed even when the application development is in progress. If the
functionality changes, only the specific verification scripts containing the business logic need to
be updated.

• Script reusability is very high. As the scripts are written to test various business functions
independently, they can easily be combined in a controlling script in order to accommodate
complex test scenarios.

• Maintaining the expected results for such scripts is very easy.


• Error handling is much more robust in these scripts. This allows unattended execution of the test
scripts.

• Since such scripts have very little interdependency they can be used in a plug and play manner

Hybrid Framework Architecture

As the name suggests this framework is the combination of one or more frameworks pulling from their
strengths and trying to mitigate their weaknesses. This hybrid test automation framework is what most
frameworks evolve into overtime and multiple projects. Maximum industry uses Keyword Framework in
combination of Function decomposition method.

Key Benefits:
• Easier to construct and maintain than the functional decomposition scripts.

• Due to the diminished learning curve, even a non-technical resource can be much more
productive in a short period of time.

• The test automation team can reuse the existing (manual) test cases.

• Maintaining the expected results for such scripts is very easy.

Вам также может понравиться