How do I add Test Cases?

 

Overview

 

Validating the data created and managed by your web application is the key to assuring web application quality. A test case type of checkpoint provide the options to validate the data and multiple attributes of GUI objects in your web application.

 

Adding Test Case

 

In the Test Case Configuration screen,

    1. Click the Add button.

    2. Specify the appropriate values for Test Case ID, Description and Severity.

    3. Choose one of the radio button to add GUI, or Database CheckPoint.

      1. Adding HTML/GUI CheckPoints

      2. Adding Database CheckPoints

Adding HTML/GUI CheckPoints

  1. Select the radio button HTML Check. Following are the sub-options displayed:

    1. Element - To verify the attributes of HTML/GUI objects in a Web browser such as select, check-box, etc.

    2. Text - To verify whether the specified text exists in the Web browser.

    3. Table - To verify whether the specified column count, row count or cell value in the specified column or row exists in the Web browser.

Select one of the option as per specific operating needs and perform the following steps:

 

Verifying Element

  1. By default, the Element radio button is selected. If not, select the Element radio button.  

  2. In the launched browser, click on the required GUI object, such as combo-box, check-box, or list box in the Web browser to verify the attributes of the selected object. The attributes of the selected object are displayed in a table in the TestCase Configuration dialog screen. This screen includes three columns Property (name of the property), Value (value of the property) and a Browse button next to each Value field to add data-driven element checkpoint wherein the data can be fetched from test scripts using an external database, CSV file or using environmental or user-defined variable substitution option. Please refer to Creating Data-Driven Test Cases for details.

  3. By default, all the properties are selected. Deselect the properties which are not required.

  4. Choose Commit to List. This adds the Checkpoint type to the Checkpoint Configuration list.

  5. To add another Checkpoint, choose the Add button below Checkpoint Configuration list and proceed to add any Checkpoint condition of choice.

  6. If done, click OK.

Verifying Text

  1. Select the Text radio button. The launched browser is displayed.

  2. Highlight the required text to be verified in the web browser. Once the text is selected, the Text Checkpoint Configuration dialog is displayed. This dialog displays the Document Text panel which displays all the text in the web browser. You can either choose the selected text as the String To Find or any other text from the Document Text panel.

  3. Select the button Set As Prefix, Set As Suffix or String To Find to set the prefix, suffix or search string.

  4. To set the prefix and suffix text, select the prefix and suffix text and click the Set As Prefix and Set As Suffix button. To set the search string or string to find, click the button String To Find.

  5. Click OK.

  6. Choose Commit to List. This adds the Checkpoint type to the Checkpoint Configuration list.

  7. To add another Checkpoint choose the Add button below Checkpoint Configuration list and proceed to add any Checkpoint condition of choice.

  8. If done, click OK.

Verifying Table

  1. Select the Table radio button. The launched browser is displayed.

  2. Click on the required table in the web browser.

  3. The table attributes such as, Cell Value At, Column Count, and Row Count are displayed in the TestCase Configuration screen. This screen includes three columns Property (name of the property), Value (value of the property) and a Browse button next to each Value field to add data-driven table checkpoint wherein the data can be fetched from test scripts using an external database, CSV file or using environmental or user-defined variable substitution option. Please refer to Creating Data-Driven Test Cases for details.

  4. You can specify the cell value, column count or row count to be verified. You can also add multiple rows to be verified using the Add Row button or delete existing rows using the Delete Row button.

  5. Choose Commit to List. This adds the Checkpoint type to the Checkpoint Configuration list.

  6. To add another Checkpoint choose the Add button below Checkpoint Configuration list and proceed to add any Checkpoint condition of choice.

  7. If done click OK.

Adding Database CheckPoints

  1. Select the radio button DB Check.

  2. Here you may configure DATA-SEARCH or TABLE-SEARCH.

Configuring DATA-SEARCH

  1. Choose DATA-SEARCH to search for existence of entry in a database table and proceed to fill in details of screen as shown below:

Field Name Value Example

Database Name

Select the name of the database if available or configure database properties by clicking the Database Configuration button. To know the details of adding/editing database details, refer to the topic Configuring Databases in QEngine.

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 the LoginTable.

Verify

Choose one of the following to be verified.

Based on Below.

 

Table Values

 

This can be used to verify the values of a table in a database. Use Expected Table Values to configure the values to be compared against.

 

Condition

 

Select one of the conditional operator to be applied between actual and the expected result. For example to verify if rowcount is greater than one choose rowcount and select greater than conditional operator and enter the value in expected Result field.

 

Result

 

Enter the expected result for row count/column count here. To verify values of a table Click Expected Table Values.

  1. Choose Commit to List. This adds the Checkpoint type to the Checkpoint Configuration list.

  2. To add another Checkpoint choose the Add button below Checkpoint Configuration list and proceed to add any Checkpoint condition of choice.

  3. If done click OK.

Configuring TABLE-SEARCH

  1. Choose TABLE-SEARCH to search for existence of a database table and proceed to fill in details of screen as shown below:

Field Name Value Example

Database Name

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

ORACLE

URL

Select the URL.

oracle.jdbc.driver.OracleDriver

Table Name

Enter the name of the database you are searching for.

reportdata

Table should exist

Choose this option if the table mentioned above should exist in the database for the test to pass.

-

Table should not exist

Select this option if the table mentioned above should not exist in the database for the test to pass.

-

  1. Choose Commit to List. This adds the Checkpoint type to the Checkpoint Configuration list.

  2. To add another Checkpoint choose the Add button below Checkpoint Configuration list and proceed to add any Checkpoint condition of choice.

  3. If done click OK.



Copyright © 1999, AdventNet Inc. All Rights Reserved.