This package provides helper utilities and custom reporters for integrating various JavaScript testing frameworks with the D2L test reporting framework. Currently at version 5.0.1, it receives frequent updates, often with bug fixes and occasional major version bumps primarily driven by Node.js engine support changes. Key differentiators include its specialized reporters for popular tools like Mocha, Playwright, `@web/test-runner`, and WebdriverIO, which streamline the process of generating test reports in a format compatible with D2L's internal reporting infrastructure. It is designed to work in conjunction with a companion D2L GitHub Action for uploading these reports to a centralized dashboard. The package is specifically targeted for Node.js environments and expects modern ES Module syntax.
npm install d2l-test-reportingVerified import paths — ran on the pinned version, not inferred.
Configures Playwright to use the `d2l-test-reporting` reporter, specifying output paths for reports and a D2L-specific configuration file for mapping test metadata.
Ensure your Node.js environment is version 22 or higher when using `d2l-test-reporting@5.x.x`. Upgrade Node.js if necessary (e.g., using `nvm install 22 && nvm use 22`).
Be aware of this limitation; for comprehensive data across matrix runs, manual aggregation or alternative reporting strategies might be necessary, or consider using single-browser runs if complete data per run is critical.
Monitor your generated reports for unusual or negative test duration values. If consistent issues arise, investigate the specific test conditions or consider using a version prior to 4.2.2 if the reverted fix was critical for your use case.
Update your Node.js environment to version 22 or newer. You can use a tool like `nvm` (Node Version Manager) to manage multiple Node.js versions easily: `nvm install 22 && nvm use 22`.
First, ensure `d2l-test-reporting` is installed: `npm install d2l-test-reporting`. Verify that the reporter path in your configuration file (e.g., `playwright.config.js`) exactly matches the provided path. If using a CommonJS setup, consider switching your project to ES Modules or using dynamic `import()` for the reporter if supported by your test runner's configuration.