Configuring Databases in QEngine

Overview

 

This topic explains the steps to add a new database in QEngine, edit the existing database details and how to add the database details for some of the popular databases such as MS SQL Server and Oracle. QEngine supports any JDBC compliant database. But, you need to set the appropriate classpath for the database driver by clicking the Set DB Classpath button in the Database Configuration screen as given below.

 

You can configure any JDBC compliant database to add database checkpoints or fetch values from database for data-driven testing wherein you can run the same script with multiple set of data.

 

Invoking Database Configuration Screen

 

Invoke the Database Configuration screen by clicking the Configure Database button in the Data Configuration screen or by clicking the Database Configuration button in the Test Case Configurator screen.
 

Adding/Editing Database Details

 

Adding Database Details

 

To add a new database,

  1. Click the New Database button below the Database List.

  2. Enter the name of the database you are configuring in the DB Name field.

  3. Enter the appropriate database driver name in the Driver Name field. To set the classpath for the new database, you can click on the Set DB Classpath button.

Note: Choose the check box option Use for all test cases if you want to use this database configuration for all the testcases.

  1. Click on the "+" sign next to the URL field. A new row will be added.

  2. In the URL field, enter the database's connection URL.

  3. In the User Name and Password fields, enter the appropriate username and password values to login into the configured database.

  4. Click Commit To List button.

  5. Choose Apply button. This will add the new database to the Database List.

  6. If you want to add more database connection details repeat 1-8.

Editing Database Details


To edit the existing database details,

  1. Click on the required database to be edited from the Database List in the left pane. The configured details are displayed in the right pane.

  2. Edit the required details such as Connection URL, User Name, Password, etc in the appropriate row and click the Commit To List button and then click the Apply button.

Configuring Some Popular Databases

 

MS SQL Server

  1. Invoke the Database Configuration screen from the Insert Testcase screen or from the Data Configuration screen based on whether you are inserting a test case or fetching values from a database for data-driven testing. To know the steps of how to add a test case or data configuration, refer to the topics Adding Testcase or Creating Data-driven test scripts.

  2. In the Database Configuration screen, click the "New Database" button placed below the Database List in the left pane to add the new database SQL Server.

  3. Enter the "DB Name" as SQLServer, "Driver Name" as com.microsoft.jdbc.sqlserver.SQLServerDriver.

  4. Enter the "Connection URL" as jdbc:microsoft:sqlserver://"<host_name>":"<port_name>";DatabaseName="<database_name>", username and password. In this URL, host name is the machine where you installed MS SQL Server.

  5. Click  the "Commit To List" and "Apply" button to add the new database.

  6. Now, execute the script to test with the new database.

Oracle

  1. Invoke the Database Configuration screen from the Insert Testcase screen or from the Data Configuration screen based on whether you are inserting a test case or fetching values from a database for data-driven testing. To know the steps of how to add a test case or data configuration, refer to the topics Adding Testcase or Creating Data-driven test scripts.

  2. In the Database Configuration screen, click the "New Database" button placed below the Database List in the left pane to add the new database Oracle.

  3. Enter the "DB Name" as Oracle, "Driver Name" as oracle.jdbc.driver.OracleDriver.

  4. Enter the "Connection URL" as jdbc:oracle:thin:@<host_name>:<port_number>:<SID>, username and password. In this URL, host name is the machine where you installed Oracle.

  5. Click  the "Commit To List" and "Apply" button to add the new database.

  6. Now, execute the script to test with the new database.



Copyright © 1999, AdventNet Inc. All Rights Reserved.