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

  1. Sign up for account

  2. Verify email

  3. Complete profile

  4. Select preferences

  5. 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

  1. Open browser plugin

  2. Navigate to starting page

  3. Click "Record"

  4. 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

  5. Click "Stop and Save"

  6. Enter test name: User Onboarding Workflow

  7. Click "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

  1. Click "Run Test"

  2. Monitor execution:

    • Watch each step execute

    • Verify transitions

    • Check for errors

  3. Wait for completion

Step 5: Verify Results

  1. Check execution status

  2. Review step results:

    • Verify each step succeeded

    • Check for any failures

    • Review error messages

  3. 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:

  1. Use session management

  2. Verify state between steps

  3. Handle state transitions

Conditional Steps

For conditional workflows:

  1. Test each condition separately

  2. Or use test data to control flow

  3. Verify correct path is taken

Error Recovery

For error handling:

  1. Test error scenarios

  2. Verify error messages

  3. Test recovery paths

Troubleshooting

Steps Not Executing in Order

Problem: Steps execute out of order

Solution:

  1. Review step order

  2. Add waits between steps

  3. Verify step dependencies

State Not Persisting

Problem: State lost between steps

Solution:

  1. Check session management

  2. Verify navigation is correct

  3. Ensure data is saved

Workflow Fails Midway

Problem: Workflow stops partway through

Solution:

  1. Identify failing step

  2. Check error message

  3. Fix selector or value

  4. Re-run test

Best Practices

  1. Break Down Workflows: Divide into logical steps

  2. Verify Each Step: Check completion before proceeding

  3. Handle Errors: Plan for error scenarios

  4. Test Complete Flow: Test end-to-end workflow


← Back to Documentation

Last updated