Gemini is a utility for regression testing the visual appearance of web pages, primarily interacting via a command-line interface and configuration files. It captures screenshots across various browsers to detect visual deviations from reference images, making it particularly useful for UI library developers. The package helps identify subtle rendering artifacts, text caret differences, and provides CSS test coverage statistics. The current stable version is 7.5.2, released in July 2019. The project appears to have a sporadic release cadence, with major version updates becoming infrequent, and the last code activity observed in March 2021. Its differentiators include granular control over capture elements and built-in image comparison tolerance for minor, expected visual variations.
npm install geminiVerified import paths — ran on the pinned version, not inferred.
Demonstrates setting up Gemini with a configuration file, defining a test suite, capturing a specific UI element, and the basic CLI commands to run it.
Upgrade your Node.js environment to a version >= 8.0.0. It is recommended to use an actively maintained Node.js LTS version.
Replace all instances of `gemini gather` with `gemini update` to save or refresh reference images.
Plugins or custom reporters interacting with these events must update their logic to access `event.image.path` and `event.image.size` instead of directly using `event.image`.
Ensure your WebDriver server is running and accessible at the `gridUrl` specified in your `.gemini.js` configuration (default: `http://localhost:4444/wd/hub`) before executing `gemini test` or `gemini update`.
Evaluate against current project needs. Consider alternatives for newer web technologies or if active maintenance is critical. If used, thoroughly test compatibility with target browsers and frameworks.
Start your WebDriver server using `selenium-standalone start` or `chromedriver` before running Gemini tests. Verify the `gridUrl` in your `.gemini.js` is correct.
Manually inspect the images to understand the cause. If the change is intended, run `gemini update` to generate new reference images. If unintended, fix the layout issue in your application.
Execute `gemini update` to create initial reference images based on the current UI state. Ensure that the `screenshotsDir` in your config is writable.