All Projects → gemini-testing → Gemini

gemini-testing / Gemini

Licence: mit
💀💀💀[DEPRECATED] Use hermione

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Gemini

Recheck Web
recheck for web apps – change comparison tool with local Golden Masters, Git-like ignore syntax and "Unbreakable Selenium" tests.
Stars: ✭ 224 (-85.12%)
Mutual labels:  selenium, testing-tools
carina-demo
Carina demo project.
Stars: ✭ 40 (-97.34%)
Mutual labels:  selenium, testing-tools
carina
Carina automation framework: Web, Mobile, API, DB etc testing...
Stars: ✭ 652 (-56.68%)
Mutual labels:  selenium, testing-tools
gemini-react
Plugin, which simplifies writing gemini tests for react components
Stars: ✭ 22 (-98.54%)
Mutual labels:  gemini, visual-regression
Openrunner
Computest Openrunner: Benchmark and functional testing for frontend-heavy web applications
Stars: ✭ 16 (-98.94%)
Mutual labels:  selenium, testing-tools
Botium Core
The Selenium for Chatbots - Bots Testing Bots
Stars: ✭ 181 (-87.97%)
Mutual labels:  selenium, testing-tools
extensiveautomation-server
Extensive Automation server
Stars: ✭ 19 (-98.74%)
Mutual labels:  selenium, testing-tools
Ayespy
A performant visual regression testing tool
Stars: ✭ 150 (-90.03%)
Mutual labels:  selenium, testing-tools
Rails Testing Toolbox
🔧 Tools to help Rails developers test
Stars: ✭ 110 (-92.69%)
Mutual labels:  selenium, testing-tools
page-modeller
⚙️ Browser DevTools extension for modelling web pages for automation.
Stars: ✭ 66 (-95.61%)
Mutual labels:  selenium, testing-tools
gemini-gui
GUI for gemini
Stars: ✭ 69 (-95.42%)
Mutual labels:  gemini, testing-tools
Carina
Carina automation framework: Web, Mobile, API, DB
Stars: ✭ 549 (-63.52%)
Mutual labels:  selenium, testing-tools
Serenity Js
A next generation, full-stack acceptance testing framework optimised for collaboration, speed and scale!
Stars: ✭ 346 (-77.01%)
Mutual labels:  selenium, testing-tools
Awesome Regression Testing
🕶️ A curated list of resources around the topic: visual regression testing
Stars: ✭ 1,604 (+6.58%)
Mutual labels:  selenium, visual-regression
Magento2 Fixtures
Fixture library for Magento 2 integration tests by @schmengler (@integer-net)
Stars: ✭ 110 (-92.69%)
Mutual labels:  testing-tools
Seleniumjavacourse
Selenium Java Code for all selenium sessions - WebDriver, TestNG, POI, etc...
Stars: ✭ 115 (-92.36%)
Mutual labels:  selenium
Gest
👨‍💻 A sensible GraphQL testing tool - test your GraphQL schema locally and in the cloud
Stars: ✭ 109 (-92.76%)
Mutual labels:  testing-tools
Mitm Scripts
🔄 A collection of mitmproxy inline scripts
Stars: ✭ 109 (-92.76%)
Mutual labels:  testing-tools
Examples Of Web Crawlers
一些非常有趣的python爬虫例子,对新手比较友好,主要爬取淘宝、天猫、微信、豆瓣、QQ等网站。(Some interesting examples of python crawlers that are friendly to beginners. )
Stars: ✭ 10,724 (+612.56%)
Mutual labels:  selenium
Query Selector Shadow Dom
querySelector that can pierce Shadow DOM roots without knowing the path through nested shadow roots. Useful for automated testing of Web Components. Production use is not advised, this is for test environments/tools such as Web Driver, Playwright, Puppeteer
Stars: ✭ 115 (-92.36%)
Mutual labels:  selenium

Gemini

npm Build Status Coverage Status Join the chat at https://gitter.im/gemini-testing/gemini Stories on waffle.io

Gemini is a utility for regression testing the visual appearance of web pages.

Gemini allows you to:

  • Work with different browsers:

    • Google Chrome (tested in latest version)
    • Mozilla Firefox (tested in latest version)
    • IE8+
    • Opera 12+
  • Test separate sections of a web page

  • Include the box-shadow and outline properties when calculating element position and size

  • Ignore some special case differences between images (rendering artifacts, text caret, etc.)

  • Gather CSS test coverage statistics

Gemini was created at Yandex and is especially useful to UI library developers.

Quick start

Installing

npm install -g gemini
npm install -g selenium-standalone
selenium-standalone install

Configuring

Put the .gemini.js file in the root of your project:

module.exports = {
    rootUrl: 'http://yandex.ru',
    gridUrl: 'http://127.0.0.1:4444/wd/hub',

    browsers: {
        chrome: {
            desiredCapabilities: {
                browserName: 'chrome'
            }
        }
    }
};

Writing tests

Write a test and put it in the gemini folder in the root of your project:

gemini.suite('yandex-search', (suite) => {
    suite.setUrl('/')
        .setCaptureElements('.home-logo')
        .capture('plain');
});

Saving reference images

You have written a new test and should save a reference image for it:

gemini update

Running tests

Start selenium-standalone in a separate tab before running the tests:

selenium-standalone start

Run gemini tests:

gemini test

Dependencies

Required software:

  1. WebDriver server implementation. There are several options:

    • Selenium Server — for testing in 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) for your OS.).

    • ChromeDriver — for testing in Google Chrome. Launch with the chromedriver --port=4444 --url-base=wd/hub command.

    • PhantomJS — launch with the phantomjs --webdriver=4444 command.

    • Cloud WebDriver services, such as SauceLabs or BrowserStack

  2. Compiler with support for C++11 ([email protected] or higher). This is a png-img requirement. Compiling on Windows machines requires the node-gyp prerequisites.

Installing

To install the utility, use the npm install command:

npm install -g gemini

Global installation is used for launching commands.

Configuring

Gemini is configured using a config file at the root of the project. Gemini can use one of the following files:

  • .gemini.conf.js
  • .gemini.conf.json
  • .gemini.conf.yml
  • .gemini.js
  • .gemini.json
  • .gemini.yml

Let's say we want to run our tests only in the locally installed PhantomJS.

In this case, the minimal configuration file will only need to have the root URL of your web app and the WebDriver capabilities of PhantomJS: For example,

rootUrl: http://yandex.com
browsers:
  PhantomJS:
    desiredCapabilities:
      browserName: phantomjs

Also, you need to run PhantomJS manually in WebDriver mode:

phantomjs --webdriver=4444

If you are using a remote WebDriver server, you can specify its URL with the 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"

Other configuration options

See the details of the config file structure and available options.

Writing tests

Each of the blocks that are being tested may be in one of the determined states. States are tested with the help of chains of step-by-step actions declared in a block's test suites.

For example, let's write a test for a search block at yandex.com:

gemini.suite('yandex-search', function(suite) {
    suite.setUrl('/')
        .setCaptureElements('.search2__input')
        .capture('plain')
        .capture('with text', function(actions, find) {
            actions.sendKeys(find('.search2__input .input__control'), 'hello gemini');
        });
});

We are creating a new test suite yandex-search, assuming that we will capture the .search2__input element from the root URL http://yandex.com. We know that the block has two states:

  • plain — right after the page is loaded
  • with text — with the hello gemini text inserted into .search2__input .input__control

States are executed one after another in the order in which they are defined, without the browser reloading in between.

See the details of test creation methods.

Using CLI

To complete the test creation procedure, you need to take reference shots using the following command:

gemini update [paths to test suites]

To launch a test (to compare the current state of a block with a reference shot), use the command:

gemini test [paths to test suites]

See the details of interaction with CLI and available options.

GUI

You can use the Gemini graphical user interface instead of the command line. It is located in the gemini-gui package and must be installed additionally:

npm install -g gemini-gui

GUI advantages:

  • Handy preview of reference shots

  • Clear real-time demonstration of the differences between a reference shot and the current state of a block

  • Easy to update reference shots

Plugins

Gemini can be extended with plugins. You can choose from the existing plugins or write your own. To use a plugin, install and enable it in your .gemini.yml:

system:
  plugins:
    some-awesome-plugin:
      plugin-option: value

HTML report

To see the difference between the current state of a block and a reference picture more clearly, use the HTML reporter - plugin for gemini. This plugin produces HTML report, which displays reference image, current image and differences between them, for each state in each browser. When all tests are completed, you will see a link to HTML report.

Programmatic API

To use Gemini in your scripts or build tools, you can use the experimental programmatic API.

Events

To learn more about all events in Gemini, see the events documentation.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].