All docs
Feature reference Build tests 2 min reference

Assign a step result to a variable

Assign to variable stores a value produced or used by one step under a project-variable name for later steps and tests.

This reference explains the term, its purpose, a practical example, common use cases, where it appears in Rima, and the closest product visual.
A Rima project detail page
Project settings, variables, groups, schedules, tests, and run history in one place.

Definition

Assign to variable stores a value produced or used by one step under a project-variable name for later steps and tests.

What it is for

It connects flows that create data with flows that need to reuse that data.

How it works

  • Pick a project variable in the step editor’s Assign to variable control; during a run the step’s resulting value is written into it.
  • Later steps and tests read the value with Use variable or a ${var:NAME} token.
  • Combined with Run Before, a setup test can create data and hand its ID to the main test.

Example

Capture the ID returned after creating a post as POST_ID, then search for ${var:POST_ID} in the next test.

Common use cases

  • Create then search.
  • Register then log in.
  • Reuse a generated email.
  • Carry a reference across Run Before tests.

Where to find it

Open the step editor and select a project variable in the Assign to variable control.

Limitations, requirements, and permissions

  • The assignment control is hidden when the step’s own value mode is Use Variable.
  • The target variable must already exist or be created from the picker.

Related features and guides

Ready to try it yourself?

Create your free account, record your first flow, add a validation, and let Rima run it on a schedule for you.

Start free trial