DevTools (Test Debugging & Visualization) Service
@wdio/devtools-service is a 3rd party package, for more information please see GitHub | npm
A powerful browser devtools extension for debugging, visualizing, and controlling test executions in real-time.
Works with WebdriverIO, Nightwatch.js, and Selenium WebDriver (any test runner) — same backend, same UI, same capture infrastructure.
Features
🎯 Interactive Test Execution
- Selective Test Rerun: Click play buttons on individual test cases, test suites, or Cucumber scenario examples to re-execute them instantly
- Smart Browser Reuse: Tests rerun in the same browser window without opening new tabs, improving performance and user experience
- Stop Test Execution: Terminate running tests with proper process cleanup using the stop button
- Test List Preservation: All tests remain visible in the sidebar during reruns, maintaining full context
🎭 Multi-Framework Support
- Mocha: Full support with grep-based filtering for test/suite execution
- Jasmine: Complete integration with grep-based filtering
- Cucumber: Scenario-level and example-specific execution with feature:line targeting
📊 Real-Time Visualization
- Live Browser Preview: View the application under test in a scaled iframe with automatic screenshot updates
- Actions Timeline: Command-by-command execution log with timestamps and parameters
- Test Hierarchy: Nested test suite and test case tree view with status indicators
- Live Status Updates: Immediate spinner icons and visual feedback when tests start/stop
🧐 Debugging Capabilities
- Command Logging: Detailed capture of all WebDriver commands with arguments and results
- Screenshot Capture: Automatic screenshots after each command for visual debugging
- Source Code Mapping: View the exact line of code that triggered each command
- Console Logs: Capture and display application console output with timestamps and log levels
- Network Logs: Monitor and inspect HTTP requests/responses including headers, payloads, timing, and status codes
- Error Tracking: Full error messages and stack traces for failed tests
🎮 Execution Controls
- Global Test Running State: All play buttons automatically disable during test execution to prevent conflicts
- Immediate Feedback: Spinner icons update instantly when tests start
- Actions Tab Auto-Clear: Execution data automatically clears and refreshes on reruns
- Metadata Tracking: Test duration, status, and execution timestamps
🎬 Session Screencast
- Automatic Video Recording: Captures a continuous
.webmvideo of the browser session alongside the existing snapshot and DOM mutation views - Per-framework modes:
- WebdriverIO: CDP push mode for Chrome/Chromium (efficient, no per-command overhead); polling fallback for other browsers
- Selenium WebDriver: CDP push mode via
selenium-webdriver/bidi; polling fallback otherwise - Nightwatch.js: Polling mode (Nightwatch doesn't expose a stable CDP escape hatch); works on every browser Nightwatch supports
- Per-Session Videos: Each browser session (including sessions created by
browser.reloadSession()) produces its own recording, selectable from a dropdown in the UI - Smart Trimming: Leading blank frames before the first URL navigation are automatically removed so videos start at the first meaningful page action
For setup, configuration options, and prerequisites see each adapter's README: WebdriverIO · Selenium · Nightwatch.
🐞 Preserve & Rerun (Compare)
- When the bug icon appears: Only on test/suite rows in a
failedstate and the icon sits next to ▶ on hover, available wherever a plain rerun is supported (e.g. Cucumber scenarios at the scenario row, Mocha tests at the test or suite row) - Side-by-side diff: Click the bug-play icon on a failed test to snapshot the failing run and rerun in one action and the Compare tab shows the two runs aligned by command, with the failure point and assertion error (Expected vs Received) called out
- Diagnose flaky tests: See exactly which command differed between a pass and a fail without re-reading logs
- Pop out: Open the comparison in a separate, themed window for a roomier view
Available across WebdriverIO, Selenium WebDriver, and Nightwatch.js. The rerun mechanism differs per framework (WDIO uses
--spec+ grep, Selenium substitutes a runner-specific filter flag like--grep/--testNamePattern, Nightwatch readsDEVTOOLS_RERUN_LABEL); the dashboard contract is identical.