{"id":15061208,"url":"https://github.com/ewert-online/osnap","last_synced_at":"2025-04-12T17:45:43.915Z","repository":{"id":42719571,"uuid":"343191342","full_name":"eWert-Online/OSnap","owner":"eWert-Online","description":"OSnap is a snapshot testing tool, which mainly focuses on speed and ease of use.","archived":false,"fork":false,"pushed_at":"2025-03-13T20:34:50.000Z","size":44747,"stargazers_count":160,"open_issues_count":3,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-04T00:02:01.016Z","etag":null,"topics":["diff","image-comparison","image-snapshots","snapshot","snapshot-testing","testing","visual-comparison-testing","visual-regression-testing"],"latest_commit_sha":null,"homepage":"https://osnap.devtools.foo","language":"OCaml","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/eWert-Online.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-28T19:11:27.000Z","updated_at":"2025-03-13T20:25:32.000Z","dependencies_parsed_at":"2024-07-13T19:01:38.815Z","dependency_job_id":"176165d5-c5d5-48bc-b8b2-607cf7ee7938","html_url":"https://github.com/eWert-Online/OSnap","commit_stats":{"total_commits":318,"total_committers":4,"mean_commits":79.5,"dds":"0.14150943396226412","last_synced_commit":"d6d284d016d8cd291c2f7c734554329dd9c79ad3"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eWert-Online%2FOSnap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eWert-Online%2FOSnap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eWert-Online%2FOSnap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eWert-Online%2FOSnap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eWert-Online","download_url":"https://codeload.github.com/eWert-Online/OSnap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248609558,"owners_count":21132916,"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":["diff","image-comparison","image-snapshots","snapshot","snapshot-testing","testing","visual-comparison-testing","visual-regression-testing"],"created_at":"2024-09-24T23:11:43.047Z","updated_at":"2025-04-12T17:45:43.893Z","avatar_url":"https://github.com/eWert-Online.png","language":"OCaml","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg width=\"600\" src=\"https://github.com/eWert-Online/OSnap/blob/master/docs/logo.png\"/\u003e\n\u003c/div\u003e\n\n\u003ch3 align=\"center\"\u003e The speedy and easy to use Snapshot Testing tool for your project! \u003c/h3\u003e\n\u003cp align=\"center\"\u003e\n  A Project with around 1200 snapshots will run in under 3 minutes*, \u003cbr /\u003e\n  compared to around 18 minutes it takes other popular snapshot tools to run the same test suite.\n\u003c/p\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ci align=\"center\"\u003e* with 20 parallel runners on a 2017 15-inch MacBook Pro.\u003c/i\u003e\n\u003c/div\u003e\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://github.com/eWert-Online/OSnap/blob/master/docs/built-with-love.svg\" alt=\"\u003c3\"\u003e\n    \u003cimg src=\"https://github.com/eWert-Online/OSnap/blob/master/docs/made-with-ocaml.svg\" alt=\"made with ocaml\"\u003e\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\u003cbr /\u003e\n\n# Table of contents\n\n- [How do I install it?](#how-do-i-install-it)\n- [How do I use it?](#how-do-i-use-it)\n- [Credits](#credits)\n- [Contributing](#contributing)\n\n\u003cbr /\u003e\n\n# How do I install it?\n\n## Docker (recommended)\n\nUse one of the official Docker images at https://hub.docker.com/u/osnap.\n\n\u003cbr /\u003e\n\n**NOTICE:** \u003cbr /\u003e\nWe do recommend using a Docker Container to run the tests, because snapshot tests are by nature pretty susceptible to the smallest changes in rendering. \u003cbr /\u003e\nThe biggest problem is, that Browsers render (mainly fonts and images) differently on different devices and operating systems. For the human eye, this is mostly not noticeable, but for an diffing algorithm, these changes are noticeable and will fail the test. \u003cbr /\u003e\nSo it is important to always run the tests in the same environment.\n\n\u003cbr /\u003e\n\u003cbr /\u003e\n\n## npm / yarn\n\nOSnap may be installed with yarn or npm using one of the following commands:\n\n```bash\nyarn add @space-labs/osnap --dev\n```\n\nor\n\n```bash\nnpm install @space-labs/osnap --save-dev\n```\n\n\u003cbr /\u003e\n\n# How do I use it?\n\nBefore you can run your first test suite, OSnap needs to be configured. To do this, you need at least two files. The global config file and one test file.\n\nAfter you have created them you have to run `yarn osnap`, `npx osnap` or create a npm script running `osnap` with the optional [cli flags](https://osnap.devtools.foo/cli) available.\n\nIn in-depth documentation with configuration options and examples can be found at:\n\n### **https://osnap.devtools.foo**\n\n\u003cbr /\u003e\n\n# Credits\n\n**[ODiff](https://github.com/dmtrKovalenko/odiff):**\nODiff inspired the name of this library and is used as the underlying diffing algorithm.\nThank you for your work [@dmtrKovalenko](https://github.com/dmtrKovalenko)!\n\n\u003cbr /\u003e\n\n# Contributing\n\nContributions are always welcome. Here's how to set up the project locally.\n\n**Install opam**\n\nhttps://opam.ocaml.org/doc/Install.html\n\n**Install dependencies**\n```sh\nmake install\n```\n\n**Build the project**\n```sh\nmake\n```\n\n# Some things we may want to add:\n\nIn decending order of priority (top ones are more important):\n\n- [ ] **A built in static webserver**:\n      The speed of the server used to serve the website being tested influences the speed of OSnap a lot. So we want to control that a bit more and provide a built in static web server. \u003cbr /\u003e\n      This also makes it easier to run tests, as you don't have to explicitly wait for the server to be up and running before running osnap.\n      \u003cbr /\u003e\u003cbr /\u003e\n- [ ] **Listen for network requests**:\n      Wait for specific network requests to finish, before taking the screenshot. For example: Wait for a failed login attempt to come back, to screenshot the error state\n      \u003cbr /\u003e\u003cbr /\u003e\n- [ ] **Wait for dom events**:\n      Maybe we can find a way, to wait for specific events to be triggered on the page. For example: Wait for all animations on the page to complete before taking the screenshot.\n\n\u003cbr /\u003e\n\n### If you find a bug or think some feature is missing, feel free to submit an issue :)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fewert-online%2Fosnap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fewert-online%2Fosnap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fewert-online%2Fosnap/lists"}