Presentation is loading. Please wait.

Presentation is loading. Please wait.

Designveloper BDD Training October 2 nd – October 3 rd, 2014 Hung Vo - CEO.

Similar presentations


Presentation on theme: "Designveloper BDD Training October 2 nd – October 3 rd, 2014 Hung Vo - CEO."— Presentation transcript:

1 Designveloper BDD Training October 2 nd – October 3 rd, 2014 Hung Vo - CEO

2 What is BDD  Software development methodology based on TDD

3 Benefit of BDD  Easy to write test scenarios, even customer can write  Verbose, easy to read  Focus on behavior (business value of the app)

4 BDD vs TDD BDD (Behavior Driven Development)TDD (Test Driven Development) Acceptance testUnit test Stand on user point of viewStand on developer point of view Related to business valueNot really related to business value Focus on “WHAT”Focus on “HOW” Similarities: -Write test, see it failed (red) -Implement, make the test passed (green) -Refactor and repeat above 2 steps

5 How to use  Test runner:  JS: Cucumber.js https://github.com/cucumber/cucumber-jshttps://github.com/cucumber/cucumber-js  PHP: Behat http://docs.behat.org/en/latest/http://docs.behat.org/en/latest/  Ruby: Cucumber http://cukes.info/http://cukes.info/  Gherkins syntax  http://docs.behat.org/en/v2.5/guides/1.gherkin.html http://docs.behat.org/en/v2.5/guides/1.gherkin.html  http://cukes.info/gherkin.html http://cukes.info/gherkin.html  Headless browsers: phantomjs, zombiejs  Real browsers: selenium webdriver, nightwatch  Mixed: webdriver.io  Bamboo

6 Some terms and conventions  User story As a, I want so that In order to, as a, I want  Scenario  Scenario Outline  Given: starting state of the scenario  When: some events  Then: expected outcomes  And: connection between multiple given, when, then statements  Step definition

7 Demo Setup: -Phantomjs -Webdriver.io -Selenium server standalone -Chrome webdriver -Cucumberjs -Bamboo

8 Development procedure Repeat the following  Step 1: Write features  Step 2: Write test scenarios  Step 3: Implement feature  Step4: Implement step definitions Note: step 3 & 4 can be done interchangeably

9 Development procedure  Step 1

10 Development procedure Step 2

11 Development produce  Step 3 – 4

12 Reference  https://bitbucket.org/designveloper/bdd-demo/src https://bitbucket.org/designveloper/bdd-demo/src  https://bitbucket.org/designveloper/bdd- demo/src/f6776081ed09550c01da854e1174ab9e33b075dd/packages/test- cucumber/?at=master https://bitbucket.org/designveloper/bdd- demo/src/f6776081ed09550c01da854e1174ab9e33b075dd/packages/test- cucumber/?at=master


Download ppt "Designveloper BDD Training October 2 nd – October 3 rd, 2014 Hung Vo - CEO."

Similar presentations


Ads by Google