| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A desktop pytest test workbench — discover, organize, run, schedule, and review Python tests from a fast, drag‑and‑drop UI.
G4 Test Wright is a cross‑platform Electron application that wraps your existing pytest test suite in a visual control center. Point it at a tests folder, pick a Python interpreter, discover tests into a navigable tree, drag the ones you care about into a run Plan, and execute them with live per‑test status — with JUnit reports, Allure integration, and timed scheduling built in.
| Overview | Interpreter picker |
|---|---|
![]() |
![]() |
The interpreter dropdown shows every discovered environment with its Python and pytest versions, and a Browse… action for a custom interpreter.
| Requirement | Why | Notes |
|---|---|---|
| Node.js 18+ (20 LTS recommended) | Runs the app + tooling | bundles Electron 39 via npm install |
| Python 3 with pytest | Test discovery & execution | the app probes each interpreter for pytest |
| pytest-xdist (optional) | Parallel test runs (-n auto) | enables the Parallel Tests toggle |
| allure-pytest + Java (optional) | Collect & view Allure reports | Java must be on PATH for the Allure viewer |
git clone https://github.com/g4-api/g4-test-wright.git
cd g4-test-wright
npm install
npm startThe app packages with electron-builder (config lives in the build field of package.json).
npm run dist # build portable archives for the current OS into dist/
npm run dist:dir # quick unpacked build (no archive) for local sanity checksTargets are portable archives for all three desktop platforms, each for x64 and arm64:
| OS | Format | Arches |
|---|---|---|
| Windows | .zip | x64, arm64 |
| macOS | .zip | x64, arm64 |
| Linux | .tar.gz | x64, arm64 |
The bundled allure-commandline is copied alongside the app via extraResources (resolved at runtime from resources/allure-commandline).
.github/workflows/release-pipeline.yml builds all 6 binaries (3 OS × x64/arm64) on a matrix of GitHub‑hosted runners.
Electron split into a privileged main process, a sandboxed renderer, and a thin preload bridge; the renderer is further organized into feature modules and reusable components.
| Layer | Files | Responsibility |
|---|---|---|
| Main | src/js/main.js | Window + native menu, IPC handlers, file dialogs, state/plan/report persistence |
| src/js/pytest-backend.js | The only place that talks to pytest + Python environments (discover, run, interpreters) | |
| src/js/allure-backend.js | Runs the bundled Allure CLI (serve / in‑app window) | |
| Bridge | src/js/preload.js | contextBridge exposes pytestBackend, allureBackend, and g4 to the renderer (contextIsolation on, no nodeIntegration) |
| Renderer | src/js/renderer.js | Orchestrator + machine state (state/runtime, showApp, run manager, boot) |
| src/js/renderer-*.js | Console, dialogs, interpreters, marks, tree, plan, plan‑files, reports, allure, accordion, schedule, runner, layout, persistence, utils | |
| Components | src/components/<name>/ | Vanilla components: date‑picker, modal, dropdown, interpreter‑picker, mark‑filter, toggle‑switch, empty‑state, console‑drawer, accordion |
| Python | src/py/collect_pytest.py, run_pytest.py | Collector (prints fenced JSON) and streaming runner (emits fenced per‑test events) |
The renderer never reads Node/Electron directly — it goes through window.pytestBackend / window.allureBackend / window.g4, which forward over IPC to the main process.
g4-test-wright/
├─ src/
│ ├─ index.html # app shell
│ ├─ css/ # styles.css + styles.{parameters,layout,visual}.css
│ ├─ js/
│ │ ├─ main.js preload.js # main process + bridge
│ │ ├─ pytest-backend.js
│ │ ├─ allure-backend.js
│ │ ├─ pytest-client.js
│ │ ├─ renderer.js # orchestrator + state
│ │ └─ renderer-*.js # feature modules
│ ├─ components/<name>/ # name.js + name.{parameters,layout,visual}.css + name.css
│ └─ py/
│ ├─ collect_pytest.py
│ └─ run_pytest.py
├─ .github/workflows/release-pipeline.yml
├─ scripts/ # legacy local packaging helpers
├─ docs/images/ # README screenshots
└─ package.json
Each component follows the same convention: a name.js factory (window.newX(...), pure DOM, no app globals) plus a name.css entry that imports name.parameters.css, name.layout.css, and name.visual.css.
The codebase follows reusable coding standards captured as repo skills (.claude/skills/): js-ts-vanilla-style (vanilla JS), css-architecture (3‑file component CSS), and html-authoring (data-test-id coverage, attribute order). New components live under src/components/<name>/ using the JS + 3‑CSS convention above.
Apache‑2.0 © G4 Community
| Back | FazBrowse Home | New Git URL |