The Copy-Paste Problem
You’ve built 20 tests. Every single one starts the same way:What Are Components?
Components are tests that other tests can reference and reuse. Think of them like functions in programming—write once, call anywhere. Or like a recipe you reference in multiple meal plans instead of writing out the steps each time. A component is just a regular test that you’ve marked as reusable. Other tests can include it as a single step, and Autonoma automatically expands it during execution.Creating Your First Component
Let’s turn that repetitive login logic into a component. Step 1: Build the login test Create a test called “Login as Test User”:The Power of Components
Let’s see components in action across multiple tests. Component: “Login as Test User” (defined once):Common Components to Create
Most teams create components for these repeated patterns: Login components:Components with Variables
Here’s where components become really powerful: They can accept variables. Component: “Login as User” (generic):{{variable:EMAIL}} and {{variable:PASSWORD}} instead of specific values.
Now you can reuse it with different credentials:
Test 1 - Login as regular user:
Nested Components
Components can reference other components. This is called nesting, and it’s incredibly useful. Component: “Login as Test User”:- Executes all steps from “Login as Test User”
- Then executes remaining steps from “Add Product to Cart”
- Then executes the unique checkout steps
Real-World Example: E-Commerce Test Suite
Let’s build a realistic test suite using components. Component: “Login”:When to Create Components
Create a component when: Logic repeats across multiple tests: If you’ve written the same 5 steps in 3+ tests, make it a component. A workflow is complex but reusable: Login flows, checkout processes, data setup—anything that’s multi-step and repeatable. You anticipate changes: If a feature might change (new auth flow, updated checkout), componentize it now. Future updates will be easier. You want to test variations: Create a component with variables, then test different scenarios by passing different values.Components vs Copy-Paste
Let’s see the difference: Without components (copy-paste):- 20 tests with identical login logic
- Login flow changes
- Update 20 tests individually
- Risk missing some tests
- Hours of tedious work
- 20 tests reference “Login” component
- Login flow changes
- Update 1 component
- All 20 tests automatically updated
- Minutes of work
Tips for Effective Components
Keep components focused:{{variable:EMAIL}}, note that in the component description.
Test components independently:
Run components as standalone tests to verify they work before referencing them.

