Reusable workflow templates to accelerate your development
Workflow Templates are proven structural patterns designed as starting points for building new workflows. They provide the foundational architecture and logic you customize for specific testing needs.
Templates vs Samples
Templates: Reusable structures you customize (like a blueprint) Samples: Complete, ready-to-use workflows (like a finished model)
Use templates to build new workflows from scratch, or samples to get started quickly.
Template Categories
📊 Sequential Pattern Template
Linear execution where each step depends on the previous completing successfully.
Name: Sequential Workflow Template
Pattern: Sequential
Steps:
- Step 1: [Configure your first action]
- Step 2: [Configure your second action]
- Step 3: [Configure your third action]
- Step 4: [Configure your fourth action]
Characteristics:
- Linear progression
- Each step waits for previous
- Easy to understand
- Slower execution
- No parallel operations
Workflow: User Registration
1. Navigate to signup page
2. Fill registration form
3. Submit form
4. Verify email sent
5. Click email confirmation link
6. Validate account created
7. Login with new account
✓ Add meaningful step names
✓ Include wait times for page loads
✓ Add assertions to verify progress
✓ Include error recovery steps
✓ Document expected results
Decision: Is condition true?
├─ Yes → Execute Path A
│ └─ Steps A1, A2, A3
└─ No → Execute Path B
└─ Steps B1, B2, B3
Name: Conditional Execution Template
Pattern: Decision-based
Condition Types:
- If/Then/Else
- Switch (multiple conditions)
- Boolean logic
- Comparison operators
Basic If/Then/Else:
Condition: [Define your condition]
If True:
- Step A1: [Action if true]
- Step A2: [Validation if true]
If False:
- Step B1: [Action if false]
- Step B2: [Validation if false]
Workflow: Order Processing with Conditional Handling
1. Check order total
2. Decision: Is order > $100?
If Yes:
a. Apply bulk discount
b. Process premium shipping
If No:
a. Apply standard discount
b. Process standard shipping
3. Continue to payment
# Switch statement
Switch: response_status
Case 200: Validate successful response
Case 400: Handle bad request
Case 404: Handle not found
Case 500: Handle server error
# Complex logic
Condition: (payment_method == "card") AND (card_type == "amex")
Then: Apply American Express processing
For Each Item in Collection:
├─ Process Item 1
├─ Process Item 2
├─ Process Item 3
└─ Process Item N
Name: Loop Iteration Template
Pattern: Repetition
Loop Types:
- For N times
- For each item in collection
- While condition true
- Until condition met
Fixed Iteration:
Loop: 5 times
- Step: [Action to repeat]
- Step: [Validation to repeat]
Collection-based:
Loop: For each in [collection_variable]
- Step: Process [current_item]
- Step: Validate [current_item]
Workflow: Add Multiple Items to Cart
Product List: [Product1, Product2, Product3]
Loop: For each product in list
1. Search for product
2. Click "Add to Cart"
3. Verify added (count increments)
4. Validate product in cart
After Loop:
1. Go to checkout
2. Verify all items present
# From data file
Collection: data.csv (products)
# From API response
Collection: response.results[]
# From database query
Collection: SELECT * FROM products
# Hardcoded list
Collection: ["Item1", "Item2", "Item3"]
# Fixed count
Loop: 5 times
# Until success
Loop Until: result == "success"
Maximum Iterations: 10
# While condition
Loop While: items.count > 0
# For each with counter
Loop: For each item (index available)
Step: Display: "Processing item {{index}} of {{total}}"
Try:
├─ Attempt action
├─ If success → Continue
└─ If fails → Catch block
Catch:
├─ Increment retry counter
├─ If retries left → Retry
└─ If retries exhausted → Execute recovery
Finally:
└─ Cleanup or logging
Name: Decision Tree Template
Pattern: Multi-level Conditional
Structure:
Level 1: Primary condition
Level 2: Secondary conditions per branch
Level 3: Tertiary conditions (optional)
Leaf Nodes: Final actions
Example:
Decision 1: What is user type?
├─ Premium User
│ └─ Decision 2: Order > $100?
│ ├─ Yes → Apply bulk discount
│ └─ No → Apply standard discount
├─ Standard User
│ └─ Decision 2: Has coupon?
│ ├─ Yes → Apply coupon
│ └─ No → No discount
└─ Guest User
└─ Action: Prompt login or continue as guest
Workflow: Checkout Flow Decision Tree
1. Decision: Is customer logged in?
├─ Yes
│ └─ Retrieve saved addresses
│ └─ Decision: Has saved payment?
│ ├─ Yes → Use saved payment
│ └─ No → Enter new payment
└─ No
└─ Decision: Existing account or new?
├─ Login → Retrieve saved data
└─ New → Collect all details
2. Decision: What shipping method?
├─ Standard → 3-5 days
├─ Express → 1-2 days
└─ Overnight → Next day
3. Continue to payment
Concurrent Executions:
├─ Thread 1: User action
├─ Thread 2: User action
├─ Thread 3: User action
└─ Thread N: User action
Measurement:
├─ Response times
├─ Error rates
├─ Throughput
└─ Resource usage
Name: Performance Testing Template
Pattern: Load Testing
Parameters:
Concurrent Users: 10-100
Duration: 5-10 minutes
Ramp-up: Gradual (optional)
Metrics: Response time, errors, throughput
Configuration:
Threads: 50 concurrent users
Ramp-up Time: 2 minutes (gradually add users)
Duration: 5 minutes (sustained load)
Think Time: 1-3 seconds (between actions)
Metrics to Capture:
- Min response time
- Max response time
- Average response time
- 95th percentile
- 99th percentile
- Error count
- Error rate (%)
- Throughput (requests/sec)
Workflow: E-commerce Platform Load Test
Setup:
- 50 concurrent users
- Ramp-up: 2 minutes
- Duration: 10 minutes
User Actions (repeated):
1. Browse products (5 sec think time)
2. Search for item (2 sec think time)
3. View product details (3 sec think time)
4. Add to cart (1 sec think time)
5. View cart (2 sec think time)
Measurements:
- Product listing API response
- Search API response
- Product details API response
- Add to cart API response
- Server CPU usage
- Database query times
Test Data Set 1 → Execute Workflow → Record Results
Test Data Set 2 → Execute Workflow → Record Results
Test Data Set 3 → Execute Workflow → Record Results
...
Test Data Set N → Execute Workflow → Record Results
Name: Data-Driven Testing Template
Pattern: Parameterized Testing
Data Sources:
- CSV file
- Excel spreadsheet
- Database query
- JSON file
- API response
Configuration:
Data File: test_data.csv
Test Rows: All or specific range
Columns: username, password, expected_result
Workflow Steps:
- For each row in data:
1. Read: {{username}} from data
2. Read: {{password}} from data
3. Execute: Login workflow
4. Validate: against {{expected_result}}
5. Record: Pass/Fail
Workflow: Login Testing with Data-Driven Approach
Test Data:
- Valid credentials (multiple users)
- Invalid password scenarios
- Missing field scenarios
- Special character scenarios
- SQL injection attempts
- Long input strings
Workflow:
For each test case in data:
1. Navigate to login
2. Enter username (from data)
3. Enter password (from data)
4. Click login
5. Validate result (from data)
6. Record outcome
Report:
- Total tests: 20
- Passed: 18
- Failed: 2
- Coverage: 95%
Workflow: E-commerce Checkout Robust
# Template 1: Sequential (main flow)
1. Navigate to cart
2. Proceed to checkout
3. Enter shipping
4. Select payment
5. Place order
# Template 2: Loop (process multiple items)
Loop through cart items:
- Validate price
- Check availability
- Update quantity
# Template 3: Conditional (shipping logic)
Condition: Order > $100?
- Yes: Free shipping
- No: Standard shipping
# Template 4: Error Handling (payment)
Try:
- Process payment
Catch:
- Retry up to 3 times
- Try alternate payment method
Finally:
- Log transaction
# Template 5: Decision Tree (user type)
If premium user:
- Apply loyalty discount
- Expedited shipping
- VIP support
Else if new user:
- Apply new customer discount
Else:
- Standard processing