Your SlideShare is downloading. ×
  • Like
Acceptance test styles - Imperative vs Declarative
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Acceptance test styles - Imperative vs Declarative

  • 1,583 views
Published

 

Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
1,583
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
2
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
  • Command driven,List of instructions, how to do somethingDescribes what to do but not how to do it how
  • Boring - doesn’t engage the business peopleTied to the UI Brittle to UI changes Mobile, thick client, Web appBrittle to implementation changes Change the authentication mechanism
  • Easy to read – The business will get involved – They can write this!No longer tied to the UI UI changes can be updated in the steps or Page Object pattern Reuse across different UI’s - Mobile, thick client, Web appNo longer brittle to implementation changes Change the authentication mechanism

Transcript

  • 1. Acceptance Test StylesImperative vs DeclarativeLeeds Tester Gathering – April 2013Alan Parkinson
  • 2. Given a user “alan" exists with password "secret"And I am not logged inWhen I navigate to the home pageThen I am redirected to the login formWhen I enter the “username” with “alan”And I enter the “password” with “secret”And I press “login”Then I am redirected to the home page
  • 3. Given I am an unauthenticated UserWhen I attempt to view some restricted contentThen I am asked to authenticateWhen I authenticate with valid credentialsThen I am shown the restricted content
  • 4. Summary• Write in the Declarative style– Your scenario doesn’t become brittle– The business will read it• Avoid unnecessary detail– Don’t tie your scenario to the UI– Using sensible default values– Override the defaults where required
  • 5. Questions and Answersalan.parkinson@hindsightsoftware.co.uk@alan_parkinson @TeamHindsightAlan ParkinsonCEO and Co-founder Hindsight Software Ltd