One test, two runs
A plain pytest run skips the narration and checks the flow. Set DEMO_MODE=narrate and the same test plays as a demo.
Silent pytest
1 passed
Narrated DEMO_MODE=narrate pytest --headed
1 passed
Rendered, not recorded
A screen recording drops frames when the machine falls behind. A limelight render waits for each frame, so the video is smooth on any machine.
Recorded
Rendered
One run, one folder
A narrated run fills one folder per demo, and limelight-render turns it into each format you ship.
- video.mp4
- The demo as a video.
- video.gif
- A GIF for the README.
- walkthrough.md
- The steps written out for the docs.
- 01-orders.png
- A screenshot of each step you mark.
- render.mp4
- The video with subtitles and your voiceover.
- subtitles.vtt
- The captions as subtitles.
- chapters.txt
- A chapter list from the title cards.
- transcript.json
- The timeline the rest is built from.
What comes with it
- The demo never goes stale
- The demo runs in CI with the rest of your tests, so a change that breaks it fails the build. A rerun renders a fresh video, with nothing to re-record.
- A live demo stays on script
- A
presentrun drives the app and waits for a key press at each step, so you talk while the test clicks. - The test still catches bugs
- A console error or an uncaught exception fails the test, and a failed run keeps a screenshot and a trace.
- The voiceover keeps time
- Each caption holds for as long as its spoken line, so your voiceover stays in step with the video.
- Start from your tests
- Wrap the page of an existing Playwright test in a
Demoand add captions one line at a time. The rest of the test stays as it is. - Django is built in
- The Django adapter signs a user in and finds each route by name. The static adapter drives any site that is already running.
Put a test in the limelight
pip install "playwright-limelight[django,pytest]"
-
Fetch a browser
Run
playwright install chromium. A video render also needsffmpegon the PATH. -
Register the plugins
Add
limelight.pytest_plugintopytest_pluginsinconftest.py. A Django project addslimelight.django.pytest_pluginas well. -
Run it narrated
Write the demo as a test, then run it with
DEMO_MODE=narrateand--headed.
The package needs Python 3.11 and Playwright 1.49 or newer. The guides cover scenes, components, barriers, and configuration, and the API reference documents each module.