Gemini is configured using .gemini.yml
file at the root of the project.
Example:
rootUrl: http://site.example.com
gridUrl: http://selenium-grid.example.com:4444/wd/hub
browsers:
phantomjs: phantomjs
chrome: chrome
opera12:
browserName: opera
version: '12.06'
firefox28:
browserName: firefox
version: '28.0'
firefox27:
browserName: firefox
version: '27.0'
Some of the options can also be overridden via command-line options or environment variables. Priorities are the following:
- command-line option has the highest priority. It overrides environment variable and config file value.
- environment variable has second priority. It overrides config file value.
- config file value has the lowest priority.
- if no command-line option, environment variable or config file option specified, default is used.
Config file options:
-
rootUrl
(CLI:--root-url
, env: 'GEMINI_ROOT_URL') – the root URL of your website. Target URLs of your test suites will be resolved relatively to it. -
gridUrl
(CLI:--grid-url
, env: 'GEMINI_GRID_URL') – Selenium Grid URL to use for taking screenshots. Required, if you want to run test in other browsers thenphantomjs
. -
browsers
– list of browsers to use for testing. Each browser should be available on Selenium Grid.browsers
field format:browsers: <browser-id>: browserName: <name> version: <version> # ... other browser capabilities as <key>: <value>
It is possible to use multiple versions of the same browser (if all versions are available on your Selenium Grid instance).
If version is omitted, any browsers of the specified name will be used.
<browser-id>: <name>
is a shortcut for<browser-id>: {browserName: <name>}
.<browser-id>
value is used for browser indentification in test reports and for constructing screens file names. -
projectRoot
– root directory of a project. All relative paths in config or options will be resolved relatively to it. By default it is the directory config file is placed in. -
screenshotsDir
(CLI:--screenshots-dir
, env:GEMINI_SCREENSHOTS_DIR
) – directory to save reference screenshots to. Specified relatively to config file directory.gemini/screens
by default. -
capabilities
– additional Selenium and Sauce Labs capabilities to use for all browsers:capabilities: option1: value, option2: value
It is possible to set any capability, except
browserName
andversion
(usebrowsers
option instead) andtakesScreenshot
(always set totrue
automatically).gemini supports custom capability option
--noCalibrate
. By default it's false and this enables browser calibration. It is required for such cases when web driver captures screenshots with some area outside of the browser view. Calibration makes browser to render a special page which allows to determine html body bounds and crop the screenshot accordingly. If needed you can disable calibration for particular browser by setting--noCalibrate
totrue
. -
debug
(CLI:--debug
, env:GEMINI_DEBUG
) – turn on debug logging to the terminal. -
parallelLimit
– by default,gemini
will run all browsers in parallel. Sometimes (i.e. when using cloud services, such as SauceLabs) you have a limit on a number of browser that can be run once at a time. Use this option to limit the number of browsers thatgemini
will try to run in parallel. -
strictComparison
– test will be considered as failed in case of any kind of error. By default, only noticeable differences are treated as test failure. -
tolerance
- indicates maximum allowed CIEDE2000 difference between colors. Used only in non-strict mode. By default its 2.3 which should be enough for the most cases. Increasing global default is not recommended, prefer changing tolerance for particular suites or states instead. -
diffColor
– specifies color which will be used to highlight differences between images. Specified in hexadecimal RGB (#RRGGBB
). Magenta by default (#FF00FF
). -
http.timeout
– Selenium Grid request timeout, msec. -
http.retries
– Selenium Grid request tries count. -
http.retryDelay
– delay before retry of Selenium Grid request, msec. -
coverage
(CLI:--coverage
, env:GEMINI_COVERAGE
) – set totrue
to enable experimental coverage reporting. Report will be saved togemini-coverage
directory. If CSS on a pages under tests has source map, original files will be shown in report. -
sourceRoot
(CLI:--source-root
, env:GEMINI_SOURCE_ROOT
) – directory which contains the source files. Local sources will be used in coverage report when source map is available, but sources can not be downladed from URL under tests. By default, it is equal toprojectRoot
. -
coverageExclude
– array of file paths or glob patterns to exclude from coverage report. For example:coverageExclude: - libs/** - path/to/some.css -
-
windowSize
(env:GEMINI_WINDOW_SIZE
) – specify browser window dimensions (i.e.1600x1200
).