Source: https://github.com/Saksham-cmd-tech/caseRunner.git
A terminal-based test case runner for developers. CaseCraft provides a sleek, Tokyo Night-themed interface to test edge cases, validate function outputs, and track your code's behavior—right from the terminal.
Built with Python and Textual, it features lazygit-style keybindings, native terminal transparency, a beautiful boot sequence, and per-file session persistence.
- Dynamic Boot Sequence: Hacker-style splash screen that automatically checks PyPI for version updates in the background.
- Native Transparency: Automatically inherits your terminal's background color and opacity.
- Cross-Platform Execution: Safely evaluates the correct executable environments (e.g.
python3vspython) across macOS, Linux, and Windows. - Local Persistence: All your test cases are saved locally inside a
.casecraft/folder in your project.
CaseCraft is available via pip:
pip install casecraftRequires Python 3.10+.
To start using CaseCraft in your project, simply run the CLI command:
casecraft initThis will generate a hidden .casecraft/ folder in your current directory where all test case data will be safely persisted.
Open the dashboard by running:
casecraftPress p to open the Directory Tree modal. Navigate through your project files using the arrow keys and press Enter to select your source file (e.g. src/main.py).
CaseCraft will load your file and assign an empty test suite to it.
Press a to open the Add Test Case modal.
Fill in:
- Label / Name — a short description (e.g. Basic case, Edge: empty list)
- Input (stdin) — the arguments or data you want to pipe into the program
- Expected Output — the output you want the program to print
Press ctrl+s to save or Escape to cancel.
| Action | Key |
|---|---|
| Run all test cases | space |
| Action | Key |
|---|---|
| Search | / |
| Add | a |
| Edit selected | e |
| Delete selected | d |
| Switch panels | Tab |
| Quit | q |
| Badge | Meaning |
|---|---|
AC |
Accepted — output matches expected |
WA |
Wrong Answer — output differs |
TLE |
Time Limit Exceeded — ran longer than 2 seconds |
RE |
Runtime Error — non-zero exit code or exception |
Output comparison normalizes whitespace: trailing spaces and blank lines at the end are ignored.
- Every
.pyfile gets its own session stored in.casecraft/sessions.json. - Switching to a different file automatically loads that file's test cases.
- The last opened file is restored on the next launch.
- Sessions survive app restarts — your test cases are always saved locally to your project workspace.
CaseCraft/
├── pyproject.toml
├── README.md
├── src/
│ └── casecraft/
│ ├── cli.py ← CLI initialization logic
│ ├── app.py ← Textual app, UI composition
│ ├── runner.py ← subprocess execution
│ ├── models.py ← Data models
│ ├── utils.py ← session I/O, helpers
│ └── widgets/
│ └── add_modal.py ← Add / Edit test case modal
Run the app and enjoy the Tokyo Night TUI.
CaseCraft is built and maintained by Saksham.
If you encounter any bugs, have feature requests, or want to contribute, please visit the Issue Tracker.
- Multi-language support (Node.js, Go, Rust) via configurable run commands
- Environment variable injection per test case
- Memory usage tracking alongside runtime
-
ctrl+kcommand palette - Export results as a Markdown or JSON report
- Configurable timeout per test case
- Side-by-side character-level diff highlighting