Multi-Step Workflows
This tutorial shows you how to test complex multi-step workflows in TrueAssert.
Overview
This tutorial covers:
Planning multi-step tests
Recording complex flows
Handling state between steps
Verifying workflow completion
Prerequisites
TrueAssert account
Browser plugin installed
Complex workflow to test
Step 1: Plan Your Workflow
Example Workflow: User Onboarding
Sign up for account
Verify email
Complete profile
Select preferences
Complete onboarding
Break Down Steps:
Identify each major step
Note transitions between steps
Identify verification points
Plan for error handling
Step 2: Record the Workflow
Open browser plugin
Navigate to starting page
Click "Record"
Execute complete workflow:
Step 1: Sign up
Fill registration form
Submit
Wait for confirmation
Step 2: Verify email (if needed)
Navigate to email
Click verification link
Wait for verification
Step 3: Complete profile
Fill profile form
Upload photo (if needed)
Submit
Step 4: Select preferences
Choose preferences
Save
Step 5: Complete onboarding
Final confirmation
Navigate to main app
Click "Stop and Save"
Enter test name:
User Onboarding WorkflowClick "Save"
Step 3: Review and Optimize
Add Verification Steps
Add WAIT steps at key points:
After each major step
Before proceeding to next step
At workflow completion
Handle State
Ensure state is maintained:
Session is preserved
Data persists between steps
Navigation is correct
Add Error Handling
Consider error scenarios:
What if step fails?
How to handle errors?
Should test continue or stop?
Step 4: Execute Test
Click "Run Test"
Monitor execution:
Watch each step execute
Verify transitions
Check for errors
Wait for completion
Step 5: Verify Results
Check execution status
Review step results:
Verify each step succeeded
Check for any failures
Review error messages
View screenshots:
Check each step completion
Verify final state
Review any failure points
Common Workflow Patterns
Linear Workflow
Pattern: Step 1 → Step 2 → Step 3
Example: Registration → Email Verification → Profile Setup
Testing:
Record complete flow
Verify each step completes
Check transitions
Branching Workflow
Pattern: Step 1 → (Branch A or Branch B) → Step 3
Example: Sign Up → (Email or Social) → Dashboard
Testing:
Create separate tests for each branch
Or use conditional logic
Test each path
Looping Workflow
Pattern: Step 1 → Step 2 → (Repeat if needed) → Step 3
Example: Add Items → Review Cart → (Add More or Checkout)
Testing:
Test one iteration
Or test multiple iterations
Verify loop completion
Advanced Techniques
State Management
For workflows with state:
Use session management
Verify state between steps
Handle state transitions
Conditional Steps
For conditional workflows:
Test each condition separately
Or use test data to control flow
Verify correct path is taken
Error Recovery
For error handling:
Test error scenarios
Verify error messages
Test recovery paths
Troubleshooting
Steps Not Executing in Order
Problem: Steps execute out of order
Solution:
Review step order
Add waits between steps
Verify step dependencies
State Not Persisting
Problem: State lost between steps
Solution:
Check session management
Verify navigation is correct
Ensure data is saved
Workflow Fails Midway
Problem: Workflow stops partway through
Solution:
Identify failing step
Check error message
Fix selector or value
Re-run test
Best Practices
Break Down Workflows: Divide into logical steps
Verify Each Step: Check completion before proceeding
Handle Errors: Plan for error scenarios
Test Complete Flow: Test end-to-end workflow
Related Topics
Browser Plugin Recording - Recording guide
Running Tests - Execute tests
Session Management - Handle state
Last updated