Send the link below via email or IMCopy
Present to your audienceStart remote presentation
- Invited audience members will follow you as you navigate and present
- People invited to a presentation do not need a Prezi account
- This link expires 10 minutes after you close the presentation
- A maximum of 30 users can follow your presentation
- Learn more about this feature in our knowledge base article
Do you really want to delete this prezi?
Neither you, nor the coeditors you shared it with will be able to recover it again.
Make your likes visible on Facebook?
Connect your Facebook account to Prezi and let your likes appear on your timeline.
You can change this under Settings & Account at any time.
My Automated Testing Journey
Transcript of My Automated Testing Journey
When the customer’s order totals <order total>
Then the customer <pays GST>
And they are charged <shipping rate> Dim TBrowser : Set TBrowser=Browser("name:=Beautiful Tea.*")
Dim TPage : Set TPage=TBrowser.Page("title:=Beautiful Tea.*")
TPage.WebEdit("name:=Search").Set "Byron Breakfast"
TPage.WebButton("name:=Search","index:=0").Click Sample QTP Sample Watir b = Watir::Browser.new
b.text_field(:name => "Search").set "Byron Breakfast"
b.button(:name => "Search").click
b.title.should == "Search Results" Small change in application
means lots of changes in scripts Scripts are written in code:
non-technical users can't understand Difficult to understand what the coverage
(either business or code) is Business Driven process_row(action, param1, param2 ...) contains business logic
but version controlling
spreadsheets is hard
can't diff/merge etc. Action Word provides some business
visibility into tests
but is the most dangerous:
specifying scripts but not using code:
incredibly hard to refactor Sold as 'anyone
can do automation' An Automated Testing Journey more business focussed:
easier to understand
...but can be hard to read:
forced use of rows & columns Continous Integration members of team integrate work frequently run automated tests for rapid feedback QTP, RFT etc. doesn't work -> prohibitive cost
won't run on non Windows machines developers need access watir, webdriver & selenium shine Allows you to specify
tests in english
And execute them Cucumber Scenario: Free Shipping Given I open a browser
And I go to "beautifultea.com"
When I enter "byron breakfast" in "search"
And I click "Search"
Then I should see byron breakfast tea
When I enter "20" into "quantity"
And I click "Add to Cart"
Then I should see the cart Still writing not steps specifications Scenario: Free Shipping Given I am on the Beautiful Tea home page
When I search for ‘Byron Breakfast’ tea
Then I see the page for ‘Byron Breakfast’ tea
When I add 10 x ‘Byron Breakfast’ tea to my cart
Then I see 10 x ‘Byron Breakfast’ tea in my cart Slightly better Can build page model
to represent Page Objects Given I am on the Beautiful Tea homepage @homepage = BeautifulTeaHome.new When I search for 'Byron Breakfast' tea @homepage.search_for 'Byron Breakfast' Then I should the page for 'Byron Breakfast' tea @resultspage.title.should == 'Byron Breakfast tea' Moving from test scripts
to specifications Less coupled to implementation
Focussed on business specifications
More resilient to change Easier to read
Easier for business to understand Feature: Beautiful Tea Shipping Costs Australian customers pay GST
Overseas customers don’t pay GST
Australian customers get free shipping for orders $100 and above
●Overseas customers all pay the same shipping rate regardless of order size Scenario Outline: Calculate GST and shipping rate Examples Living Documentation Executable specifications
become single source of truth
Used for support issues
Used for system enhancement/improvement Specifications make sense Easy to understand
Easy to test http://www.centrelink.gov.au/internet/internet.nsf/payments/baby_bonus_iat.htm Combine with personas Alister Scott ThoughtWorks Australia watirmelon.com Lots of tools make this possible ThoughtWorks Twist Cucumber SpecFlow FitNesse Concordion No page objects Given I open a browser @browser = Watir::Browser.new When I go to "beautifultea.com" @browser.goto "beautifultea.com" When I enter 'byron' in search @browser.text_field(:xpath,
"//img[@src='3.jpg']/../").set "byron" Page Objects Allows you to specify
elements in pages
Nice neat step definitions heavy weight Continous Integration Continous Integration What the business pays for Specifications as contracts Questions? email@example.com