Test Data Management (TDM) - Mapping Test Data

Mapping Test Data Overview

When test data is needed in order to drive test execution across various scenarios, you can use the Functionize TDM feature in order to map a Data Source to a particular Test Case.

To execute your test(s) utilizing multiple data sets, see TDM - Orchestrations.

To create a Data Source via data file or database connection, see TDM - Data Source Creation.

 

What is Mapping?

In order to perform data-driven testing, a user will need to connect or map a Data Source to a Test Case.

There are two methods for mapping data to a test case:

  • Auto Mapping
  • Manual Mapping

And there are two types of mappings:

  • Read
  • Write

Read mapping, reads data from the Data Source for taking data from that source and using it in the test case. An example might be entering a Username and Password that was previously stored in a .csv file or a database.

When using Read mapping, if the user selects Delete Data Source Row. After executing the test in a TDM Orchestration, the data source row being used will be deleted from the Data Source, the "data was consumed."
Note: All data sets using that data source row will also be removed. This is great for scenarios where you have one-time-use data.
TDMManual6.png

A Write mapping, supports temporarily stored data within a test case or orchestration at the time of execution. The data stored in a Write can be used within the same orchestration or test while that test is running. An example might be having the first test case within an orchestration create an account and store (write) the random credentials that might be used to create that account back to the data source. If later in that workflow, whether in the same test, or another test within the orchestration, the test can Read from those same columns in order to reuse the random data that was generated with the Write mapping.

When using Write mapping, select Update Data Source row. After executing this test in a TDM Orchestration, the data source row being used, in addition to the data set, will be updated to match whatever data was written to this column. A user also has the option to select Add a new Data Source row. If this is selected, a new data source row will be added based on the resulting data set record.
TDMManual5.png

Note: TDM Data Mapping supports character data to include foreign accent words.

 

Auto Mapping:

Auto Mapping supports downloading a template for the test case so that, all at once, all mapping may be configured in bulk. Only Actions Types: Input, Verify, PageInit, and Clicks are supported with Auto Mapping. Other Action Types must be manually mapped.

Auto Mapping is related to test case configuration. Auto Mapping provides the ability to download a template for test cases, allowing users to configure multiple mappings in bulk, all at once, or pick only specific actions necessary to data-drive a test flow. The supported mappings in Auto Mapping are specifically related to actions performed during testing. These supported actions include:

  • Input: This refers to entering input values or data into various fields or elements of an application under test during testing

  • Verify: This action involves verifying or checking the expected results or outcomes of a test against the actual results obtained during testing

  • PageInit: Page initialization refers to the setup or initialization of a page or application before performing specific test actions

  • Clicks: This action involves performing mouse clicks on different elements or buttons within an application under test during testing

Auto Mapping simplifies the process of configuring mappings for these actions by providing a template that can be downloaded and used to set up the mappings in bulk, rather than configuring them individually. This feature can save time and effort in test case mapping setup and configuration.

TDMAuto9.png

How to Auto-Map a Data Source to a Test Case

  1. Click the TDM button to open the available Data Source list


  2. Select the Data Source to map to the test case


  3. The Auto Mapping workflow will open to the action matching the first column of data, confirm the column matches the test action, the Mapping Type and then click Attach
    Note: You may click Attach All to map the data source without confirming each action.


  4. Continue Attaching Columns to all selected mapped actions and then click Done


  5. Review the Mapping, view by Mapped Columns, Missing Columns, Unified View and click OK
    • Mapped Columns


    • Missed Columns - columns in Data Source not mapped to a test action
      TDMAuto5.png

    • Unified View


  6. Each action mapped to the Data Source will display a label in the action footer, click the label to edit the mapping and click the to delete the mapping


  7. In addition, all Data Sources mapped in a test case will display on the Test Details page


Manual Mapping in Test Detail Page

Manual Mapping is available for most Action Types and may be mapped to any Attribute for an action

  1. Select the action and expand to see Action DetailsTDMManual1.png

  2. Click Add Test Data


  3. Select the Data Source, or Add a data source as needed
    TDMManual3.png

  4. Select the Column that you'd like to map to the action
    Note: If the user maps a column and that value happens to be blank, the attribute mapped will be set to 'blank.'

    TDMManual4.png

  5. Select Read or Write Mapping Type

  6. Click Next

  7. Select the Attribute that you would like to map for this test action, the current value of that attribute will be shown under Default Value
    Note: If a random value was selected in the test case, you may see something similar to [functionizeappType].
    TDMManual7.png

  8. Click OK to save the mapping
  9. The mapping is now visible in the action footer, click the label to edit the mapping or remove by clicking the
    TDMManual8.png

Manual Mapping in Slider View

You can also add, edit, and delete mappings while in Slider View the same as on the Test Detail page.

  1. Click the gear icon on the action to open Action Settings
    TDMManual9.png

  2. Click Add Test Data
    TDMManual10.png

  3. Select the Column, Mapping Type, and Data Source Row instructions as above, and then click Next
    TDMManual11.png

  4. Set the Attribute for the action and click OK
    TDMManual12.png

Add a Data Source within a Test Case

  1. Open a test in a project

  2. Click the TDM button



  3. Click Add a data source
    TDM1.png

  4. In the Create Data Source modal, give the new source a meaningful Name and select the File Type
    TDM3.png

  5. Upload your file and click Submit
    TDM4.png

  6. Your new Data Source will be in the list for selection
    TDM5.png