{"id":17062339,"url":"https://github.com/devpaul/visual-regression","last_synced_at":"2026-05-04T04:35:39.656Z","repository":{"id":137917229,"uuid":"63295855","full_name":"devpaul/visual-regression","owner":"devpaul","description":"Visual Regression Testing with Intern","archived":false,"fork":false,"pushed_at":"2016-11-04T21:36:08.000Z","size":119,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-23T08:41:52.818Z","etag":null,"topics":["intern"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devpaul.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-07-14T02:38:17.000Z","updated_at":"2019-06-03T22:22:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"4e991e0c-a4be-4d1e-99ab-f7992d2e300b","html_url":"https://github.com/devpaul/visual-regression","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/devpaul/visual-regression","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devpaul%2Fvisual-regression","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devpaul%2Fvisual-regression/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devpaul%2Fvisual-regression/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devpaul%2Fvisual-regression/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devpaul","download_url":"https://codeload.github.com/devpaul/visual-regression/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devpaul%2Fvisual-regression/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32595199,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"online","status_checked_at":"2026-05-04T02:00:06.625Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["intern"],"created_at":"2024-10-14T10:49:44.978Z","updated_at":"2026-05-04T04:35:39.649Z","avatar_url":"https://github.com/devpaul.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Intern Visual Regression Testing\n\nThis project adds support for visual regression testing in [Intern](https://github.com/theintern/intern).\n\n## Overview\n\nA visual regression test compares a screenshot of a webpage with a previously generated baseline providing the ability\nto make automated comparisons against a known-good version to ensure nothing has changed.\n\nThese tests can help engineers\n\n* ensure a page is rendered identically on various browsers\n* identify when a css change has an undesired effect elsewhere\n* put a quick set of visual tests around legacy code to identify regressions \n\n## Installation\n\nThe `intern-visual` package should be installed as a peer of Intern\n\n```\n$ npm install intern intern-visual\n```\n\n## Quick Start\n\nOk! You want to see all the great things Visual Regression Testing can do and how to do it! See real test code by\nlooking in the `tests/visual` directory.\n\nTo run our visual regression tests\n\n1. clone this project\n1. install some tools `npm install -g grunt-cli typings`\n1. `npm install`\n1. start selenium\n1. `grunt test`\n\n## APIs and Architecture\n\nThis Intern plugin can be broken down into three main pieces of functionality. The assertion layer is made up of\n`assert` and `test`; they provide a programmatic and configuration based approach, respectively. The comparison layer\nis used by the assertion layer to identify differences between the baseline and snapshot images. And the reporting\nlayer is used by Intern to generate HTML reports.\n\n### assert\n\n`assert` is a module that allows you to compare two sets of images (a baseline and snapshot). It is also responsible\nfor generating baselines as necessary for future test runs. The method is called during functional testing like this:\n\n```typescript\nimport assertVisuals from 'visual/assert';\n\nregisterSuite({\n    test() {\n        this.remote()\n            .get('https://sitepen.com')\n            .setWindowSize(1024, 768)  // set the window size\n            .takeScreenshot()\n            .then(assertVisuals(this, {\n                missingBaseline: 'snapshot'\n            }));\n    }\n})\n```\n\nThere are a number of options that can be passed to `assert` or set globally. The complete list of options can be \nseen in the module.\n\n*baseline*: explicitly point to a baseline png to use. When this is not defined the test name is used to generate\n a path to a baseline\n \n*regenerateBaselines*: when set to true, a new baseline will be automatically generated\n\n\n### test\n\n`test` provides a wrapper around the `assert` module that will create a visual regression test from configuration.\n\n```typescript\nimport visualTest from 'visual/test';\n\nregisterSuite({\n\ttest: visualTest({\n\t\turl: 'https://sitepen.com',\n\t\twidth: 1024,\n\t\theight: 768,\n\t\tmissingBaseline: 'snapshot',\n\t});\n});\n```\n\n### reporters/VisualRegression\n\nThe `VisualRegression` reporter is responsible for creating a HTML report that reports (only) on the visual\nregression tests. It can be used in combination with other Intern reporters.\n\n```typescript\nexport reporters = [\n    'Runner',\n    { id: 'visual/reporters/VisualRegression', baselineLocation: './baselines', reportLocation: './reports' }\n]\n```\n\n## Contributing\n\nWe would love to hear your feedback and welcome PRs. Please take a look at \n [Intern's Contribution Guidelines](https://github.com/theintern/intern/blob/master/CONTRIBUTING.md) for some info\n and tips. Thanks!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevpaul%2Fvisual-regression","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevpaul%2Fvisual-regression","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevpaul%2Fvisual-regression/lists"}