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
Navigate to Project Settings → Login
Fill in login form:
Login URL: https://example.com/login
Login Username:
testuser@example.comLogin Password:
password123
Click "Save"
Wait for login test to be generated (status: DRAFTING → REVIEW)
Click "Review Login" to review generated steps
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
Click "Finish Review" to mark as READY
Step 2: Create Test
Option A: Using Browser Plugin
Open browser plugin
Navigate to target website
Click "Record"
Perform login actions:
Navigate to login page
Fill username
Fill password
Click login button
Wait for dashboard/confirmation
Click "Stop and Save"
Enter test name:
Login Flow TestClick "Save"
Option B: Using AI Generation
Go to Create Test page
Fill in form:
Test Name:
Login Flow TestTarget URL: https://example.com/login
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 messageLogin Required: ✅ Checked
Click "Create Test"
Wait for generation to complete
Option C: Manual Creation
Go to Create Test page
Create test with name and target URL
Add steps manually:
FILL: Username field
FILL: Password field
CLICK: Login button
WAIT: Dashboard/confirmation element
Check "Login Required" if using session management
Step 3: Review Test Steps
Go to test detail page
Review all steps:
Verify selectors are correct
Check values are correct
Ensure step order is logical
Edit any incorrect steps
Step 4: Execute Test
On test detail page, click "Run Test"
Monitor execution:
Status updates in real-time
Progress bar shows completion
Step statuses update
Wait for completion
Step 5: Verify Results
Check execution status:
Should be SUCCESS if all steps passed
Check for FAIL if any step failed
Review step results:
All steps should show SUCCESS
Check for any FAIL steps
View screenshots:
Click on steps to view screenshots
Verify page states are correct
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:
Go to Project Settings → Login
Click "Review Login"
Finish review to mark as READY
Test Fails at Login
Problem: Login steps fail
Solution:
Check credentials in project settings
Review login test steps
Update selectors if login page changed
Verify login URL is correct
Session Not Being Reused
Problem: Full login happens every time
Solution:
Verify session was saved after first login
Check session domain matches test URL domain
Review validation steps in login test
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
Related Topics
Setting Up Login - Detailed login setup
Session Validation - How session reuse works
Running Tests - Execute tests
Viewing Results - Understand results
Last updated