bem-site / bem-forum-content-ru

Content BEM forum for Russian speak users
MIT License
56 stars 6 forks source link

Gemini + Selenium #396

Open Gordiievskyi opened 9 years ago

Gordiievskyi commented 9 years ago

Hi guys,

I am looking for tool for visual testing. Project's automation language is php. I've heard about gemini on selenium camp as good one for visual testing. So could you answer on next questions:

  1. Is there any option out of the box to use it with web driver on php ?
  2. If no then what web driver you are using with Gemini
  3. Is it possible to connect it with Selenium grid
  4. I didn't see in example any assertion so how can I use it with CI(Bamboo for example) and see results like pass/fail. Is this plugin solve the issue ? - Plugin for Gemini which enables reporting test result
  5. What locators strategy does it use ? all or only css
  6. Did you share you automation framework somewhere(I mean page object/html object etc)
  7. Are you using it in Yandex for UI regression ? :))
  8. How to use it for visual testing on mobile devices
  9. How to exclude some object from comparing - Example whole body without video player.
  10. Is there any issues with iframes
  11. Are you using GraphicsMagick for image processing ?
  12. Am I right that all I need is give the locator on element I do not need to write what properties to compare like in Web Driver
  13. If test created for chrome can I reuse it for firefox ?I mean screenshots
  14. If I have design of element can I use it in the tests as baseline?
  15. Is there solution out of box for viewport I mean if content exceeds screen size will gemeni auto scroll it and glue it in one ?
  16. Is there any option for comparing level adjustmant - like pixel to pixel/ lower/ the lowest etc.
  17. Is there option to give coordinates instead of locator to compare

Currently that it, thanks for your answers in advance

arikon commented 9 years ago
  1. Is there any option out of the box to use it with web driver on php ?

Gemini is a tool written in Node.js, so it is no way connected with php on web driver php module.

  1. If no then what web driver you are using with Gemini

We are using wd node.js library.

  1. Is it possible to connect it with Selenium grid

Out of the box.

  1. I didn't see in example any assertion so how can I use it with CI(Bamboo for example) and see results like pass/fail. Is this plugin solve the issue ?

Gemini provides the DSL to write visual regression tests. You just declare test suits (which define areas to take shots of) and steps (which define actions to perform on the web page) and Gemini does the rest. It provides console and html reports out of the box.

  1. What locators strategy does it use ? all or only css

CSS only.

  1. Did you share you automation framework somewhere(I mean page object/html object etc)

Sorry, I didn't get the question.

  1. Are you using it in Yandex for UI regression ? :))

Of course. We are using it at least for testing of our internal blocks library called Lego Islands and the SERP (Search Engine Results Page).

  1. How to use it for visual testing on mobile devices

It's on the roadmap.

  1. How to exclude some object from comparing - Example whole body without video player.

You can specify elements to ignore with ignoreElements(selector...). It is on the docs: https://github.com/gemini-testing/gemini/blob/master/doc/tests.md#suite-builder-methods

  1. Is there any issues with iframes

We didn't check.

  1. Are you using GraphicsMagick for image processing ?

We switched to the lightweight png-img library to make it faster.

  1. Am I right that all I need is give the locator on element I do not need to write what properties to compare like in Web Driver

Yes, you are.

  1. If test created for chrome can I reuse it for firefox ?I mean screenshots

You can reuse the test code but not the images. It is if the rendering nature of the different browsers.

  1. If I have design of element can I use it in the tests as baseline?

No. You should implement that design as a code block, that take screenshot of it with gemini gather command and use it as a reference.

  1. Is there solution out of box for viewport I mean if content exceeds screen size will gemeni auto scroll it and glue it in one ?

Gemini can't take screenshots of the elements that are larger then viewport. If you need to take shots of large elements, you should configure the size of the virtual screen in which you run selenium server so you content will fit into it.

  1. Is there any option for comparing level adjustmant - like pixel to pixel/ lower/ the lowest etc.

You can adjust tolerance config value. https://github.com/gemini-testing/gemini/blob/master/doc/config.md

  1. Is there option to give coordinates instead of locator to compare

Not for now. But you can send a feature or a pull request ;)

Thank you for the interest to the Gemini!

mursya commented 9 years ago

Привет! А почему на английском вопрос? Тут вроде у нас русскоязычный форум.. Если хочется вести переписку на английском, мы очень сильно рекомендуем на en.bem.info/forum заводить топик! спасибо!

Gordiievskyi commented 9 years ago

Привет, не знал что можно на русском. Спросил у друга который вроде бы часто сидит на этом форуме сказал что лучше на анлгийском :)). Теперь буду знать

2015-05-25 19:03 GMT+03:00 Yelena Jetpyspayeva notifications@github.com:

Привет! А почему на английском вопрос? Тут вроде у нас русскоязычный форум.. Если хочется вести переписку на английском, мы очень сильно рекомендуем на en.bem.info/forum заводить топик! спасибо!

— Reply to this email directly or view it on GitHub https://github.com/bem/bem-forum-content-ru/issues/396#issuecomment-105257079 .

Guria commented 9 years ago

На английском предпочтительно общение в issues самих библиотек и инструментов. А данный форум рассчитан на русскоязычное общение.

Gordiievskyi commented 9 years ago

Доброго времени суток,

А как конфигурить size of the virtual screen, это можно сделать где то в yml файле ? - это к ответу что делать есил элемент вылазит за границы вью порта и нужно скролить

Забыл спросить как запустить один и тот же тест для разных брейкпоинтов?

Заранее благодарен за помошь

arikon commented 9 years ago

А как конфигурить size of the virtual screen, это можно сделать где то в yml файле

Можно задавать размер окна браузера через опцию windowSize в конфиге или через вызов экшена setWindowSize() в тестах. Не работает в Opera Presto (до 16 версии).

Забыл спросить как запустить один и тот же тест для разных брейкпоинтов?

Переформулируй вопрос, пожалуйста. Непонятно, что имелось в виду под брейкпоинтами.

mursya commented 9 years ago

у нас 2 ветки форума — ru и en.

Если можешь писать на англ и хочешь писать сразу на англ аудиторию, лучше заводить тему в https://en.bem.info/forum/

Если нет, пиши в https://ru.bem.info/forum/ на русском

Пока у тебя путаница :(

Gordiievskyi commented 9 years ago

А что делать если максимальные размеры которые можно задать windowSize в конфиге или через вызов экшена setWindowSize() меньше чем эелемент ?

2015-07-08 0:10 GMT+03:00 Sergey Belov notifications@github.com:

А как конфигурить size of the virtual screen, это можно сделать где то в yml файле

Можно задавать размер окна браузера через опцию windowSize в конфиге или через вызов экшена setWindowSize() в тестах. Не работает в Opera Presto (до 16 версии).

Забыл спросить как запустить один и тот же тест для разных брейкпоинтов?

Переформулируй вопрос, пожалуйста. Непонятно, что имелось в виду под брейкпоинтами.

— Reply to this email directly or view it on GitHub https://github.com/bem/bem-forum-content-ru/issues/396#issuecomment-119342147 .

Gordiievskyi commented 9 years ago

Переформулируй вопрос, пожалуйста. Непонятно, что имелось в виду под брейкпоинтами. Скрин сайзы на которых меняеться верстка, extra narrow, narrow, medium, wide, что под собой подразумевает windowSize 480x400, 600x500, 800x600. При изменениии ширины меняеться верстка, положение элементов на странице. Но тест к примеру проверяет наличие одного и того же елемента при разных размерах окна браузера, и хотелось бы что бы это был один тест(один и тот же код, просто разные скрины для каждого размера окна браузера или вьюпорта).

Дайте знать если вам нужна еще какае то информация Спасибо, Слава

2015-07-08 0:10 GMT+03:00 Sergey Belov notifications@github.com:

А как конфигурить size of the virtual screen, это можно сделать где то в yml файле

Можно задавать размер окна браузера через опцию windowSize в конфиге или через вызов экшена setWindowSize() в тестах. Не работает в Opera Presto (до 16 версии).

Забыл спросить как запустить один и тот же тест для разных брейкпоинтов?

Переформулируй вопрос, пожалуйста. Непонятно, что имелось в виду под брейкпоинтами.

— Reply to this email directly or view it on GitHub https://github.com/bem/bem-forum-content-ru/issues/396#issuecomment-119342147 .

Gordiievskyi commented 9 years ago

Насчет брейкпоинтов ответ нашол: https://github.com/bem/bem-forum-content-ru/issues/443

arikon commented 9 years ago

А что делать если максимальные размеры которые можно задать windowSize в конфиге или через вызов экшена setWindowSize() меньше чем эелемент ?

К сожалению, только в firefox можно будет снять такой элемент. И для этого не нужно ничего делать, оно должно работать из коробки.

Gordiievskyi commented 9 years ago

а кроме как использовать executeJS для скрола, из коробки нету возможности ?

arikon commented 9 years ago

@Gordiievskyi При взаимодействии с элементом Selenium сам подскроливает к нему. При снятии скриншота, Gemini скролит страницу так, чтобы вся снимаемая область попадала во вьюпорт. Поэтому, скролить самому необходимости, как правило, нет.

Для чего требуется скролить страницу самостоятельно?

Gordiievskyi commented 9 years ago

мои извинения, моя ошибка, нужно было подождать елемент, в фаерфоксе давал локатор на боди а на скриншоте не было ботом элемента, думал что нужно доскролить. Спасибо

gorelovserj commented 8 years ago

Коллеги, добрый день! Как выполнить скролл для проверки "прилипания элементов" к верхней кромке браузера?

kompolom commented 8 years ago

@Gordiievskyi Конкретнее напишите, что хотите сделать

qfox commented 8 years ago

Как выполнить скролл для проверки "прилипания элементов" к верхней кромке браузера?

Может быть просто .executeJs(function(window){ window.scroll = 100; }) внутри .capture('text', function(actions){ actions.executeJs(...); }) ?