Data Configuration

Tags:  

Overview

Data Configuration enables you to configure variable name in your test scripts. The variable values are substituted at runtime from an external database, CSV file or using variable substitution option. You can select specific text such as "Servers" in clickLink("Servers",11), "Home" in clickLink("Home",1) from your recorded test script and replace it with a variable name using the Data Configuration screen.

 

Note: While selecting the text for parameterization from the script editor, select the entire string including the quotes to enable parameterization from database or CSV file. If you are selecting the string without the quotes, then, only the variable substitution option will be enabled for parameterization.

Types of Data Configuration

You can substitute variable values from

  • Database, such as Oracle or Mysql

  • CSV file or

  • Using Variable Substitution

Configuring Variable Values

  • Invoke the Data Configuration screen from Tools menu.

  • Enter the variable name in the Variable Name field.

  • Select the Import Data combo-box to import data from Database, CSV file or using Variable Substitution option.

Importing Data from Database

To import data from database:

    • Select the Database option from Import Data combo-box.

    • Enter the appropriate values for the following field:

 

Field Name Value

Example

Database Name

Select the name of the database if available or configure database properties by clicking the Configure button

ORACLE

URL

Select the URL.

oracle.jdbc.driver.OracleDriver

Query

Enter the SQL query to fetch the data from the database.

Select name, password from  LoginTable.

Row Index and

Enter the row index from where the value has to be fetched.

2

Column Index (Or) Column Name

Enter the column index value or  column name from where the value has to be fetched.

-

Importing Data from CSV File 

To import data from CSV file:

    • Select the CSV file option from Import Data combo-box.

    • Enter the appropriate values for the following field:

      • Enter or browse the file name.

      • Enter the row index and column index value from where the value has to be fetched.

Importing Data Using Variable Substitution 

This option is used to select the reserved variables or user-defined variables. The values for the user-defined variables are configured using the Settings->Environment Settings menu item which are substituted at run time. For details, please refer to the context-sensitive help topic Configuring Environment Settings. The values for the reserved variables are automatically substituted by QEngine as shown in the table below. You can make use of these reserved variables as per specific operating needs.

QEngine Reserved Variable

Value

$localhost

Substitutes the name of the host machine in which test is being executed.

$localip

Substitutes the IP Address of the host machine in which test is being executed.

$localnet

Substitutes the network address of the host machine in which test is being executed.

$date(dd_mm_yyyy)

Substitutes the system date, in the format specified, of the machine in which test is being executed.

$APPHOME

Substitutes the location of the Application Home directory.

$nexthour

Substitutes the system time of the machine +1 in which test is being executed.

$nextday

Substitutes the system date of the machine +1 in which test is being executed.


0 Comments  Show recent to old
Post a comment



 RSS of this page

Copyright © 2009, Zoho Corporation. All Rights Reserved.