Solit 2013, Behaviour Driven Development, Ихелис Александр

4,632 views

Published on

Александр Ихелис, Лондон, эксперт в автоматизации тестирования международного уровня

«Behaviour Driven Development». Процессы, принципы разработки, бенефиты, примеры. Лекция. Development секция. Webinar из Лондона.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
4,632
On SlideShare
0
From Embeds
0
Number of Embeds
4,061
Actions
Shares
0
Downloads
7
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Solit 2013, Behaviour Driven Development, Ихелис Александр

  1. 1. Behavior Driven Development by Aliaksandr Ikhelis, 2013 @Expedia.comSunday, 10 March 13
  2. 2. Agenda • BDD • Development workflow • Testing quadrants (types of tests) • Testing Pyramid • Stubbing in Functional Tests • Continuous IntegrationSunday, 10 March 13
  3. 3. Communication Issue They are They do not know slow!.. what they need!..Sunday, 10 March 13
  4. 4. Communication Issue They are They do not know slow!.. what they need!..Sunday, 10 March 13
  5. 5. Building communication bridgeSunday, 10 March 13
  6. 6. Building communication bridgeSunday, 10 March 13
  7. 7. Behavior Driven Development BDD is an evolution in the thinking behind TDD & ATDP Focus on delivery of the prioritized and verifiable business value by providing a common vocabularySunday, 10 March 13
  8. 8. Behavior Driven Development PracticesSunday, 10 March 13
  9. 9. Behavior Driven Development Practices • Establish goalsSunday, 10 March 13
  10. 10. Behavior Driven Development Practices • Establish goals • Draw out features using feature injectionSunday, 10 March 13
  11. 11. Behavior Driven Development Practices • Establish goals • Draw out features using feature injection • Involve stakeholders in the implementation process through outside-in software developmentSunday, 10 March 13
  12. 12. Behavior Driven Development Practices • Establish goals • Draw out features using feature injection • Involve stakeholders in the implementation process through outside-in software development • Use examples to describe behaviorSunday, 10 March 13
  13. 13. Behavior Driven Development Practices • Establish goals • Draw out features using feature injection • Involve stakeholders in the implementation process through outside-in software development • Use examples to describe behavior • Automate examples to provide quick feedback and regression testingSunday, 10 March 13
  14. 14. What BDD adds to TDDSunday, 10 March 13
  15. 15. What BDD adds to TDD • Test what an object does instead of what it isSunday, 10 March 13
  16. 16. What BDD adds to TDD • Test what an object does instead of what it is • Design top-down, which is essential for YAGNI – You Arent Gonna Need ItSunday, 10 March 13
  17. 17. What BDD adds to TDD • Test what an object does instead of what it is • Design top-down, which is essential for YAGNI – You Arent Gonna Need It • Define acceptance criteria with the customer and specify it in the automated way, serve the living specSunday, 10 March 13
  18. 18. The BDD “Outside-In” cycleSunday, 10 March 13
  19. 19. The BDD “Outside-In” cycleSunday, 10 March 13
  20. 20. Gherkin: feature title and narrative Feature: Adding movies to the queueSunday, 10 March 13
  21. 21. Gherkin: feature title and narrative Feature: Adding movies to the queueSunday, 10 March 13
  22. 22. Gherkin: feature title and narrative Feature: Adding movies to the queueSunday, 10 March 13
  23. 23. Gherkin: feature title and narrative Feature: Adding movies to the queueSunday, 10 March 13
  24. 24. Describing Features with Cucumber Cucumber is a BDD tool that reads plain text descriptions of application features with example scenarios, which can be converted into automation. The text is written in a business readable domain language, known as Gherkin.Sunday, 10 March 13
  25. 25. Cucumber step definitions © 2012 Expedia, Inc..Sunday, 10 March 13
  26. 26. Describing code with RSpec RSpec is a BDD framework, which is used to write executable examples of the expected behaviour of a small bit of code in a controlled context. Code example: Output:Sunday, 10 March 13
  27. 27. Describing code with RSpecSunday, 10 March 13
  28. 28. Example: process flowSunday, 10 March 13
  29. 29. Example: story cardSunday, 10 March 13
  30. 30. Describing code with RSpecSunday, 10 March 13
  31. 31. Benefits • Communication • Living Documentation • Traceability • Focus on behaviorSunday, 10 March 13
  32. 32. Sunday, 10 March 13
  33. 33. Testing quadrandsSunday, 10 March 13
  34. 34. Get the testing pyramid (un)fit BEFORE AFTERSunday, 10 March 13
  35. 35. Stubbing services/back-ends © 2012 Expedia, Inc..Sunday, 10 March 13
  36. 36. Stubbing services/back-ends • Spoofing the service (replicate behavior with mocked backend + store data) • Prepared canned responses • Stubbing per browser session © 2012 Expedia, Inc..Sunday, 10 March 13
  37. 37. Jenkins: trunk pipeline Stage 1 Stage 2 Stage 3 - Compile - Deploy - Stub - Package - isWorking acceptance - Unit tests - Stub - PMD (static analysis) integration © 2012 Expedia, Inc..Sunday, 10 March 13
  38. 38. Jenkins: trunk pipeline © 2012 Expedia, Inc..Sunday, 10 March 13
  39. 39. CI tips • Start small • Keep it fast – set a limit • Fail Fast • Keep it green • Everyone is responsible for Quality • Pre-checkin Ant Targets © 2012 Expedia, Inc..Sunday, 10 March 13
  40. 40. Speaking the same language = building together As an awesome team We want to build such a great product So that everyone loves it Given the investment of 22M of bricks When you place all the bricks properly Then the Solit Conference Tower is visible to all people across the GlobeSunday, 10 March 13
  41. 41. Do not forget to Have Fun!Sunday, 10 March 13
  42. 42. • alex.ikhelis@gmail.com • www.linkedin.com/in/aikhelis/Sunday, 10 March 13
  43. 43. Recommended reading by Aliaksandr Ikhelis, 2013Sunday, 10 March 13

×