Extractions in Spur allow you to capture data from your application and reuse it in subsequent test steps. This is particularly useful for dynamic data that needs to be validated or used later in your test flow.

1

Type 'Extract'

Begin by typing “Extract” to open the extraction interface

2

Pre-extraction Setup

Fill in the required fields for extraction:

  • Specify what to extract

  • Define where to extract from

  • Set the variable name for future use

Users can extract up to 5 values in a single step!
3

Run the Step

Execute the extraction step to capture the data

4

View Environment Variables

Check the extracted value in the environment variables section to confirm successful extraction

Variable names are case sensitive.
5

Use Extracted Value

To use the extracted value in subsequent steps:

1

Type `{` to open the dropdown of available variables

2

Select your variable from the dropdown to insert the extracted value

Common Testing Flows

Best Practices

  1. Meaningful Variable Names

    • Use UPPERCASE for extracted or random variables

    • Use UNIQUE names for all variables

    • Choose descriptive names that indicate the data’s purpose

    • Example: USER_EMAIL, ORDER_TOTAL, PRODUCT_ID

  2. Extraction Timing

    • Extract data as soon as it becomes available

    • Verify the extracted data before using it

    • Consider adding waits before extraction if data is dynamic

  3. Error Handling

    • Add verfication after extraction

Troubleshooting

Common issues and solutions when working with extractions:

  1. Data Not Found

    • Ensure the element is visible before extraction

    • Check if dynamic content has loaded

    • Verify selector accuracy

  2. Invalid Data Format

    • Add verification steps after extraction

    • Use JavaScript for data cleaning if needed

    • adding wait steps for dynamic content

  3. Variable Scope

    • Variables are available throughout the test

    • Use unique names to avoid conflicts

    • Consider prefixing variables for clarity

Next Steps