Viewing Results

This guide explains how to view and understand test execution results in TrueAssert.

Overview

After running a test, you can view:

  • Execution status and progress

  • Step-by-step results

  • Screenshots captured during execution

  • Error messages for failed steps

  • Execution history

Test Detail Page

The test detail page (/test/{test_id}/) shows comprehensive information about your test and its executions.

Test Information

Header Section:

  • Test name

  • Test status (DRAFTING, REVIEW, READY, ARCHIVED)

  • Target URL

  • Project name

  • Test version

Status Badge:

  • Color-coded status indicator

  • Shows current execution status if running

  • Updates automatically via polling

Progress Indicator:

  • Progress bar showing completed steps / total steps

  • Only shown when execution version matches test version

  • Updates in real-time during execution

Test Steps Table

The steps table shows:

  • Order: Step sequence number

  • Action: Action type (CLICK, FILL, GOTO, WAIT, etc.)

  • Description: Human-readable step description

  • Selector: XPath or CSS selector used

  • Value: Input value (for FILL actions)

  • Status: Execution status badge

  • Screenshot: Link to screenshot (if available)

Execution Status Badges

Step Status:

  • Not Executed: Gray badge - Step hasn't been run yet

  • Running: Blue badge - Step is currently executing

  • Success: Green badge - Step completed successfully

  • Failed: Red badge - Step failed (error message available)

  • Skipped: Yellow badge - Step was skipped

Test Execution Status:

  • IN_QUEUE: Test is waiting to be picked up

  • RUNNING: Test is currently executing

  • SUCCESS: All steps completed successfully

  • FAIL: One or more steps failed

Execution Detail Page

Navigate to execution details:

  1. Click on the execution status badge

  2. Or go to /execution/{execution_id}/

Execution Information

Header:

  • Execution ID

  • Test name (linked back to test)

  • Execution status

  • Triggered by (user)

  • Created at (timestamp)

  • Test version

Step Results:

  • All steps with execution results

  • Status for each step

  • Error messages for failed steps

  • Screenshots for each step

  • Execution order

Understanding Results

Successful Execution

When all steps succeed:

  • Test execution status: SUCCESS

  • All step statuses: SUCCESS

  • Progress bar shows 100%

  • Green status badges throughout

Failed Execution

When steps fail:

  • Test execution status: FAIL

  • Failed steps show: FAIL status

  • Error messages displayed

  • Screenshots captured at failure point

Partial Execution

When test is interrupted:

  • Some steps may show SUCCESS

  • Remaining steps show PENDING or NOT EXECUTED

  • Test execution may be RUNNING or FAIL

Screenshots

When Screenshots Are Captured

Screenshots are automatically captured:

  • After each step execution (if enabled)

  • On step failure (automatic)

  • At test completion

Viewing Screenshots

In Test Detail Page:

  • Screenshot icon next to step status

  • Click to view full-size screenshot

  • URL format: /screenshots/{execution_id}/{step_id}.png

In Execution Detail Page:

  • Screenshots listed for each step

  • Click to view or download

  • Missing screenshots show placeholder

Screenshot Storage

  • Stored in screenshots/ directory

  • Named by execution ID and step ID

  • Served via Django media files

  • Available for download

Error Messages

Understanding Error Messages

Error messages provide details about failures:

  • Selector not found: Element doesn't exist on page

  • Timeout: Element didn't appear within timeout period

  • Action failed: Action couldn't be performed (e.g., click blocked)

  • Navigation error: Page navigation failed

  • Login failed: Authentication failed (for login-required tests)

Common Error Types

Selector Errors:

Element not found: //button[@id='submit']
  • Selector doesn't match any element

  • Page structure changed

  • Element not loaded yet

Timeout Errors:

Timeout waiting for element: //div[@class='loading']
  • Element didn't appear within timeout

  • Page loading slowly

  • Element condition not met

Action Errors:

Cannot click element: Element is not clickable
  • Element is hidden or disabled

  • Element is covered by another element

  • Element is not in viewport

Real-time Updates

Status Polling

The test detail page polls for updates:

  • Interval: Every 2 seconds

  • Endpoint: /api/test-status/{test_id}/

  • Updates: Status badges, progress bar, step results

What Updates Automatically

  • Test execution status badge

  • Progress bar (completed steps / total steps)

  • Step status badges

  • Step execution results

  • Screenshot availability

Polling Behavior

  • Starts when page loads

  • Continues while test is RUNNING or IN_QUEUE

  • Stops when test is SUCCESS or FAIL

  • Resumes if test is run again

Execution History

Viewing History

  1. Go to test detail page

  2. Scroll to execution history section

  3. See all previous executions

  4. Click on execution to view details

Execution Information

Each execution shows:

  • Execution ID

  • Status (SUCCESS/FAIL)

  • Created at timestamp

  • Test version

  • Completed steps count

  • Link to execution detail page

Version Tracking

  • Test version increments when steps are modified

  • Executions show which test version was used

  • Old executions may show "version mismatch" if test was modified

Interpreting Results

Success Criteria

A test is successful when:

  • All steps execute successfully

  • No errors occur

  • Final page state is correct

  • All assertions pass (if any)

Failure Analysis

When analyzing failures:

  1. Check Error Messages: Read the specific error

  2. Review Screenshots: See what the page looked like

  3. Check Selectors: Verify selector is still valid

  4. Review Step Order: Ensure steps execute in correct order

  5. Check Timing: Verify elements load before interaction

Common Issues

Intermittent Failures:

  • Timing issues (elements not loaded)

  • Network delays

  • Race conditions

  • Solution: Add WAIT steps before interactions

Consistent Failures:

  • Selector issues (element changed)

  • Page structure changed

  • Authentication expired

  • Solution: Update selectors or test steps

Best Practices

Reviewing Results

  1. Check Immediately: Review results right after execution

  2. Read Error Messages: Understand why steps failed

  3. View Screenshots: Visual verification of page state

  4. Compare Executions: Look for patterns in failures

Using Screenshots

  1. Verify Page State: Check that page loaded correctly

  2. Debug Failures: See what page looked like when step failed

  3. Document Behavior: Screenshots serve as documentation

  4. Share Issues: Use screenshots to report bugs

Analyzing Failures

  1. Start with Error Message: Read the specific error

  2. Check Selector: Verify selector matches element

  3. Review Context: Check previous steps succeeded

  4. Test Manually: Reproduce issue manually

  5. Fix and Re-run: Update test and execute again


← Back to Documentation | Next: Debugging Failed Tests →

Last updated