Wdio Timeline Reporter is a WebdriverIO reporter that generates an aggregated HTML report for test results, providing a timeline visualization of test execution. The current stable version is 5.1.4, with active development indicated by recent minor releases. Its key differentiators include combining test summaries, detailed test runs with embedded screenshots, error stack traces, and runtime information into a single, static HTML file. It aims to streamline debugging by providing all necessary information in one place, reducing the need to switch between terminal logs and separate screenshot files. It works seamlessly with Mocha and Jasmine frameworks in WebdriverIO v5+ and later.
npm install wdio-timeline-reporterVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to configure the `wdio-timeline-reporter` and its mandatory `TimelineService` in a `wdio.conf.js` file, including basic reporter options and how to add custom context to tests. It assumes WebdriverIO v5+ is installed.
For WebdriverIO v5+, ensure `wdio-timeline-reporter` is version 5.x or higher. If using WebdriverIO v4, refer to the `v4` branch of the reporter's GitHub repository for compatible versions and instructions.
Ensure your `wdio.conf.js` includes `import { TimelineService } from 'wdio-timeline-reporter/timeline-service';` and `services: [[TimelineService]]`.Always specify `outputDir` in the reporter configuration: `reporters: [['timeline', { outputDir: './path/to/report' }]]`.Be aware of this behavior when choosing `wdio-timeline-reporter` for Cucumber projects. Consider alternative reporters if a consolidated scenario-level report is preferred. No direct fix within the reporter for this behavior.
Centralize screenshot configuration in either the `TimelineService` options or the reporter options, ensuring consistency. The `embedImages` option in reporter config determines if images are base64-encoded into the HTML.
Add `outputDir` to your reporter options: `reporters: [['timeline', { outputDir: './my-reports' }]]`.Ensure `TimelineService` is imported with `import { TimelineService } from 'wdio-timeline-reporter/timeline-service';` and added to services as `services: [[TimelineService]]`.Double-check that both the `timeline` reporter is listed in `reporters` and `TimelineService` is correctly added to `services` array, as specified in the usage instructions. Ensure compatible versions of `wdio-timeline-reporter` and WebdriverIO are used.