Skip to main content

Test Execution

TestFlair runs your generated test scripts in a browser in its cloud and records the result: pass or fail, step logs, metrics, a video of the run and a screenshot of any failure.

This page covers running scripts from the Test Scripts tab, one or a few at a time. To run a fixed set of test cases together and compare attempts, use Test Runs.

  • Who can run Project Admin, QA Manager, Tester (and workspace Owners and Coordinators)
  • Costs Nothing. Running tests never uses Flairs
  • Where Project → Test Scripts tab
  • You need A completed script and a URL on its test case

What happens when you click Run​

YouClick Run
queued
Cloud browser runs the scriptonce a slot is free
Your appat a public URL, or your local app through a tunnel
Resultlogs, video, screenshot
The script runs in TestFlair's cloud, so your application must be reachable from the internet, directly or through a tunnel.

Running a script​

A script running, with the Execution Started tag

  1. Open the Test Scripts tab.
  2. Click the run icon on a script card (its tooltip says Execute test script, or Re-run after the first run). You can also click Run in the script's drawer, or select several cards and click Run or Rerun in the selection bar.
  3. In Execution Preferences Settings, check the Current setting, or choose Use Existing Setting or Add New Setting.
  4. Click Run.

The card shows Execution Queued, then Execution Started, then the result. The run also appears in the progress indicator in the corner of the app, so you can leave the page and come back.

The run icon is disabled while the script is still generating, when the test case has no URL, or while a previous execution of that script is still in progress (Execution still in progress).

Execution preferences​

The Execution Preferences Settings dialog

A preference is a named, saved set of browser settings for a project. The one marked Current is used for your next runs, and changes to it apply to all future executions. Open them any time with Preferences in the Test Scripts header.

SettingOptionsDefault
Browser Window SizeDesktop 4K (3840×2160), Desktop Full HD (1920×1200), Desktop HD (1920×1080), Desktop 720p (1280×720), Tablet Landscape (1024×768), Tablet Portrait (768×1024), Mobile Landscape (640×360), Mobile Portrait (360×640)Desktop HD
Maximum Test Duration30s, 60s, 90s, 120s, 180s, 210s, 250s: how long one test may run before it is stopped120s
Page Load Time15s, 30s, 45s, 60s, 90s: how long to wait for a page to load30s
Action Timeout5s, 10s, 15s, 30s, 60s: how long one action waits for its element30s
Page Transition Timeout0s, 1s, 2s, 3s, 5s, 10s: an extra pause after every page change, for slow apps0s
Disable CacheDon't use saved data; load everything from scratchOff
Start with Clean SessionRemove all cookies before testingOff
Video RecordingCapture a video of the testOn

Each setting needs a Setting name that is unique in the project. Saved settings can be edited or deleted from the Use Existing Setting list.

tip

If a test is cut off before it finishes, raise Maximum Test Duration. If one step fails with a timeout on an element that does appear eventually, raise Action Timeout or add a Page Transition Timeout.

Limits and cost​

LimitValue
Time per testThe Maximum Test Duration of the preference, 120 seconds by default and up to 250 seconds
Concurrent executionsUp to 3 at a time per workspace, and 2 per user. More executions wait in the queue until a slot frees up
FlairsNone. Running tests is free, whether from this page, a test run, CI or your editor

Executions run in parallel within those limits. The slots are shared across the workspace: a teammate's runs, a test run, a CI pipeline or your editor all use the same ones, so your run may wait in Execution Queued for a while.

Results​

Statuses​

The same script after a successful run

StatusMeaning
Execution QueuedWaiting for a free slot
Execution StartedRunning now
Execution SuccessEvery step and assertion passed
Execution FailedAn assertion or step failed, or the test errored
Compilation FailedThe script's code doesn't compile, usually after a manual edit
Code Validation FailedThe script didn't pass the safety check that runs before execution
Precondition FailedA precondition's steps failed, so this test's own steps never ran
Execution Queued
Execution Started
Execution Success
Execution Failedthe test fails
Precondition Faileda precondition fails
  • Execution Queued→Code Validation Failedthe safety check fails
  • Execution Queued→Compilation Failedthe code doesn’t compile
The code is checked and compiled before the browser starts; only then can the test itself pass or fail.

Execution history and details​

Execution history for a script

Open Execution history from a card's ⋯ menu, or the Execution history tab in the script's drawer. It shows totals (All tests, Completed, Failed) and one row per run with its result, start time and duration.

Click a run to open its details:

  • Metrics: Duration, Passed and Failed steps, and Progress.
  • Views: Split view (logs and video side by side), Browser (the video), Logs, and Bugs linked to the test case.

Execution logs stream live while the test runs and show each entry with its time and level, and how many entries there are. The video becomes available when the run finishes; while the test is running, the browser view shows Recording in Progress. No video is captured if the test failed before the browser started, or if Video Recording is off in the preference.

When a test fails, TestFlair also captures a screenshot of the page at the moment of failure. It is shown with the bug suggestions for that run (below).

Bugs from failed runs​

When a run fails, TestFlair's AI can read its logs and screenshot and suggest bug reports. It never files bugs on its own.

  1. Click the bug icon on the failed card (or Generate bugs from execution on a failed run in the history).
  2. Confirm. Generating suggestions uses Flairs; the confirmation shows the cost.
  3. In Generated Bugs, review the suggestions with their priority and confidence, alongside the Failure Screenshot. Edit any of them.
  4. Select the ones you want and click Create Bug Report. The bugs are created and linked to the test case.

Suggestions are kept, so reopening them later is instant; Regenerate asks for new ones. A green dot on the bug icon means suggestions are waiting. See Bugs for managing them.

Testing local applications​

The browser runs in TestFlair's cloud, so it can't open localhost or an address that only exists inside your network. A tunnel gives your local app a temporary public URL.

  1. Open Add URL on a test case (on the Test Cases tab, or from a script card that has no URL).
  2. Under Testing a private/VPN environment?, click Learn how to set up a tunnel.
  3. In Set Up URL Tunneling, choose Cloudflare Tunnel or ngrok.
  4. Copy and run the install command for Windows, macOS or Linux.
  5. Run the tunnel command shown below, replacing 3000 with your app's port.
  6. Copy the public URL it prints (for example https://abc123.trycloudflare.com), paste it as the test case's URL and click Apply. TestFlair labels recognised tunnel URLs.
cloudflared tunnel --url http://localhost:3000

Keep the tunnel running while scripts are generated and executed. A quick tunnel's URL changes each time you start it, so update the test case URL if you restart it.

Troubleshooting​

The run waits in Execution Queued

  • All execution slots for your workspace or your user are busy. It starts as soon as one frees up.

Compilation Failed after editing

  • Open the script, fix the error shown in the logs, and Save, or regenerate the script.

Timeouts or tests cut off

  • Raise Maximum Test Duration, Page Load Time or Action Timeout in your execution preference, and check the URL loads in a normal browser.

The page never loads

  • If the app is local or behind a VPN, use a tunnel and make sure it is still running.

Precondition Failed

  • One of the test case's preconditions failed first. Run or fix the precondition's script.

Next Steps​

  • Test Runs — Run many test cases together and track them as a set
  • Test Scripts — Generate and edit scripts
  • Bugs — Manage bugs created from failed tests
  • Git Integrations — Run scripts from your CI pipeline