Record your E2E tests as MP4 videos with live panel overlays and interactive HTML reports.
Project description
thea-recorder
Record your E2E browser tests as MP4 videos with live panel overlays and interactive HTML reports.
Your tests already prove your app works. But when they fail at 3am in CI, you're left staring at a stack trace trying to imagine what the browser was doing. thea-recorder captures everything — the browser, your test steps, custom status panels — as a video, then generates a report where you can click any step and watch exactly what happened.
Why
E2E tests are the most expensive tests you write. They're slow, flaky, and when they break, they're the hardest to debug. The typical debugging cycle looks like:
- Read the failure log
- Try to reproduce locally
- Add more logging
- Push, wait for CI, read logs again
- Repeat
This is absurd. Your browser was right there doing the thing. You just weren't watching.
thea-recorder fixes this by recording the virtual display during test execution. Every scenario gets its own MP4. The panel overlay shows you which step is running, the current status, and any custom context you want. The HTML report lets you click a step and the video seeks to that exact moment.
You stop guessing. You start watching.
Features
- HTTP server + native SDKs — use from Go, Python, Ruby, TypeScript, or Java
- CLI — server mode and client mode, scriptable from any language
- Panel overlay system — named columns below the viewport with live-updating text
- Smart scrolling — panels auto-scroll to keep the active content visible
- Interactive HTML reports — embedded videos with clickable step timelines
- Framework agnostic — works with any test runner in any language
- Docker ready — example Dockerfile and E2E test suite included
Install
pip install thea-recorder
System dependencies (in your Docker image or CI runner):
apt install xvfb ffmpeg x11-xserver-utils fonts-dejavu-core
Quick start — HTTP server
Start the server:
thea serve --port 9123
Then use any SDK:
Go
client := recorder.NewClient("http://localhost:9123")
client.StartDisplay(ctx)
stop, _ := client.Recording(ctx, "login_test")
defer stop()
// ... run your browser test ...
Python
from thea import RecorderClient
client = RecorderClient("http://localhost:9123")
client.start_display()
with client.recording("login_test"):
# ... run your browser test ...
pass
TypeScript
const client = new RecorderClient({ url: "http://localhost:9123" });
await client.startDisplay();
await client.recording("login_test", async () => {
// ... run your Playwright test ...
});
Ruby
client = Recorder::Client.new("http://localhost:9123")
client.start_display
client.recording("login_test") do
# ... run your browser test ...
end
Java
try (var client = new RecorderClient("http://localhost:9123")) {
client.startDisplay();
client.recording("login_test", c -> {
// ... run your Selenium test ...
});
}
Quick start — Python library
from recorder import Recorder, generate_report
recorder = Recorder(output_dir="./recordings", display=99)
recorder.add_panel("status", title="Status", width=120)
recorder.add_panel("steps", title="Steps")
recorder.start_display()
recorder.start_recording("login_test")
recorder.update_panel("status", "Running")
recorder.update_panel("steps", " Given a user\n* When I log in\n Then I see the dashboard")
# ... run your browser automation here (on DISPLAY :99) ...
video = recorder.stop_recording()
generate_report(
videos=[{
"feature": "Authentication",
"scenario": "Login",
"status": "passed",
"video": video,
"steps": [
{"keyword": "Given", "name": "a user", "status": "passed", "offset": 0.0},
{"keyword": "When", "name": "I log in", "status": "passed", "offset": 2.5},
{"keyword": "Then", "name": "I see the dashboard", "status": "passed", "offset": 5.0},
],
}],
output_dir="./recordings",
title="My Test Report",
)
recorder.cleanup()
CLI
# Server mode
thea serve --port 9123 --output-dir ./recordings --cors
# Client mode (talks to running server)
thea --server http://localhost:9123 start-display
thea --server http://localhost:9123 add-panel --name editor --title "Code" --width 80
thea --server http://localhost:9123 start-recording --name login_test
thea --server http://localhost:9123 stop-recording
thea --server http://localhost:9123 list-recordings
thea --server http://localhost:9123 health
Set THEA_URL to avoid repeating --server:
export THEA_URL=http://localhost:9123
thea health
thea start-display
thea start-recording --name my-test
Docker
FROM python:3.12-slim
RUN apt-get update && apt-get install -qyy --no-install-recommends \
chromium-driver xvfb ffmpeg x11-xserver-utils fonts-dejavu-core \
&& rm -rf /var/lib/apt/lists/*
RUN pip install thea-recorder
EXPOSE 9123
CMD ["thea", "serve", "--host", "0.0.0.0", "--port", "9123"]
Panel system
Panels are named overlay columns rendered below the browser viewport in a dark bar. They update in real-time during recording.
# Fixed-width panel
recorder.add_panel("status", title="Status", width=120)
# Auto-width panel (shares remaining space)
recorder.add_panel("log", title="Activity Log")
# Update content (atomically — no tearing in the video)
recorder.update_panel("log", "Line 1\nLine 2\nLine 3")
# Scroll to keep a specific line visible
recorder.update_panel("log", long_text, focus_line=current_step)
Report
The HTML report is a single self-contained file with:
- Embedded MP4 video players per scenario
- Clickable step timelines that seek the video
- Video playback highlights the current step
- Feature/scenario grouping with pass/fail badges
- Dark theme, responsive layout
- Customisable title, subtitle, and logo
Documentation
- HTTP Server API — full endpoint reference
- CLI Reference — all commands and flags
- SDK Quick Start — all 5 languages
- Integration Guide — framework-specific examples
API
Recorder(output_dir, display, browser_size, framerate, font, font_bold)
| Param | Default | Description |
|---|---|---|
output_dir |
/tmp/recordings |
Where MP4 files are saved |
display |
99 |
X11 display number |
browser_size |
1920x1080 |
Virtual display resolution |
framerate |
15 |
Recording FPS |
font |
auto-detect | Path to regular TTF font |
font_bold |
auto-detect | Path to bold TTF font |
Methods
| Method | Description |
|---|---|
start_display() |
Launch Xvfb |
stop_display() |
Terminate Xvfb |
add_panel(name, title, width) |
Register a panel |
remove_panel(name) |
Remove a panel |
update_panel(name, text, focus_line) |
Update panel content |
start_recording(filename) |
Start ffmpeg capture |
stop_recording() |
Stop capture, return MP4 path |
recording_elapsed |
Seconds since recording started |
cleanup() |
Stop everything, remove temp files |
generate_report(videos, output_dir, title, subtitle, logo_text)
Takes a list of video metadata dicts and writes report.html.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file thea_recorder-0.3.0.tar.gz.
File metadata
- Download URL: thea_recorder-0.3.0.tar.gz
- Upload date:
- Size: 34.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb52516a01aa313fa20e2e0af23321cbf0e6dd28e5993d141cc688f2aba6722a
|
|
| MD5 |
cfd0cc08360103333639dd4d049d739f
|
|
| BLAKE2b-256 |
372f02c98d8c3b3bff789540e5d3b6fbfadff5f0b37261a5064e5ded00942e0b
|
Provenance
The following attestation bundles were made for thea_recorder-0.3.0.tar.gz:
Publisher:
publish-python.yml on barkingiguana/thea-recorder
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
thea_recorder-0.3.0.tar.gz -
Subject digest:
cb52516a01aa313fa20e2e0af23321cbf0e6dd28e5993d141cc688f2aba6722a - Sigstore transparency entry: 1073442881
- Sigstore integration time:
-
Permalink:
barkingiguana/thea-recorder@02be326be0c9e06abbdaa0f643b6057f33f1f1bb -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/barkingiguana
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@02be326be0c9e06abbdaa0f643b6057f33f1f1bb -
Trigger Event:
release
-
Statement type:
File details
Details for the file thea_recorder-0.3.0-py3-none-any.whl.
File metadata
- Download URL: thea_recorder-0.3.0-py3-none-any.whl
- Upload date:
- Size: 22.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7359617e8e30f9e8830d5a93318310309bb74084758f136b48786e80764e763a
|
|
| MD5 |
184b07a3cad3165bdb12497de333aa22
|
|
| BLAKE2b-256 |
366b1f362460135f8cf6c4c89fa5f91142de4419b395fe349a74a844f36015fc
|
Provenance
The following attestation bundles were made for thea_recorder-0.3.0-py3-none-any.whl:
Publisher:
publish-python.yml on barkingiguana/thea-recorder
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
thea_recorder-0.3.0-py3-none-any.whl -
Subject digest:
7359617e8e30f9e8830d5a93318310309bb74084758f136b48786e80764e763a - Sigstore transparency entry: 1073442895
- Sigstore integration time:
-
Permalink:
barkingiguana/thea-recorder@02be326be0c9e06abbdaa0f643b6057f33f1f1bb -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/barkingiguana
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@02be326be0c9e06abbdaa0f643b6057f33f1f1bb -
Trigger Event:
release
-
Statement type: