SlideShare a Scribd company logo
Software quality assurance days
19 Международная конференция
по вопросам качества ПО
sqadays.com
Санкт-Петербург. 20–21 мая 2016
Владислав Романенко
Intellectsoft. Минск, Беларусь
Игры с огнём: знакомимся с BDD
и Cucumber фреймворком BDDfire
QA-инженер в Intellectsoft
В тестировании >2 лет,
до этого работал инженером
географических информационных
систем (ГИС)
Тестирую мобильные и веб
приложения
Сертификат ISTQB Foundation level
v.romanenko_
laechoppe@gmail.com
BDD is like Jazz.
There is no
authoritative
definition of what it is
BDD
is a process designed to aid
the management and the delivery
of software development projects
by improving communication
between engineers and business
professionals
Игры с огнём: знакомимся с BDD и Cucumber фреймворком BDDfire
w o r k s h o p
1.
1.
BA
QA
dev
2.=> Cucumber format
Given…
When…
Then…
Gherkin:
3.
ruby
=> step definitions
3. => tests execution
Игры с огнём: знакомимся с BDD и Cucumber фреймворком BDDfire
- prevent the bug
To do list:
- exhaustive list
of scenarios
To do list:
What’s to avoid?
What’s to avoid?
- Leaking scenarios
Given When Then
A BX
What’s to avoid?
- All is end-to-end
What’s to avoid?
- Fixtures
BDD is not:
Equal to
Functional testing
BDD is not:
Only about
testing
a quick fix,...
BDD is not:
...an investment
BDD is:
SQA DAys-18 talk:
“Behat-trick:...”
w e b d r i v e r
bddfire:
Write your tests,
not framework
Игры с огнём: знакомимся с BDD и Cucumber фреймворком BDDfire
Why “Cucumber”?
bddfire:
Capybara
Selenium Webdriver
Docker
RestClient
Poltergeist
Gatling
Appium
Saucelabs
Relish, Yard
Axe accessibility engine
Rubocop
Installation:
$ gem install bddfire
$ bddfire fire_cucumber
$ cd cucumber & bundle install
Predefined steps:
Given I am on “url”
When I click on element having text “foo"
Then The page title is “bar"
Predefined steps definitions:
Then(/^page contains "(.*?)"$/) do |element|
page.should have_css(element)
end
Then(/^I should see "(.*?)"$/) do |text|
page.should have_content text
end
Scenario: Signing in as an existing user
Given I am on "http://test.org/auth"
When I fill in "email" with the text "vlad@r.by"
And I fill in "password" with the text "qwerty"
And I click on element having text "Sign In"
Then The page title is "Homepage"
Hello world scenario:
Natural risks
forest fire
avalanche
Project overview:
Actions
Rescue people
Put out the fire
Warn alpinists
1. Features
Project structure:
Scenario: I can see the quantity of risks in each state
Given I'm a rescue team member
When I observe the table of risks
Then I see the correct quantity of risks by state
Project structure:
When (/^I want to view the details of a Risk/) do
risk_num = rand(1...10).to_s
link = '#/steps/' + risk_num + '/details'
find(:xpath,"(//*[@href='#{link}'])[1]").click
end
2. Step definitions
Project structure:
Capybara.configure do |config|
config.run_server = false
...
config.default_selector = :xpath
config.default_wait_time = 60
end
3. Support code
Project structure:
After do
page.evaluate_script('window.confirm = function()
{ return true; }')
find(:xpath, '//*[@ng-click="vm.logOut()"]').click
end
4. Hooks
Project structure:
default: -p selenium
html: --format --out reports/test.html
api : DRIVER=poltergeist --tags @api
chrome: DRIVER=chrome
pretty: -f pretty
5. Configuration file
Project structure:
source 'http://rubygems.org'
gem 'cucumber'
gem 'capybara'
gem 'bddfire'
gem 'selenium-webdriver'
6. Dependencies
Project structure:
6. Reports / Docs folders
What’s included?
1. Capybara
Acceptance test framework for web
applications.
It simulates how a real user would
interact with the app
Why “Capybara”?
Why “Capybara”?
Webrat => Capybara
What’s included?
1. Capybara
Given(/^I am on homepage$/) do
visit('http://risk.piemont.org/#/login')
end
Given(/^I want to see Risk timeline/) do
find(:xpath,'//*[@ui-sref="risk.timeline"]').click
end
What’s included?
2. Poltergeist
allows runNing Capybara tests on a headless browser
What’s included?
2. Poltergeist
@poltergeist
Scenario: Signing in as an existing user
Given I am on "http://test.org/auth"
When I fill in "email" with the text "vlad@r.by"
And I fill in "password" with the text "qwerty"
And I click on element having text "Sign In"
Then The page title is "Homepage"
What’s included?
3. parallel_tests
What’s included?
4. BrowserStack
Cloud-based cross-browser testing tool
What’s included?
4. BrowserStack
What’s included?
5. Rubocop
Code style checker
based on the community-driven Style Guide
What’s included?
5. Rubocop
What’s included?
6. CukeSniffer
Static analysis tool for the Cucumber.
What’s included?
6. CukeSniffer
What’s included?
7. Yard
A Requirements Documentation Tool
What’s included?
7. Yard
What’s included?
8. RestClient
Simple HTTP and REST client for Ruby
What’s included?
8. RestClient
Given I send a GET request for "<your_uri>"
Given I send a GET/PUT/POST/DELETE request
for "<your_uri>" with the following:
"""
<your_payload>
"""
Then the response should be JSON
What’s included?
9. Axe
What’s included?
9. Axe
What’s included?
10. Gatling
load testing framework
What’s included?
10. Gatling
What’s included?
11. Docker
platform for distributed applications
Summary:
$ gem install bddfire
$ bddfire fire_cucumber
$ cd cucumber & bundle install
Thanks!
Questions?
v.romanenko_
laechoppe@gmail.com

More Related Content

PDF
淺談 Groovy 與 AWS 雲端應用開發整合
PDF
行動應用開發實務 - Gradle 介紹
PDF
NetBeans Support for EcmaScript 6
PPTX
Capistrano与jenkins(hudson)在java web项目中的实践
PDF
JCConf 2015 workshop 動手玩 Java 專案建置工具
PPTX
Michal Kordas "Docker: Good, Bad or Both"
PPTX
Shestakov Illia "The Sandbox Theory"
PDF
Docker In the Bank
淺談 Groovy 與 AWS 雲端應用開發整合
行動應用開發實務 - Gradle 介紹
NetBeans Support for EcmaScript 6
Capistrano与jenkins(hudson)在java web项目中的实践
JCConf 2015 workshop 動手玩 Java 專案建置工具
Michal Kordas "Docker: Good, Bad or Both"
Shestakov Illia "The Sandbox Theory"
Docker In the Bank

What's hot (20)

ODP
Implementing Quality on Java projects (Short version)
PDF
An Introduction to Gradle for Java Developers
PDF
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
PDF
Groovy on the shell
PPTX
Automation testing with Drupal 8
PDF
Buildr - build like you code
KEY
うさぎ組 in G* WorkShop -うさみみの日常-
PDF
Hands on the Gradle
PDF
GroovyFX - groove JavaFX Gr8Conf EU 2017
PDF
Automated Testing in WordPress, Really?!
PDF
Gearman work queue in php
PPTX
PHP & JavaScript & CSS Coding style
PDF
Groovy and noteworthy
PDF
Ant, Maven and Jenkins
PDF
Gradle build tool that rocks with DSL JavaOne India 4th May 2012
PDF
Gradle Introduction
PDF
Magento and Continuous Integration - Damian Luszczymak
PDF
Использование Docker в CI / Александр Акбашев (HERE Technologies)
PDF
[Image Results] Java Build Tools: Part 2 - A Decision Maker's Guide Compariso...
PPTX
Gorush: A push notification server written in Go
Implementing Quality on Java projects (Short version)
An Introduction to Gradle for Java Developers
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
Groovy on the shell
Automation testing with Drupal 8
Buildr - build like you code
うさぎ組 in G* WorkShop -うさみみの日常-
Hands on the Gradle
GroovyFX - groove JavaFX Gr8Conf EU 2017
Automated Testing in WordPress, Really?!
Gearman work queue in php
PHP & JavaScript & CSS Coding style
Groovy and noteworthy
Ant, Maven and Jenkins
Gradle build tool that rocks with DSL JavaOne India 4th May 2012
Gradle Introduction
Magento and Continuous Integration - Damian Luszczymak
Использование Docker в CI / Александр Акбашев (HERE Technologies)
[Image Results] Java Build Tools: Part 2 - A Decision Maker's Guide Compariso...
Gorush: A push notification server written in Go
Ad

Viewers also liked (20)

PPTX
Jenkins 2.0: Организуем тестирование в составе Continuous Delivery
PPT
Оценка методологии автоматизации - MBT
PDF
Как мы приручили демона или процесс тестирования демонов в Badoo
PPTX
Тестирование в изоляции: Играем в драконий покер
PDF
Полуавтоматизация third-party API
PPTX
GUI-автоматизация в Telerik Test Studio
PPTX
Автоматизация тестирования ролей и привилегий
PDF
Проникновение в Docker с примерами
PPTX
Cross browser testing with browser stack
PPT
Как подготовить себе преемника?
PDF
Введение в performance management
PPTX
Разработка системы автоматизированного тестирования при помощи фреймворка Pro...
PPTX
Тестируем производительность с помощью Selenium
PPTX
Cloud api
PPT
BDD JBehave или Cucumber JVM + Appium для эффективной кроссплатформенной авто...
PDF
Лекция 7. Исключения и менеджеры контекста.
PDF
Лекция 5. Встроенные коллекции и модуль collections.
PDF
Лекция 6. Классы 1.
PDF
Лекция 11. Тестирование.
PDF
Лекция 12. Быстрее, Python, ещё быстрее.
Jenkins 2.0: Организуем тестирование в составе Continuous Delivery
Оценка методологии автоматизации - MBT
Как мы приручили демона или процесс тестирования демонов в Badoo
Тестирование в изоляции: Играем в драконий покер
Полуавтоматизация third-party API
GUI-автоматизация в Telerik Test Studio
Автоматизация тестирования ролей и привилегий
Проникновение в Docker с примерами
Cross browser testing with browser stack
Как подготовить себе преемника?
Введение в performance management
Разработка системы автоматизированного тестирования при помощи фреймворка Pro...
Тестируем производительность с помощью Selenium
Cloud api
BDD JBehave или Cucumber JVM + Appium для эффективной кроссплатформенной авто...
Лекция 7. Исключения и менеджеры контекста.
Лекция 5. Встроенные коллекции и модуль collections.
Лекция 6. Классы 1.
Лекция 11. Тестирование.
Лекция 12. Быстрее, Python, ещё быстрее.
Ad

Similar to Игры с огнём: знакомимся с BDD и Cucumber фреймворком BDDfire (20)

PPTX
Behavior Driven Development Testing (BDD)
PPTX
Behavioural Testing Ruby/Rails Apps @ Scale - Rspec & Cucumber
PPTX
BDD / cucumber /Capybara
PDF
Ruby onrails cucumber-rspec-capybara
PPTX
CucumberSeleniumWD
PPTX
MyHeritage - End 2 End testing Infra
PPTX
Behavior Driven Development - TdT@Cluj #15
PDF
cucumber harpal.pdf
PPTX
Bdd with Cucumber and Mocha
PDF
Curriculum outline
PPTX
Behavior Driven Development
PPTX
BDD Selenium for Agile Teams - User Stories
PPT
Testing Any Site With Cucumber and Selenium
PPTX
Making Watir and Cucumber an efficient tool for Web UI Automation
PPTX
Introduce cucumber
KEY
PPTX
Automation test framework with cucumber – BDD
PDF
10 things about BDD, Cucumber and SpecFlow - Long Version 2016
PPTX
MyHeritage - QA Automations in a Continuous Deployment environment
PDF
Behaviour driven infrastructure
Behavior Driven Development Testing (BDD)
Behavioural Testing Ruby/Rails Apps @ Scale - Rspec & Cucumber
BDD / cucumber /Capybara
Ruby onrails cucumber-rspec-capybara
CucumberSeleniumWD
MyHeritage - End 2 End testing Infra
Behavior Driven Development - TdT@Cluj #15
cucumber harpal.pdf
Bdd with Cucumber and Mocha
Curriculum outline
Behavior Driven Development
BDD Selenium for Agile Teams - User Stories
Testing Any Site With Cucumber and Selenium
Making Watir and Cucumber an efficient tool for Web UI Automation
Introduce cucumber
Automation test framework with cucumber – BDD
10 things about BDD, Cucumber and SpecFlow - Long Version 2016
MyHeritage - QA Automations in a Continuous Deployment environment
Behaviour driven infrastructure

More from SQALab (20)

PDF
Готовим стажировку
PPTX
Куда приводят мечты? или Искусство развития тестировщика
PPT
Оптимизация Selenium тестов и ускорение их поддержки
PPT
Автоматизация 0.0: 0 - бюджет, 0 - опыт программирования
PPTX
Нагрузочное тестирование нестандартных протоколов с использованием Citrix и J...
PPTX
Continuous performance testing
PDF
Конфиги вместо костылей. Pytestconfig и зачем он нужен
PPT
Команда чемпионов в ИТ стихии
PPTX
API. Серебряная пуля в магазине советов
PPTX
Добиваемся эффективности каждого из 9000+ UI-тестов
PPT
Делаем автоматизацию проектных KPIs
PDF
Вредные привычки в тест-менеджменте
PPTX
Мощь переполняет с JDI 2.0 - новая эра UI автоматизации
PPT
Как hh.ru дошли до 500 релизов в квартал без потери в качестве
PPTX
Стили лидерства и тестирование
PPT
"Давайте не будем про качество"
PDF
Apache.JMeter для .NET-проектов
PPTX
Тестирование геолокационных систем
PPTX
Лидер или босс? Вот в чем вопрос
PPTX
От Зефира в коробке к Structure Zephyr или как тест-менеджеру перекроить внут...
Готовим стажировку
Куда приводят мечты? или Искусство развития тестировщика
Оптимизация Selenium тестов и ускорение их поддержки
Автоматизация 0.0: 0 - бюджет, 0 - опыт программирования
Нагрузочное тестирование нестандартных протоколов с использованием Citrix и J...
Continuous performance testing
Конфиги вместо костылей. Pytestconfig и зачем он нужен
Команда чемпионов в ИТ стихии
API. Серебряная пуля в магазине советов
Добиваемся эффективности каждого из 9000+ UI-тестов
Делаем автоматизацию проектных KPIs
Вредные привычки в тест-менеджменте
Мощь переполняет с JDI 2.0 - новая эра UI автоматизации
Как hh.ru дошли до 500 релизов в квартал без потери в качестве
Стили лидерства и тестирование
"Давайте не будем про качество"
Apache.JMeter для .NET-проектов
Тестирование геолокационных систем
Лидер или босс? Вот в чем вопрос
От Зефира в коробке к Structure Zephyr или как тест-менеджеру перекроить внут...

Recently uploaded (20)

PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
Cell Types and Its function , kingdom of life
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
master seminar digital applications in india
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
A systematic review of self-coping strategies used by university students to ...
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
Presentation on HIE in infants and its manifestations
PDF
Classroom Observation Tools for Teachers
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PPTX
Pharma ospi slides which help in ospi learning
PDF
Computing-Curriculum for Schools in Ghana
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PPTX
Microbial diseases, their pathogenesis and prophylaxis
Abdominal Access Techniques with Prof. Dr. R K Mishra
Cell Types and Its function , kingdom of life
Module 4: Burden of Disease Tutorial Slides S2 2025
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
VCE English Exam - Section C Student Revision Booklet
Supply Chain Operations Speaking Notes -ICLT Program
master seminar digital applications in india
Chinmaya Tiranga quiz Grand Finale.pdf
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
O7-L3 Supply Chain Operations - ICLT Program
A systematic review of self-coping strategies used by university students to ...
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Microbial disease of the cardiovascular and lymphatic systems
Presentation on HIE in infants and its manifestations
Classroom Observation Tools for Teachers
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Pharma ospi slides which help in ospi learning
Computing-Curriculum for Schools in Ghana
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Microbial diseases, their pathogenesis and prophylaxis

Игры с огнём: знакомимся с BDD и Cucumber фреймворком BDDfire