Login Flow Testing

This step-by-step tutorial shows you how to create and execute a test for a login flow.

Overview

This tutorial covers:

  • Setting up login settings

  • Creating a login flow test

  • Executing the test

  • Verifying results

Prerequisites

  • TrueAssert account created

  • Browser plugin installed

  • API key configured

  • Target website with login page

Step 1: Configure Login Settings

  1. Navigate to Project SettingsLogin

  2. Fill in login form:

  3. Click "Save"

  4. Wait for login test to be generated (status: DRAFTING → REVIEW)

  5. Click "Review Login" to review generated steps

  6. Verify login steps are correct:

    • GOTO to login page

    • FILL username

    • FILL password

    • CLICK login button

    • WAIT for confirmation

    • GOTO authenticated page

    • WAIT for confirmation

  7. Click "Finish Review" to mark as READY

Step 2: Create Test

Option A: Using Browser Plugin

  1. Open browser plugin

  2. Navigate to target website

  3. Click "Record"

  4. Perform login actions:

    • Navigate to login page

    • Fill username

    • Fill password

    • Click login button

    • Wait for dashboard/confirmation

  5. Click "Stop and Save"

  6. Enter test name: Login Flow Test

  7. Click "Save"

Option B: Using AI Generation

  1. Fill in form:

    • Test Name: Login Flow Test

    • AI Prompt: Create a test that navigates to the login page, fills in the username and password fields, clicks the login button, and verifies that the user is redirected to the dashboard and sees a welcome message

    • Login Required: ✅ Checked

  2. Click "Create Test"

  3. Wait for generation to complete

Option C: Manual Creation

  1. Create test with name and target URL

  2. Add steps manually:

  3. Check "Login Required" if using session management

Step 3: Review Test Steps

  1. Go to test detail page

  2. Review all steps:

    • Verify selectors are correct

    • Check values are correct

    • Ensure step order is logical

  3. Edit any incorrect steps

Step 4: Execute Test

  1. On test detail page, click "Run Test"

  2. Monitor execution:

    • Status updates in real-time

    • Progress bar shows completion

    • Step statuses update

  3. Wait for completion

Step 5: Verify Results

  1. Check execution status:

    • Should be SUCCESS if all steps passed

    • Check for FAIL if any step failed

  2. Review step results:

    • All steps should show SUCCESS

    • Check for any FAIL steps

  3. View screenshots:

    • Click on steps to view screenshots

    • Verify page states are correct

  4. Check session:

    • If using session management, verify session was saved

    • Check that future runs use session validation

Troubleshooting

Login Test Not Ready

Problem: Login test status is not READY

Solution:

  1. Go to Project Settings → Login

  2. Click "Review Login"

  3. Finish review to mark as READY

Test Fails at Login

Problem: Login steps fail

Solution:

  1. Check credentials in project settings

  2. Review login test steps

  3. Update selectors if login page changed

  4. Verify login URL is correct

Session Not Being Reused

Problem: Full login happens every time

Solution:

  1. Verify session was saved after first login

  2. Check session domain matches test URL domain

  3. Review validation steps in login test

  4. Clear and recreate session if needed

Next Steps

  • Create more tests for authenticated flows

  • Test different user roles

  • Test logout functionality

  • Test password reset flow


← Back to Documentation

Last updated