Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Nightwatch.js

$ nightwatch Official Med Risk
NightwatchJS · Browser & Web · MIT · macos / linux / windows

Nightwatch.js (nightwatch) is an all-in-one Node.js E2E, component, and accessibility testing CLI supporting W3C WebDriver, Chrome DevTools, and mobile testing. It supports --headless, --parallel, --env, and built-in JSON/JUnit report generation under --output.

FCRS-1.0 Score
81 /100
Good
Medium Confidence
Zero-Friction Install
npm install -D nightwatch
CLI vs MCP Decision CLI Only

Executes configured E2E and component regression suites in CI/local dev; distinct from exploratory MCP browser control.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 19 / 25

Supports --headless, --test, --fail-fast, and built-in JSON reporter files under --output, though JSON is written to per-suite files rather than clean stdout.

  • Supports --headless, --output <dir> JSON reports, and --test
Trust & Safety 21 / 25

Executes user-defined test files against configured environments and writes local report files under tests_output/.

  • Scoped via nightwatch.conf.js, --env, and --test
Setup & Portability 12 / 15

Cross-platform via npm/npx, but requires browser drivers (chromedriver, geckodriver) or Selenium server packages.

  • Requires Node.js plus WebDriver binaries in package.json
Utility & Efficiency 13 / 15

Covers E2E, unit, component, and Appium mobile testing with built-in --parallel workers.

  • Supports --parallel, --workers, and built-in HTML/JUnit/JSON reporters
Maintenance & Lineage 8 / 10

Official nightwatchjs/nightwatch repository under MIT license (backed by BrowserStack).

  • Active nightwatchjs/nightwatch MIT repository
Docs & Verifiability 8 / 10

Clear CLI test runner guide on nightwatchjs.org.

  • CLI runner guide at nightwatchjs.org

Security, Auth & Guardrails

Auth Modes
No Auth Env API Key Config File
Credential Storage

Reads optional cloud grid credentials (BrowserStack/SauceLabs) from env vars or nightwatch.conf.js.

Side Effects
Read-Only Local Write Remote Write
Cost & Quotas

Free, MIT open-source Node.js framework.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Nightwatch.js Agent Rules
- Always pass `--headless` and scope runs with `--test <file>` or `--group <dir>`.
- Avoid running `npm init nightwatch` interactively without explicit flags.
- Parse structured results from `--output <dir>` JSON files or process exit codes.

Agent-Ready Command Recipes

Safe Read-Only Queries

Run a specific test file headlessly
npx nightwatch --headless --test tests/smoke.js --output ./tests_output

Runs tests/smoke.js in headless mode and writes built-in JSON/XML reports into ./tests_output.

Inspect Nightwatch CLI flags
npx nightwatch --help

Lists runner flags (--env, --headless, --parallel, --output) without launching browsers.

Strengths for Agents

  • + Built-in --headless flag and automatic JSON/JUnit reporting (--output) with zero extra reporter plugins.
  • + Supports --test, --group, and --fail-fast for fast targeted feedback.

Caveats & Pitfalls

  • ! JSON reports are written as multiple files in --output (tests_output/) rather than printed to stdout.
  • ! Requires compatible browser driver packages (chromedriver, etc.) to be installed.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI