Download - Behavior Driven Development
- 1.Behavior Driven Development BDD
2. BDD ? : BDD TDD 3.
- Dan North (2003 .)
4. TDD
- TDD
5. TDD Unit-User stories Unit- 6. BDD User stories Unit- 7.
- User Story
8. Given... When... Then... 9. ?
- Unit tests:
- Setup
- Excersize
- Verify
- Teardown
10.
- Given
- [ And< > ]
- ...
- When
- [ And< >]
- ...
- Then
- [ And< >]
11.
- 10000
- 5%
- 1
- 1
- 10500
12. Ruby/Cucumber 13. 1
- :
14. 2
- , , (pending)
15. 3
- :
16. 4
- , :
17. 5
- , :
18. 6
- , :
19. 7
- , !
20. Java/JBehave
-
- Given I am not logged in
- When I log in as Liz with a password JBehaver
- Then I should see a message, "Welcome, Liz!"
21. public class UserLogsInSuccessfully extends Scenario { public UserLogsInSuccessfully() { super(new LoginSteps()); } } 22. public class LoginSteps extends Steps { } 23.
-
- Given I am not logged in (PENDING)
- When I log in as Liz with a password JBehaver (PENDING)
- Then I should see a message, "Welcome, Liz!" (PENDING)
24.
- :
- @Given("...")
- @When("...")
- @Then("...")
25.
-
- @Given(Message $param)
- public void method(Param param) {
- }
26. @Given("I am not logged in") public void logOut() { currentPage.click("logout"); } 27. @When("I log in as $username with a password $password") public void logIn(String username, String password) { currentPage.click("login"); } 28. @Then("I should see a message, "$message"") public void checkMessage(String message) { ensureThat(currentPage, containsMessage(message)); } 29.
- , , (pending)
- ,
- ,
- ,
- , !
30. TDD
- ,
- (DSL)
31.
- Java
- JBehave, JTestR, instinct
- Ruby
- RBehave
- Rspec
- Cucumber
- PHP
- PHPSpec
32.
- Javascript
- JSSpec
- Python
- PySpec
- Groovy
- GSpec
33.
- http://behavior-driven.org/
- http://jbehave.org/
- http://dannorth.net/
- ...
34. ????????????? 35.
- Comodo - team lead
- Certified ScrumMaster
- [email_address]
- http://agile.od.ua/
36. !