{"id":13482635,"url":"https://github.com/gemini-testing/gemini","last_synced_at":"2025-12-17T10:09:03.771Z","repository":{"id":14031940,"uuid":"16734168","full_name":"gemini-testing/gemini","owner":"gemini-testing","description":"💀💀💀[DEPRECATED] Use hermione","archived":true,"fork":false,"pushed_at":"2021-05-20T15:49:32.000Z","size":3783,"stargazers_count":1501,"open_issues_count":127,"forks_count":150,"subscribers_count":43,"default_branch":"master","last_synced_at":"2024-04-14T22:14:34.656Z","etag":null,"topics":["gemini","selenium","testing","testing-tools","visual-regression","yandex"],"latest_commit_sha":null,"homepage":"https://github.com/gemini-testing/hermione","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gemini-testing.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-02-11T14:58:41.000Z","updated_at":"2024-04-13T12:39:41.000Z","dependencies_parsed_at":"2022-08-04T01:15:23.198Z","dependency_job_id":null,"html_url":"https://github.com/gemini-testing/gemini","commit_stats":null,"previous_names":[],"tags_count":192,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gemini-testing%2Fgemini","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gemini-testing%2Fgemini/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gemini-testing%2Fgemini/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gemini-testing%2Fgemini/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gemini-testing","download_url":"https://codeload.github.com/gemini-testing/gemini/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234916110,"owners_count":18906642,"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":["gemini","selenium","testing","testing-tools","visual-regression","yandex"],"created_at":"2024-07-31T17:01:03.936Z","updated_at":"2025-10-02T14:32:06.201Z","avatar_url":"https://github.com/gemini-testing.png","language":"JavaScript","readme":"# Gemini\n\n[![npm](https://img.shields.io/npm/v/gemini.svg?maxAge=2592000)](https://www.npmjs.com/package/gemini)\n[![Build Status](https://travis-ci.org/gemini-testing/gemini.svg?branch=master)](https://travis-ci.org/gemini-testing/gemini)\n[![Coverage Status](https://img.shields.io/coveralls/gemini-testing/gemini.svg)](https://coveralls.io/r/gemini-testing/gemini)\n[![Join the chat at https://gitter.im/gemini-testing/gemini](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/gemini-testing/gemini?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n[![Stories on waffle.io](https://img.shields.io/badge/waffle-dashboard-green.svg)](http://waffle.io/gemini-testing/gemini)\n\n[Gemini](https://github.com/gemini-testing/gemini) is a utility for regression\ntesting the visual appearance of web pages.\n\nGemini allows you to:\n\n* Work with different browsers:\n\n  - Google Chrome (tested in latest version)\n  - Mozilla Firefox (tested in latest version)\n  - IE8+\n  - Opera 12+\n\n* Test separate sections of a web page\n\n* Include the `box-shadow` and `outline` properties when calculating element position and size\n\n* Ignore some special case differences between images (rendering artifacts, text caret,\n  etc.)\n\n* Gather CSS test coverage statistics\n\n**Gemini** was created at [Yandex](http://www.yandex.com/) and is especially\nuseful to UI library developers.\n\n## Quick start\n\n### Installing\n\n```\nnpm install -g gemini\nnpm install -g selenium-standalone\nselenium-standalone install\n```\n\n### Configuring\n\nPut the `.gemini.js` file in the root of your project:\n\n```javascript\nmodule.exports = {\n    rootUrl: 'http://yandex.ru',\n    gridUrl: 'http://127.0.0.1:4444/wd/hub',\n\n    browsers: {\n        chrome: {\n            desiredCapabilities: {\n                browserName: 'chrome'\n            }\n        }\n    }\n};\n```\n\n### Writing tests\n\nWrite a test and put it in the `gemini` folder in the root of your project:\n\n```javascript\ngemini.suite('yandex-search', (suite) =\u003e {\n    suite.setUrl('/')\n        .setCaptureElements('.home-logo')\n        .capture('plain');\n});\n```\n\n### Saving reference images\n\nYou have written a new test and should save a reference image for it:\n```\ngemini update\n```\n\n### Running tests\n\nStart `selenium-standalone` in a separate tab before running the tests:\n```\nselenium-standalone start\n```\n\nRun gemini tests:\n```\ngemini test\n```\n\n## Dependencies\n\nRequired software:\n\n1. WebDriver server implementation. There are several options:\n\n   - [Selenium Server](http://docs.seleniumhq.org/download/) — for testing in\n     different browsers. Launch with the `selenium-standalone start` command (if you will get error like \"No Java runtime present, requesting install.\" you should install [Java Development Kit (JDK)](https://www.oracle.com/technetwork/java/javase/downloads/index.html) for your OS.).\n\n   - [ChromeDriver](https://sites.google.com/a/chromium.org/chromedriver/) — for\n     testing in Google Chrome. Launch with the `chromedriver --port=4444 --url-base=wd/hub` command.\n\n   - [PhantomJS](http://phantomjs.org/) — launch with the `phantomjs\n     --webdriver=4444` command.\n\n   - Cloud WebDriver services, such as\n     [SauceLabs](http://saucelabs.com/) or\n     [BrowserStack](http://www.browserstack.com/)\n\n2. Compiler with support for C++11 (`GCC@4.6` or higher). This is a\n   [png-img](https://github.com/gemini-testing/png-img) requirement.\n   Compiling on Windows machines requires the [node-gyp prerequisites](https://github.com/nodejs/node-gyp#on-windows).\n\n## Installing\n\nTo install the utility, use the [npm](https://www.npmjs.org/) `install` command:\n\n```sh\nnpm install -g gemini\n```\nGlobal installation is used for launching commands.\n\n## Configuring\n\n**Gemini** is configured using a config file at the root of the project.\nGemini can use one of the following files:\n* `.gemini.conf.js`\n* `.gemini.conf.json`\n* `.gemini.conf.yml`\n* `.gemini.js`\n* `.gemini.json`\n* `.gemini.yml`\n\nLet's say we want to run our tests only in the locally installed `PhantomJS`.\n\nIn this case, the minimal configuration file will only need to have the root URL\nof your web app and the WebDriver capabilities of `PhantomJS`:\nFor example,\n\n```yaml\nrootUrl: http://yandex.com\nbrowsers:\n  PhantomJS:\n    desiredCapabilities:\n      browserName: phantomjs\n```\n\nAlso, you need to run `PhantomJS` manually in `WebDriver` mode:\n\n```\nphantomjs --webdriver=4444\n```\n\n\nIf you are using a remote WebDriver server, you can specify its URL with the\n`gridUrl` option:\n\n```yaml\nrootUrl: http://yandex.com\ngridUrl: http://selenium.example.com:4444/wd/hub\n\nbrowsers:\n  chrome:\n    desiredCapabilities:\n      browserName: chrome\n      version: \"45.0\"\n\n  firefox:\n    desiredCapabilities:\n      browserName: firefox\n      version: \"39.0\"\n\n```\n\nYou can also set up each browser to have its own node:\n\n```yaml\nrootUrl: http://yandex.com\n\nbrowsers:\n  chrome:\n    gridUrl: http://chrome-node.example.com:4444/wd/hub\n    desiredCapabilities:\n      browserName: chrome\n      version: \"45.0\"\n\n  firefox:\n    gridUrl: http://firefox-node.example.com:4444/wd/hub\n    desiredCapabilities:\n      browserName: firefox\n      version: \"39.0\"\n\n```\n\n### Other configuration options\n\n[See the details](doc/config.md) of the config file structure and available\noptions.\n\n## Writing tests\n\nEach of the blocks that are being tested may be in one of the determined states.\nStates are tested with the help of chains of step-by-step actions declared in a block's\ntest suites.\n\nFor example, let's write a test for a search block at\n[yandex.com](http://www.yandex.com):\n\n```javascript\ngemini.suite('yandex-search', function(suite) {\n    suite.setUrl('/')\n        .setCaptureElements('.search2__input')\n        .capture('plain')\n        .capture('with text', function(actions, find) {\n            actions.sendKeys(find('.search2__input .input__control'), 'hello gemini');\n        });\n});\n```\n\nWe are creating a new test suite `yandex-search`, assuming that we will capture the\n`.search2__input` element from the root URL `http://yandex.com`. We know that the\nblock has two states:\n\n* `plain` — right after the page is loaded\n* `with text` — with the `hello gemini` text inserted into `.search2__input .input__control`\n\nStates are executed one after another in the order in which they are defined, without the browser\nreloading in between.\n\n[See the details](doc/tests.md) of test creation methods.\n\n## Using CLI\n\nTo complete the test creation procedure, you need to take reference shots using\nthe following command:\n\n```\ngemini update [paths to test suites]\n```\n\nTo launch a test (to compare the current state of a block with a reference shot), use\nthe command:\n\n```\ngemini test [paths to test suites]\n```\n\n[See the details](doc/commands.md) of interaction with CLI and available\noptions.\n\n## GUI\n\nYou can use the `Gemini` graphical user interface instead of the command line. It\nis located in the [gemini-gui](https://github.com/gemini-testing/gemini-gui) package\nand must be installed additionally:\n\n```\nnpm install -g gemini-gui\n```\n\nGUI advantages:\n\n* Handy preview of reference shots\n\n* Clear real-time demonstration of the differences between a reference shot and\n  the current state of a block\n\n* Easy to update reference shots\n\n## Plugins\n\nGemini can be extended with plugins. You can choose from the [existing\nplugins](https://www.npmjs.com/browse/keyword/gemini-plugin) or [write your\nown](doc/plugins.md). To use a plugin, install and enable it in your\n`.gemini.yml`:\n\n```yaml\nsystem:\n  plugins:\n    some-awesome-plugin:\n      plugin-option: value\n```\n\n## HTML report\n\nTo see the difference between the current state of a block and a reference picture\nmore clearly, use the [HTML reporter](https://github.com/gemini-testing/html-reporter) - plugin for gemini. This\nplugin produces HTML report, which displays reference image, current image and\ndifferences between them, for each state in each browser. When all tests are\ncompleted, you will see a link to HTML report.\n\n## Programmatic API\n\nTo use Gemini in your scripts or build tools, you can use the experimental\n[programmatic API](doc/programmatic-api.md).\n\n## Events\n\nTo learn more about all events in Gemini, see the [events documentation](doc/events.md).\n","funding_links":[],"categories":["JavaScript","Deprecated  (a-z↓)","Tools and frameworks"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgemini-testing%2Fgemini","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgemini-testing%2Fgemini","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgemini-testing%2Fgemini/lists"}