data item.md

Data Item

This guide introduces you to the Data Item in Leapwork Go. Data items help keep your test data organised and allow you to reuse it across different parts of your projects.

You can use this guide to:

What is a Data Item?

A data item is a reusable table of values that your sequences can reference during test execution. Instead of placing values directly inside sequence steps, you store them in a structured table and reference them when needed. Typical uses include product IDs or SKUs for an e-commerce flow, user accounts and credentials, and IDs, payload fragments, or parameters for API calls.

Instead of hard-coding values in every step, you can:

This approach improves maintainability and makes it easier to scale tests with large or changing datasets.

Data item types

When you open a data item, what you see in the editor depends on the type of data item. Each type has its own layout and fields that match how the data will be used.

Available data item types include:

Overview of the data item workspace

If you're new to Leapwork Go, start with the ++Overview of the Go workspace++ for a tour of the user interface:

When you open a Data Item, the workspace shows specific information inside that same layout:

  1. Project Explorer: shows where the items are stored together with related assets (data items, timelines, etc.).
  2. Data item Tab: shows the data item name and provides actions such as Close and Refresh for that data item.
  3. Data item Editor: The centre of the editor adapts to the type of data item. It displays the contents of a specific data item, which varies by item.

Data item Tab

At the top of the workspace, the tab bar shows all open assets. Each asset appears as a separate tab, which allows you to switch between editing different items.

Data item Editor

When you open a data item, the center of the workspace shows the main editor along with a small toolbar for actions. The layout and available actions depend on the type of data item you are working with, but each type is designed to help you manage and reuse test data efficiently.

Table

For Table data items, the editor displays a grid with column headers at the top and rows of data beneath. Each row represents a data record, and each column represents a field that sequences can reference during execution.

You use this format to build structured datasets that can evolve with your test scenarios.

Common actions include:

The toolbar supports tasks such as importing data from a CSV file, adding rows or columns, and saving changes. This layout makes it easy to maintain structured test data and reuse it across different journeys.

AD Users

For AD Users data items, the editor shows a table-like view focused on user information and credentials. This helps you manage accounts used in authenticated flows.

Typical fields include:

You can manage users directly in this view by adding new entries, updating credentials, or removing users that are no longer needed.

The toolbar allows you to import users, add or delete entries, and save updates. This gives you a clear overview of your test accounts and how they are configured.

JSON

For JSON data items, the editor displays a text area where you work directly with raw JSON. Instead of a grid, you see the full JSON structure and edit it as needed.

This type is useful when you need to manage complete payloads or configuration blocks. You can:

The toolbar typically includes options to import JSON and save changes, ensuring the latest version is used wherever the data item is referenced.

Dictionary

For Dictionary data items, the editor shows a simple two-column list of keys and values. Each row represents one key--value pair.

This format works well for small datasets such as configuration values, mappings, or headers.

You can:

The toolbar supports adding or deleting rows, importing data, and saving updates so the latest values are available during test execution.

String

For String data items, the editor provides a single text field in the center of the workspace. You work with one value at a time.

This type is useful when you need to store and reuse a single piece of data, such as a token, base URL, or identifier.

You can:

The toolbar is minimal and focuses mainly on saving the value. In some cases, you can also clear or reset the text.

Auth Script

For Auth Script data items, the editor opens a script view used for authentication flows. You see the script along with fields for defining inputs and outputs.

Typical elements include:

You can update the script when authentication flows change, adjust input fields, and define what values the script should return.

Script

For Script data items, the editor opens a JavaScript code editor in the center of the workspace. You write plain JavaScript that has access to all sequence variables through the variables object.

This type is useful when you need to compute a dynamic value at runtime such as combining variables, formatting strings, or performing calculations and assign the result to a target variable via a Set Value step.

You can:

The toolbar includes options to format, edit, and copy the script. A preview panel lets you test your logic with mock variable values before using it in a sequence run.

Use a data item in sequences and timelines

After you prepare your data item, you can connect it to sequences and timelines so they can use the stored values.

In a Sequence, select Data items at the top of the sequence canvas and choose the data item (for example, product table). Inside sequence steps, reference the columns from the data item instead of hard-coding values.

In a Timeline, sequences attached to tracks automatically use the data items linked to those sequences. This allows the same journey to run with many different data records during a load test.

By using Data Items, you can run realistic tests with varied data while keeping sequences easier to maintain.