TestData - Find & provide item

Tricentis Test Automation for SAP Test Data Service enables you to identify and retrieve the right test data.

To do so, use the Module TestData - Find & provide item to find a specific item in your database.

In case security is enabled, the functionality described on this page may be restricted depending on the user groups you belong to. To set your access rights, contact your Administrator.

This Module is part of the Standard subset. You can find it under Standard modules->Test Data Management->Test Data Service.

Example

The following example shows how to find an item in your database and how to insert the data into your application. To do so, follow the steps below: 

  1. Complete the steps as described in see chapter "The prerequisite steps for TestData Modules".

  1. Create a TestStep which selects the control Automobile in the menu of the sample application (see chapter "Navigate the Test Automation for SAP XScan UI").

  2. Create a new TestCase and drag and drop the Module TestData - Find & provide item onto this TestCase (see chapter "Create TestSteps from Modules"). Tricentis Test Automation for SAP automatically creates a new TestStep with the with the XTestStepValues Existing TDS type, Alias name (item), Position, and Data search filter.

  3. To find a specific object, you can search within a specific range of objects. Enter the following values into your XTestStepValues:

    • Enter car for Existing or new TDS type.

    • Leave Alias name (item) blank. In this case, Tricentis Test Automation for SAP automatically uses the Value of Existing TDS type.

    • Optionally, enter the Position value of your choice. The default is First.

    • Optionally, enter a query expression to find an item in Query.

    • Populate the values of Data search filter as shown in the screenshot below. In this example, Tricentis Test Automation for SAP searches for the item of a car with the dateofmanufacture between the years of 2010 and 2015 and with the make defined as VW.

      If you enter numeric values in the Value column, you have to set the DataType to Numeric.

      It is possible to use wildcards and regular expressions.

    • Select Sorting as ascending.

Find an item of the type car.

For date comparisons, you must provide the Value according to the ISO 8601 date format (yyyy-MM-dd). Test Data Service uses string comparison.

Once execution is finished, the following results appear:

Successful result in ScratchBook

Unsuccessful result in ScratchBook

  1. Create a new TestStep named Vehicle Data to use the data from the item that was retrieved from the Test Data Service repository. Since you left Alias name (item) blank, Tricentis Test Automation for SAP automatically uses the Value of Existing TDS type.

Use values from the Test Data Service database

You have exclusive access to the item and after you retrieved it, it is locked. No other TestStep will get the same item if you need it.

This ensures that the test runs in a distributed environment. The item is automatically unlocked once you have executed your tests or as soon as you start a new iteration in your loop. If the TestCase fails, the item is also unlocked.