Skip to main content

Excel File Adaptor Example

Introduction

Through the Excel Adaptor, H-TEST can manage Excel files (of .xls and .xlsx types) and test them. It’s possible to perform single tests with this adaptor or end to end tests connecting with other adaptors either.

Initialization parameters

The Excel AdapterAdaptor will attempt to read and parse the Excel sheet. The necessary initialisation parameters for this example are the following:

  • FilePath: Represents the full path and file name of the Excel file being handled by this instance of the Excel Adapter:Adaptor: C:\testURLsPERIODICOS.xlsx

  • Sheet: Indicates the sheet number of the Excel file we are going to work with: 1

Predefined functions (PF)

This is an exampleExample of a UML Diagram which uses the GUI HTML Adaptor and Excel Adaptor Exercise

 

Statement of the exercise

With an Excel and a loop, open 6 web pages: Createcreate an Excel with different URL's and collect them with TASTH-TEST to open them in the GUI adapter.Adaptor.

Tip:Tip: use the function getNumColumns or getNumRows and use it as the end value of the loop. Use while or for loop of TASTH-TEST.

Solving the test casecase:

In this first resolution, we have designed this test case using three Adapters:Adaptors: the User Object Adapter,Adaptor, the Excel Adapter,Adaptor, and the HTML GUI Adapter.Adaptor. We have also created the WHILE loop, with which we will execute the same steps, as long as the condition we indicate in the properties of the Fragment is fulfilled.