The Problem with Forgetful Tests
You’re testing your e-commerce checkout flow. The test works perfectly:- Add product to cart
- Go to checkout
- Complete purchase
- See confirmation: “Order #A7B3X9 confirmed!”
- Hardcode an order number (breaks when data changes)
- Search for “any order” (doesn’t verify your specific transaction)
- Give up and test manually
What Is Extraction?
Extraction is simple: Your test can capture information from your application and save it for later use. Think of it like taking a photo of something important so you can reference it later. Your test “sees” the order number on the confirmation page, captures it, and can use it in subsequent steps. The syntax:ORDER_ID. Now you can reference it anywhere in your test using {{key:ORDER_ID}}.
Your First Extraction
Let’s build that e-commerce test properly using extraction. Step 1: Complete the purchase flowORDER_ID.
Step 3: Use the extracted value
Now navigate to order history and use the extracted value:
{{key:ORDER_ID}}—this references the value you extracted earlier. If the order number was #A7B3X9, Autonoma waits until it sees “#A7B3X9” (or “A7B3X9”, or however it’s displayed) in the order list.
The complete test:
When to Use Extraction
Use extraction whenever your application generates dynamic information that you need to verify later: Order numbers:{{key:KEY_NAME}}.
Real-World Examples
Support ticket flow:Multiple Extractions in One Test
You can extract multiple values in a single test:Extraction vs Variables vs Random Data
At this point you might be thinking: “Wait, we already have variables and random data. How is this different?” Variables ({{variable:NAME}}): Values you set before the test runs
- Example:
{{variable:TEST_EMAIL}}might be “[email protected]” - Use for: Configuration, credentials, static test data
{{random:type}}): Values Autonoma generates each run
- Example:
{{random:email}}generates “[email protected]” - Use for: Unique data needed for testing (emails, names, etc.)
{{key:NAME}}): Values your application generates during the test
- Example:
{{key:ORDER_ID}}might be “#A7B3X9” (your app created this) - Use for: Application-generated values you need to verify later
- Variables: You control the value
- Random data: Autonoma controls the value
- Keys: Your application controls the value (and extraction captures it)
Tips for Effective Extraction
Be specific about what to extract:What’s Next
You now understand how to give your tests memory—extracting application-generated values and reusing them throughout your test flow. This unlocks testing complex, multi-step workflows that were previously difficult to automate. Next, we’ll explore a capability that’s unique to mobile testing: how to test features that require camera input, like QR codes and photo scanning.Ready for mobile testing capabilities? Continue to Mobile Testing Features →

