Automating API Using API collectionOptions for Generating Test Data in a Separate YAML File

Options for Generating Test Data in a Separate YAML File

This article explains how to generate test data in a separate YAML file using different options.

Options for Generating Test Data in an API Test Automation Process

  1. Data Decoupling Option:
    1. Navigate to the Settings >> Feature File Settings.
    2. In the Feature File Settings, select the Data Decoupling option and click on update.
    3. This will trigger the generation of a separate YAML file.
  2. Data Set Option:
    1. Navigate to the Generate Script screen.
    2. In this screen, you can enable the data set option by selecting the More Menu (3 dots) corresponding to the Request Name.
    3. Upon selecting the data set option for the first time, a YAML file will be generated automatically.
  3. Upload Data Set Option:
    1. If you have an existing data set, upload it onto the Platform using the Upload option, the test data values will be generated in a separate YAML file.
    2. To access Upload option, in the Generate Script screen, select the More Menu corresponding to the Request Name.
      Selected Request List table with Move Request popup showing Move Up, Move Down and Upload Dataset
    3. For the script to be generated click on Generate Scripts.
      Generate script step showing Selected Request List table with Update Sequence and Generate Script buttons

Accessing the Test Data

Upon generating test data in a separate YAML file, perform the following:

  1. Navigate to the Test Cases and expand the respective Test Case folder to access the YAML file.
  2. A system-generated separate YAML file can be viewed and downloaded from here.
TestData.yml editor showing YAML test data for login, profile and create project API tests