Scenario Tables are a powerful new feature in Spur that allow you to simplify and scale your test suites by parameterizing test data. Instead of writing multiple near-identical tests with different inputs, you can now use a single test that dynamically runs through multiple scenarios defined in a table.

When to Use Scenario Tables

Use Scenario Tables when you have repetitive tests that differ only by input data—for example, form submissions where only the values for fields like airport codes or cities change. Instead of maintaining separate tests for each input, Scenario Tables let you loop through a set of variable values in one reusable test.

Before using scenario tables, every variation of the test had to have its own test. The test suite contains 10 tests, all testing the same flow with different inputs and values.

After using scenario tables, we were able to compress the entire test suite into just one test! We simply added a scenario table and provided the different variation values in a table format and edited the test to use the table.
Learn more about using scenarios within a test here

Benefits

  • Reduce Redundancy: Write one test instead of many.
  • Easier Maintenance: Update inputs in one place without modifying test logic.
  • Better Test Coverage: Easily run variations and edge cases.

Video Walkthrough

How It Works

1. Create a Scenario Table

Navigate to the Scenario Tables section in Spur. You can either create a table manually or import one using a CSV file.

  • Go to Scenario Tables

  • Create new table by clicking Import via CSV or New Scenario buttons

    Import via CSV

  • Choose a CSV to upload

    • Select View Sample CSV link to view the format of the csv expected. You can also download the sample csv and edit it with your data.
    • NOTE: The CSV must follow the format of Scenario Name, <name_of_property>, ...
      • Replace <name_of_property> with the property name you want to assign that column
      • Property names can not have a space and must be unique across the CSV file

  • Provide the Scenario Table Name and Description

  • You can confirm the CSV has been imported correctly by verifying the Preview of the first row shown along with the total number of scenarios and properties marked for import.

  • Click on Import button

New Scenario (Manual)

  • Provide the **Scenario Table Name **and Description

  • Click on Create Scenario button

  • Table should be created. Make any necessary edits and click on Save Edits button to save your changes

Each row in the table represents a scenario, and each column is treated as a property.

2. Connect a Scenario Table to a Test

To use a Scenario Table in a test suite:

  • Go to Test Suites
  • Select an existing suite or create a new one
  • Create or edit a test
  • In the test editor, type [ to open the scenario variable menu
  • Select the Scenario Table (e.g., Flight List Table)
  • Insert properties into your test steps (e.g., Type [From_city])

More detailed explanation for using scenarios within a test are available here

Spur will now run the test once for each row (scenario) in the table, substituting the properties with corresponding values.

3. Run and Inspect Scenario-Based Tests

After saving your test:

  • Click Run to execute the scenario-based test suite
  • View the results in Run History broken down by scenario
    • For example: one run for DFW, another for LAX
  • Click each scenario to inspect individual steps and outcomes

You can also schedule scenario-based suites just like regular test suites.