Bdd with java using concordion and selenium ui tests
1. BDD на Java при помощи
Selenium UI тестов
Май 2012
Алексей Резчиков
AUTOMATED-TESTING.INFO
2. Обо мне
• Java разработчик и тимлид
с более чем 10-летним стажем
• Евангелист автоматизированного
тестирования уже более 4-х лет
• Энтузиаст XP/Agile/Lean
• Успел «понюхать порох» вместе с eBay и HP
2 AUTOMATED-TESTING.INFO
3. План
• В чем польза BDD?
• BDD + Selenium : как это работает вместе?
• Практика (live coding)
• Альтернативы
• Критика подхода
• Выводы
3 AUTOMATED-TESTING.INFO
7. TDD это прекрасно, но…
Кто будет думать о качестве?
7 AUTOMATED-TESTING.INFO
8. Что ИМЕННО дает TDD?
A 2005 study found that using TDD meant
writing more tests and, in turn, programmers
who wrote more tests tended to be more
productive. Hypotheses relating to code
quality and a more direct correlation between
TDD and productivity were inconclusive.
Wikipedia
8 AUTOMATED-TESTING.INFO
9. Что ИМЕННО дает TDD?
Test-driven development offers more than just
simple validation of correctness, but can also
drive the design of a program
Wikipedia
9 AUTOMATED-TESTING.INFO
11. Попытка исправить TDD – ATDD
Acceptance Test Driven Development (ATDD)
is a practice in which the whole team
collaboratively discusses acceptance criteria,
with examples, and then distills them into a
set of concrete acceptance tests before
development begins.
http://testobsessed.com/blog/2008/12/08/acceptance-test-driven-development-
atdd-an-overview/
11 AUTOMATED-TESTING.INFO
12. Попытка исправить TDD – ATDD
Acceptance TDD helps coordinate software
projects in a way that helps us deliver exactly
what the customer wants when they want it,
and that doesn’t let us implement the required
functionality only half way.
http://www.methodsandtools.com/archive/archive.php?id=72
12 AUTOMATED-TESTING.INFO
13. Что же такое BDD?
• At the heart of BDD is a rethinking of the
approach to unit testing and acceptance
testing: unit test names are whole sentences
starting with the word "should" and they are
written in order of business value.
• BDD encourages collaboration among
developers, QA and non-technical or business
participants in a software project. It has
evolved over the last few years.
Wikipedia
13 AUTOMATED-TESTING.INFO
15. BDD + Selenium
Concordion is an open source tool for writing
automated acceptance tests in Java*
* There are also versions for .NET, Python, Scala, and Ruby.
15 AUTOMATED-TESTING.INFO
16. How it works?
Concordion
WebDriver Browser
Test Runner
TestNG/JUnit
PageObject
test
Concordion TestNG/JUnit
test spec test methods
16 AUTOMATED-TESTING.INFO
17. Практика
Пример тестирования сайта
17 AUTOMATED-TESTING.INFO
18. Альтернативы: платформа
Стоит быть прагматичными –
не стоит добавлять Java в проекты где ее
нет.
18 AUTOMATED-TESTING.INFO
23. А если серьезно
• BDD незаменим в проектах, где
необходима тесная связь бизнеса с
командой разработки
• BDD имеет свою четкую область
применения
• внедрение BDD это комплексный процесс
• успешная команда работает на качество
вместе
23 AUTOMATED-TESTING.INFO
24. Вопросы
@twincengray
alex.mcgray@gmail.com
http://mcgray.com.ua
24 AUTOMATED-TESTING.INFO