# Scenarios

A scenario contains lines of instructions on what to do to achieve the desired action.

# List of scenarios

To view the list of scenarios in a feature, select the desired feature and the Scenarios pane would be shown with the list.

Scenarios list

Each scenario list item shows:

Scenarios list item

  1. the unique ID of the scenario;
  2. the title of the scenario; and
  3. the number of lines of instructions in the scenario.

# Rearrange scenarios

When a feature or project is being tested with the runner, the scenarios are tested in order of listing. If the order needs to change, use sort to rearrange them.

Click sort to start rearranging.

Sort scenarios

Click move on the desired scenario list item to move it up to the desired position. Then click save sort to save the position or cancel sort to cancel.

Sorting scenarios

# Create a new scenario

To create a new scenario, click create at the top right corner of the pane. Then fill out the scenario information on the shown page.

Create a new scenario

Select the desired gherkin scenario keyword from the dropdown and fill out the field(s) beside each to complete the line.

Scenario form

Delete any of the scenario lines by click delete on the left side of each line.

Duplicate any line by clicking duplicate.

Rearrange the lines by click move on the left of each line to move the line up to the desired position.

# Scenario Lines

Each line of a scenario could either be an action to perform or a state to check. Use the When keyword to specify actions to perform and the Then keyword for state checks.

Actions to perform must always come before state checks.

Where multiple Whens or Thens are needed, use And or But keywords to join them as required.

# Scenario Options

Scenario options

Click on options to the right of each scenario list item to view the options for the scenario.

# Edit a scenario

Click Edit button from the desired scenario's options and update the scenario information as desired in the form that is shown to the right.

Edit a scenario

# Delete a scenario

Click delete from the desired scenario's options and confirm deletion.

Confirm scenario deletion

NOTE: Deleted scenarios CANNOT be retrieved.

# Other Options

  • Copy ID: Copies the id of the scenario to the clipboard. This may be needed for the cli runner.
  • Export as PDF: Exports the scenario to a PDF file that's downloaded automatically via your browser.
  • Backup: Creates a zipped backup of the scenario in the background and sends an email to download the zip file when ready.

"Export as PDF" and "Backup" options are disabled if scenario doesn't contain any scenario.

# Import backup

Zip files created with the backup option above can be imported later. Use import to import zip files.

Import scenario button

An email will be sent once the scenario has been successfully imported. If there's an error while importing, an email would be sent to indicate this as well.

Note that only zip files containing proper backup files can be uploaded. It is therefore advised to only import zip files created with the backup option.