Docs/Scenarios
#

Scenarios

Run one E2E test as an admin and as a member, or against several accounts, environments and roles, with scenarios: named sets of workflow input values and personas that suites run in one go.

Run one test with several sets of inputs

A scenario is a named set of values for a test's workflow inputs, plus a persona for each login input. With scenarios, one test covers an admin and a member, or two environments, without a copy of the test for each.

Add a scenario

  1. Define the inputs that vary. Add a workflow input for each value that changes between runs. See Macros and variables. A persona input lets a scenario choose who signs in.

  2. Open the scenario editor. In the Flow Designer, click the canvas background so that no step is selected. In the Configure tab, click Configure scenarios, then open the Scenarios tab.

  3. Click Add scenario and fill in the form.

    FieldWhat it does
    NameHow the scenario appears in the run dialog and in results, for example Admin on staging. Required.
    DescriptionOptional notes.
    Use as defaultThe scenario a run starts with. Only one scenario can be the default.
    Include in test suiteOn by default. A suite runs the test once for each scenario that has this on.
    InputsA value for each workflow input. An empty field falls back to the input's default value.
    CredentialsThe persona each login input uses in this scenario.
  4. Save the scenario. A test holds up to 50 scenarios.

How scenarios run

  • One run. The Run configuration dialog has a Scenario menu. It starts on the default scenario, or on the first one if none is marked as default. Its values and personas apply to that run.
  • In a suite. The suite starts one run for every scenario that has Include in test suite on. If the test has no scenarios, or all of them have it off, the test runs once with the input defaults.
  • A scenario that points at a removed input. The suite records that run as skipped and names the missing input.

Each run keeps the scenario it used, so a result tells you which account or environment was under test.

Check it worked

  1. Open the test and start a run from the app. The Scenario menu in Run configuration lists every scenario you saved.
  2. Run the suite that holds the test. Confirm it shows one run per included scenario, and that none is skipped.
  3. Open a run and confirm the values it used are the ones from its scenario.

Go deeper