Test Data Finder and Classification Terms

Classification terms are terms used by testers to identify entities in the application. They are stored on the application model and consist of one or more columns of a database table. Concrete values in a database table on which a classification term has been stored are called classification term values.

Classification term usages define where the values of a classification term are stored in the columns of a database table. They specify the relationship between the classification term and the database table and indicate where the values for the classification term are stored. They allow testers to identify entities within the application and provide a way to categorize and organize the data in a database. By using classification term usages, testers can easier manipulate test data for their testing scenarios.

In contrast to classification terms, attributes are characteristics that an entity may have and are of particular interest to the user. For example, a contract is an entity. A classification term could be the contract number, and an attribute could be the term, the insurance sum, or other relevant details. Attributes are stored in the application model version, where the database table columns, in which an attribute is stored.

Procedure description

For example, if we have a database that has employees, departments and titles as tables, a classification term could represent the employee. To identify the employee, we need the employee number and the last name. Optionally, the first name can also be included. These columns of the table would define our classification term in this case.

To model this in XDM we must first create a classification term. The classification term has 2 properties. The display name and the columns. In this example, the display name would be "Employee", as we want to model an employee. The field columns should contain all columns of the table that are essential for the definition. In our example, these columns would be the employee number, first name and last name. The classification term is now created and can be used in the version of an application model.

To use the classification term in a version, we must create a classification term usage there. In this usage we now select the created classification term Employee. We can also control whether the classification term usage is active. We enter "employees" as the name pattern. This is the table with the employee data. As columns, we again enter the essential columns of the table that define the classification term.

This completes the setup of the classification term usage. Now a task can be executed that uses this application model. To display the data that the classification term selects during the execution, the task can be executed with the classification term report. This can be found in the useful examples.

Test Data Finder

The test data indexer task also uses classification terms to identify interesting data and make it available in the test data finder. However, it also uses attributes. In our employees example, one attribute could be the salary. To create this, we need to create a new attribute in the attribute list in the version. This object needs a name, a schema pattern and a name pattern. In addition, there is an active flag. The name is used for the assignment in a workflow or data shop and should be meaningful. The schema pattern indicates in which schema of the database the attribute is located. The name pattern is used to select the table. In our example the schema pattern would be "production" and the name pattern "salaries". The column is defined in the field Column Expression. In this example "salary".

Once we have made these settings it is time to run the test data indexer task. This requires the environment that our application model with its classification term and attributes uses.

Afterward the index can be used either in the data shop or workflow. To use the index in a data shop, the corresponding environment and the classification term must be entered in the test data finder tab on the data shop. Afterward you can use the test data finder in the order view of the data shop.

To filter by salary, first select the attribute Salary in the test data finder area in the drop-down menu Searchable Attribute. We can then enter a value and an operator for this attribute. For example, if we enter "120000" as the value and "GREATER" as the operator, we will get employee numbers that meet this condition.

To keep business secrets or protect the personalized data of the customers or employees, the test data finder can use modification. More about the usage under Data Modification or in the tutorial.

For more details on using the Test Data Finder, see: Test Data Finder.

Classification term relations

To make this example as detailed as possible, this part needs a second application model for the table department and a corresponding classification term on this application model. Additionally, it needs an attribute on the column "dept_name".

In order to establish the connection from an employee to a department in our example, we need a classification term relations. The table departments from the sample environment must be resolved via the connection table "dept_emp". Classification term relations are used to represent this in the test data index.

The classification term relation can be found as a separate list on the version. We now create a relation in this list on the version of our application model Employee. This has a name as an attribute, which should be meaningful in order to simplify later use. For example, "Employee to Department". The field Table serves as the starting point in this relation, in our case the table "employees". As Columns From we now enter "emp_no". We also enter this in the field Columns To. Application Model From is the current application model. In this case, the Application Model To is another application model. Here we enter the application model Department.

This classification term relation now creates the connection between employee and department via the table "dept_emp", or more precisely, the connection from employee to the connection table "emp_dept" is realized with it.

In order to use the new information provided by the added objects, the test data indexer task must be executed again. This collects all the data and adds to the existing index if necessary. Afterward, the test data finder can also be used to search for departments.

To offer the user a drop-down list with predefined values, the flag Enumerate values must be activated in the attributes. In our example, it makes sense to activate this field for the Department attribute in order to display all available departments to the user.

Once a data shop has been set up, the purchaser can save the configuration of the test data finder as an attribute comparison filter. This allows him to reuse all the values set in the saved object in a new order with a click of the mouse.