Test Database Management

Test data mapping is very well taken care in NetTest. A user can upload data set in known formats like csv, xls, and others. A data set contains key and value. Key points to a form field and value is its content which is used while test case execution. NetTest provides interface to map entries in a date set to form fields.

A user can upload multiple data sets and can provide criteria to use that. Criteria can be test case category, template, page state, or others. During test case execution, NetTest parameterizes all user inputs with the help of available data set.

Note: If a test data set is not available, NetTest uses recorded data set.

Click the Test Database Management menu on the left panel. The following window is displayed.

Each section is described in detail further.

Script Object

In the ‘Test Database Management’ window, click the Script Object button.

To create a new script object, provide the name and description, and then click Create. This script object is added in the ‘Script Object Detail’ table. Click the corresponding  icon to delete a script object.

A user can add a property to the script object by clicking  icon. The Add New Property dialog box is displayed.

Provide the following details, and then click Add.

  • Name: Name of the property.
  • Type: Select the type as Boolean, Number, String or Object from the drop-down list.
  • Scope: Select the scope as User, Page or Session from the drop-down list.

In the ‘Properties’ column, click the number to view the Properties table. In this table, the user can view the details of the property along with extraction rule. Each property should map with extraction rule.

  • A script object should have a name and a set of properties to be captured.
  • The properties of an object can be captured from any selector.

A user can edit or delete a property that is added. To add an extraction rule, click (+) icon in the ‘Extraction Rule’ column. The Add New Extraction Rule dialog box is displayed.

Provide the following details, and then click Add Rule.

  • Page: Select one or more pages from the drop-down list.
  • Source Type: Select a source type from the drop-down list.
  • Selector: Provide the selector name in the text box.
  • Pattern: Provide a pattern.
  • Value Index: Provide a value index, such as a Regex or the value to be extracted.

In the ‘Extraction Rule’ column, click the number to view the Extraction Rule table.

A user can edit or delete an extraction rule that is added.

Test DataSet

In the ‘Test Database Management’ window, click the Test DataSet button. Test Data Set is a json object. It is a set of data object.

To create a new test data set, click Create. The following window is displayed.

Provide the following details, and then click Submit.

  • Name: The name of DataObject should be same as script object. A user can define multiple DataObjects of similar type in data set.
  • Description: Provide a description for better understanding.
  • File: The user can either upload a json file by clicking File Upload or call a Rest URL by clicking RestCall.
  • File Upload: In the ‘File’ field above, if the user selects File Upload, choose a file stored locally. The file uploaded should be in a format in which script object is specified. In the ‘File’ field above, if the user selects RestCall, provide a Rest URL.

Form Mapping

In the ‘Test Database Management’ window, click the Form Mapping button. The following window is displayed.

Select the profile, release, and page from the drop-down lists. After selecting page, the user needs to select form. The ‘Form Field’ is displayed in which the user needs to map all fields of DataObject with its properties.