Business Selectors                Extension ForThursday, 18 October 12
Ben WaineThursday, 18 October 12
BDD Workflow In Large Organisations                             Business Analyst   Designers                               ...
BDD Workflow In Large Organisations                          Business Analyst     Designers                                ...
Example Steps Shipped With Mink Extension          Scenario: Searching for a page that does exist            Given I am on...
Problems Encountered At Sky / Orange   • Mink requires implementation details   • Test teams with no PHP skills   • Difficu...
Business SelectorsThursday, 18 October 12
Example            test.feature            Given I go to the page "Home Page"            When I follow the link "Add Subsc...
Steps Shipped With Business Selector Extension Given I go to the page "<PAGE NAME>" When I follow the link "<LINK>" When I...
Some Extra Steps Dealing With Common Tasks         When I focus on the "<IFRAME (RELATES TO ID OR INDEX)>" iframe         ...
Extension Configuration    default:        context:             parameters:                 javascript_session: selenium   ...
Extension Use  <?php  // Namespaces ...  class FeatureContext extends BehatContext  {      public function __construct(arr...
DEMOThursday, 18 October 12
BDD Workflow In Large Organisations                          Business Analyst     Designers                                ...
BDD Workflow In Large Organisations                             Business Analyst   Designers                               ...
Questions?Thursday, 18 October 12
Shameless Plug:                Orange Digital Are Hiring!                     Testers / Developers - Contract / Permanent ...
Upcoming SlideShare
Loading in …5
×

Business selectors

1,088 views

Published on

My talk on the Business Selectors Extension.

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,088
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Business selectors

  1. 1. Business Selectors Extension ForThursday, 18 October 12
  2. 2. Ben WaineThursday, 18 October 12
  3. 3. BDD Workflow In Large Organisations Business Analyst Designers Tester Developer Tester Business AnalystThursday, 18 October 12
  4. 4. BDD Workflow In Large Organisations Business Analyst Designers Tester Concepts Implementation DeveloperThursday, 18 October 12
  5. 5. Example Steps Shipped With Mink Extension Scenario: Searching for a page that does exist Given I am on "/wiki/Main_Page" When I fill in "search" with "Behavior Driven Development" And I press "searchButton" Then I should see "agile software development" When /^(?:|I )fill in "(?P<field>(?:[^"]|")*)" with "(?P<value>(?:[^"]|")*)"$/ When /^(?:|I )press "(?P<button>(?:[^"]|")*)"$/Thursday, 18 October 12
  6. 6. Problems Encountered At Sky / Orange • Mink requires implementation details • Test teams with no PHP skills • Difficulty identifying elements on the page using Mink ExtensionThursday, 18 October 12
  7. 7. Business SelectorsThursday, 18 October 12
  8. 8. Example test.feature Given I go to the page "Home Page" When I follow the link "Add Subscription" And I fill in the "first name box" field with "ben" Then the "first name box" form field should contain "ben" And I press the "test" button And the "Widget" should contain "Area One Text" selectors.yml Add Subscription: "a.self-link" first name box: "form#name_form input[name=first_name]" test: "form#name_form input[name=submit]" Widget: div#user_widget urls.yml Home Page: "/" Element Page: "/element.html"Thursday, 18 October 12
  9. 9. Steps Shipped With Business Selector Extension Given I go to the page "<PAGE NAME>" When I follow the link "<LINK>" When I click the "<CLICKABLE ELEMENT>" When I press the "<BUTTON>" button When I fill in the "<TEXT INPUT>" field with "value" When the "<TEXT INPUT>" form field should not contain "value" When I select "value" from the "<SELECT OR MULTISELECT>" selector When I additionally select "value" from the "<MULTISELECT>" selector When I check the "<CHECKBOX>" checkbox When I uncheck the "<CHECKBOX>" checkbox When I focus on the "<IFRAME (RELATES TO ID OR INDEX)>" iframe When I refocus on the primary page When I hover over "<PAGE ELEMENT>" When I wait for the "<PAGE ELEMENT>" component to [dis]appear Then the "<PAGE ELEMENT>" should contain "value" Then the "<PAGE ELEMENT>" should not contain "value" Then I should see "<PAGE ELEMENT>" component Then I should not see "<PAGE ELEMENT>" component Then "<PAGE ELEMENT>" should contain "<PAGE ELEMENT>" Then "<PAGE ELEMENT>" should not contain "<PAGE ELEMENT>" Then the "<CHECKBOX>" should be checked Then the "<CHECKBOX>" should not be checked Then the "<TEXT INPUT>" form field should contain "value"Thursday, 18 October 12
  10. 10. Some Extra Steps Dealing With Common Tasks When I focus on the "<IFRAME (RELATES TO ID OR INDEX)>" iframe When I refocus on the primary page Given I attach <FILEPATH> to <PAGEELEMENT> When I wait for the "<PAGE ELEMENT>" component to [dis]appearThursday, 18 October 12
  11. 11. Extension Configuration default: context: parameters: javascript_session: selenium browser: firefox show_cmd: open %s extensions: OrangeDigitalBusinessSelectorExtensionExtension: urlFilePath: urls.yml selectorFilePath: selectors.yml assetPath: path timeout: 30 contexts: UIBusinessSelector: ~ BehatMinkExtensionExtension: base_url: "http://local.dev" default_session: goutte goutte: ~ selenium: ~ selenium2: ~Thursday, 18 October 12
  12. 12. Extension Use <?php // Namespaces ... class FeatureContext extends BehatContext { public function __construct(array $parameters) { $this->useContext(mink, new MinkContext($parameters)); $this->useContext(BS, new BusinessSelectorContext($parameters)); } }Thursday, 18 October 12
  13. 13. DEMOThursday, 18 October 12
  14. 14. BDD Workflow In Large Organisations Business Analyst Designers Business Tester Concepts Selectors Implementation DeveloperThursday, 18 October 12
  15. 15. BDD Workflow In Large Organisations Business Analyst Designers Tester Developer Tester Business AnalystThursday, 18 October 12
  16. 16. Questions?Thursday, 18 October 12
  17. 17. Shameless Plug: Orange Digital Are Hiring! Testers / Developers - Contract / Permanent ray.fawcett@orange.comThursday, 18 October 12

×