8.2 Working with Local Data Repository
Overview:
Local Data Repository is a type of spreadsheet which contains data that can be used for test iterations in OpKey Web. While working with Test Case(s) in OpKey Web, now you can use your data from the Local data Repository for iterating the Test Case. You can either create Local Data Repository file or import data from an Excel sheet (.xlsx files only) as per your convenience. You can switch to the Local Data Repository mode to provide data driving values from your Local Data Repository.
Local Data Repository provides you the flexibility to add and manage data by providing features to add Datasets, rows/columns, move rows or cells, Import/Export data from Excel, copy/paste the data and save it as well. The Data Repository consists of a spreadsheet which is divided into number of Datasets and Datasets into rows and columns. While working with Test Case in OpKey Web, you can provide data driving value either from Global Data Repository or from Local Data Repository. By default, Global Data Repository mode is selected which allows you to provide data from your Global Data Repository file. You can switch to the Local Data Repository mode to provide test iteration values from your Local Data Repository.
Need of Local Data Repository:
Test data plays a significant role in Test Automation. You may come across many Test scenarios that need to be parameterized. Parameterizing the Test case allows you to run the same Test Case with variable inputs , therefore increasing the coverage from a single Test value to multiple Test values. Data in the Local Data Repository is used during subsequent run-sessions thus, you need to be careful while entering Data in the Data Repository. The iteration of the selected test step(s) will be perfomed only during it finds data from the respective DataRow of the DataSet.
Using Data from Local Data Repository:
At a time, you can use either Local Data Repository or Global Data Repository for the Test iteration. The Local Data Repository stores all the Static value(s) and Global variable value(s) provided initially in the Test Step(s). A dataset in the Local Data Repository defines the number of iterations a step requires to go through. Number columns in the Local Data Repository are equal to the number of test steps in the Test Case. Rows & columns contain data values which are used for test iterations. Unlike Global Data Repository, Local Data Repository allows you to iterate desired test steps only, by using the data from the Local Data Repository.
Local Data Repository may contain either a single or multiple Local Data Repository files. A Local Data Repository file may contain either a single or multiple Datasets which are divided into rows and columns. There may be either single or multiple rows within a Dataset. A dataset in Local Data Repository defines the number of iterations a step requires to go through. Unlike Global Data Repository, Local Data Repository allows you to iterate desired test steps only, by using the data from the Local Data Repository.
Data driving the Test Case through Local Data Repository
- When you work with the Test Case, by default Global Data Repository mode is selected which allows you to provide data to iterate the Test Case.
- If you want to provide Data from Local Data Repository, switch the toggle button to the Local Data Repository. A pop-up message will be displayed as follow:
- Click Yes to proceed with Local Data Repository.
- Click on Local Data Repository tab. The Local Data Repository window will open as follows:
- Click on Add to add a new Local Data Repository file.
- Click on Local Data Repository icon to view the Local Data Repository file.
- Local Data Repository file opens as follows:
- By default, the Local Data Repository remains in read-only mode. Click on Enable Editing to enable LDR editing.
- You can view the Local Data repository as follows:
- The number of columns in the Local Data Repository is equal to the number of Test Steps in the Test Case.
- The Local Data Repository stores all the Static value(s) and Global variable value(s) provided initially in the Test Step(s). You can edit the Static value(s) in the Local Data Repository by clicking on the desired cell. However, the data value(s) provided with the Global variables cannot be edited.
Getting Familiar with Local Data Repository Buttons:
Show/Hide Optional Arguments in LDR:
While working with Local data repository, now you can show or hide the optional data Input Arguments showing with the mapped Test Steps. Make sure that Local Data Repository is not in protected view. Editing of the Local Data Repository should be enabled.
If there are few input parameters (Optional & Mandatory) added to FL, you marked few of them optional by checking corresponding Optional checkbox, provided value and mapped the FL with TC then you can show/hide optional Input Arguments values showing in the LDR. While mandatory input arguments values are always visible in LDR of the Test Case.
Here, you can view all optional/mandatory data input arguments, by default.
If you want to hide optional data input arguments then click on Show Optional toggle button. This button will get switched to Hide optional mode and your previously appearing optional data input arguments will get disappeared.
LDR Expand/Collapse:
Now you can expand and collapse the LDR based on Steps. By default, argument values are shown in the expanded view. When you click on the Expand/Collapse icon, it get collapsed and your argument values get disappeared. If you have created groups by adding test steps then you can expand and collapse arguments based on the Group. This feature is very useful in case you want to hide few argument values.
 :
OpKey users can now skip execution of a full Function library file during test case execution if they wish to do so. In order to skip execution of a Function Library during test case execution, add input parameter(s) in Function Library and left them blank. Make sure that all the added input parameters have blank values.