Manual Test Creation

This guide explains how to manually create and edit test steps using the TrueAssert web interface.

Overview

Manual test creation allows you to:

  • Create tests step-by-step without recording or AI

  • Edit existing tests (recorded or AI-generated)

  • Add, modify, or delete test steps

  • Reorder steps using drag-and-drop

  • Fine-tune selectors and values

When to Use Manual Creation

Use manual creation when:

  • You need precise control over test steps

  • You want to edit recorded or AI-generated tests

  • You're creating simple, straightforward tests

  • You need to fix or improve existing tests

Creating a Test Manually

Step 1: Create Test

  1. Go to Create Test page or click "Create Test"

  2. Fill in basic test information:

    • Test Name: Name for your test

    • Target URL: Starting URL (optional for manual creation)

    • AI Prompt: Can be left empty for manual creation

  3. Click "Create Test"

  4. You're redirected to test detail page

Step 2: Add Test Steps

On the test detail page:

  1. Click "Add Step" button

  2. A new row appears in the steps table

  3. Fill in step details:

    • Action Type: Select from dropdown (CLICK, FILL, GOTO, WAIT, etc.)

    • Selector Type: XPATH or CSS

    • Selector: XPath or CSS selector

    • Value: Input value (for FILL actions)

    • Description: Human-readable description

  4. Click "Save" to add the step

Step 3: Continue Adding Steps

Repeat step 2 for each test step:

  • Steps are numbered automatically

  • Order determines execution sequence

  • You can add as many steps as needed

Step 4: Review and Execute

  1. Review all steps

  2. Verify selectors and values are correct

  3. Click "Run Test" to execute

Editing Test Steps

Edit Existing Step

  1. Find the step in the steps table

  2. Click "Edit" button (pencil icon)

  3. Modify step fields:

    • Action type

    • Selector type

    • Selector

    • Value

    • Description

  4. Click "Save" to update

Delete Step

  1. Find the step in the steps table

  2. Click "Delete" button (trash icon)

  3. Confirm deletion

  4. Step is removed and remaining steps are renumbered

Reorder Steps

  1. Use drag-and-drop on step rows

  2. Drag step to new position

  3. Drop to reorder

  4. Steps are automatically renumbered

  5. Test version increments

Available Action Types

GOTO

Navigate to a URL.

Fields:

  • Selector: Not needed (empty)

  • Value: URL to navigate to

  • Description: "Navigate to [URL]"

Example:

CLICK

Click an element.

Fields:

  • Selector: XPath or CSS selector for element

  • Value: Not needed (empty)

  • Description: "Click [element description]"

Example:

  • Action: CLICK

  • Selector: //button[@id='submit']

  • Description: "Click submit button"

FILL

Fill a form field with a value.

Fields:

  • Selector: XPath or CSS selector for input field

  • Value: Text to fill

  • Description: "Fill [value] in [field]"

Example:

  • Action: FILL

  • Selector: //input[@name='username']

  • Value: testuser

  • Description: "Fill username field"

WAIT

Wait for an element to appear.

Fields:

  • Selector: XPath or CSS selector for element to wait for

  • Value: Not needed (empty)

  • Description: "Wait for [element]"

Example:

  • Action: WAIT

  • Selector: //div[@id='loading']

  • Description: "Wait for loading to complete"

SCROLL

Scroll the page.

Fields:

  • Selector: Not needed (empty)

  • Value: Scroll direction or amount

  • Description: "Scroll [direction]"

PRESS

Press a keyboard key.

Fields:

  • Selector: Not needed (empty)

  • Value: Key to press (e.g., "Enter", "Escape")

  • Description: "Press [key]"

Selector Types

XPath Selectors

Format: XPath expression

Examples:

  • //button[@id='submit'] - Button with ID

  • //input[@name='email'] - Input with name attribute

  • //div[contains(@class, 'container')] - Div with class

  • //a[text()='Login'] - Link with text

When to Use:

  • More robust than CSS

  • Better for complex DOM structures

  • Recommended for most cases

CSS Selectors

Format: CSS selector syntax

Examples:

  • #submit - Element with ID

  • .button-primary - Element with class

  • input[name='email'] - Input with name

  • div.container > button - Child selector

When to Use:

  • Simple, straightforward selectors

  • When XPath is overkill

  • Familiar CSS syntax

Step Management

Adding Steps

  1. Click "Add Step" button

  2. New row appears at bottom of table

  3. Fill in step details

  4. Click "Save" to add

Automatic Features:

  • Step order is calculated automatically

  • Test version increments

  • Previous executions marked as outdated

Editing Steps

  1. Click "Edit" button on step row

  2. Modify fields inline

  3. Click "Save" to update

What Updates:

  • Step fields (action, selector, value, description)

  • Test version increments

  • Previous executions invalidated

Deleting Steps

  1. Click "Delete" button on step row

  2. Confirm deletion

  3. Step is removed

What Happens:

  • Step is deleted from database

  • Remaining steps are renumbered

  • Test version increments

  • Previous executions invalidated

Reordering Steps

  1. Drag step row to new position

  2. Drop to reorder

  3. Steps automatically renumbered

What Happens:

  • Step order updated in database

  • Test version increments

  • Previous executions invalidated

Test Version System

How Versions Work

  • Test version starts at 1

  • Version increments when:

    • Steps are added

    • Steps are edited

    • Steps are deleted

    • Steps are reordered

Version and Executions

  • Executions store the test version they used

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

  • New executions use current test version

  • Version mismatch doesn't affect execution, just indicates test changed

Best Practices

Step Organization

  1. Logical Order: Arrange steps in execution order

  2. Clear Descriptions: Use descriptive step descriptions

  3. Stable Selectors: Use IDs or data-testid when possible

  4. Complete Flows: Include all necessary steps

Selector Quality

  1. Prefer XPath: More robust for complex pages

  2. Use IDs: Best selectors when available

  3. Avoid Classes: CSS classes change frequently

  4. Test Selectors: Verify selectors work before saving

Step Descriptions

  1. Be Descriptive: "Click login button" not "Click"

  2. Include Context: "Fill username in login form"

  3. Action + Target: "Wait for dashboard to load"

  4. Clear Intent: Make purpose obvious

Editing Workflow

  1. Review First: Review all steps before editing

  2. Edit Carefully: Small changes can have big impact

  3. Test After Edits: Run test after making changes

  4. Version Awareness: Understand version increments

Common Workflows

Creating a Simple Test

  1. Create test with name and target URL

  2. Add GOTO step (navigate to starting page)

  3. Add CLICK steps (interact with page)

  4. Add FILL steps (fill forms)

  5. Add WAIT steps (wait for elements)

  6. Review and run

Editing Recorded Test

  1. Record test using browser plugin

  2. Review generated steps

  3. Edit incorrect selectors

  4. Add missing steps

  5. Remove unnecessary steps

  6. Reorder if needed

Fixing Failed Test

  1. Run test and identify failed step

  2. Check error message

  3. Edit failed step (fix selector or value)

  4. Add WAIT step if timing issue

  5. Re-run test to verify fix

Troubleshooting

Can't Add Step

Problem: Add Step button doesn't work.

Solutions:

  • Refresh page

  • Check browser console for errors

  • Verify you have edit permissions

  • Check test status (must not be ARCHIVED)

Can't Edit Step

Problem: Edit button doesn't work.

Solutions:

  • Verify you have edit permissions

  • Check test belongs to your organization

  • Refresh page and try again

Steps Not Saving

Problem: Changes not persisting.

Solutions:

  • Check network tab for errors

  • Verify CSRF token is valid

  • Check server logs for errors

  • Try refreshing and editing again

Reordering Not Working

Problem: Drag-and-drop doesn't work.

Solutions:

  • Check JavaScript is enabled

  • Verify drag-and-drop library loaded

  • Try refreshing page

  • Check browser console for errors


← Back to Documentation | Next: Debugging Failed Tests →

Last updated