Popping the Gherkin Stack




                           Ayan Dave
          Terry Wiegmann, CBAP, CSQE
February 16, 2012 – Today / Terry


• What is/are gherkin(s)?
• Examples of gherkins
• Reports after execution
• Screen shot captured for each click
• Executed within the Iteration
• Discussed at retrospectives
Sample gherkins
• Goal Level:
   – Given that I am a Teacher
   – When I have students in my Classes
   – Then I should be able to see the same ConnectED content
     my Students see
•
• Task Level:
   – Given that I have created a class and have added students
     to it
   – When I open the book for that class
   – Then I should be able to access the same
   – Newsfeed that Student see
Screenshots
February 16, 2012 – Today / Ayan

• Technologies used
   • Java, Maven
   • WebDriver, Cuke4Duke
   • gherkin-salad – my pet project
• Automation using three browsers
   • Chrome, FireFox, IE
• Automation in three environments
   • DEV, QA, UAT
Flashback: October 10, 2011/Terry


          • New team, new client site, new project
          • Terry BA and QA: Ayan Lead Developer
          • App, Browsers, System Environments
          • Client Environment
          • Pooled past experiences
          • Challenges for agile teams, blending roles
Flashback: October 10, 2011/Ayan

          • Challenges as a Developer
          • Use gherkins
             • Gherkins as a shared language
             • Possibility of Automation
          • But no automation at this point
             • To allow the team to ride the learning /
                adopting curve
Flashback: October 10, 2011/Terry


          • Use gherkins to capture
            requirements, acceptance tests
          • Use gherkins to form test plans
          • Write gherkins at the start of development
Flashback: October 10, 2011 / Ayan

          • Execute gherkins before the development
            ends
          • Definition of Done - Before the developer
            calls a feature “done” the developer, QA and
            BA would get together and manually run
            through the gherkins
          • Code Reviews are also done
• 2 iterations, 0 defects
                                                           • Scenarios walked
                                                             through at the end of
Flashback: November 14, 2011 /Terry




                                                             development with BA


                                      After 2 iterations
                                                             and Tester
                                                           • First version of
                                                             “gherkins”
Initial Version of our gherkins / Terry

• Rolling Scenarios
• Action Level gherkins
• Data Preparation Scenarios
• Task and Action Level
                                                            gherkins
                                                          • Action levels are good
Flashback: November 10, 2011 /Ayan




                                                            for certain audiences –


                                     After 2 iterations
                                                            Help
                                                            Desk, Writers, Newbies
                                                          • Ready to try Task Level
                                                            Gherkins
Task Level gherkins / Ayan

• Less element level interactions
• Every task level instruction may translate to
  multiple action level instructions
• Used gherkins in show
                                                             and tell, business and
                                                             client is intrigued
                                                           • Questions came up that
                                                             how is this different
Flashback: November 10, 2011 /Terry




                                                             from QTP?

                                      After 2 iterations
                                                           • No License :)
                                                           • Accessible to everyone
                                                           • Need Automation
                                                           • Traceability to
                                                             requirements in JIRA
Traceability

• Adding the requirement ID in the feature and
  scenario text
• Can write groovy script to
                                                             create reports around
                                                             traceability
                                                          • Want to do automation in all
                                                             environments, all browsers
Flashback: November 10, 2011 /Ayan




                                                          • Would do only Firefox and DEV



                                     After 2 iterations
                                                             environment for next 2
                                                             iterations
                                                          • With Task Level gherkins we
                                                             would write code at action
                                                             level
January 2, 2012 - Happy New Year!
After 2 iterations & Nice Holiday Season




• We had more task level gherkins
• Gherkins and automation organized in SVN
• Found a Notepad++ plugin to assist in writing gherkins
SVN Structure
January 2, 2012 - Happy New Year!
  After 2 iterations & Nice Holiday Season




• Captured page structure
   information, Role, Component, Element
• @manual features
• @wip features
• Want to do more automation in 3 browsers, 3 environments
• Created Execution Plans
• Created Data File
Page Structure (one per application)
Data File (for each environment)
Execution Plan (one per environment)
Automated Step
Automated Step
February 16, 2012 – Back to Today, After 2 Iterations


• Here we have a process with 0 defects, well
  running and adapted to
   • A running process
   • Running in 3 browsers
   • Running in 3 environments
   • Scheduled run at 6 in evening
February 16, 2012 – Back to Today, After 2 Iterations


• Added the following features
   • Capturing screenshots
   • Archiving the results
   • Specific browser usage
What Do We Jump Over next?




• Capture scenarios as we are talking to
  business and run it by them, if possible
• Involve client Testing/QA team in our
  processes
• Ensuring scenario and test coverage
• Ensuring complementary scenarios
What Do We Jump Over next?




• Support for ipad?
• Simplify the maintenance of gherkins including
  execution plan, page structure and data file
• Automatic conversion of Task Level gherkins to
  Action Level Gherkins?
• Automatically generating gherkins from
  models?
Credits




All of this is not something that we could have
done by ourselves. It is a team effort.
• Development Team: Chai Thatipamula, Sakshi
  Vaghela, Pallavi Jain
• Project Manager: Demetrius Jackson
• Team at the Client Location
Contact




• Ayan Dave
   •   @daveayan
   •   http://projects.daveayan.com
   •   http://daveayan.com

• Terry Wiegmann, CBAP, CSQE
   •   @twieg
   •   twiegmann@quicksolutions.com
03/2012 - Popping the gherkin stack

03/2012 - Popping the gherkin stack

  • 1.
    Popping the GherkinStack Ayan Dave Terry Wiegmann, CBAP, CSQE
  • 2.
    February 16, 2012– Today / Terry • What is/are gherkin(s)? • Examples of gherkins • Reports after execution • Screen shot captured for each click • Executed within the Iteration • Discussed at retrospectives
  • 3.
    Sample gherkins • GoalLevel: – Given that I am a Teacher – When I have students in my Classes – Then I should be able to see the same ConnectED content my Students see • • Task Level: – Given that I have created a class and have added students to it – When I open the book for that class – Then I should be able to access the same – Newsfeed that Student see
  • 4.
  • 6.
    February 16, 2012– Today / Ayan • Technologies used • Java, Maven • WebDriver, Cuke4Duke • gherkin-salad – my pet project • Automation using three browsers • Chrome, FireFox, IE • Automation in three environments • DEV, QA, UAT
  • 8.
    Flashback: October 10,2011/Terry • New team, new client site, new project • Terry BA and QA: Ayan Lead Developer • App, Browsers, System Environments • Client Environment • Pooled past experiences • Challenges for agile teams, blending roles
  • 9.
    Flashback: October 10,2011/Ayan • Challenges as a Developer • Use gherkins • Gherkins as a shared language • Possibility of Automation • But no automation at this point • To allow the team to ride the learning / adopting curve
  • 10.
    Flashback: October 10,2011/Terry • Use gherkins to capture requirements, acceptance tests • Use gherkins to form test plans • Write gherkins at the start of development
  • 11.
    Flashback: October 10,2011 / Ayan • Execute gherkins before the development ends • Definition of Done - Before the developer calls a feature “done” the developer, QA and BA would get together and manually run through the gherkins • Code Reviews are also done
  • 12.
    • 2 iterations,0 defects • Scenarios walked through at the end of Flashback: November 14, 2011 /Terry development with BA After 2 iterations and Tester • First version of “gherkins”
  • 13.
    Initial Version ofour gherkins / Terry • Rolling Scenarios • Action Level gherkins • Data Preparation Scenarios
  • 14.
    • Task andAction Level gherkins • Action levels are good Flashback: November 10, 2011 /Ayan for certain audiences – After 2 iterations Help Desk, Writers, Newbies • Ready to try Task Level Gherkins
  • 15.
    Task Level gherkins/ Ayan • Less element level interactions • Every task level instruction may translate to multiple action level instructions
  • 16.
    • Used gherkinsin show and tell, business and client is intrigued • Questions came up that how is this different Flashback: November 10, 2011 /Terry from QTP? After 2 iterations • No License :) • Accessible to everyone • Need Automation • Traceability to requirements in JIRA
  • 17.
    Traceability • Adding therequirement ID in the feature and scenario text
  • 18.
    • Can writegroovy script to create reports around traceability • Want to do automation in all environments, all browsers Flashback: November 10, 2011 /Ayan • Would do only Firefox and DEV After 2 iterations environment for next 2 iterations • With Task Level gherkins we would write code at action level
  • 19.
    January 2, 2012- Happy New Year! After 2 iterations & Nice Holiday Season • We had more task level gherkins • Gherkins and automation organized in SVN • Found a Notepad++ plugin to assist in writing gherkins
  • 20.
  • 21.
    January 2, 2012- Happy New Year! After 2 iterations & Nice Holiday Season • Captured page structure information, Role, Component, Element • @manual features • @wip features • Want to do more automation in 3 browsers, 3 environments • Created Execution Plans • Created Data File
  • 22.
    Page Structure (oneper application)
  • 23.
    Data File (foreach environment)
  • 24.
    Execution Plan (oneper environment)
  • 25.
  • 26.
  • 27.
    February 16, 2012– Back to Today, After 2 Iterations • Here we have a process with 0 defects, well running and adapted to • A running process • Running in 3 browsers • Running in 3 environments • Scheduled run at 6 in evening
  • 28.
    February 16, 2012– Back to Today, After 2 Iterations • Added the following features • Capturing screenshots • Archiving the results • Specific browser usage
  • 29.
    What Do WeJump Over next? • Capture scenarios as we are talking to business and run it by them, if possible • Involve client Testing/QA team in our processes • Ensuring scenario and test coverage • Ensuring complementary scenarios
  • 30.
    What Do WeJump Over next? • Support for ipad? • Simplify the maintenance of gherkins including execution plan, page structure and data file • Automatic conversion of Task Level gherkins to Action Level Gherkins? • Automatically generating gherkins from models?
  • 31.
    Credits All of thisis not something that we could have done by ourselves. It is a team effort. • Development Team: Chai Thatipamula, Sakshi Vaghela, Pallavi Jain • Project Manager: Demetrius Jackson • Team at the Client Location
  • 32.
    Contact • Ayan Dave • @daveayan • http://projects.daveayan.com • http://daveayan.com • Terry Wiegmann, CBAP, CSQE • @twieg • twiegmann@quicksolutions.com