SlideShare a Scribd company logo
1 of 14
Sustainable Automation
Frameworks
© 2016 CoverMyMeds LLC. All Rights Reserved.
Time to Get Serious
© 2016 CoverMyMeds LLC. All Rights Reserved.
• The ultimate goal of testing is to allow our products to reach
production faster and safer.
• We can’t do this if we’re sinking time into maintaining our
test suite.
• This helps no one.
• Our automated test framework should be lightweight and
easy to resolve problems.
• This allows us to get back to the more important task of
actually ensuring the quality of our applications.
How do we get there?
© 2016 CoverMyMeds LLC. All Rights Reserved.
• Page-object model
• Step definition reusability
• Data management
• Other topics as my abstract promised
The Problem: Hardcoding
© 2016 CoverMyMeds LLC. All Rights Reserved.
• There’s a lot of STUFF in the THING you’re testing
• Lots of pages and objects on a web app
• Lots of services in an API
• Straight out of the box Google, most frameworks don’t have
a good way to manage this STUFF
• Then, when something changes, there is no one central
repository to update and we wind up having to make fixes
EVERYWHERE
The Solution: Page-Object Model
© 2016 CoverMyMeds LLC. All Rights Reserved.
• So we call it page-object… but really it’s applying object
orientation
• For each logical group we’re testing, we have a class that
describes it
• This works for web apps
• One page, one class
• Or for APIs
• One service, one class
What does this do for us?
© 2016 CoverMyMeds LLC. All Rights Reserved.
• Makes our code reusable
• We can even package it into a gem and share with other
areas
• Makes our code easy to update
• One change can fix every failing test
• Makes our code easy to understand
• The code now reflects the system that is under test in a
logical manner
The Problem: Too Many Step Definitions
© 2016 CoverMyMeds LLC. All Rights Reserved.
• Someone creates some step definitions that do the thing.
• Someone else creates another step definitions to do a thing.
• Nobody checks to see if there’s an existing step that can do
the thing.
• Everyone just keeps adding more step definitions until
there’s too many for a reasonable human being to search
through.
Why does this happen?
© 2016 CoverMyMeds LLC. All Rights Reserved.
• Step definitions aren’t written to do what they say.
• Sure, there’s a step that says it does that… but it only
partially does it. Or does some other thing. And it’s not
what you actually need.
• Step definitions are unclear.
• You could spend an hour figuring out what that thing is
supposed to be doing… or you could spend ten minutes
writing your own step.
• No one polices the step definitions.
• Because we all really hate maintaining our test
framework.
The Solution: No One Quick Fix
© 2016 CoverMyMeds LLC. All Rights Reserved.
• Standards
• Have a method of organization for your library
• Define at what level you want your steps to be written
• Everyone has to follow these!
• Step definitions ARE NOT CODE
• Structuring step definitions to represent coding logic
results in many incomprehensible steps
• Write step definitions to represent higher level business
logic
The Solution: No One Quick Fix
© 2016 CoverMyMeds LLC. All Rights Reserved.
• Review your step definition library regularly
• This should be a quick check that can be done as part of
the normal process of writing tests
• If you’re having to make time or use special tools to
manage your library… your library is probably too big
• Get it under control and keep it under control
• Abstract your steps
• Don’t make your steps dependent on data
• Instead, let data drive the test
The Problem: Data Management
© 2016 CoverMyMeds LLC. All Rights Reserved.
• If your framework consists of objects and your steps are
flexible and business-oriented… data becomes the driver for
testing
• Data is no longer locked in as part of the step definition, so
we can load different data for each test
• So how do we manage large amounts of data?
The Solution
© 2016 CoverMyMeds LLC. All Rights Reserved.
• Have a consistent, easy-to-use way of loading data into
your test
• Helper methods?
• Dump it into a fixture in a hook?
• Use descriptive naming for your data sets
• Reuse data where possible
• Make default data for stuff you don’t care about
• Creating a new test becomes as simple as changing the
data around
How to Keep it Pretty
© 2016 CoverMyMeds LLC. All Rights Reserved.
• Be disciplined
• Don’t put off tomorrow what you should really be doing
today
• Have a hierarchy of changes
• Change the data
• Change the gherkin
• Change the step definition
• Change the page-object
How to Keep it Pretty
© 2016 CoverMyMeds LLC. All Rights Reserved.
• Know what’s in your test suite and trust it to do it’s job
• Use all the resources available
• Don’t write unit tests with a GUI-driven test suite
• Not everything needs an automated test

More Related Content

What's hot

I Smell A RAT- Rapid Application Testing
I Smell A RAT- Rapid Application TestingI Smell A RAT- Rapid Application Testing
I Smell A RAT- Rapid Application Testing
Peter Presnell
 
Auditing Drupal Sites
Auditing Drupal SitesAuditing Drupal Sites
Auditing Drupal Sites
Exove
 

What's hot (20)

Automation testing: how tools are important?
Automation testing: how tools are important?Automation testing: how tools are important?
Automation testing: how tools are important?
 
I Smell A RAT- Rapid Application Testing
I Smell A RAT- Rapid Application TestingI Smell A RAT- Rapid Application Testing
I Smell A RAT- Rapid Application Testing
 
UI Automation Quirks
UI Automation QuirksUI Automation Quirks
UI Automation Quirks
 
Reaching for Your Quality Stretch Goals: Testing at Realtor.com
Reaching for Your Quality Stretch Goals: Testing at Realtor.comReaching for Your Quality Stretch Goals: Testing at Realtor.com
Reaching for Your Quality Stretch Goals: Testing at Realtor.com
 
Testing regression
Testing regressionTesting regression
Testing regression
 
Continuous everything
Continuous everythingContinuous everything
Continuous everything
 
Testing Web Services - QA or the Highway 2016
Testing Web Services - QA or the Highway 2016Testing Web Services - QA or the Highway 2016
Testing Web Services - QA or the Highway 2016
 
A journey to a Full Stack Tester
A journey to a Full Stack Tester A journey to a Full Stack Tester
A journey to a Full Stack Tester
 
Manual, Visual, and Automated Testing For Web Apps
Manual, Visual, and Automated Testing For Web AppsManual, Visual, and Automated Testing For Web Apps
Manual, Visual, and Automated Testing For Web Apps
 
Drupal 7 ci and testing
Drupal 7 ci and testingDrupal 7 ci and testing
Drupal 7 ci and testing
 
Getting Started With Selenium
Getting Started With SeleniumGetting Started With Selenium
Getting Started With Selenium
 
Test Design + Environment Management: Scaling UI Automation for Agile
Test Design + Environment Management: Scaling UI Automation for AgileTest Design + Environment Management: Scaling UI Automation for Agile
Test Design + Environment Management: Scaling UI Automation for Agile
 
Auditing Drupal Sites
Auditing Drupal SitesAuditing Drupal Sites
Auditing Drupal Sites
 
Making a Mock by Kelsey Shannahan
Making a Mock by Kelsey ShannahanMaking a Mock by Kelsey Shannahan
Making a Mock by Kelsey Shannahan
 
TestWorksConf: Experience exploratory testing
TestWorksConf: Experience exploratory testingTestWorksConf: Experience exploratory testing
TestWorksConf: Experience exploratory testing
 
Writing better tests for your java script app
Writing better tests for your java script appWriting better tests for your java script app
Writing better tests for your java script app
 
Five Easy Ways to QA Your Drupal Site
Five Easy Ways to QA Your Drupal SiteFive Easy Ways to QA Your Drupal Site
Five Easy Ways to QA Your Drupal Site
 
5 Essential Tips for Load Testing Beginners
5 Essential Tips for Load Testing Beginners5 Essential Tips for Load Testing Beginners
5 Essential Tips for Load Testing Beginners
 
Introduction to Test Driven Development
Introduction to Test Driven DevelopmentIntroduction to Test Driven Development
Introduction to Test Driven Development
 
Solving Flaky Automated Tests Using Machine Learning
Solving Flaky Automated Tests Using Machine LearningSolving Flaky Automated Tests Using Machine Learning
Solving Flaky Automated Tests Using Machine Learning
 

Viewers also liked

Advanced Software Test Automation
Advanced Software Test AutomationAdvanced Software Test Automation
Advanced Software Test Automation
Unmesh Ballal
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
Lior Tal
 
Test Automation and Continuous Integration
Test Automation and Continuous Integration Test Automation and Continuous Integration
Test Automation and Continuous Integration
TestCampRO
 

Viewers also liked (12)

Testing web services by Stan Jónsson
Testing web services by Stan JónssonTesting web services by Stan Jónsson
Testing web services by Stan Jónsson
 
Institute for Sustainable Technology
Institute for Sustainable TechnologyInstitute for Sustainable Technology
Institute for Sustainable Technology
 
Smart Cities: Technologies for Efficient and Sustainable Cities
Smart Cities: Technologies for Efficient and Sustainable CitiesSmart Cities: Technologies for Efficient and Sustainable Cities
Smart Cities: Technologies for Efficient and Sustainable Cities
 
Advanced Software Test Automation
Advanced Software Test AutomationAdvanced Software Test Automation
Advanced Software Test Automation
 
Green technology
Green technologyGreen technology
Green technology
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
 
Software Testing for International Students
Software Testing for International StudentsSoftware Testing for International Students
Software Testing for International Students
 
Test Automation and Continuous Integration
Test Automation and Continuous Integration Test Automation and Continuous Integration
Test Automation and Continuous Integration
 
Distributed Testing Environment
Distributed Testing EnvironmentDistributed Testing Environment
Distributed Testing Environment
 
Scrum gathering Paris 2013 - test automation strategy for Scrum Projects
Scrum gathering Paris 2013 -  test automation strategy for Scrum ProjectsScrum gathering Paris 2013 -  test automation strategy for Scrum Projects
Scrum gathering Paris 2013 - test automation strategy for Scrum Projects
 
Continuous test automation
Continuous test automationContinuous test automation
Continuous test automation
 
Building a Sustainable Technology Ecosystem and Cluster Bindi Karia
Building a Sustainable Technology Ecosystem and Cluster  Bindi KariaBuilding a Sustainable Technology Ecosystem and Cluster  Bindi Karia
Building a Sustainable Technology Ecosystem and Cluster Bindi Karia
 

Similar to Sustainable Automation Frameworks by Kelsey Shannahan

Artur Suchwalko “What are common mistakes in Data Science projects and how to...
Artur Suchwalko “What are common mistakes in Data Science projects and how to...Artur Suchwalko “What are common mistakes in Data Science projects and how to...
Artur Suchwalko “What are common mistakes in Data Science projects and how to...
Lviv Startup Club
 

Similar to Sustainable Automation Frameworks by Kelsey Shannahan (20)

Agile testingandautomation
Agile testingandautomationAgile testingandautomation
Agile testingandautomation
 
A Brief Introduction to Test-Driven Development
A Brief Introduction to Test-Driven DevelopmentA Brief Introduction to Test-Driven Development
A Brief Introduction to Test-Driven Development
 
Adopting Agile
Adopting AgileAdopting Agile
Adopting Agile
 
A lean automation blueprint for testing in continuous delivery
A lean automation blueprint for testing in continuous deliveryA lean automation blueprint for testing in continuous delivery
A lean automation blueprint for testing in continuous delivery
 
Load testing with Visual Studio and Azure - Andrew Siemer
Load testing with Visual Studio and Azure - Andrew SiemerLoad testing with Visual Studio and Azure - Andrew Siemer
Load testing with Visual Studio and Azure - Andrew Siemer
 
Architecting govCMS: Australian Government as a Service -
Architecting govCMS: Australian Government as a Service - Architecting govCMS: Australian Government as a Service -
Architecting govCMS: Australian Government as a Service -
 
The Kanban Retrospective
The Kanban RetrospectiveThe Kanban Retrospective
The Kanban Retrospective
 
Making disaster routine
Making disaster routineMaking disaster routine
Making disaster routine
 
Lean, Kanban, and TFS
Lean, Kanban, and TFSLean, Kanban, and TFS
Lean, Kanban, and TFS
 
Lean, Kanban and TFS
Lean, Kanban and TFSLean, Kanban and TFS
Lean, Kanban and TFS
 
An Introduction To Software Development - Final Review
An Introduction To Software Development - Final ReviewAn Introduction To Software Development - Final Review
An Introduction To Software Development - Final Review
 
Agile Acceptance testing with Fitnesse
Agile Acceptance testing with FitnesseAgile Acceptance testing with Fitnesse
Agile Acceptance testing with Fitnesse
 
Using Machine Learning to Optimize DevOps Practices
Using Machine Learning to Optimize DevOps PracticesUsing Machine Learning to Optimize DevOps Practices
Using Machine Learning to Optimize DevOps Practices
 
Protecting privacy with fuzzy-feeling test data
Protecting privacy with fuzzy-feeling test dataProtecting privacy with fuzzy-feeling test data
Protecting privacy with fuzzy-feeling test data
 
Bugday bkk-2014 nitisak-auto_perf
Bugday bkk-2014 nitisak-auto_perfBugday bkk-2014 nitisak-auto_perf
Bugday bkk-2014 nitisak-auto_perf
 
Get lean tutorial
Get lean tutorialGet lean tutorial
Get lean tutorial
 
Artur Suchwalko “What are common mistakes in Data Science projects and how to...
Artur Suchwalko “What are common mistakes in Data Science projects and how to...Artur Suchwalko “What are common mistakes in Data Science projects and how to...
Artur Suchwalko “What are common mistakes in Data Science projects and how to...
 
Software Defects and SW Reliability Assessment
Software Defects and SW Reliability AssessmentSoftware Defects and SW Reliability Assessment
Software Defects and SW Reliability Assessment
 
No more excuses QASymphony
No more excuses QASymphonyNo more excuses QASymphony
No more excuses QASymphony
 
Continuous Delivery & Testing Madrid AfterTest
Continuous Delivery & Testing Madrid AfterTestContinuous Delivery & Testing Madrid AfterTest
Continuous Delivery & Testing Madrid AfterTest
 

More from QA or the Highway

Jeff Van Fleet and John Townsend - Transition from Testing to Leadership.pdf
Jeff Van Fleet and John Townsend - Transition from Testing to Leadership.pdfJeff Van Fleet and John Townsend - Transition from Testing to Leadership.pdf
Jeff Van Fleet and John Townsend - Transition from Testing to Leadership.pdf
QA or the Highway
 

More from QA or the Highway (20)

KrishnaToolComparisionPPT.pdf
KrishnaToolComparisionPPT.pdfKrishnaToolComparisionPPT.pdf
KrishnaToolComparisionPPT.pdf
 
Ravi Lakkavalli - World Quality Report.pptx
Ravi Lakkavalli - World Quality Report.pptxRavi Lakkavalli - World Quality Report.pptx
Ravi Lakkavalli - World Quality Report.pptx
 
Caleb Crandall - Testing Between the Buckets.pptx
Caleb Crandall - Testing Between the Buckets.pptxCaleb Crandall - Testing Between the Buckets.pptx
Caleb Crandall - Testing Between the Buckets.pptx
 
Thomas Haver - Mobile Testing.pdf
Thomas Haver - Mobile Testing.pdfThomas Haver - Mobile Testing.pdf
Thomas Haver - Mobile Testing.pdf
 
Thomas Haver - Example Mapping.pdf
Thomas Haver - Example Mapping.pdfThomas Haver - Example Mapping.pdf
Thomas Haver - Example Mapping.pdf
 
Joe Colantonio - Actionable Automation Awesomeness in Testing Farm.pdf
Joe Colantonio - Actionable Automation Awesomeness in Testing Farm.pdfJoe Colantonio - Actionable Automation Awesomeness in Testing Farm.pdf
Joe Colantonio - Actionable Automation Awesomeness in Testing Farm.pdf
 
Sarah Geisinger - Continious Testing Metrics That Matter.pdf
Sarah Geisinger - Continious Testing Metrics That Matter.pdfSarah Geisinger - Continious Testing Metrics That Matter.pdf
Sarah Geisinger - Continious Testing Metrics That Matter.pdf
 
Jeff Sing - Quarterly Service Delivery Reviews.pdf
Jeff Sing - Quarterly Service Delivery Reviews.pdfJeff Sing - Quarterly Service Delivery Reviews.pdf
Jeff Sing - Quarterly Service Delivery Reviews.pdf
 
Leandro Melendez - Chihuahua Load Tests.pdf
Leandro Melendez - Chihuahua Load Tests.pdfLeandro Melendez - Chihuahua Load Tests.pdf
Leandro Melendez - Chihuahua Load Tests.pdf
 
Rick Clymer - Incident Management.pdf
Rick Clymer - Incident Management.pdfRick Clymer - Incident Management.pdf
Rick Clymer - Incident Management.pdf
 
Robert Fornal - ChatGPT as a Testing Tool.pptx
Robert Fornal - ChatGPT as a Testing Tool.pptxRobert Fornal - ChatGPT as a Testing Tool.pptx
Robert Fornal - ChatGPT as a Testing Tool.pptx
 
Federico Toledo - Extra-functional testing.pdf
Federico Toledo - Extra-functional testing.pdfFederico Toledo - Extra-functional testing.pdf
Federico Toledo - Extra-functional testing.pdf
 
Andrew Knight - Managing the Test Data Nightmare.pptx
Andrew Knight - Managing the Test Data Nightmare.pptxAndrew Knight - Managing the Test Data Nightmare.pptx
Andrew Knight - Managing the Test Data Nightmare.pptx
 
Melissa Tondi - Automation We_re Doing it Wrong.pdf
Melissa Tondi - Automation We_re Doing it Wrong.pdfMelissa Tondi - Automation We_re Doing it Wrong.pdf
Melissa Tondi - Automation We_re Doing it Wrong.pdf
 
Jeff Van Fleet and John Townsend - Transition from Testing to Leadership.pdf
Jeff Van Fleet and John Townsend - Transition from Testing to Leadership.pdfJeff Van Fleet and John Townsend - Transition from Testing to Leadership.pdf
Jeff Van Fleet and John Townsend - Transition from Testing to Leadership.pdf
 
DesiradhaRam Gadde - Testers _ Testing in ChatGPT-AI world.pptx
DesiradhaRam Gadde - Testers _ Testing in ChatGPT-AI world.pptxDesiradhaRam Gadde - Testers _ Testing in ChatGPT-AI world.pptx
DesiradhaRam Gadde - Testers _ Testing in ChatGPT-AI world.pptx
 
Damian Synadinos - Word Smatter.pdf
Damian Synadinos - Word Smatter.pdfDamian Synadinos - Word Smatter.pdf
Damian Synadinos - Word Smatter.pdf
 
Lee Barnes - What Successful Test Automation is.pdf
Lee Barnes - What Successful Test Automation is.pdfLee Barnes - What Successful Test Automation is.pdf
Lee Barnes - What Successful Test Automation is.pdf
 
Jordan Powell - API Testing with Cypress.pptx
Jordan Powell - API Testing with Cypress.pptxJordan Powell - API Testing with Cypress.pptx
Jordan Powell - API Testing with Cypress.pptx
 
Carlos Kidman - Exploring AI Applications in Testing.pptx
Carlos Kidman - Exploring AI Applications in Testing.pptxCarlos Kidman - Exploring AI Applications in Testing.pptx
Carlos Kidman - Exploring AI Applications in Testing.pptx
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Recently uploaded (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 

Sustainable Automation Frameworks by Kelsey Shannahan

  • 1. Sustainable Automation Frameworks © 2016 CoverMyMeds LLC. All Rights Reserved.
  • 2. Time to Get Serious © 2016 CoverMyMeds LLC. All Rights Reserved. • The ultimate goal of testing is to allow our products to reach production faster and safer. • We can’t do this if we’re sinking time into maintaining our test suite. • This helps no one. • Our automated test framework should be lightweight and easy to resolve problems. • This allows us to get back to the more important task of actually ensuring the quality of our applications.
  • 3. How do we get there? © 2016 CoverMyMeds LLC. All Rights Reserved. • Page-object model • Step definition reusability • Data management • Other topics as my abstract promised
  • 4. The Problem: Hardcoding © 2016 CoverMyMeds LLC. All Rights Reserved. • There’s a lot of STUFF in the THING you’re testing • Lots of pages and objects on a web app • Lots of services in an API • Straight out of the box Google, most frameworks don’t have a good way to manage this STUFF • Then, when something changes, there is no one central repository to update and we wind up having to make fixes EVERYWHERE
  • 5. The Solution: Page-Object Model © 2016 CoverMyMeds LLC. All Rights Reserved. • So we call it page-object… but really it’s applying object orientation • For each logical group we’re testing, we have a class that describes it • This works for web apps • One page, one class • Or for APIs • One service, one class
  • 6. What does this do for us? © 2016 CoverMyMeds LLC. All Rights Reserved. • Makes our code reusable • We can even package it into a gem and share with other areas • Makes our code easy to update • One change can fix every failing test • Makes our code easy to understand • The code now reflects the system that is under test in a logical manner
  • 7. The Problem: Too Many Step Definitions © 2016 CoverMyMeds LLC. All Rights Reserved. • Someone creates some step definitions that do the thing. • Someone else creates another step definitions to do a thing. • Nobody checks to see if there’s an existing step that can do the thing. • Everyone just keeps adding more step definitions until there’s too many for a reasonable human being to search through.
  • 8. Why does this happen? © 2016 CoverMyMeds LLC. All Rights Reserved. • Step definitions aren’t written to do what they say. • Sure, there’s a step that says it does that… but it only partially does it. Or does some other thing. And it’s not what you actually need. • Step definitions are unclear. • You could spend an hour figuring out what that thing is supposed to be doing… or you could spend ten minutes writing your own step. • No one polices the step definitions. • Because we all really hate maintaining our test framework.
  • 9. The Solution: No One Quick Fix © 2016 CoverMyMeds LLC. All Rights Reserved. • Standards • Have a method of organization for your library • Define at what level you want your steps to be written • Everyone has to follow these! • Step definitions ARE NOT CODE • Structuring step definitions to represent coding logic results in many incomprehensible steps • Write step definitions to represent higher level business logic
  • 10. The Solution: No One Quick Fix © 2016 CoverMyMeds LLC. All Rights Reserved. • Review your step definition library regularly • This should be a quick check that can be done as part of the normal process of writing tests • If you’re having to make time or use special tools to manage your library… your library is probably too big • Get it under control and keep it under control • Abstract your steps • Don’t make your steps dependent on data • Instead, let data drive the test
  • 11. The Problem: Data Management © 2016 CoverMyMeds LLC. All Rights Reserved. • If your framework consists of objects and your steps are flexible and business-oriented… data becomes the driver for testing • Data is no longer locked in as part of the step definition, so we can load different data for each test • So how do we manage large amounts of data?
  • 12. The Solution © 2016 CoverMyMeds LLC. All Rights Reserved. • Have a consistent, easy-to-use way of loading data into your test • Helper methods? • Dump it into a fixture in a hook? • Use descriptive naming for your data sets • Reuse data where possible • Make default data for stuff you don’t care about • Creating a new test becomes as simple as changing the data around
  • 13. How to Keep it Pretty © 2016 CoverMyMeds LLC. All Rights Reserved. • Be disciplined • Don’t put off tomorrow what you should really be doing today • Have a hierarchy of changes • Change the data • Change the gherkin • Change the step definition • Change the page-object
  • 14. How to Keep it Pretty © 2016 CoverMyMeds LLC. All Rights Reserved. • Know what’s in your test suite and trust it to do it’s job • Use all the resources available • Don’t write unit tests with a GUI-driven test suite • Not everything needs an automated test