+ All Categories
Home > Technology > Bdd with java_using_concordion_and_selenium_ui_tests

Bdd with java_using_concordion_and_selenium_ui_tests

Date post: 16-Nov-2014
Category:
Upload: oleksiy-rezchykov
View: 1,274 times
Download: 3 times
Share this document with a friend
Description:
My automated-testing.info meet-up #16 presentation
Popular Tags:
24
AUTOMATED- TESTING.INFO BDD на Java при помощи Selenium UI тестов Май 2012 Алексей Резчиков
Transcript
Page 1: Bdd with java_using_concordion_and_selenium_ui_tests

A U T O M AT E D -T E S T I N G . I N F O

BDD на Java при помощи Selenium UI тестов

Май 2012Алексей Резчиков

Page 2: Bdd with java_using_concordion_and_selenium_ui_tests

A U T O M AT E D -T E S T I N G . I N F O

• Java разработчик и тимлидс более чем 10-летним стажем

• Евангелист автоматизированноготестирования уже более 4-х лет

• Энтузиаст XP/Agile/Lean

• Успел «понюхать порох» вместе с eBay и HP

Обо мне

2

Page 3: Bdd with java_using_concordion_and_selenium_ui_tests

A U T O M AT E D -T E S T I N G . I N F O

План

• В чем польза BDD?• BDD + Selenium : как это работает

вместе?• Практика (live coding)• Альтернативы• Критика подхода • Выводы

3

Page 4: Bdd with java_using_concordion_and_selenium_ui_tests

A U T O M AT E D -T E S T I N G . I N F O

Все началось с XP

4

Page 5: Bdd with java_using_concordion_and_selenium_ui_tests

A U T O M AT E D -T E S T I N G . I N F O

Потом придумали TDD

5

Page 6: Bdd with java_using_concordion_and_selenium_ui_tests

A U T O M AT E D -T E S T I N G . I N F O

Суть TDD

6

Page 7: Bdd with java_using_concordion_and_selenium_ui_tests

A U T O M AT E D -T E S T I N G . I N F O

TDD это прекрасно, но…

7

Кто будет думать о качестве?

Page 8: Bdd with java_using_concordion_and_selenium_ui_tests

A U T O M AT E D -T E S T I N G . I N F O

Что ИМЕННО дает 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

Page 9: Bdd with java_using_concordion_and_selenium_ui_tests

A U T O M AT E D -T E S T I N G . I N F O

Что ИМЕННО дает TDD?

Test-driven development offers more than just simple validation of correctness, but can also drive the design of a programWikipedia

9

Page 10: Bdd with java_using_concordion_and_selenium_ui_tests

A U T O M AT E D -T E S T I N G . I N F O

Попытка исправить TDD – ATDD

10

Page 11: Bdd with java_using_concordion_and_selenium_ui_tests

A U T O M AT E D -T E S T I N G . I N F O

Попытка исправить TDD – ATDDAcceptance 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

Page 12: Bdd with java_using_concordion_and_selenium_ui_tests

A U T O M AT E D -T E S T I N G . I N F O

Попытка исправить TDD – ATDDAcceptance 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

Page 13: Bdd with java_using_concordion_and_selenium_ui_tests

A U T O M AT E D -T E S T I N G . I N F O

Что же такое 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

Page 14: Bdd with java_using_concordion_and_selenium_ui_tests

A U T O M AT E D -T E S T I N G . I N F O

Магия слов: GWT

14

Page 15: Bdd with java_using_concordion_and_selenium_ui_tests

A U T O M AT E D -T E S T I N G . I N F O

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

Page 16: Bdd with java_using_concordion_and_selenium_ui_tests

A U T O M AT E D -T E S T I N G . I N F O

How it works?

Concordion Test

Runner

TestNG/JUnit test

Concordion test spec

TestNG/JUnit test methods

PageObject

WebDriver Browser

16

Page 17: Bdd with java_using_concordion_and_selenium_ui_tests

A U T O M AT E D -T E S T I N G . I N F O

Практика

Пример тестирования сайта

17

Page 18: Bdd with java_using_concordion_and_selenium_ui_tests

A U T O M AT E D -T E S T I N G . I N F O

Альтернативы: платформа

Стоит быть прагматичными – не стоит добавлять Java в проекты где ее нет.

18

Page 19: Bdd with java_using_concordion_and_selenium_ui_tests

A U T O M AT E D -T E S T I N G . I N F O

Альтернативы: BDD фреймворк• Cucumber• JBehave• easyB…

19

Page 20: Bdd with java_using_concordion_and_selenium_ui_tests

A U T O M AT E D -T E S T I N G . I N F O

Альтернативы: UI тестыне Selenium’ом единым

20

Page 21: Bdd with java_using_concordion_and_selenium_ui_tests

A U T O M AT E D -T E S T I N G . I N F O

Критика подхода

• BDD может быть не нужен, достаточно ATDD

• часто разумней заменить UI тесты более низкоуровневыми

21

Page 22: Bdd with java_using_concordion_and_selenium_ui_tests

A U T O M AT E D -T E S T I N G . I N F O

Выводы

22

Page 23: Bdd with java_using_concordion_and_selenium_ui_tests

A U T O M AT E D -T E S T I N G . I N F O

А если серьезно

• BDD незаменим в проектах, где необходима тесная связь бизнеса с командой разработки

• BDD имеет свою четкую область применения

• внедрение BDD это комплексный процесс

• успешная команда работает на качество вместе

23

Page 24: Bdd with java_using_concordion_and_selenium_ui_tests

A U T O M AT E D -T E S T I N G . I N F O

Вопросы

@twincengray

[email protected]

http://mcgray.com.ua24


Recommended