17.10.23 - Agenda - Hooks
17.10.23 - Agenda - Hooks
Hooks
Apache POI (Poor Obfuscation Implementation)
The test data plays an important role. The test automation framework developers maintain the test data in various
formats and Microsoft Excel is one of the easiest and most used ways of storing and maintaining test data. Even the
manual QAs keep their test data in Excel files. Now to access this test data in the automation frameworks, Java
provides various libraries and Apache POI is one of the most used among them.
pache POI uses certain terms to work with Microsoft
Excel. Let's get familiar with these before we go into the
details of the code.
Term Details
A workbook represents a
Microsoft Excel file. It can be
used for creating and
Workbook
maintaining the spreadsheet. A
workbook may contain
many sheets.
A sheet refers to a page in a
Microsoft Excel file that
Sheet
contains the number
of rows and columns.
A row represents a collection
of cells, which is used to
Row
represent a row in the
spreadsheet.
A cell is indicated by a row and
column combination. Data
entered by a user is stored in a
Cell
cell. Data can be of the type
such as string, numeric value, or
formula.
Hooks
Cucumber hooks are blocks of code that run before or after each scenario. You can define them
anywhere in your project or step definition layers, using the methods @Before and @After. Cucumber
Hooks allows us to better manage the code workflow and helps us to reduce the code redundancy.
We can say that it is an unseen step, which allows us to perform our scenarios or tests.