{"id":18955008,"url":"https://github.com/alaca/vrt","last_synced_at":"2025-06-29T08:34:28.568Z","repository":{"id":57791349,"uuid":"527521943","full_name":"alaca/vrt","owner":"alaca","description":"Visual Regression Testing Tool","archived":false,"fork":false,"pushed_at":"2022-08-23T11:47:23.000Z","size":39,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-14T22:04:51.948Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alaca.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-22T10:49:24.000Z","updated_at":"2023-08-23T18:28:43.000Z","dependencies_parsed_at":"2022-08-30T16:30:39.894Z","dependency_job_id":null,"html_url":"https://github.com/alaca/vrt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alaca%2Fvrt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alaca%2Fvrt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alaca%2Fvrt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alaca%2Fvrt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alaca","download_url":"https://codeload.github.com/alaca/vrt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239907236,"owners_count":19716583,"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-08T13:46:57.253Z","updated_at":"2025-02-21T04:14:39.223Z","avatar_url":"https://github.com/alaca.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Visual Regression Testing Tool\n\n## Install\n\n```npm i vrt-tool```\n\n## Setup VRT\n\nAdd VRT scripts to your project `package.json` file\n\n```json\n{\n  \"scripts\": {\n    \"vrt-init\": \"vrt-tool init\",\n    \"vrt-setup\": \"vrt-tool setup\",\n    \"vrt-test\": \"vrt-tool test\",\n    \"vrt-reports\": \"vrt-tool reports\"\n  }\n}\n```\n\nThen run\n\n```npm run vrt-init```\n\nThis will create `vrt.config.js` file and `.vrt` directory in your project root.\n\nOpen the `vrt.config.js` file and add testing scenarios.\n\nExample:\n\n```javascript\nmodule.exports = {\n    scenarios: [\n        {\n            name: 'Homepage',\n            sourceUrl: 'http://localhost:10008/home',\n            testUrl: 'http://localhost:10008/home',\n            onPage: async page =\u003e {\n                await page.waitForTimeout(3000);\n            },\n        },\n    ],\n};\n```\n\n`onPage` callback will receive the `page` argument which is the\nPuppeteer's [Page class](https://pptr.dev/api/puppeteer.page) instance.\n\n## Running tests\n\n- Run ```npm run vrt-setup```\n \n  _This command will take a screenshot of `sourceUrl` for each defined scenario._\n\n- Make changes to `sourceUrl` page (edit html, etc. )\n\n- Run ```npm run vrt-test```\n\n  _This will take a screenshot of `testUrl` and compare it with `sourceUrl` screenshot._ \n\nIf `sourceUrl` and `testUrl` screenshots don't match, a report will be generated. \n\n\n## Reports\n\nReport will be generated each time when `sourceUrl` and `testUrl` screenshots don't match.\n\nYou can list all reports by running `npm run vrt-reports`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falaca%2Fvrt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falaca%2Fvrt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falaca%2Fvrt/lists"}