Gemini is the utility for regression testing of web pages appearance.
Its key features are:
-
Compatibility with different browsers:
- Google Chrome (tested in latest version)
- Mozilla Firefox (tested in latest version)
- IE8+
- Opera 12+
-
Ability to test separate sections of a web page;
-
Position and size of an element are calculated including its
box-shadowandoutlineproperties; -
Some special case differences between images (rendering artifacts, text caret, etc.) are ignored;
-
CSS test coverage statistics.
Gemini is created at Yandex and will be especially useful to UI libraries developers.
Current document is a quick step-by-step guide that describes installation, configuration and usage of Gemini.
Required software:
-
WebDriver server implementation. There are few possible options:
-
Selenium Server β for testing in different browsers.
-
ChromeDriver - for testing in Google Chrome.
-
PhantomJS β launch with
phantomjs --webdriver=4444command. -
Cloud WebDriver services, such as SauceLabs or BrowserStack
-
-
Compiler with support of C++11 (
GCC@4.6or higher). This is a png-img requirement.
To install the utility use npm command install:
npm install -g geminiGlobal installation is used for commands launch.
To write the tests you will also need local installation of Gemini. Run the
following command in project directory:
npm install geminiGemini is configured using config file at the root of the project. Gemini can use one of the next files:
.gemini.conf.js.gemini.conf.json.gemini.conf.yml.gemini.js.gemini.json.gemini.yml
Lets say we want to run our tests only in locally installed PhantomJS.
In this case, the minimal configuration file will need to have only the root url
of your web app and WebDriver capabilities of PhantomJS:
For example,
rootUrl: http://yandex.com
browsers:
PhantomJS:
desiredCapabilities:
browserName: phantomjsAlso, you need to run PhantomJS manually in a WebDriver mode:
phantomjs --webdriver=4444
In case you are using remote WebDriver server, you can specify its URL with
gridUrl option:
rootUrl: http://yandex.com
gridUrl: http://selenium.example.com:4444/wd/hub
browsers:
chrome:
desiredCapabilities:
browserName: chrome
version: "45.0"
firefox:
desiredCapabilities:
browserName: firefox
version: "39.0"
You can also set up each browser to have its own node:
rootUrl: http://yandex.com
browsers:
chrome:
gridUrl: http://chrome-node.example.com:4444/wd/hub
desiredCapabilities:
browserName: chrome
version: "45.0"
firefox:
gridUrl: http://firefox-node.example.com:4444/wd/hub
desiredCapabilities:
browserName: firefox
version: "39.0"
See the details of a config file structure and available options.
< 8000 div class="markdown-heading" dir="auto">