Helper package for generating reports for use with the D2L test reporting framework. Reporters in this package produce a structured JSON report file that can be uploaded to the D2L test reporting back-end using the corresponding GitHub Action.
Note
If you have any questions, concerns or just want to chat feel free to reach out in #test-reporting (D2L employee accessible only).
Install the package as a dev dependency since it is only used during test execution.
npm install --save-dev d2l-test-reportingThis library provides built-in reporters for several test execution frameworks
used at D2L, along with a ReportBuilder class for building custom reporters.
A D2L test reporting configuration file is required when using one of the
reporters in this package. It maps test files to a test type and tool, which
are recorded in the output report. By default, reporters look for a file named
d2l-test-reporting.config.json at the root of the repository. This path can
be changed using the reportConfigurationPath option available on each
reporter, though the default is sufficient for most projects.
See Report Configuration for examples, and Report Configuration Format for schema details.
Each reporter wraps your test framework and emits a D2L test report JSON file when the test run completes. The following frameworks are supported.
If your test framework isn't supported by the built-in reporters, you can build
your own using the ReportBuilder class. See Report Builder for a complete
walkthrough of creating a custom reporter for any test framework.
Reporters in this package output the D2L test report JSON format, which is required by the GitHub Action to upload results to the back-end. For details on the schema, see Report Format.
After cloning the repository, make sure to install dependencies.
npm ci
npx playwright install --with-deps# eslint and editorconfig-checker
npm run lint
# eslint only
npm run lint:eslint
# editorconfig-checker only
npm run lint:editorconfig# currently only eslint
npm run fix
# eslint only
npm run fix:eslint# lint, unit tests and integration tests
npm test
# unit tests and integration tests only
npm run test:all
# unit tests only
npm run test:unit
# integration tests only
npm run test:integrationThis repo is configured to use semantic-release. Commits prefixed with fix:
and feat: will trigger patch and minor releases when merged to main.
To learn how to create major releases and release from maintenance branches, refer to the semantic-release GitHub Action documentation.