Test Data Service Modules

The folder Standard modules->Test Data Management->Test Data Service in the Tricentis Tosca Standard subset contains XModules that perform specific tasks for Tricentis Tosca Test Data Service.

TestData - Find & provide item

The Module TestData - Find & provide item allows you to find a data item (see chapter "TestData - Find & provide item").

Once you have retrieved the item, the item is locked. No other TestStep can retrieve the same item.

It has the following ModuleAttributes:

ModuleAttribute

Description

Existing TDS type

TDS type that contains the item you search for.

Alias name (item)

Specify an alias for the item you find. This alias is valid for the duration of the TestCase.

This ModuleAttribute is optional, unless you want to update, delete, or move the item you create.

Position

Optionally, specify the position of the item you want to retrieve. You can use the following values:

  • First, which takes the first row/record of data. This is the default value. Alternatively, you can enter 0, which does the same thing.

  • Random, which takes a random row/record of data.

  • Any positive integer to refer to a specific row/record of data after the first row. For example, if you enter 2, Tosca takes the third row/record of data overall.

Query

Enter a query expression to find an item.

Data search filter

Define search criteria for your items.

To do so, perform the following actions:

  • Replace the name of the data search filter parameter <Enter_TDS_attribute_and_a_value> with the name of the attribute that you want to search for.

  • Enter the expected value of the attribute into the Value column.

  • Use ActionMode Constraint.

You can also use wildcards and regular expressions.

Sorting

Specify the sorting options. To do so, enter the property for sorting data and select the direction. You can sort in ascending or descending order.

TestData - Create & provide new item

The Module TestData - Create & provide new item allows you to add a new item to your database (see chapter "TestData - Create & provide new item").

It has the following ModuleAttributes:

ModuleAttribute

Description

Existing or new TDS type

TDS type to which you want to add the item. You can create a new type or use an existing one.

The TDS type name must not contain the following characters: / ? # [ ] @ ! $ & ' ( ) * + , ; = \ :

Alias name (item)

Specify an alias for the item you create. This alias is valid for the duration of the TestCase.

This ModuleAttribute is optional, unless you want to update, delete, or move the item you create.

Data structure

Define attributes for your item. This ModuleAttribute is optional.

To define an attribute, perform the following actions:

  • Replace the name of the data structure parameter <Enter_TDS_attribute_and_a_value> with the name of the attribute that you want to create.

  • Enter a value for the attribute into the Value column.

  • Use ActionMode Input.

TestData - Update item

The Module TestData - Update item allows you to update an existing item in your database (see chapter "TestData - Update item").

It has the following ModuleAttributes:

ModuleAttribute

Description

Existing alias name (item)

Alias name of the item that you want to update.

Data structure

Add new attributes to the item or change the value of existing attributes.

To add or modify an attribute, perform the following actions:

  • Replace the name of the data structure parameter <Enter_TDS_attribute_and_a_value> with the name of the attribute that you want to create or modify.

  • Enter the desired value for the attribute into the Value column.

  • Use ActionMode Input.

TestData - Move item to type

The Module TestData - Move item to type allows you to move items from one existing TDS type to another (see chapter "TestData - Move item to type").

It has the following ModuleAttributes:

ModuleAttribute

Description

Existing or new TDS type

TDS type into which you want to move your item. You can create a new type or use an existing one.

The TDS type name must not contain the following characters: / ? # [ ] @ ! $ & ' ( ) * + , ; = \ :

Existing alias name (item)

Alias name of the item you want to move.

TestData - Delete item

The Module TestData - Delete item allows you to delete items from your database (see chapter "TestData - Delete item").

It has the following ModuleAttribute:

ModuleAttribute

Description

Existing alias name (item)

Alias name of the item that you want to delete.

TestData - Import items

The Module TestData - Import items allows you to import items to a type from a file (see chapter "TestData - Import items").

It has the following ModuleAttributes:

ModuleAttribute

Description

Existing or new TDS type

TDS type that contains the type you search for.

Import format

The format of the data you import. You can use CSV, Excel, or JSON.

Filename

Enter the absolute path to the file.

Ensure order

Select if the order of the items should be kept during import.

Encoding

If you use a CSV file, specify the encoding: ASCII, Windows 1252, or UTF-8.

Separator

Separator character (only for CSV files). Default is ;.

TestData - Export items

The Module TestData - Export items allows you to export all items of a type from your database as a file (see chapter "TestData - Export items").

It has the following ModuleAttributes:

ModuleAttribute

Description

Existing TDS type

TDS type that contains the type you search for.

Export format

The export format of the data. You can use CSV, Excel or JSON formats.

Filename

The absolute path to the export file.

Sorting

Specify the sorting options. To do so, enter the property for sorting data and select the direction. You can sort in ascending or descending order.

Encoding

If you use a CSV file, specify the encoding: ASCII, Windows 1252, or UTF-8.

Line Break

Line break character (only for CSV files). You can use \r, \n, or \r\n values.

Separator

Separator character (only for CSV files). Default is ;.

TestData - Update type

The Module TestData - Update type allows you to update a type in your database (see chapter "TestData - Update type").

It has the following ModuleAttribute:

ModuleAttribute

Description

Existing TDS type

TDS type that contains the type you search for.

New type name

A new TDS type name.

TestData - Expert module

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

It has the following ModuleAttributes:

ModuleAttribute

Description

Test data task

Specify what you want to do. To do so, select the respective option from the Value drop-down menu.

You can choose from the following options:

  • 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 or buffer attributes (see the example in chapter "TestData - Expert module").

    Unlike other options, ReadOnly doesn't lock the item that you retrieve.

  • Find: find an item as you would with the Module TestData - Find & provide 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. If you choose this option, you don't have to fill out any other XTestStepValues.

  • 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.

  • Locktem: 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.

Existing or new TDS type

TDS type. The TDS type name must not contain the following characters: / ? # [ ] @ ! $ & ' ( ) * + , ; = \ :

Alias name (item)

Alias name of the item.

Position

Optionally, specify the position of the item you want to retrieve. You can use the following values: First or Random.

Query

Enter a query expression to find an item.

Data structure

Find, verify, create, or modify attributes.

To do so, perform the following actions:

  • Replace the name of the data structure parameter <Enter_TDS_attribute_and_a_value> with the name of the attribute.

  • Enter the expected or desired value for the attribute into the Value column.

  • Choose the relevant ActionMode:

    To search for an item with this attribute, use ActionMode Constraint.

    To verify the value of the attribute, use ActionMode Verify.

    To create or modify the attribute, use ActionMode Input.

Sorting

Specify the sorting options. To do so, enter the property for sorting data and select the direction. You can sort in ascending or descending order.