TestData - Find & provide record (2024)

Tricentis Tosca Test Data Service enables you to identify and retrieve the right test data.

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

TestData - Find & provide record (1)

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 a record in your database and how to insert the data into your application. To do so, follow the steps below:

  1. Import the Standard.tsu subset to your workspace (see chapter "Import and export subsets").

  2. Navigate to the TestData - Find & provide record (2)Configurations folder and expand the imported Configurations folder therein.

  3. Select the TestData - Find & provide record (3)TestDataService configuration and define the following test configuration parameters:

    • TestData - Find & provide record (4) TestDataEndpoint to specify the location from which you want to retrieve your records

TestData - Find & provide record (7)

Define test configuration parameters for TestDataEndpoint and TestDataRepository.

TestData - Find & provide record (8)

Optionally, you can omit the test configuration parameter (TCP) called TestDataEndpoint. In this case, Tosca Commander automatically retrieves a TDS endpoint from the Service Discovery.

To configure it, go to the Tosca Commander settings and navigate to Tricentis Services->ServerEndpointAddress.

  1. Create a TestCase with the name Sample TestCase. Assign the TestData - Find & provide record (9)TestDataService configuration to the TestCase by using drag and drop (see chapter "Assign configurations").

  1. To create a TestStep for opening your test application, drag and drop the Module OpenUrl onto the Sample TestCase. This Module is part of the Standard.tsusubset and located at Standard modules->TBox Engines->Html.

  2. Tricentis Tosca automatically creates a new TestStep with the XTestStepValue Url. Enter the URL of the Tricentis Tosca Sample Application into the Value column and set the ActionMode to Input.

    With this example you can open the Tricentis Tosca Sample Application http://sampleapp.tricentis.com.

TestData - Find & provide record (10)

Open Tricentis Tosca Insurance Calculator

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

TestData - Find & provide record (11)

Select the control Automobile

  1. Create a new TestCase and drag and drop the Module TestData - Find & provide record onto this TestCase (see chapter "Creating TestSteps from Modules"). Tricentis Tosca automatically creates a new TestStep with the with the XTestStepValues Existing TDS type*, Alias name (record) and Data search filter.

  2. 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 TDS type*.

    • Leave Alias name (record) blank. In this case, Tricentis Tosca automatically uses the Value of Existing TDS type*.

    • Populate the values of Data search filter as shown in the screenshot below. In this example, Tricentis Tosca searches for the record 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.

TestData - Find & provide record (12)

Find a record of the type car.

Example:once execution is finished, the following results appear:

TestData - Find & provide record (13)

Successful result in ScratchBook

TestData - Find & provide record (14)

Unsuccessful result in ScratchBook

  1. Create a new TestStep named Vehicle Data to use the data from the record that was retrieved from the Test Data Servicerepository. Since you left Alias name (record) blank, Tricentis Tosca automatically uses the Value of Existing TDS type*.

    If you only want to use a record of a certain type, you can use dynamic expressions to retrieve record data.

TestData - Find & provide record (15)

Use values from the Test Data Service database

TestData - Find & provide record (16)

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

This ensures that the test runs in a distributed environment. The record 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 record is also unlocked.

TestData - Find & provide record (2024)
Top Articles
Latest Posts
Article information

Author: Otha Schamberger

Last Updated:

Views: 6049

Rating: 4.4 / 5 (75 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Otha Schamberger

Birthday: 1999-08-15

Address: Suite 490 606 Hammes Ferry, Carterhaven, IL 62290

Phone: +8557035444877

Job: Forward IT Agent

Hobby: Fishing, Flying, Jewelry making, Digital arts, Sand art, Parkour, tabletop games

Introduction: My name is Otha Schamberger, I am a vast, good, healthy, cheerful, energetic, gorgeous, magnificent person who loves writing and wants to share my knowledge and understanding with you.