TestData - Update Record

Tricentis Tosca Test Data Service enables you to update records in your database.

To do so, use the Module TestData - Update Record.

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 update a record in your database. In this case, you have to retrieve the record from the TDS database first and then perform an update on it. 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 Configurations folder and expand the imported Configurations folder therein.

  3. Select the TestDataService configuration and define the following test configuration parameters:

    • TestDataEndpoint to specify the location from which you want to retrieve your records

    • TestDataRepository to define the repository to be queried

Define test configuration parameters for TestDataEndpoint and TestDataRepository.

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 Using TDS. Assign the TestDataService configuration to this TestCase by using drag and drop (see chapter "Assign configurations").

  1. Drag and drop the Module TestData - Find & provide record onto the TestCase Sample TestCase Using TDS (see chapter "Creating TestSteps from Modules").

  2. Tosca automatically creates a new TestStep with the XTestStepValues Existing TDS type*, Alias name (record) and Data search filter. Enter car as the Value for Existing TDS type*.

    If you leave Alias name (record) blank, Tosca automatically uses the Value of Existing TDS type*.

Find a record of the type car.

  1. Drag and drop the Module TestData - Update Record onto the TestCase Sample TestCase Using TDS. Tosca automatically creates a new TestStep with the XTestStepValues Existing TDS type* and Data structure.

  2. In the new TestStep, populate your XTestStepValues:

    • Enter car as the value for Existing alias name (record). This is the name of the record that was found in the previous TestStep.

    • You can update this record in the Data structure XTestStepValue: Define a new attribute or edit the existing one. The screenshot below shows that the model XTestStepValue is defined by Golf in the Value column.

TestData - Update record

When you execute your TestCase, Tricentis Tosca finds the record in the first TestStep with the type car and updates the XTestStepValue model with the value Golf of the record car in the second TestStep.