{"id":20560133,"url":"https://github.com/rpii/wdio-html-reporter","last_synced_at":"2025-05-09T17:33:02.971Z","repository":{"id":191967481,"uuid":"685295844","full_name":"rpii/wdio-html-reporter","owner":"rpii","description":"Fork for cleanup of wdio-html-format-reporter","archived":false,"fork":true,"pushed_at":"2024-10-29T23:10:39.000Z","size":9409,"stargazers_count":1,"open_issues_count":1,"forks_count":8,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-05-04T21:51:50.646Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"webdriverio-community/wdio-html-reporter","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rpii.png","metadata":{"files":{"readme":"README.md","changelog":"changes.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-08-30T23:30:19.000Z","updated_at":"2024-12-09T19:53:13.000Z","dependencies_parsed_at":"2023-09-01T20:22:44.011Z","dependency_job_id":null,"html_url":"https://github.com/rpii/wdio-html-reporter","commit_stats":{"total_commits":239,"total_committers":15,"mean_commits":"15.933333333333334","dds":0.598326359832636,"last_synced_commit":"12605101027cc50b451e54767f47a665c2f5e0ac"},"previous_names":["rpii/wdio-html-reporter"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rpii%2Fwdio-html-reporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rpii%2Fwdio-html-reporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rpii%2Fwdio-html-reporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rpii%2Fwdio-html-reporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rpii","download_url":"https://codeload.github.com/rpii/wdio-html-reporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253295803,"owners_count":21885697,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-16T03:53:14.070Z","updated_at":"2025-05-09T17:33:02.549Z","avatar_url":"https://github.com/rpii.png","language":"TypeScript","funding_links":[],"categories":["Plugins"],"sub_categories":["Reporters"],"readme":" # wdio-html-nice-reporter\n\nA reporter for webdriver.io which generates a nice HTML report.  \nThe name is silly but provides integration with webdriverio\n\n### New:  no longer beta.\n\n### New:  cleaned up and switched logging to wdio-logging. Samples are updated.\n    You need to remove the log4Js logger initialization from your config\n\n### New:  rewritten as an ES module for webdriverio 8 compatibility.\n    You may need changes in your test app\n\n### Bug fix:  webdriverio was shutting down in the middle of json async write.\n\n### Bug fix:  json write was not awaited for correctly\n\n### Great new improvement:  no more out of memory errors due to json.stringify\n\n### Great new feature:  take videos of each test\n\n\n## [Changelog](https://github.com/rpii/wdio-html-reporter/blob/master/changes.md)\n\n## Information\n\nThis project is a rewrite of [@rpii/wdio-html-reporter](https://www.npmjs.com/package/wdio-html-reporter)\nIt is written in typescript with many enhancements.\n\n\n\n## Configuration\n\n### WDIO.config.ts\n\nThe following code shows the default wdio test runner configuration. Just add an HtmlReporter object as another reporter to the reporters array:\n\n### A functioning wdio.config.ts is provided in the [/samples/wdio.config.ts](/samples/wdio.config.ts)\n\nbelow are snippets from that file.\n\n```typescript\n\n// wdio.config.ts\nimport {ReportGenerator, HtmlReporter} from 'wdio-html-nice-reporter';\nlet reportAggregator: ReportGenerator;\n\nconst BaseConfig: WebdriverIO.Config = {\n    \n  reporters: ['spec',\n        [\"html-nice\", {\n            outputDir: './reports/html-reports/',\n            filename: 'report.html',\n            reportTitle: 'Test Report Title',\n            linkScreenshots: true,\n            //to show the report in a browser when done\n            showInBrowser: true,\n            collapseTests: false,\n            //to turn on screenshots after every test\n            useOnAfterCommandForScreenshot: false\n        }\n        ]\n    ]\n    \n \n};\n```\n## Configuration Options:\n  \n### To generate a master report for all suites\n\nwebdriver.io will call the reporter for each test suite.  It does not aggregate the reports.  To do this, add the following event handlers to your wdio.config.js\n\nAdd to browser config file:\n```\nlet reportAggregator : ReportAggregator;\n```\nAdd to browser config object:\n```javascript\n    onPrepare: function(config, capabilities) {\n\n    reportAggregator = new ReportGenerator({\n        outputDir: './reports/html-reports/',\n        filename: 'master-report.html',\n        reportTitle: 'Master Report',\n        browserName: capabilities.browserName,\n        collapseTests: true\n    });\n    reportAggregator.clean();\n}\n\n\nonComplete: function (exitCode, config, capabilities, results) {\n    (async () =\u003e {\n        await reportAggregator.createReport();\n    })();\n}\n\n\n``` \n\n\n  \n### To generate a pdf file from this report\n\nRequires an additional plugin to keep the support lightweight for those that dont want it.\nsee [@rpii/wdio-html-reporter-pdf](https://www.npmjs.com/package/@rpii/wdio-html-reporter-pdf)\n\n\n## Sample Output:\n\n![Report Screenshot](TestReport.png)\n\n## browserName\n\nThis must be set manually.  Its not available at config time since the browser object doesnt exist until you start a session.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frpii%2Fwdio-html-reporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frpii%2Fwdio-html-reporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frpii%2Fwdio-html-reporter/lists"}