TestData - Expert module

The Module TestData - Expert module combines the functionality of other TestData Modules and provides you with additional functionality on top.

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.

Test data task allows you to perform the following actions:

  • Create: create an item as you would with the Module TestData - Create & provide new item.

  • ReadOnly: read data from an item. You can then verify certain attributes, for instance (see the example below).

  • Find: find an item as you would with the Module TestData - Find & provide new item.

  • Update: update an item or move an item as you would with the Modules TestData - Update item and TestData - Move item to type.

  • DeleteItem: delete an item as you would with the Module TestData - Delete item.

  • DeleteType: delete an existing TDS type along with all its associated items.

  • DeleteAll: delete all contents of a Tricentis Tosca Test Data Service database. You can't cancel this operation and all your test data will be lost.

  • LockItem: lock an item. You need to find an item first. Use alias name to refer to it when executing the steps.

  • UnlockItem: unlock an item. You need to find an item first. Use alias name to refer to it when executing the steps.

  • LockType: lock all items in a type. By default, Tricentis Tosca marks all the items in the test run as locked and when the test run process ends, unlocks them.

  • UnlockType: unlock all items in a type.

    By default, Tricentis Tosca marks all the items in the test run as locked and when the test run process ends, unlocks them.

    Optionally, you can mark the items manually during long test runs.

    If you set an item as locked in the Module TestData - Expert module, it appears as locked for editing in Web UI.

Example

In this example, you search for test data items with particular attributes. Then you sort the search results, select an item from a particular position, and save part of its information for later.

To do this, you create a TestCase with two TestSteps:

  1. Create a TestStep from the TestData - Expert Module and name it Read data. This TestStep defines which item you're looking for.

  2. Create a TestStep from the TBox Set Buffer Module and name it Create buffer for color. This TestStep creates the buffer where you save the information.

Example TestCase with two TestSteps

In the Read data TestStep, define the following TestStepValues:

  • In Test data task, enter ReadOnly, so Tosca knows you want to read an item.

  • In Existing or new TDS type, enter the name of the item you're looking for: car.

  • In Alias name (item), enter ReadForColor. This is the alias of the item that Tosca will use, based on your specifications. You'll need the alias later, when you create the buffer.

  • In Start index, leave the default value of 1.

  • In Position, enter 5. This means that after sorting the search results, Tosca will use the item in the fifth row after the header.

  • In Data structure, define your search criteria. All items should have the attribute Make with the value Ford, the attribute Model with the value Explorer, and the attribute DateOfManufacture with the value 2014.

    And to tell Tosca that these are search parameters, you use ActionMode Constraint.

  • In Sorting, define how to sort your search results. Mileage is the sorting criteria, and Ascending is the desired order.

TestStep Read data: Define the test data item you're looking for

In the Create buffer for color TestStep, you only have one TestStepValue, which you modify in the following way:

  • Specify FordExplorer2024 - Color as the buffer name.

  • Enter the TDS expression {TDS[ReadForColor.Color]} as the value. This tells Tosca to write the value of the attribute Color of the resource ReadForColor to the buffer.

TestStep Create buffer for color: Create a new buffer with specific data

You can now use the buffer in other TestSteps or TestCases. For example, to insert the value into your application or to compare the value to an expected value.