Configuration of a Complex Data Shop

In this advanced tutorial we configure a Data Shop that does more than just start a single task with a few simple parameters. Instead, it combines a workflow, the Test Data Finder and a customized Data Shop layout to support more complex test data orders.

In many projects, testers do not only want to request some contracts or one customer. They need very specific test cases that match a set of business criteria, for example:

  • all contracts of customers in a certain risk class,

  • only policies with open claims in a specific product line, or

  • customers who match a given age range, region and product combination.

Finding such cases directly in the database is difficult for non‑technical users.

In this tutorial, we build a complex Data Shop configuration that:

  • uses the Test Data Finder to pre‑select suitable business objects for a test case,

  • passes the selected identifiers to a workflow via custom parameters,

  • and uses that workflow to orchestrate the necessary tasks to provide the requested test data in the target environment.

The result is a Data Shop order page where testers can:

  • search for and choose suitable test case candidates using business terms, and

  • submit a single order that automatically transfers all required data according to the defined process.

For more information, visit: Data Shop.

The following object references are used within the Complex Data Shop configuration:

These references provide additional information on the components and configurations relevant to the Complex Data Shop setup.

Creating a Custom Parameter

To define a new parameter, follow these steps:

  1. Navigate to XDM Configuration in the menu and select Custom Parameters. Click + Create to add a new parameter.

  2. In the New Custom Parameter panel, fill in the required details:

    Field

    Value

    Name

    Employee ID

    Description

    Please enter a valid Employee ID

    Variable

    employee [1]


    1. This is the internal name of the parameter. When referencing this parameter in code (e.g., within an SQL query), use this exact name. Note that it is case-sensitive.

    Parameter Type

    Select String from the drop-down list.

    Default Value

    (leave empty)

    Requirement Level

    Select RUNTIME from the drop-down list.

    Validation Type

    Select None from the drop-down list.

    Validation Expression

    (leave empty)

  3. Click Save Changes to confirm and apply your settings.

Creating Application Models and Versions

Application Models define the data relationships and structures required for test data retrieval. Follow these steps to create one:

  1. Open the Data Subsets menu and select Application Models. Click + Create and enter the following details:

Field

Value

Name

HR Employee

  1. Click Create.

  2. Open the Application Model by clicking the button Button with an arrow pointing to the right-hand direction on the left side of the HR Employee.

  3. In the bottom panel, switch to the Versions tab and click + Create. Enter the following details:

Field

Value

Name

V1

Modelling Connection

Select Sample production database from the drop-down list.

Modelling Schema

production

  1. Click Create and edit.

  2. Next, assign a start table for this model:

    • Click Pick next to Start table name. This will open a list of existing tables in the selected schema.

    • In the Tables list, select employees and click Choose.

    • The schema browser will close, and the field Start table name will be updated accordingly.

  3. Click Save Changes to confirm.

Adding Data Relation Rules

Now that the Application Model Version is set up, we need to define relationships between data tables:

  1. Open the Table Relation Modelling panel at the bottom of the page.

  2. Navigate to the Data Relation Rules tab and click Import from Database (Import From Database button).

  3. Click Pick to view available schemas and tables.

  4. In the Schemas list, select production, then choose employees from the Tables list and click Choose.

  5. A list of foreign keys will appear. Select each checkbox and click the import button (Button with an arrow pointing to the bottom).

  6. In the Data Relation Rule Import dialog, click Import to finalize the process.

Creating Another Application Model

To create a second Application Model, repeat the previous steps with the following details:

  1. In the Data Subsets menu, select Application Models and click + Create. Enter:

Field

Value

Name

HR Department

  1. Click Create.

  2. Open the Application Model by clicking the button Button with an arrow pointing to the right-hand direction on the left side of the HR Department.

  3. In the bottom panel, go to the Versions tab and click + Create. Enter:

Field

Value

Name

V1

Modelling Connection

Select Sample production database from the drop-down list.

Modelling Schema

production

  1. Click Create and edit.

  2. Assign the start table:

    • Click Pick next to Start table name to open the schema browser.

    • Select departments from the Tables list and click Choose.

    • The selected table name will now appear in the field.

  3. Click Save Changes to finalize.

Your Application Models and Classification Terms are now fully set up, enabling you to find relevant test data efficiently.

Adding Data Relation Rules

Now we add Data Relation Rules to the Version of this Application Model.

  1. Open the panel Table Relation Modelling at the bottom of the page.

  2. Then select the tab Data Relation Rules and click Import from Database (Import From Database button).

  3. Click the button Pick to open the list of available schemas and tables.

  4. In the list Schemas, select production. In the list Tables, select departments. Click the button Choose. The schema browser will disappear and you will see a list of foreign keys.

  5. Select the check box in front of the foreign key with the name p.production.dept_manager.dept_manager_dept_no_fkey and click the import button (Button with an arrow pointing to the bottom). In the dialog window Data Relation Rule Import, click the button Import to confirm.

  6. Click the Import from Database (Import From Database button) Button again.

  7. Click the button Pick to open the list of available schemas and tables.

  8. In the list Schemas, select production. In the list Tables, select dept_manager. Click the button Choose. The schema browser will disappear and you will see a list of foreign keys.

  9. Select the check box in front of the foreign key with the name c.production.dept_manager.dept_manager_emp_no_fkey and click the import button (Button with an arrow pointing to the bottom). In the dialog window Data Relation Rule Import, click the button Import to confirm.

  10. Click the Import from Database (Import From Database button) Button again.

  11. Click the button Pick to open the list of available schemas and tables.

  12. In the list Schemas, select production. In the list Tables, select dept_emp. Click the button Choose. The schema browser will disappear and you will see a list of foreign keys.

  13. Select the check box in front of the foreign key with the name c.production.dept_emp.dept_emp_dept_no_fkey and click the import button (Button with an arrow pointing to the bottom). In the dialog window Data Relation Rule Import, click the button Import to confirm.

Editing Data Relation Rules

Now we need to edit one of the Data Relation Rules so it uses the Referenced Application Model.

  1. Locate the c.production.dept_manager.dept_manager_emp_no_fkey Data Relation Rule and click the edit button (Pen button to edit the object) that is located next to it.

  2. In the top panel, select the tab Referenced table and activate the slide toggle next to the Referenced Application Model field.

  3. In the Referenced Application Model field select the HR Employee Application Model.

  4. Click the button Save Changes.

Table Relation Rules list

Updating Data Relation Rules

We need to change two Data Relation Rules in the other Application Model too.

  1. In the left sidebar, click the menu category Data Subsets to expand the data subsets menu and select the menu item Application Models.

  2. Open the Application Model by clicking the button Button with an arrow pointing to the right-hand direction on the left side of the HR Employee

  3. Open the V1 Version by clicking the button Button with an arrow pointing to the right-hand direction on the left side and locate the p.production.dept_emp.dept_emp_emp_no_fkey Data Relation Rule and click the edit button (Pen button to edit the object) that is located next to it.

  4. In the top panel, select the tab Referenced table and activate the slide toggle next to the Referenced Application Model field.

  5. In the Referenced Application Model field select the HR Department Application Model.

  6. Click the button Save Changes.

  7. Navigate through the breadcrumbs back to the Data Relation Rules from the V1 Version.

  8. Locate the p.production.dept_manager.dept_manager_emp_no_fkey Data Relation Rule and click the edit button (Pen button to edit the object) that is located next to it.

  9. In the top panel, select the tab Referenced table and activate the slide toggle next to the Referenced Application Model field.

  10. In the Referenced Application Model field select the HR Department Application Model.

  11. Click the button Save Changes.

Table Relation Rules list

Creating Environments

Setting up the HR Production Environment

  1. In the left sidebar, click the menu category Data Subsets to expand the data subsets menu and select Environments. Then click + Create. Enter the following information:

    Field

    Value

    Name

    HR Production

  2. Click the button Create.

  3. Open the Environment by clicking the button Button with an arrow pointing to the right-hand direction on the left side of the HR Production.

  4. Then select the tab Installed Applications and click the button + Create. Enter the following information:

    Field

    Value

    Application Model

    HR Employee

    Version

    V1

    Connection

    Sample production database

    Table schema

    production

  5. Click the button Save Changes.

  6. Click the button + Create again and enter the following information:

    Field

    Value

    Application Model

    HR Department

    Version

    V1

    Connection

    Sample production database

    Table schema

    production

  7. Click the button Save Changes.

  8. Click the button Edit for the current Environment.

  9. In the panel Start Model, check if HR Employee ( V1 ) on Sample production database is selected as the Start Model. If not, select it.

  10. Click the button Save Changes.

Setting up the HR Testing Environment

  1. In the left sidebar, click the menu category Data Subsets to expand the data subsets menu and select Environments. Then click + Create. Enter the following information:

    Field

    Value

    Name

    HR Testing

  2. Click the button Create.

  3. Open the Environment by clicking the button Button with an arrow pointing to the right-hand direction on the left side of the HR Testing.

  4. Then select the tab Installed Applications and click the button + Create. Enter the following information:

    Field

    Value

    Application Model

    HR Employee

    Version

    V1

    Connection

    Sample testing database as super user

    Table schema

    qa3

  5. Click the button Save Changes.

  6. Click the button + Create again and enter the following information:

    Field

    Value

    Application Model

    HR Department

    Version

    V1

    Connection

    Sample testing database as super user

    Table schema

    qa3

  7. Click the button Save Changes.

  8. Click the button Edit for the current Environment.

  9. In the panel Start Model, check if HR Employee ( V1 ) on Sample testing database as super user is selected as the Start Model. If not, select it.

  10. Click the button Save Changes.

Creating the Row Level Processor Task Template

  1. In the left sidebar, click the menu category Tasks to expand the tasks menu. Then click the menu item Task Templates.

  2. In the tab Row Level Processing, click the button Button with an arrow pointing to the right-hand direction on the left side of Row Level Processor Task Templates to expand the list. Initially, the list may be empty.

  3. Click the button + Create. A panel titled Create Row Level Processor Task Template opens. Enter the following information:

    Field

    Value

    Name

    Copy employee by id

  4. Click the button Create and edit.

  5. Under the panel Source/Target Environments, click Source environment and select HR Production and for Target environment select HR Testing from the drop-down box.

  6. In the top panel, select the tab Custom Parameter, click the button Configure Custom Parameters and then select the Custom Parameter Employee ID.

  7. Click the button Apply.

  8. In the top panel, select the tab Start Conditions and enter the following Start Condition Script:

    SELECT ${uniqueRowIdentifier}
    FROM "${startTableSchema}"."${startTableName}" "T"
    WHERE "emp_no" in (${employee})
  9. Click the button Save Changes.

Creating a Data Shop

  1. In the left sidebar, click the menu category Tasks to expand the tasks menu and select the menu item Data Shops.

  2. Click the button + Create. You will see a panel titled Create Data Shop. Enter the following information:

    Field

    Value

    Name

    Copy employee by id

  3. Click the button Create and edit.

  4. In the top panel, select the tab Template Settings and enter the following information:

    Field

    Value

    Executable type

    Select Task Template from the drop-down list

    Task Template

    Select Copy employee by id from the drop-down list

    In the subsection Parameters, click the button + to add a parameter. You can create a list of parameters by adding more.

  5. Enter the following information:

    Field

    Value

    Display Name

    Employee ID

    Description

    (Optional, may be left empty)

    Mapped Property

    Select Employee ID from the drop-down list

  6. Click the button Save Changes.


Previous section: Task Stage Hooks | Next section: Configuration of a Test Data Finder