testing
Skill183 starsChanged 18 days agoBSD-3-ClauseView on GitHub
Run tests, verify changes, and collect diagnostics. Use when running tests, writing new tests, verifying code changes before commit, or collecting logs for debugging.
- Installs packages
We split this skill into the rules it gives an agent
16 rules. 0 are common, 3 are distinctive, and 13 are very specific to this project.
0
Common
Most of the 170 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
13
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 21
After making changes, run the narrowest credible test first, then broader checks.
- Very specific: line 62
Always run cargo xtask lint --fix before committing.
- Very specific: line 139
Fixture test: Create notebook in crates/notebook/fixtures/audit-test/, create spec in e2e/specs/, add to FIXTURE_SPECS in e2e/wdio.conf.js, …
- Very specific: line 141
Regular test: Create a spec in e2e/specs/.
- Very specific: line 158
Use data-testid attributes.
- Very specific: line 159
Use browser.execute() + browser.waitUntil().
- Very specific: line 160
Use typeSlowly() for CodeMirror.
- Very specific: line 161
Use browser.execute() for iframe testing.
- Very specific: line 175
Use env -i for system diagnostics to avoid dev env vars (RUNTIMED_DEV, RUNTIMED_WORKSPACE_PATH) leaking through.
- Distinctive: line 195
Read files from tarball without extracting:
- Very specific: line 204
Daemon crashes: Check runtimed.log.1 (previous session)
- Very specific: line 205
Upgrade failures: Search [upgrade] in notebook.log
- Very specific: line 206
Kernel issues: Search [daemon-kernel] or kernel_status
- Very specific: line 207
Sync errors: Search [notebook-sync] or daemon:disconnected
- Very specific: line 209
launchd issues: Check doctor.json launchd_service status
- Distinctive: line 213
Prefer fast integration tests over slow E2E.
“Common” is measured: kept by at least 6 in 10 of the 170 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Testing & Verification
Quick Reference
| Type | Location | Command | Framework |
| Browser E2E | apps/notebook/e2e/ | pnpm --filter notebook-ui test:e2e:browser | Playwright |
| Native E2E | e2e/specs/ | cargo xtask e2e test | WebdriverIO + Mocha |
| Frontend unit | src/**/__tests__/, apps/notebook/src/**/__tests__/ | pnpm test | Vitest + jsdom |
| Rust unit | inline #[cfg(test)] | cargo test | built-in |
| CLI behavior | crates/runt/tests/*.hone | cargo hone test | Hone |
| Python | python/runtimed/tests/ | pytest | pytest |
Verification Workflow
After making changes, run the narrowest credible test first, then broader checks.
Narrow Tests by Crate
| Files changed | Test command |
crates/runtimed/src/** | cargo test -p runtimed |
crates/notebook-wire/src/** | cargo test -p notebook-wire && cargo test -p notebook-protocol |
crates/notebook-doc/src/** | cargo test -p notebook-doc |
crates/notebook-protocol/src/** | cargo test -p notebook-protocol |
crates/notebook-sync/src/** | cargo test -p notebook-sync |
crates/kernel-env/src/** | cargo test -p kernel-env |
crates/kernel-launch/src/** | cargo test -p kernel-launch |
crates/runt/src/** | cargo test -p runt |
crates/runt-workspace/src/** | cargo test -p runt-workspace |
crates/runtimed-py/src/** | up rebuild=true |
crates/runtimed-wasm/** | cargo xtask wasm then deno test --allow-read --allow-env --no-check |
apps/notebook/src/** | pnpm test:run |
python/runtimed/src/** | pytest python/runtimed/tests/test_session_unit.py -v |
Multiple crates: cargo test -p runtimed -p notebook-doc.
MCP Live Verification (when nteract-dev available)
For daemon/kernel changes: up rebuild=true → create_notebook → create_cell with 1 + 1 → execute_cell → verify output is 2.
For CRDT/doc changes: create_notebook → create_cell → get_cell (verify source) → set_cell → get_cell (verify update).
For kernel-env changes: up rebuild=true → create_notebook → execute import sys; print(sys.executable) → verify Python path.
Reporting verification
State which checks ran and what they established. Distinguish compilation, narrow tests, and MCP live verification; name skipped or blocked checks and the behavior they leave unverified.
For example, after narrow tests pass but a live check is unavailable:
The daemon tests passed. I couldn't run the MCP check because nteract-dev wasn't available, so live cell execution is still unverified.
Always run cargo xtask lint --fix before committing.
Frontend Unit Tests (Vitest)
Config: vitest.config.ts (jsdom environment, globals enabled).
pnpm test # Watch mode
pnpm test:run # Run onceKey locations: src/components/isolated/__tests__/, src/components/outputs/__tests__/, src/components/widgets/__tests__/, apps/notebook/src/lib/__tests__/.
Rust Unit Tests
cargo test # All workspace tests
cargo test -p runtimed # Specific crate
cargo test -- --nocapture # Show println! outputHone CLI Tests
Declarative bash-based tests in crates/runt/tests/*.hone.
cargo hone test # All hone tests
cargo hone test cli.hone # Specific fileAssertions: ASSERT exit_code == 0, ASSERT stdout contains "text", ASSERT stdout matches /pattern/.
Python Tests
Two venvs: workspace (.venv at root) for dev, and python/runtimed/.venv for isolated pytest.
# Setup test venv
cd python/runtimed && python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
cd ../../crates/runtimed-py && VIRTUAL_ENV=../../python/runtimed/.venv maturin develop
# Run
pytest python/runtimed/tests/test_session_unit.py -v # Unit (no daemon)
SKIP_INTEGRATION_TESTS=1 pytest python/runtimed/tests/ -v # Skip integration
RUNTIMED_INTEGRATION_TEST=1 pytest python/runtimed/tests/ -v # CI mode (spawns daemon)Browser E2E Tests
Playwright tests in apps/notebook/e2e/ are the preferred E2E surface for
notebook UI, runtime, fixture, and renderer behavior. They use the Vite browser
relay plus the dev daemon, avoiding the slower Tauri WebDriver app build.
pnpm --filter notebook-ui test:e2e:browser -- --project=chromium
pnpm --filter notebook-ui test:e2e:browser -- --project=chromium apps/notebook/e2e/execute-cell-output.spec.ts
pnpm --filter notebook-ui test:e2e:browser:portless -- --project=chromiumNative E2E Tests
Native WebDriverIO tests should stay focused on Tauri-specific setup: app shell boot, cwd-derived untitled notebook behavior, launcher/bootstrap behavior, and other issues that require the real Tauri process.
Running
cargo xtask e2e build # Build with WebDriver support (required first)
cargo xtask e2e test # Native smoke/default run
cargo xtask e2e test-all # Native smoke plus long-tail Tauri fixtures
cargo xtask e2e test-fixture <notebook> <spec> # Single fixture testAdding Tests
Fixture test: Create notebook in crates/notebook/fixtures/audit-test/, create spec in e2e/specs/, add to FIXTURE_SPECS in e2e/wdio.conf.js, add to crates/xtask/src/main.rs, add to CI.
Regular test: Create a spec in e2e/specs/. It is picked up automatically if not in FIXTURE_SPECS.
Helpers (e2e/helpers.js)
| Helper | Purpose |
waitForAppReady() | Waits for toolbar (15s). Use in every before() hook |
waitForKernelReady() | Waits for kernel idle/busy (60s). Superset of above |
executeFirstCell() | Focuses first code cell, Shift+Enter |
waitForCellOutput(cell) | Waits for stream output |
waitForOutputContaining(cell, text) | Waits for specific output text |
approveTrustDialog() | Clicks "Trust & Install" |
typeSlowly(text) | Character-by-character (30ms). Required for CodeMirror |
setupCodeCell() | Finds/creates code cell, focuses editor, selects all |
wry WebDriver Constraints
- Use
data-testidattributes. Text selectors return broken refs. - Use
browser.execute()+browser.waitUntil().executeAsync()is unsupported. - Use
typeSlowly()for CodeMirror. Fast input drops characters. - Use
browser.execute()for iframe testing.switchToFrame()is broken.
Selectors
data-testid: notebook-toolbar, save-button, add-code-cell-button, add-markdown-cell-button, start-kernel-button, restart-kernel-button, interrupt-kernel-button, run-all-button, deps-toggle, trust-dialog, trust-approve-button, deps-panel, deps-add-input.
data-slot: output-area, ansi-stream-output, ansi-error-output.
Other: [data-cell-type="code"], [data-cell-type="markdown"], .cm-content[contenteditable="true"], iframe[sandbox].
Diagnostics
Collecting
Use env -i for system diagnostics to avoid dev env vars (RUNTIMED_DEV, RUNTIMED_WORKSPACE_PATH) leaking through. env -i also clears PATH, so use the installed nteract link (~/.local/bin by default) and --channel to pick the installation.
# Nightly (system)
env -i HOME=$HOME "$HOME/.local/bin/nteract" --channel nightly diagnostics
# Stable (system)
env -i HOME=$HOME "$HOME/.local/bin/nteract" --channel stable diagnostics
# Dev daemon (no env -i needed)
RUNTIMED_DEV=1 RUNTIMED_WORKSPACE_PATH="$(pwd)" ./target/debug/runt diagnosticsOther system commands follow the same env -i pattern:
env -i HOME=$HOME "$HOME/.local/bin/nteract" --channel nightly daemon status
env -i HOME=$HOME "$HOME/.local/bin/nteract" --channel nightly daemon logs -f
env -i HOME=$HOME "$HOME/.local/bin/nteract" --channel stable psRead files from tarball without extracting:
tar xzf <archive>.tar.gz -O doctor.json
tar xzf <archive>.tar.gz -O runtimed.log | grep -i 'error\|panic'What to Look For
- Ghost windows:
Context for '...' missingin notebook.log - Daemon crashes: Check
runtimed.log.1(previous session) - Upgrade failures: Search
[upgrade]in notebook.log - Kernel issues: Search
[daemon-kernel]orkernel_status - Sync errors: Search
[notebook-sync]ordaemon:disconnected - Frontend errors:
webview:errororwebview:warnin notebook.log - launchd issues: Check
doctor.jsonlaunchd_servicestatus
Test Philosophy
Prefer fast integration tests over slow E2E. Use E2E for critical user journeys, integration tests for daemon behavior, unit tests for algorithms.
Other versions191 projects use a version of this.
Word for word · 1
- nteract/nteract★ 183100% same
Edited · 0
None found.
Wrote their own version · 190
- modelcontextprotocol/servers★ 92ksame name
- lobehub/lobehub★ 84ksame name
- lobehub/lobe-chat★ 83ksame name
- penpot/penpot★ 62ksame name
- meteor/meteor★ 45ksame name
- iOfficeAI/AionUi★ 34ksame name
- garrytan/gbrain★ 31ksame name
- OpenZeppelin/openzeppelin-contracts★ 27ksame name
- tursodatabase/turso★ 25ksame name
- redis/go-redis★ 22ksame name
180 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use bundle-dependency-prs, update-library-template and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
MicrosoftSkillbundle-dependency-prs
Fix broken dependency update PRs and aggregate the ones that work into one PR.
Also in 6 projects that use this
MicrosoftSkillupdate-library-template
Merges the latest Library.Template into this repo (at position of HEAD) and resolves conflicts.
Also in 6 projects that use this
zetaloopSkillassign-copilot
Assigns a GitHub issue to the Copilot coding agent, optionally specifying a custom agent. Use this when asked to assign an issue to Copilot or delegate an issue to CCA.
Also in 3 projects that use this
NVIDIA-NeMoSkillbuild-and-dependency
Build and dependency management for NeMo-RL. Covers Docker image building and running, uv usage, venv setup, and adding dependencies.
Also in 3 projects that use this
timmo001Skillchangeset-scope
Keep all scoped code work contained to the user-defined changeset. Use for implementation, fixes, diagnosis, refactoring, cleanup, and review when explicit instructions, named files, diffs, branches, pull requests, or injected work scopes define the boundary.
Also in 3 projects that use this
NVIDIA-NeMoSkilllinting-and-formatting
Code style guidelines for NeMo-RL (Python and shell). Covers naming, indentation, comments, docstrings, reflection avoidance, and uv usage.
Also in 3 projects that use this
In this repository9 other files it gives its agents.
- AGENTS.mdAGENTS.md
- architectureSkill
- automerge-syncSkill
- daemon-devSkill
- execution-pipelineSkill
- frontend-devSkill
- mcp-session-lifecycleSkill
- nteract-diagnosticsSkill
- releasingSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

