{"id":19432759,"url":"https://github.com/brightspace/test-reporting-node","last_synced_at":"2026-01-25T17:33:41.320Z","repository":{"id":213134343,"uuid":"731639746","full_name":"Brightspace/test-reporting-node","owner":"Brightspace","description":"Node helper package for the test reporting framework","archived":false,"fork":false,"pushed_at":"2026-01-22T09:15:26.000Z","size":2561,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":23,"default_branch":"main","last_synced_at":"2026-01-22T23:55:33.610Z","etag":null,"topics":["quality-enablement","test-reporting","testing"],"latest_commit_sha":null,"homepage":"https://npmjs.com/d2l-test-reporting","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Brightspace.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-12-14T14:32:34.000Z","updated_at":"2026-01-22T09:15:30.000Z","dependencies_parsed_at":"2023-12-18T18:29:28.162Z","dependency_job_id":"6d59ee90-ac5b-4893-87e3-1e4d7b74d3da","html_url":"https://github.com/Brightspace/test-reporting-node","commit_stats":null,"previous_names":["brightspace/test-reporting-node"],"tags_count":103,"template":false,"template_full_name":null,"purl":"pkg:github/Brightspace/test-reporting-node","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brightspace%2Ftest-reporting-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brightspace%2Ftest-reporting-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brightspace%2Ftest-reporting-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brightspace%2Ftest-reporting-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Brightspace","download_url":"https://codeload.github.com/Brightspace/test-reporting-node/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brightspace%2Ftest-reporting-node/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28755947,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T16:32:25.380Z","status":"ssl_error","status_checked_at":"2026-01-25T16:32:09.189Z","response_time":113,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["quality-enablement","test-reporting","testing"],"created_at":"2024-11-10T14:37:01.074Z","updated_at":"2026-01-25T17:33:41.308Z","avatar_url":"https://github.com/Brightspace.png","language":"JavaScript","readme":"# d2l-test-reporting\n\n[![License][License Badge]][License File]\n[![Version][Version Badge]][Version Package]\n[![Release][Release Badge]][Release Workflow]\n[![Node Version][Node Version Badge]][Node Version Rules]\n\nHelper package for generating reports for use with the **D2L test reporting\nframework**. This package is meant to be used in conjunction with this [GitHub\nAction].\n\n\u003e [!NOTE]\n\u003e If you have any questions, concerns or just want to chat feel free to reach\n\u003e out in [#test-reporting] (D2L employee accessible only).\n\n## Installation\n\n```console\nnpm install d2l-test-reporting\n```\n\n## Usage\n\nThis library provides reporters for many of the test execution frameworks we use\nat D2L. In order to use the accompanying [GitHub Action] to upload reports to\nthe back-end you must use of one of the reporters provided below or have a\ncustom implementation that outputs a JSON file in the format outlined in [Report\nFormat].\n\n### Reporters\n\n#### [Mocha]\n\nPlease consult the [official documentation for Mocha] to see how to use\nreporters. Below is an example of how to add the reporter provided by this\npackage. It assumes you are using the default `.mocharc.js` file for\nconfiguration.\n\n```js\nmodule.exports = {\n  spec: 'test/*.test.js',\n  reporter: 'd2l-test-reporting/reporters/mocha.js',\n  reporterOptions: [\n    'reportPath=./d2l-test-report.json', // optional\n    'reportConfigurationPath=./d2l-test-reporting.config.json' // optional\n  ]\n};\n```\n\n##### Inputs\n\n* `reportPath`: path to output the report to, relative to current working\n  directory. Not required. Defaults to `./d2l-test-report.json`.\n* `reportConfigurationPath`: path to the D2L test reporting configuration file\n  for mapping test type, experience and tool to test code. Not required.\n  Defaults to `./d2l-test-reporting.config.json`.\n\n#### [Playwright]\n\nPlease consult the [official documentation for Playwright] to see how to use\nreporters. Below is an example of how to add the reporter provided by this\npackage. It assumes you are using the default `playwright.config.js` file for\nconfiguration.\n\n```js\nimport { defineConfig, devices } from '@playwright/test';\n\nexport default defineConfig({\n  reporter: [\n    [\n      'd2l-test-reporting/reporters/playwright.js',\n      {\n        reportPath: './d2l-test-report.json', // optional\n        reportConfigurationPath: './d2l-test-reporting.config.json' // optional\n      }\n    ],\n    ['list']\n  ],\n  testDir: '../',\n  testMatch: '*.test.js',\n  projects: [{\n    name: 'firefox',\n    use: devices['Desktop Firefox'],\n    testMatch: 'firefox/*.test.js'\n  }]\n});\n```\n\n\u003e [!WARNING]\n\u003e Currently the [`merge-reports`] command is not fully supported due to a lack\n\u003e of browser/launcher information preservation with the `blob` reporter. If you\n\u003e are using a GitHub matrix run this may result in partial data showing in the\n\u003e reporting dashboard as it becomes available.\n\n##### Inputs\n\n* `reportPath`: path to output the report to, relative to current working\n  directory. Not required. Defaults to `./d2l-test-report.json`.\n* `reportConfigurationPath`: path to the D2L test reporting configuration file\n  for mapping test type, experience and tool to test code. Not required.\n  Defaults to `./d2l-test-reporting.config.json`.\n\n#### [`@web/test-runner`]\n\nPlease consult the [official documentation for `@web/test-runner`] to see how to\nuse reporters. Below is an example of how to add the reporter provided by this\npackage. It assumes you are using the default `web-test-runner.config.js` file\nfor configuration.\n\n```js\nimport { defaultReporter } from '@web/test-runner';\nimport { reporter } from 'd2l-test-reporting/reporters/web-test-runner.js';\n\nexport default {\n  reporters: [\n    defaultReporter(),\n    reporter({\n      reportPath: './d2l-test-report.json', // optional\n      reportConfigurationPath: './d2l-test-reporting.config.json' // optional\n    })\n  ],\n  files: 'test/component-*.test.js',\n  groups: [{\n    name: 'group',\n    files: 'test/group/component-*.test.js'\n  }]\n};\n```\n\n##### Inputs\n\n* `reportPath`: path to output the report to, relative to current working\n  directory. Not required. Defaults to `./d2l-test-report.json`.\n* `reportConfigurationPath`: path to the D2L test reporting configuration file\n  for mapping test type, experience and tool to test code. Not required.\n  Defaults to `./d2l-test-reporting.config.json`.\n\n#### [WebdriverIO]\n\nPlease consult the [official documentation for WebdriverIO] to see how to use\nreporters. Below is an example of how to add the reporter provided by this\npackage. It assumes you are using the default `wdio.conf.js` file for\nconfiguration.\n\n```js\nexports.config = {\n  specs: [\n    join(__dirname, '../tests/webdriverio/reporter-1.test.js'),\n    join(__dirname, '../tests/webdriverio/reporter-2.test.js'),\n    join(__dirname, '../tests/webdriverio/reporter-3.test.js')\n  ],\n  maxInstances: 2,\n  capabilities: [{\n    browserName: 'chrome',\n    'goog:chromeOptions': {\n      args: ['--headless', '--disable-gpu', '--no-sandbox', '--disable-dev-shm-usage']\n    }\n  }],\n  logLevel: 'error',\n  bail: 0,\n  waitforTimeout: 10000,\n  connectionRetryTimeout: 120000,\n  connectionRetryCount: 3,\n  framework: 'mocha',\n  reporters: [\n    'spec',\n    [join(__dirname, '../../../../src/reporters/webdriverio.cjs'), {\n      reportPath: './d2l-test-report-webdriverio.json',\n      reportConfigurationPath: './d2l-test-reporting.config.json',\n      verbose: true\n    }]\n  ],\n  mochaOpts: {\n    ui: 'bdd',\n    timeout: 60000,\n    retries: 3\n  },\n  onComplete() {\n    // Merge all worker reports into a single final report\n    mergeReports(\n      './d2l-test-report-webdriverio-*.json',\n      './d2l-test-report-webdriverio.json'\n    );\n  }\n};\n```\n\n##### Inputs\n\n* `reportPath`: path to output the report to, relative to current working\n  directory. Not required. Defaults to `./d2l-test-report.json`.\n* `reportConfigurationPath`: path to the D2L test reporting configuration file\n  for mapping test type, experience and tool to test code. Not required.\n  Defaults to `./d2l-test-reporting.config.json`.\n* `verbose`: enable verbose logging for debugging purposes. Not required.\n  Defaults to `false`.\n\n#### Custom Reporters\n\nIf your test framework isn't supported by the built-in reporters, you can build your own using the `ReportBuilder` class.\n\nSee the [ReportBuilder Guide](./docs/report-builder-guide.md) for a complete walkthrough of creating a custom reporter for any test framework.\n\n### Configuration\n\nTo have the test type, experience and tool mapped to test code, a D2L test\nreporting configuration file is required when using one of the reporters\nprovided in this package.\n\nBelow are examples of how to create the config file. Note that the `type` field\nwill end up as lowercase in the report.\n\nPlease see [Automated Testing Definitions] on Confluence for the list of test\ntypes that should be used when creating the D2L test reporting configuration\nfile.\n\n```json\n{\n  \"type\": \"UI Visual Diff\",\n  \"experience\": \"Experience\",\n  \"tool\": \"Tool\",\n}\n```\n\n```json\n{\n  \"type\": \"UI E2E\",\n  \"overrides\": [\n    {\n      \"pattern\": \"tests/account-settings/**/*\",\n      \"experience\": \"Administration\",\n      \"tool\": \"Account Settings\"\n    },\n    {\n      \"pattern\": \"tests/announcements/**/*\",\n      \"experience\": \"Teaching \u0026 Learning\",\n      \"tool\": \"Announcements\"\n    },\n    {\n      \"pattern\": \"tests/rubrics.test.js\",\n      \"experience\": \"Assessment\",\n      \"tool\": \"Rubrics\"\n    }\n  ]\n}\n```\n\n## Report Format\n\nFor details on the schema that the various custom reporters output, see [Report\nFormat].\n\n\u003e [!NOTE]\n\u003e This specific JSON structure is required in order to upload reports to the\n\u003e back-end using the corresponding [GitHub Action].\n\n## Developing\n\nAfter cloning the repository, make sure to install dependencies.\n\n```console\nnpm ci\nnpx playwright install --with-deps\nnpx puppeteer browsers install chrome\n```\n\n### Linting\n\n```console\n# eslint and editorconfig-checker\nnpm run lint\n\n# eslint only\nnpm run lint:eslint\n\n# editorconfig-checker only\nnpm run lint:editorconfig\n```\n\n### Fixing\n\n```console\n# currently only eslint\nnpm run fix\n\n# eslint only\nnpm run fix:eslint\n```\n\n### Testing\n\n```console\n# lint, unit tests and integration tests\nnpm test\n\n# unit tests and integration tests only\nnpm run test:all\n\n# unit tests only\nnpm run test:unit\n\n# integration tests only\nnpm run test:integration\n```\n\n### Versioning and Releasing\n\nThis repo is configured to use `semantic-release`. Commits prefixed with `fix:`\nand `feat:` will trigger patch and minor releases when merged to `main`.\n\nTo learn how to create major releases and release from maintenance branches,\nrefer to the [semantic-release GitHub Action] documentation.\n\n\u003c!-- links --\u003e\n[License Badge]: https://img.shields.io/github/license/Brightspace/test-reporting-node?label=License\n[License File]: ./LICENSE\n[Version Badge]: https://img.shields.io/npm/v/d2l-test-reporting?label=Version\n[Version Package]: https://www.npmjs.com/d2l-test-reporting\n[Node Version Badge]: https://img.shields.io/node/v/d2l-test-reporting\n[Node Version Rules]: ./package.json#L38\n[Release Badge]: https://github.com/Brightspace/test-reporting-node/actions/workflows/release.yml/badge.svg\n[Release Workflow]: https://github.com/Brightspace/test-reporting-node/actions/workflows/release.yml\n[file an issue]: https://github.com/Brightspace/test-reporting-node/issues/new\n[official documentation for Mocha]: https://mochajs.org/api/mocha#reporter\n[official documentation for Playwright]: https://playwright.dev/docs/test-reporters\n[official documentation for `@web/test-runner`]: https://modern-web.dev/docs/test-runner/reporters/overview\n[official documentation for WebdriverIO]: https://webdriver.io/docs/reporter\n[Mocha]: https://mochajs.org\n[Playwright]: https://playwright.dev\n[`@web/test-runner`]: https://modern-web.dev/docs/test-runner/overview\n[WebdriverIO]: https://webdriver.io\n[`merge-reports`]: https://playwright.dev/docs/test-sharding#merge-reports-cli\n[GitHub Action]: https://github.com/Brightspace/test-reporting-action\n[Automated Testing Definitions]: https://desire2learn.atlassian.net/wiki/spaces/QE/pages/4354408450/Automated+Testing+Definitions\n[#test-reporting]: https://d2l.slack.com/archives/C05MMC7H7EK\n[semantic-release GitHub Action]: https://github.com/BrightspaceUI/actions/tree/main/semantic-release\n[Report Format]: ./docs/report-format.md\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrightspace%2Ftest-reporting-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrightspace%2Ftest-reporting-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrightspace%2Ftest-reporting-node/lists"}