BDD on Java Concordion and Selenium


Published on

My BDD presentation about Concordion and Selenium for JUG Lviv

Published in: Technology
  • @LanceKind My point was that there is a some sort of evolution of tools - each new one solving a different problem on a different level.
    When process started to be customer oriented (evolution) TDD was not there for it - so BDD stepped in.
    Are you sure you want to  Yes  No
    Your message goes here
  • TDD answers the question, does the code operate as the developer designed it.
    BDD answers the question, does the software behave as the customer wished it would.

    These are two different levels of test. I don't really understand why people keep talking about BDD and then point disparagingly at TDD. It's like complaining that apples taste like apples so stop eating them and eat oranges instead. You need both.

    I'm guessing you have this attitude due to in-fighting with peers or organization about TDD vs BDD. The practices are disjoint sets. In fact, BDD isn't about test automation at all but you *can* get it as a side affect. What test automation you do get is system test automation.

    I'm unhappy with this slideshare in that it promulgates the fallacy that TDD is somehow broken.
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • Почему я решил рассказать про BDD,почему я могу считать себя экспертом в этом вопросе
  • Разработчики увлеклись TDD. TDD это прекрасно, НО…Кто будет думать о качестве?ИспользованиеTDD только косвенно влияет на качество кодаИ не несет никакой прямойпользы для бизнеса
  • Где TDDпроцессе разработки
  • Быстрый цикл обратной связи
  • Как и темная сторона силы TDD обманчив, он ведь абсолютно ничего не говорит о качестве. Ну почти ничего.
  • Оставить только основное!!!Сначала мы представляем что хотим получить, а потом уже делаем. Преимущество в том, что это как раз правильный порядок действий а не «обратный» как может показаться. Самое сложное это перестроить себя.
  • Оставить только основное!!!
  • Given WhenThenМасштабATDD
  • Annotated HTML
  • BDD on Java Concordion and Selenium

    1. 1. BDD with Java usingConcordion and Selenium September 2012 Oleksiy Rezchykov @ua_spring #JugLviv
    2. 2. About meSoftware Engineer for morethan 10 yearsWorking with Spring during last6 yearsPragmatic Automation, Continuous 2Integration, ContinuousDelivery Consultant @ua_spring #JugLviv
    3. 3. AgendaWhat is BDD for?BDD + Selenium how this works togetherSome codeAlternativesApproach criticismConclusion @ua_spring #JugLviv 3
    4. 4. Everything started with XP @ua_spring #JugLviv 4
    5. 5. Then comes TDD @ua_spring #JugLviv 5
    6. 6. What is TDD? @ua_spring #JugLviv 6
    7. 7. TDD is great, but…Who will take care of the quality? 7
    8. 8. What exactly TDD is?A 2005 study found that using TDD meant writingmore tests and, in turn, programmers who wrotemore tests tended to be more productive.Hypotheses relating to code quality and a moredirect correlation between TDD and productivitywere inconclusive.Wikipedia @ua_spring #JugLviv 8
    9. 9. What exactly TDD is?Test-driven development offers more than justsimple validation of correctness, but can alsodrive the design of a programWikipedia @ua_spring #JugLviv 9
    10. 10. An attempt to fix TDD - ATDD @ua_spring #JugLviv 10
    11. 11. An attempt to fix TDD - ATDDAcceptance Test Driven Development (ATDD) is apractice in which the whole team collaborativelydiscusses acceptance criteria, with examples, andthen distills them into a set of concreteacceptance tests before development begins. driven-development-atdd-an-overview/ @ua_spring #JugLviv 11
    12. 12. An attempt to fix TDD - ATDDAcceptance TDD helps coordinate softwareprojects in a way that helps us deliver exactlywhat the customer wants when they want it, andthat doesn’t let us implement the requiredfunctionality only half way. @ua_spring #JugLviv 12
    13. 13. What is 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 @ua_spring #JugLviv 13
    14. 14. Magical words: GWT @ua_spring #JugLviv 14
    15. 15. BDD + SeleniumConcordion is an open source tool for writingautomated acceptance tests in Java* * There are also versions for .NET, Python, Scala, and Ruby. @ua_spring #JugLviv 15
    16. 16. How this works? Concordion WebDriver Browser Test RunnerTestNG/JUnit PageObject test Concordion TestNG/JUnit 16 test spec test methods @ua_spring #JugLviv
    17. 17. Some codeSite test example @ua_spring #JugLviv 17
    18. 18. Code on the GitHub @ua_spring #JugLviv 18
    19. 19. Alternatives: platformBe pragmatic – don’t use Java where it is notneeded. @ua_spring #JugLviv 19
    20. 20. Alternatives: BDD frameworks Cucumber JBehave easyB… @ua_spring #JugLviv 20
    21. 21. Alternatives: UI tests @ua_spring #JugLviv 21
    22. 22. Approach criticismOften “pure BDD” is not needed - ATDD isenoughUsually UI-tests are better to replace withlower-level tests (e.g. integration or evenfunctional) @ua_spring #JugLviv 22
    23. 23. Conclusion@ua_spring #JugLviv 23
    24. 24. Talking seriously…BDD is designed for a projects where businessand engineering are working tightlyBDD is not useful for every projectBDD adoption is a complex processevery team member is responsible for aproduct quality @ua_spring #JugLviv 24
    25. 25. Questions?@twincengray@ua_spring @ua_spring #JugLviv 25