Successfully reported this slideshow.

Behavioral Driven Development

0

Share

Loading in …3
×
1 of 18
1 of 18

Behavioral Driven Development

0

Share

Download to read offline

Description

Recording of Chris Riley's presentation at Twin Cities Product Conf 2019

Transcript

  1. 1. BEHAVORIAL DRIVEN DEVELOPMENT Shared Understanding Goes A Long Way! Chris Riley
  2. 2. WHO IS CPRIME?
  3. 3. It takes more than talent and technology to deliver performance worth celebrating. It takes the concerted effort of those willing to wrestle with complexity… and overcome complacency. At Cprime, our performer-first approach to consulting drives harmonious transformations across the enterprise, while our best-in-class managed services ensure business doesn’t miss a beat. CPRIME: DELIVER PERF ORMAN CE WHO IS CPRIME
  4. 4. Some Thoughts • Why am I here? - QUALITY is everyone’s job • How do we make quality inherent? – WE define it with our customer • What are we trying to deliver? – WORKING Software
  5. 5. Personal Experiences • Measuring a derelict house – simplicity, standards • Learning to row on a collegiate crew team – practice…practice … practice • Pearson Student Registration System – trust, empathy, grit = Shared Understanding
  6. 6. Shared Understanding: Example Mapping https://cucumber.io/blog/example-mapping-introduction/ Rule = Acceptance Criteria Example = Exercise the Rule Question = Unknown Outcomes
  7. 7. Behavioral Driven Development • Deliberate Discovery (e.g. Example Mapping) • Test Driven Development
  8. 8. Test first, software second • TDD and BDD focus on creating the test first • Software is then constructed to make the test pass • Refactoring can then occur on the software using the test to validate
  9. 9. BDD Lifecycle CAPTURE BEHAVIOR Create Gherkin to support Stories and Scenarios TEST AUTOMATION Leverage Cucumber Framework to Generate Test Stubs, Add Logic and Include in Continuous Integration TEAM DEFINES Product, UX, QA, Business, Development, Architecture obtain consensus on expected behavior(s)
  10. 10. Gherkin Example Story: As a user I would like to login to the Customer App #features/example1.feature Feature: As a Customer App user I want to login Scenario: Valid User Given I go to "http://localhost:8090/CustomerApp/login" When I enter the user ”criley" And the password "111111111" And click the button Sign In Then I should see the CustomerApp Home Page
  11. 11. Cucumber Example module.exports = function() { this.Given(/^I go to "([^"]*)"$/, function (arg1,callback) { // Write code here that turns the phrase above into concrete actions callback(null, 'pending'); }); this.When(/^I enter the user "([^"]*)"$/, function (arg1, callback) { // Write code here that turns the phrase above into concrete actions callback(null, 'pending'); }); this.When(/^the password "([^"]*)"$/, function (arg1, callback) { // Write code here that turns the phrase above into concrete actions callback(null, 'pending'); }); … this.Then(/^I should see the Fedline Home Page$/, function (callback) { // Write code here that turns the phrase above into concrete actions callback(null, 'pending'); }); };
  12. 12. Cucumber Completed Example module.exports = function() { this.Given(/^I go to "([^"]*)"$/, function (site) { browser.get(site); }); this.When(/^I enter the user "([^"]*)"$/, function (arg1) { element(by.id('loginId')).sendKeys(arg1); }); …
  13. 13. Cucumber Completed Example ChristophersMBP:Example1 criley$ protractor protractor.conf.js [10:12:14] I/hosted - Using the selenium server at http://127.0.0.1:4444/wd/hub [10:12:14] I/launcher - Running 1 instances of WebDriver Feature: As a CustomerApp user I want to login cucumber event handlers attached via registerHandler are now passed the associated object instead of an event getPayloadItem will be removed in the next major release Scenario: Valid User ✓ Given I go to "http://localhost:8090/CustomerApp/login" ✓ When I enter the user ”criley" ✓ And the password "111111111" ✓ And click the button Sign In ✓ Then I should see the CustomerApp Home Page 1 scenario (1 passed) 5 steps (5 passed) 0m00.006s [10:12:15] I/launcher - 0 instance(s) of WebDriver still running [10:12:15] I/launcher - chrome #01 passed
  14. 14. Team Benefit IN ACTION “We keep going until the group is satisfied that the scope of the story is clear, or we run out of time.”
  15. 15. Development Benefit The test is the acceptance criteria verbatim and BDD allows me to validate my code with the business requirements. “ “
  16. 16. Summary • Why am I here? - QUALITY is everyone’s job • How do we make quality inherent? – WE define it with our customer • What are we trying to deliver? – WORKING Software
  17. 17. THANK YOU

Description

Recording of Chris Riley's presentation at Twin Cities Product Conf 2019

Transcript

  1. 1. BEHAVORIAL DRIVEN DEVELOPMENT Shared Understanding Goes A Long Way! Chris Riley
  2. 2. WHO IS CPRIME?
  3. 3. It takes more than talent and technology to deliver performance worth celebrating. It takes the concerted effort of those willing to wrestle with complexity… and overcome complacency. At Cprime, our performer-first approach to consulting drives harmonious transformations across the enterprise, while our best-in-class managed services ensure business doesn’t miss a beat. CPRIME: DELIVER PERF ORMAN CE WHO IS CPRIME
  4. 4. Some Thoughts • Why am I here? - QUALITY is everyone’s job • How do we make quality inherent? – WE define it with our customer • What are we trying to deliver? – WORKING Software
  5. 5. Personal Experiences • Measuring a derelict house – simplicity, standards • Learning to row on a collegiate crew team – practice…practice … practice • Pearson Student Registration System – trust, empathy, grit = Shared Understanding
  6. 6. Shared Understanding: Example Mapping https://cucumber.io/blog/example-mapping-introduction/ Rule = Acceptance Criteria Example = Exercise the Rule Question = Unknown Outcomes
  7. 7. Behavioral Driven Development • Deliberate Discovery (e.g. Example Mapping) • Test Driven Development
  8. 8. Test first, software second • TDD and BDD focus on creating the test first • Software is then constructed to make the test pass • Refactoring can then occur on the software using the test to validate
  9. 9. BDD Lifecycle CAPTURE BEHAVIOR Create Gherkin to support Stories and Scenarios TEST AUTOMATION Leverage Cucumber Framework to Generate Test Stubs, Add Logic and Include in Continuous Integration TEAM DEFINES Product, UX, QA, Business, Development, Architecture obtain consensus on expected behavior(s)
  10. 10. Gherkin Example Story: As a user I would like to login to the Customer App #features/example1.feature Feature: As a Customer App user I want to login Scenario: Valid User Given I go to "http://localhost:8090/CustomerApp/login" When I enter the user ”criley" And the password "111111111" And click the button Sign In Then I should see the CustomerApp Home Page
  11. 11. Cucumber Example module.exports = function() { this.Given(/^I go to "([^"]*)"$/, function (arg1,callback) { // Write code here that turns the phrase above into concrete actions callback(null, 'pending'); }); this.When(/^I enter the user "([^"]*)"$/, function (arg1, callback) { // Write code here that turns the phrase above into concrete actions callback(null, 'pending'); }); this.When(/^the password "([^"]*)"$/, function (arg1, callback) { // Write code here that turns the phrase above into concrete actions callback(null, 'pending'); }); … this.Then(/^I should see the Fedline Home Page$/, function (callback) { // Write code here that turns the phrase above into concrete actions callback(null, 'pending'); }); };
  12. 12. Cucumber Completed Example module.exports = function() { this.Given(/^I go to "([^"]*)"$/, function (site) { browser.get(site); }); this.When(/^I enter the user "([^"]*)"$/, function (arg1) { element(by.id('loginId')).sendKeys(arg1); }); …
  13. 13. Cucumber Completed Example ChristophersMBP:Example1 criley$ protractor protractor.conf.js [10:12:14] I/hosted - Using the selenium server at http://127.0.0.1:4444/wd/hub [10:12:14] I/launcher - Running 1 instances of WebDriver Feature: As a CustomerApp user I want to login cucumber event handlers attached via registerHandler are now passed the associated object instead of an event getPayloadItem will be removed in the next major release Scenario: Valid User ✓ Given I go to "http://localhost:8090/CustomerApp/login" ✓ When I enter the user ”criley" ✓ And the password "111111111" ✓ And click the button Sign In ✓ Then I should see the CustomerApp Home Page 1 scenario (1 passed) 5 steps (5 passed) 0m00.006s [10:12:15] I/launcher - 0 instance(s) of WebDriver still running [10:12:15] I/launcher - chrome #01 passed
  14. 14. Team Benefit IN ACTION “We keep going until the group is satisfied that the scope of the story is clear, or we run out of time.”
  15. 15. Development Benefit The test is the acceptance criteria verbatim and BDD allows me to validate my code with the business requirements. “ “
  16. 16. Summary • Why am I here? - QUALITY is everyone’s job • How do we make quality inherent? – WE define it with our customer • What are we trying to deliver? – WORKING Software
  17. 17. THANK YOU

More Related Content

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all

×