Test Data Management (TDM) - Mapping Test Data

Mapping Test Data Overview

When test data is needed to drive test execution across various scenarios, you can use the Functionize TDM feature to map a Data Source to a particular Test Case. This guide provides an overview of mapping test data and how to perform data-driven testing in Functionize.

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?

Mapping connects a Data Source to a Test Case to perform data-driven testing. There are two methods for mapping data to a test case: Auto Mapping and Manual Mapping. Additionally, there are two types of mappings: Read and Write.

  • Read Mapping: Reads data from the Data Source and uses it in the test case. For example, entering a Username and Password stored in a .csv file or a database. If the "Delete Data Source Row" option is selected, the data source row will be deleted after test execution, making it suitable for one-time-use data.

    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

  • Write Mapping: Temporarily stores data within a test case or orchestration at the time of execution. The stored data can be used within the same orchestration or test. For example, creating an account and storing the random credentials generated during the test execution back to the data source for later reuse in the same or another test within the orchestration. When using Write Mapping, you can select "Update Data Source Row" or "Add a new Data Source Row" to update or add rows in the data source.

    Note: TDM Data Mapping supports character data, including foreign accent words.

    TDMManual5.png

Auto Mapping

Auto Mapping supports downloading a template for the test case to configure all mappings in bulk. Only Action 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. Open Data Source List:

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


  2. Select Data Source:

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


  3. Auto Mapping Workflow:

    • 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 Mapping:

    • Attach Columns to all selected mapped actions and then click Done.


  5. Review Mapping:

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

    • Unified View:



  6. Edit Mapping:

    • 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 x to delete the mapping.


  7. View Mappings:

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

How to Manually Map Data

  1. Select Action:

    • Select the action and expand to see Action Details.TDMManual1.png

  2. Add Test Data:

    • Click Add Test Data.
      TDMManual2.png
  3. Select Data Source:

    • Select the Data Source or add a new one as needed.
      TDMManual3.png
  4. Select Column:

    • Select the column that you'd like to map to the action.
      TDMManual4.png

      Note: If the column value is blank, the attribute mapped will be set to 'blank'.

  5. Select Mapping Type:

    • Select Read or Write Mapping Type and click Next.
  6. Set Attribute:

    • Select the attribute to map for this test action. The current value of that attribute will be shown under Default Value.
      TDMManual7.png

      Note: If a random value was selected in the test case, you may see something similar to [functionizeappType].

  7. Save Mapping:

    • Click OK to save the mapping.
  8. Edit Mapping:

    • The mapping is now visible in the action footer. Click the label to edit the mapping or remove it by clicking the x.
      TDMManual8.png

Manual Mapping in Slider View

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

  1. Open Action Settings:

    • Click the gear icon on the action to open Action Settings.


  2. Add Test Data and Select Data source:

    • Click Add Test Data.


    • Select the Data source or add a New one 
      TDMManual3.png

  3. Select Column and Mapping Type:

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

  4. Set Attribute:

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

    • Click the TDM button.


  2. Add a Data Source:

    • Click Add a data source.
      TDM1.png

  3. Create Data Source:

    • In the Create Data Source modal, give the new source a meaningful name and select the file type.
      TDM3.png

  4. Upload File:

    • Upload your file and click Submit.
      TDM4.png

  5. Select Data Source:

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

Conclusion

By following these steps, you can efficiently manage and utilize data sources in Functionize, ensuring your tests run in the appropriate context, providing reliable and accurate results.