TestData - Delete Record

Tricentis Tosca Test Data Service enables you to delete records from your database.

To delete a record, use the Module TestData - Delete 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.

Alternatively, you can delete records in the Test Data Management as described in chapter "Delete records".

Example 

The following example shows how to find and delete the record car from your database. To do so, follow the steps below: 

  1. Create a new TestCase by right-clicking a TestCase folder and selecting Create TestCase from the mini toolbar.

  2. Rename the newly created TestCase to Sample TestCase Using TDS.

  3. Drag and drop the Module TestData - Find & provide record onto the TestCase.

Tricentis Tosca automatically creates a TestStep called TestData - Find & provide record with the XTestStepValues Existing TDS type*, Alias name (record), and Data search filter.

  1. Create the following test configuration parameters for your TestCase:

    • 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 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. In the TestStep TestData - Find & provide record, enter car as the Existing TDS type*. If you leave the Alias name (record) XTestStepValue blank, Tricentis Tosca uses the Value of Existing TDS type*.

    The example below shows that the search is for a record with the dateofmanufacture XTestStepValue between the years of 2010 to 2015 and with the make XTestStepValue VW.

Find a record of the type car

  1. Drag and drop the Module TestData - Delete Record onto the same TestCase.

  2. Tricentis Tosca automatically creates a TestStep called TestData - Delete Record with the XTestStepValue Existing alias name (record)*.

  3. Enter car as the Value for Existing alias name (record)*.

    Since you left the XTestStepValue Alias name (record) blank in the previous step, Tricentis Tosca automatically uses the XTestStepValue Existing TDS type* car to refer to the record to delete.

Delete the found record

When you run the TestCase, the TestStep TestData - Find & provide record finds the record car in your database. The TestStep TestData - Delete Record deletes it.