Scenario Tables are a powerful feature in Spur that help you simplify and scale your test suites by using parameterized test data. Instead of creating multiple nearly identical tests with different inputs, you can write one test that dynamically runs through multiple scenarios defined in a table. Screenshot 2025-04-28 at 5.26.39 PM.png

Why Use Scenario Tables?

Scenario Tables are perfect when you have repetitive tests that only differ by input data. Common examples include:
  • Form submissions with different field values (airport codes, cities, names)
  • Login tests with various user credentials
  • Product searches with different search terms
  • Data validation with multiple input variations
  • JavaScript actions with different parameters and configurations
  • API testing with various endpoint parameters and payloads
  • E-commerce flows with different product categories and pricing tiers
Instead of maintaining separate tests for each input combination, Scenario Tables let you loop through a set of variable values in one reusable test. scenario-table.png scenariotest.png

Before vs. After

    Image24 SvBefore Scenario Tables:
    • 10 separate tests for the same flow
    • Each test differs only by input values
    • Hard to maintain and update

    Key Benefits

    Reduce Redundancy

    Write one test instead of many duplicate tests

    Easier Maintenance

    Update inputs in one central location

    Better Test Coverage

    Easily test variations and edge cases

    Scalability

    Add new scenarios without modifying test logic

    Video Walkthrough


    How to Set Up Scenario Tables

    Step 1: Create Your Scenario Table

    Navigate to the Scenario Tables section in Spur (/scenarios) and choose your preferred method: Screenshot 2025-04-28 at 5.39.54 PM.png
    Recommended for bulk data
    Screenshot 2025-04-28 at 5.42.12 PM.png
    1

    Click 'Import via CSV'

    Click the Import via CSV button in the Scenario Tables section
    2

    Prepare your CSV file

    Follow this format:image.png
    Important CSV requirements:
    • First column must be “Scenario Name”
    • Property names cannot contain spaces
    • Each property name must be unique
    • Use underscores instead of spaces for column names (e.g., user_email instead of user email)
    3

    Upload your CSV file

    Screenshot 2025-04-28 at 5.47.37 PM.png
    4

    Configure table details

    • Enter Scenario Table Name
    • Add a clear Description
    • Review the preview to confirm correct import
    Screenshot 2025-04-28 at 5.48.13 PM.png
    5

    Import your table

    Click “Import” to create your table
    Understanding the structure:
    • Each row = one scenario (test variation)
    • Each column = one property (variable you’ll use in tests)

    Step 2: Connect Your Table to a Test

    Important: Scenario Tables must be connected to Test Suites, not individual tests. Once connected to a suite, all tests within that suite can use the scenario properties.

    How it works:

    1. Connect the Scenario Table to a Test Suite
    2. Use the properties [property_name] in any test within that suite
    3. Run the suite to execute all scenarios across all tests
    Now you’ll connect your Scenario Table to a test suite. You can do this in two ways:

    Option 1: Through Test Suites Menu

    1

    Go to Test Suites

    Navigate to the Test Suites section
    2

    Select your test suite

    Choose the test suite you want to connect to a scenario table
    3

    Access suite menu

    Click the three-dot menu (⋯) next to your test suite
    4

    Connect scenario table

    Select “Connect Scenario Table” from the dropdown menu
    5

    Choose your table

    Select the scenario table you want to connect to this test suite

    Option 2: Through Test Editor

    1

    Create or edit a test

    Open the test editor for your chosen test
    2

    Add scenario variables

    In the test editor:
    • Type [ to open the scenario variable menu
    • Select your Scenario Table (e.g., “Flight List Table”)
    • Insert properties into test steps (e.g., “Type [From_city]”)
    Property names will auto-complete as you type, making it easy to reference your scenario data.

    Step 3: Run and Monitor Your Tests

    After saving your scenario-based test:
    1

    Execute your test

    Click “Run” to execute all scenarios
    2

    View results

    Check results in Run History, broken down by scenario:Screenshot 2025-04-28 at 6.05.04 PM.png
    • Example: Separate results for DFZ scenario and LAX scenario
    3

    Inspect individual scenarios

    Click each scenario to inspect individual steps and outcomes clickonscenario.gif
    4

    Schedule recurring runs

    Schedule recurring runs just like regular test suite Screenshot 2025-07-14 at 5.58.05 PM.png

    Best Practices

    Naming

    Use descriptive scenario names that clearly identify what each test variation covers

    Properties

    Keep property names short but meaningful (e.g., from_city instead of departure_city_location)

    Organization

    Group related scenarios in the same table for better organization

    Testing

    Test your table with a small number of scenarios before scaling up

    Need Help?