Verify Data (DB)

This is a pre-built Action located under the @Generic Element. The functionality of this Action in Avo Assure is to verify the data from a Database table with the Excel file provided in the input field. The result is stored in the given dynamic variable for further use during test execution.

Syntax

Input value: <DB IP/instance name/DB file path>;<DB port>;<DB username>;<DB password>;<DB name>;<Query>;<DB Number/DB Tags>;<file path to verify data>;<Sheet Name>;<querytype/ warehouse>(Optional);<schema>(Optional)

Argument
Description

<DB IP/instance name/DB file path> (Required)

Provide the Database server location, instance name, or DB file path which you want to use.

<DB port> (Required)

Provide the port number which you want to use to connect to the Database.

<DB username> (Required)

Provide the username credential which you want to use for Database access.

<DB Password> (Required)

Provide the password associated with the username.

<DB name> (Required)

Provide the Database name which you want to connect to.

<Query> (Required)

Provide the SQL or Non-SQL query which you want to execute.

<DB Number/DB Tags> (Required)

Provide the Database identifier which you want to use for the connection.

<file path to verify data> (Required)

Provide Excel file path which you want to use for the comparison. Following are the supported file formats:

  • .xls

  • .xlsx

  • .csv

<Sheet Name> (Required)

Provide Excel sheet name which you want to use for the comparison.

<querytype/warehouse> (Optional)

Provide the data container you want to target within the Database.

<schema> (Optional)

Provide the schema you want to use.

Other Related Links:

  • To learn more about supported Database and there respective Database numbers and Tags, click here.

Note:

  • Provide either the Database IP address, the instance name, or the Database file path in the input value as required.

  • Provide either the Database Number or the Database Tags in the input value as required.

  • When you are using a non-SQL query, you must provide either the querytype or the warehouse name in the input value.

Output Value: <Dynamic Variable>(Optional);<Dynamic Variable>(Optional)

Argument
Description

<Dynamic Variable>(Optional);<Dynamic Variable>(Optional)

Both dynamic variable stores the status as True or False.

Example: Verifying Database Data Against an Excel Sheet

In this example, we explain how to verify data from a Database by comparing it with the records available in an Excel sheet.

  • Action: Verify Data(DB)

  • Input Value: 10.13.0.57;1033;John;John$QA@1802;Student;SELECT * from PQRS;MSSQL;C:\Users\Jhon.Doe\Desktop\QA list.xlsx;Sheet3

    • The first argument (10.13.0.57) specifies the Database server IP address.

    • The second argument (1033) specifies the port number used to establish the Database connection.

    • The third argument (John) specifies the Database username.

    • The fourth argument (John$QA@1802) specifies the Database password.

    • The fifth argument (Student) specifies the Database name.

    • The sixth argument (SELECT * from PQRS) contains the SQL query to be executed.

    • The seventh argument (MSSQL) specifies the Database tag used for execution.

    • The eighth argument (C:\Users\Jhon.Doe\Desktop\QA list.xlsx) provides the Excel file path.

    • The ninth argument (Sheet3) specifies the sheet name containing the data for comparison.

  • Output Value: {Status}

    • The comparison result is stored in the {Status} dynamic variable with the following possible values:

      • True: If the data from the Database matches the records in the Excel sheet.

      • False: If the Database data does not match with the Excel sheet data.

  • Logical Explanation: The Verify Data(DB) action reads the connection details and SQL query from the Input Value column (10.13.0.57;1033;John;John$QA@1802;Student;SELECT * from PQRS;MSSQL;C:\Users\Jhon.Doe\Desktop\QA list.xlsx;Sheet3). The action connects to the specified Database and executes the query. It retrieves the data and compares the resulting records against the data in the provided Excel sheet. The final verification result (True) is stored in the {Status} variable.

Last updated

Was this helpful?