Related Data Across Sheets

Let each order row pick its own user from the Users sheet, without guessing.
Updated

What It Does

Without related data, you copy user details into every order row and keep the copies in step by hand. Instead, keep each sheet as it is and say how a row finds its partner: choose the related data, name the column in it, name the column in the current row that it must equal, and give the match a short name. For an Excel workbook, add each sheet you need as its own data source; sheets are not linked automatically. Check matches before running to find the rows that would be held back, with the reasons for the first five, such as an order whose USER_ID has no matching ID. Related data is read whole, once for each run, and a related dataset counts in that dataset's usage list. A workflow in which a row is held back reads as inconclusive, not passed. Each relation matches on one column and finds exactly one row: composite keys, one-to-many matches and relations that depend on other relations are not supported. The workflow editor has no Data section yet, so relations on a workflow are set through the API or the Project Assistant. On the desktop Agent, the runner reads JSON, CSV, XML and API data sets itself; otherwise the server reads both sets of data.

Three Orders rows are matched to a Users sheet where the user ID equals the order USER_ID: orders 1001 and 1002 each find exactly one user and run with that user's email, while order 1003 asks for user 99, which has no matching row, so it is not run and the reason is shown

Overview

Real test data rarely fits in one sheet: orders live in one place and the users who placed them in another. With related data, a data-driven test that runs once for each row can also pick the one matching row of another data set. For example, each Orders row picks the Users row whose ID equals the order's USER_ID, and the test reads values such as {{related.user.EMAIL}}. A match is never guessed. A row with no match, or more than one, is not run, and you see why. It is part of data-driven testing, on every plan.

Key Capabilities

Each data row picks one matching row from a saved dataset or a saved data source
Use values as {{related.user.EMAIL}} in the path, query, headers, body or an expected value, or bind the related column
"Check matches" shows before a run which selected rows have exactly one match
A row with an empty key, no match or several matches is not run, with the reason; the other rows run
Keys are compared as trimmed text, so 42 matches "42"
Row selection and filters apply first, so a relation never changes which rows are chosen
One test can declare more than one relation, each with its own name
Columns with secret-like names are masked in the run report

How It Works

  1. 1

    Open a test, go to its Data tab and switch Data-driven testing on

  2. 2

    Under Related data, choose "+ Add related data" and pick a saved dataset or data source

  3. 3

    Set the match, for example where its column ID equals this row's USER_ID, and name it user

  4. 4

    Select "Check matches" and fix any row that does not have exactly one match

  5. 5

    Use {{related.user.EMAIL}} in the request or an expected value, then run the test

Available on

All Plans

Included in the free trial — no credit card required.

Included in all plans
See pricing →

Go deeper

Guides and playbooks that show this capability in practice.

Start your 15-day free trial — no credit card required.