Your SlideShare is downloading. ×
Business selectors
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Business selectors

648
views

Published on

My talk on the Business Selectors Extension.

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
648
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Business Selectors Extension ForThursday, 18 October 12
  • 2. Ben WaineThursday, 18 October 12
  • 3. BDD Workflow In Large Organisations Business Analyst Designers Tester Developer Tester Business AnalystThursday, 18 October 12
  • 4. BDD Workflow In Large Organisations Business Analyst Designers Tester Concepts Implementation DeveloperThursday, 18 October 12
  • 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. 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. Business SelectorsThursday, 18 October 12
  • 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. 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. 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. 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. 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. DEMOThursday, 18 October 12
  • 14. BDD Workflow In Large Organisations Business Analyst Designers Business Tester Concepts Selectors Implementation DeveloperThursday, 18 October 12
  • 15. BDD Workflow In Large Organisations Business Analyst Designers Tester Developer Tester Business AnalystThursday, 18 October 12
  • 16. Questions?Thursday, 18 October 12
  • 17. Shameless Plug: Orange Digital Are Hiring! Testers / Developers - Contract / Permanent ray.fawcett@orange.comThursday, 18 October 12