Convert screen recording videos into structured QA test cases using AI vision
Project description
Clipcase
Convert screen recording videos of application usage into structured, comprehensive test cases — automatically.
Drop a .mov/.mp4 video, run one command, and get test cases in Markdown, CSV, and Excel formats.
How It Works
Video (.mov/.mp4) ──▶ ffmpeg (frame extraction) ──▶ AI Vision (frame analysis) ──▶ Test Cases (MD/CSV/XLSX)
- Frame extraction — Uses
ffmpegto extract screenshots from the video at a configurable frame rate. - AI analysis — Sends sampled frames to a vision-capable LLM (Claude or GPT-4o) to understand the complete user flow.
- Test case generation — The AI generates structured test cases following QA best practices, covering positive, negative, and edge case scenarios.
- Export — Outputs test cases in Markdown, CSV, and styled Excel formats.
Prerequisites
| Dependency | Why | Install |
|---|---|---|
| Python 3.9+ | Runtime | python.org |
| ffmpeg | Frame extraction from video | brew install ffmpeg (macOS) / sudo apt install ffmpeg (Linux) / choco install ffmpeg (Windows) |
| API Key | AI analysis (Claude or GPT-4o) | See API Setup below |
Quick Start
1. Clone and install
git clone <repo-url> clipcase
cd clipcase
pip install -r requirements.txt
2. Set your API key
cp .env.example .env
# Edit .env and paste your API key
Or export directly:
export ANTHROPIC_API_KEY=sk-ant-api03-...
# or
export OPENAI_API_KEY=sk-...
3. Run
python clipcase.py your_recording.mov
That's it. Your test cases will appear as:
your_recording_test_cases.mdyour_recording_test_cases.csvyour_recording_test_cases.xlsx
Usage
python clipcase.py <video_file> [options]
Options
| Flag | Default | Description |
|---|---|---|
--fps |
2 |
Frames per second to extract |
--provider |
anthropic |
LLM provider: anthropic or openai |
--output |
auto | Base name for output files |
--frames-dir |
frames |
Directory for extracted frames |
--frames-only |
off | Only extract frames, skip AI |
--sample-interval |
10 |
Use every Nth frame for analysis |
--principles |
auto | Path to custom principles file |
Examples
# Basic — uses Claude, 2 fps
python clipcase.py recording.mov
# Use OpenAI GPT-4o instead
python clipcase.py recording.mov --provider openai
# Use Google Gemini (free tier)
python clipcase.py recording.mov --provider gemini
# Higher frame rate for fast-paced UI
python clipcase.py recording.mov --fps 4
# Just extract frames (no AI cost), review manually
python clipcase.py recording.mov --frames-only
# Custom output name
python clipcase.py recording.mov --output login_flow_tests
# Analyze more frames (lower interval = more frames sent to AI)
python clipcase.py recording.mov --sample-interval 5
API Setup
Option A: Anthropic (Claude) — Recommended
- Go to console.anthropic.com
- Create an API key
- Add to
.env:ANTHROPIC_API_KEY=sk-ant-api03-...
Option B: OpenAI (GPT-4o)
- Go to platform.openai.com
- Create an API key
- Add to
.env:OPENAI_API_KEY=sk-... - Use
--provider openaiwhen running
Option C: Google Gemini — Free tier available
- Go to aistudio.google.com/app/apikey
- Sign in with your Google account
- Click Create API Key (free, no credit card needed)
- Add to
.env:GEMINI_API_KEY=AIza... - Use
--provider geminiwhen running
Custom Test Case Principles
You can customize how test cases are written by providing your own principles file:
python clipcase.py recording.mov --principles my_standards.md
If you place a file named test_case_creation_principles.md in the same directory as the video, it will be picked up automatically.
The included test_case_creation_principles.md covers:
- Clarity, independence, repeatability, traceability, maintainability
- Naming conventions (Verify that..., Verify if the user...)
- Pre-conditions, expected outcomes, test data guidelines
- Test type classification (Smoke, Sanity, Regression, E2E)
Output Formats
Markdown (.md)
Full document with flow analysis, test case table, and summary statistics.
CSV (.csv)
Tab-importable into Google Sheets, Jira, TestRail, or any test management tool. Checkmarks rendered as ✓.
Excel (.xlsx)
Professionally styled with:
- Color-coded header row
- Alternating row shading
- Auto-filters on every column
- Frozen header row
- Auto-sized columns
Project Structure
clipcase/
├── clipcase.py # Main CLI tool
├── requirements.txt # Python dependencies
├── .env.example # API key template
├── .gitignore # Git ignore rules
├── test_case_creation_principles.md # QA principles (auto-loaded)
├── test_case_template.md # Reference template
└── README.md # This file
Tips
- Short videos work best: 1–5 minute recordings of a single flow produce the most focused test cases.
- Record one flow per video: Login flow, checkout flow, onboarding flow — keep them separate.
- Review and refine: AI-generated test cases are a strong starting point. Have your QA team review and adjust.
- Lower
--sample-intervalfor complex UIs where many small changes happen quickly. - Use
--frames-onlyto preview what the AI will see before spending API credits.
Cost Estimate
Each run makes 2–4 API calls depending on video length:
| Provider | Approximate Cost per Run |
|---|---|
| Claude (Anthropic) | ~$0.30 – $1.00 |
| GPT-4o (OpenAI) | ~$0.50 – $1.50 |
| Gemini 1.5 Pro (Google) | Free tier available (generous quota) |
Costs scale with frame count and video length.
Troubleshooting
| Issue | Fix |
|---|---|
ffmpeg: command not found |
Install ffmpeg (see Prerequisites) |
ANTHROPIC_API_KEY not set |
Add key to .env or export in shell |
| Unicode filename error | Tool handles this automatically via symlink |
openpyxl not installed |
Run pip install openpyxl for Excel support |
| Too few test cases generated | Lower --sample-interval to send more frames |
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 clipcase-1.0.0.tar.gz.
File metadata
- Download URL: clipcase-1.0.0.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cee0f1521242aca5c09f5e96b81c9d861af9b89b5ebb3159fbf82ac1a2e9fed9
|
|
| MD5 |
c30365637d4f68e38658a7e6c0abef67
|
|
| BLAKE2b-256 |
b1aaa3edb76f81d3d1fcd50881911222dce9eb93aa0412de5a84293160b550b7
|
File details
Details for the file clipcase-1.0.0-py3-none-any.whl.
File metadata
- Download URL: clipcase-1.0.0-py3-none-any.whl
- Upload date:
- Size: 13.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
51265adfaa4e80098a3e37ff17c18f0c4e226ba73b6e83eb2df0e7c55b8f198e
|
|
| MD5 |
3aa44c6171317907b82d7663382c8a2b
|
|
| BLAKE2b-256 |
f7ac36a625cf3fe03dd44a7d10034d4da3be82d4815a8b1642eb89ac9b334c20
|