Keyword Driven Framework is a type of Functional Automation Testing
Framework which
is also known as Table-Driven testing or Action Word based testing.
The basic idea behind the keyword-driven testing approach in
test automation is to separate the automation from the test case design. This
is usually achieved by using an additional layer of abstraction where the tests
itself are defined technology-independent and readable for non-technical
personnel as well. Thus, a keyword could be defined as a set of actions
performing a “Login” or “Save”-Operation.
What is Keyword Driven Testing?
Keyword-driven testing is a type of functional
automation testing framework which is also known as table-driven testing or
action word based testing.
In Keyword-driven testing, we use a table format,
usually a spreadsheet, to define keywords or action words for each function
that we would like to execute.
Advantages:
1) It is best suited for novice or a non-technical tester.
2) Enables writing tests in a more abstract manner using this
approach.
3) Keyword driven testing allows automation to be started
earlier in the SDLC even before a stable build is delivered for testing.
4) There is a high degree of reusability.
Disadvantages :
1) Initial investment in developing the keywords and its related
functionalities might take longer.
2) It might act as a restriction to the technically abled testers.
In Keyword driven testing, each keyword corresponds
to an individual testing action like a mouse click, selection of a menu item,
keystrokes, opening or closing a window or other actions. A keyword-driven test
is a sequence of operations, in a keyword format, that simulate user actions on
the tested application. In keyword driven automation framework we create the methods
in Java that are mapped to the functionality of the application.
The basic idea behind the Keyword
Driven approach in
automation is to separate the coding from the test case & test step. This
helps a non-technical person to understand the automation very well.
The Components of keyword driven automation framework in Selenium
webdriver.
Each keyword driven automation framework has some common components
as mentioned below:
1) Java
Class Library with functionality specific methods.)
This class will contain a list of
all generic functions, which need to be reused in the application. They can be
either Generic functions or Application specific functions.
2) Test
Data Sheet (generally in excel format)
This is an excel sheet (data
source for all the keywords)
3) Read
Keyword Excel Utility
This utility will actually read
the keywords in the excel sheet and will give a call to the Java Class library.
Keyword refers either to a base or user keyword which both can be used freely
when test cases are constructed. Keywords have variable number of arguments and
rest of the columns are reserved for them.
4) Test
Script with actual keywords
This is the Test case which you
write, wherein you will be using all the functions. The steps in this Test will
be executed according to the execution steps in the Test Keyword Sheet.
5)
Reports
The reports generated will contain
the response as per step, either pass or fail.
Flow of Execution:
1)
User will Execute the Test Script written with
Action Keywords
2)
The Action Keywords are mapped in the excel
sheet, so the Excel Reader file will read the keywords.
3)
The Excel Reader will read the excel file and
pass the control to the Library class function.
4)
The Library class function contains the reusable
functions, which will be executed.
5)
The functions will be executed with either
pass or fail status and the same will be printed in the reports.
No comments:
Post a Comment