Nightwatch.js
$ nightwatch Official Med RiskNightwatch.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.
npm install -D nightwatch Executes configured E2E and component regression suites in CI/local dev; distinct from exploratory MCP browser control.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
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
Executes user-defined test files against configured environments and writes local report files under tests_output/.
- Scoped via
nightwatch.conf.js,--env, and--test
Cross-platform via npm/npx, but requires browser drivers (chromedriver, geckodriver) or Selenium server packages.
- Requires Node.js plus WebDriver binaries in
package.json
Covers E2E, unit, component, and Appium mobile testing with built-in --parallel workers.
- Supports
--parallel,--workers, and built-in HTML/JUnit/JSON reporters
Official nightwatchjs/nightwatch repository under MIT license (backed by BrowserStack).
- Active
nightwatchjs/nightwatchMIT repository
Clear CLI test runner guide on nightwatchjs.org.
- CLI runner guide at
nightwatchjs.org
Security, Auth & Guardrails
Reads optional cloud grid credentials (BrowserStack/SauceLabs) from env vars or nightwatch.conf.js.
Free, MIT open-source Node.js framework.
# 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
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.
npx nightwatch --help
Lists runner flags (--env, --headless, --parallel, --output) without launching browsers.
Strengths for Agents
- + Built-in
--headlessflag and automatic JSON/JUnit reporting (--output) with zero extra reporter plugins. - + Supports
--test,--group, and--fail-fastfor 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.