automated testing 101 - drupalcon...join us for contribution sprint friday, 29 september, 2017 first...
TRANSCRIPT
![Page 1: AUTOMATED TESTING 101 - DrupalCon...JOIN US FOR CONTRIBUTION SPRINT Friday, 29 September, 2017 First time Sprinter Workshop Mentored Core Sprint General Sprint 9:00-12:00 Room: Lehar](https://reader033.vdocument.in/reader033/viewer/2022042303/5ececdd2510079189a2ed950/html5/thumbnails/1.jpg)
AUTOMATED TESTING 101
Ezequiel “Zequi” Vázquez
![Page 2: AUTOMATED TESTING 101 - DrupalCon...JOIN US FOR CONTRIBUTION SPRINT Friday, 29 September, 2017 First time Sprinter Workshop Mentored Core Sprint General Sprint 9:00-12:00 Room: Lehar](https://reader033.vdocument.in/reader033/viewer/2022042303/5ececdd2510079189a2ed950/html5/thumbnails/2.jpg)
JOIN US FORCONTRIBUTION SPRINT
Friday, 29 September, 2017
First time Sprinter Workshop
MentoredCore Sprint General Sprint
9:00-12:00Room: Lehar 1 - Lehar 2
9:00-18:00Room: Stolz 2
9:00-18:00Room: Mall
#drupalsprints
![Page 3: AUTOMATED TESTING 101 - DrupalCon...JOIN US FOR CONTRIBUTION SPRINT Friday, 29 September, 2017 First time Sprinter Workshop Mentored Core Sprint General Sprint 9:00-12:00 Room: Lehar](https://reader033.vdocument.in/reader033/viewer/2022042303/5ececdd2510079189a2ed950/html5/thumbnails/3.jpg)
AUTOMATED TESTING 101
DevOps trackhttps://events.drupal.org/vienna2017/sessions/automated-testing-101
Ezequiel “Zequi” Vázquez
![Page 4: AUTOMATED TESTING 101 - DrupalCon...JOIN US FOR CONTRIBUTION SPRINT Friday, 29 September, 2017 First time Sprinter Workshop Mentored Core Sprint General Sprint 9:00-12:00 Room: Lehar](https://reader033.vdocument.in/reader033/viewer/2022042303/5ececdd2510079189a2ed950/html5/thumbnails/4.jpg)
ZEQUI VÁZQUEZ
Backend Developer
Works @ Lullabot
Sysadmin & DevOps
Hacking & Security
Testing!
![Page 5: AUTOMATED TESTING 101 - DrupalCon...JOIN US FOR CONTRIBUTION SPRINT Friday, 29 September, 2017 First time Sprinter Workshop Mentored Core Sprint General Sprint 9:00-12:00 Room: Lehar](https://reader033.vdocument.in/reader033/viewer/2022042303/5ececdd2510079189a2ed950/html5/thumbnails/5.jpg)
INDEX
SOFTWARE QUALITY
TESTING TECHNIQUES
AUTOMATED TESTING TOOLS
HOW DO WE DO IT AT LULLABOT
![Page 6: AUTOMATED TESTING 101 - DrupalCon...JOIN US FOR CONTRIBUTION SPRINT Friday, 29 September, 2017 First time Sprinter Workshop Mentored Core Sprint General Sprint 9:00-12:00 Room: Lehar](https://reader033.vdocument.in/reader033/viewer/2022042303/5ececdd2510079189a2ed950/html5/thumbnails/6.jpg)
SOFTWARE QUALITY
![Page 7: AUTOMATED TESTING 101 - DrupalCon...JOIN US FOR CONTRIBUTION SPRINT Friday, 29 September, 2017 First time Sprinter Workshop Mentored Core Sprint General Sprint 9:00-12:00 Room: Lehar](https://reader033.vdocument.in/reader033/viewer/2022042303/5ececdd2510079189a2ed950/html5/thumbnails/7.jpg)
WHAT IS SOFTWARE QUALITY?
![Page 8: AUTOMATED TESTING 101 - DrupalCon...JOIN US FOR CONTRIBUTION SPRINT Friday, 29 September, 2017 First time Sprinter Workshop Mentored Core Sprint General Sprint 9:00-12:00 Room: Lehar](https://reader033.vdocument.in/reader033/viewer/2022042303/5ececdd2510079189a2ed950/html5/thumbnails/8.jpg)
HOW QUALITY CAN BE MEASURED?
Metrics, framework, data...
Functional testing
Other aspects: non functional
![Page 9: AUTOMATED TESTING 101 - DrupalCon...JOIN US FOR CONTRIBUTION SPRINT Friday, 29 September, 2017 First time Sprinter Workshop Mentored Core Sprint General Sprint 9:00-12:00 Room: Lehar](https://reader033.vdocument.in/reader033/viewer/2022042303/5ececdd2510079189a2ed950/html5/thumbnails/9.jpg)
HOW TO INTEGRATE QA ON A PROJECT
![Page 10: AUTOMATED TESTING 101 - DrupalCon...JOIN US FOR CONTRIBUTION SPRINT Friday, 29 September, 2017 First time Sprinter Workshop Mentored Core Sprint General Sprint 9:00-12:00 Room: Lehar](https://reader033.vdocument.in/reader033/viewer/2022042303/5ececdd2510079189a2ed950/html5/thumbnails/10.jpg)
WE DON'T WANT THIS TO HAPPEN
![Page 11: AUTOMATED TESTING 101 - DrupalCon...JOIN US FOR CONTRIBUTION SPRINT Friday, 29 September, 2017 First time Sprinter Workshop Mentored Core Sprint General Sprint 9:00-12:00 Room: Lehar](https://reader033.vdocument.in/reader033/viewer/2022042303/5ececdd2510079189a2ed950/html5/thumbnails/11.jpg)
TESTING TECHNIQUES
![Page 12: AUTOMATED TESTING 101 - DrupalCon...JOIN US FOR CONTRIBUTION SPRINT Friday, 29 September, 2017 First time Sprinter Workshop Mentored Core Sprint General Sprint 9:00-12:00 Room: Lehar](https://reader033.vdocument.in/reader033/viewer/2022042303/5ececdd2510079189a2ed950/html5/thumbnails/12.jpg)
PEER REVIEWS
All team members are responsible
Solutions that you may have skipped
Manual review before QA
![Page 13: AUTOMATED TESTING 101 - DrupalCon...JOIN US FOR CONTRIBUTION SPRINT Friday, 29 September, 2017 First time Sprinter Workshop Mentored Core Sprint General Sprint 9:00-12:00 Room: Lehar](https://reader033.vdocument.in/reader033/viewer/2022042303/5ececdd2510079189a2ed950/html5/thumbnails/13.jpg)
CODE LINTING
![Page 14: AUTOMATED TESTING 101 - DrupalCon...JOIN US FOR CONTRIBUTION SPRINT Friday, 29 September, 2017 First time Sprinter Workshop Mentored Core Sprint General Sprint 9:00-12:00 Room: Lehar](https://reader033.vdocument.in/reader033/viewer/2022042303/5ececdd2510079189a2ed950/html5/thumbnails/14.jpg)
UNIT TESTING
![Page 15: AUTOMATED TESTING 101 - DrupalCon...JOIN US FOR CONTRIBUTION SPRINT Friday, 29 September, 2017 First time Sprinter Workshop Mentored Core Sprint General Sprint 9:00-12:00 Room: Lehar](https://reader033.vdocument.in/reader033/viewer/2022042303/5ececdd2510079189a2ed950/html5/thumbnails/15.jpg)
UNIT TESTING
![Page 16: AUTOMATED TESTING 101 - DrupalCon...JOIN US FOR CONTRIBUTION SPRINT Friday, 29 September, 2017 First time Sprinter Workshop Mentored Core Sprint General Sprint 9:00-12:00 Room: Lehar](https://reader033.vdocument.in/reader033/viewer/2022042303/5ececdd2510079189a2ed950/html5/thumbnails/16.jpg)
INTEGRATION TESTING
Components relationships
Makes sense on OOP
Check implemented patterns
![Page 17: AUTOMATED TESTING 101 - DrupalCon...JOIN US FOR CONTRIBUTION SPRINT Friday, 29 September, 2017 First time Sprinter Workshop Mentored Core Sprint General Sprint 9:00-12:00 Room: Lehar](https://reader033.vdocument.in/reader033/viewer/2022042303/5ececdd2510079189a2ed950/html5/thumbnails/17.jpg)
END TO END TESTING
![Page 18: AUTOMATED TESTING 101 - DrupalCon...JOIN US FOR CONTRIBUTION SPRINT Friday, 29 September, 2017 First time Sprinter Workshop Mentored Core Sprint General Sprint 9:00-12:00 Room: Lehar](https://reader033.vdocument.in/reader033/viewer/2022042303/5ececdd2510079189a2ed950/html5/thumbnails/18.jpg)
END TO END TESTING
Test full use cases, for all user roles
Real third party integration: no mocks!
Happy path and error cases
Prevent all regression bugs!
Remember to use test data
![Page 19: AUTOMATED TESTING 101 - DrupalCon...JOIN US FOR CONTRIBUTION SPRINT Friday, 29 September, 2017 First time Sprinter Workshop Mentored Core Sprint General Sprint 9:00-12:00 Room: Lehar](https://reader033.vdocument.in/reader033/viewer/2022042303/5ececdd2510079189a2ed950/html5/thumbnails/19.jpg)
PERFORMANCE TESTING
Simpler metric: page load time
Use real use cases
Study impact on user experience
![Page 20: AUTOMATED TESTING 101 - DrupalCon...JOIN US FOR CONTRIBUTION SPRINT Friday, 29 September, 2017 First time Sprinter Workshop Mentored Core Sprint General Sprint 9:00-12:00 Room: Lehar](https://reader033.vdocument.in/reader033/viewer/2022042303/5ececdd2510079189a2ed950/html5/thumbnails/20.jpg)
SCALABILITY TESTING
A.K.A. Load testing
Determine maximum users
SLA + Cloud
Capacity planning
![Page 21: AUTOMATED TESTING 101 - DrupalCon...JOIN US FOR CONTRIBUTION SPRINT Friday, 29 September, 2017 First time Sprinter Workshop Mentored Core Sprint General Sprint 9:00-12:00 Room: Lehar](https://reader033.vdocument.in/reader033/viewer/2022042303/5ececdd2510079189a2ed950/html5/thumbnails/21.jpg)
SECURITY TESTING
Apply to process, not only to code
Code audit + Pentesting
Relevance of training
Bonus: Backups testing
![Page 22: AUTOMATED TESTING 101 - DrupalCon...JOIN US FOR CONTRIBUTION SPRINT Friday, 29 September, 2017 First time Sprinter Workshop Mentored Core Sprint General Sprint 9:00-12:00 Room: Lehar](https://reader033.vdocument.in/reader033/viewer/2022042303/5ececdd2510079189a2ed950/html5/thumbnails/22.jpg)
USABILITY AND ACCESSIBILITY TESTING
Test with real users if possible
Standards apply (A, AA, AAA)
More than a checklist
HTML checkers
![Page 23: AUTOMATED TESTING 101 - DrupalCon...JOIN US FOR CONTRIBUTION SPRINT Friday, 29 September, 2017 First time Sprinter Workshop Mentored Core Sprint General Sprint 9:00-12:00 Room: Lehar](https://reader033.vdocument.in/reader033/viewer/2022042303/5ececdd2510079189a2ed950/html5/thumbnails/23.jpg)
NOT ENOUGH?
Some other types of testing techniques...
Regression
Smoke & sanity
Acceptance
Alpha/Beta
A/B testing
…
![Page 24: AUTOMATED TESTING 101 - DrupalCon...JOIN US FOR CONTRIBUTION SPRINT Friday, 29 September, 2017 First time Sprinter Workshop Mentored Core Sprint General Sprint 9:00-12:00 Room: Lehar](https://reader033.vdocument.in/reader033/viewer/2022042303/5ececdd2510079189a2ed950/html5/thumbnails/24.jpg)
AUTOMATED TESTINGTOOLS
![Page 25: AUTOMATED TESTING 101 - DrupalCon...JOIN US FOR CONTRIBUTION SPRINT Friday, 29 September, 2017 First time Sprinter Workshop Mentored Core Sprint General Sprint 9:00-12:00 Room: Lehar](https://reader033.vdocument.in/reader033/viewer/2022042303/5ececdd2510079189a2ed950/html5/thumbnails/25.jpg)
/(PHP|JS|.*) UNIT/
Most languages have support
Test all the things!
… but be smart
![Page 26: AUTOMATED TESTING 101 - DrupalCon...JOIN US FOR CONTRIBUTION SPRINT Friday, 29 September, 2017 First time Sprinter Workshop Mentored Core Sprint General Sprint 9:00-12:00 Room: Lehar](https://reader033.vdocument.in/reader033/viewer/2022042303/5ececdd2510079189a2ed950/html5/thumbnails/26.jpg)
NIGHTWATCH JS
Based on Selenium/Webdriver
Allows replication of human behaviour
Written on JavaScript
Powerful and easy to implement
![Page 27: AUTOMATED TESTING 101 - DrupalCon...JOIN US FOR CONTRIBUTION SPRINT Friday, 29 September, 2017 First time Sprinter Workshop Mentored Core Sprint General Sprint 9:00-12:00 Room: Lehar](https://reader033.vdocument.in/reader033/viewer/2022042303/5ececdd2510079189a2ed950/html5/thumbnails/27.jpg)
GATLING.IO
Real use cases for performance
User concurrency
Easy to implement
![Page 28: AUTOMATED TESTING 101 - DrupalCon...JOIN US FOR CONTRIBUTION SPRINT Friday, 29 September, 2017 First time Sprinter Workshop Mentored Core Sprint General Sprint 9:00-12:00 Room: Lehar](https://reader033.vdocument.in/reader033/viewer/2022042303/5ececdd2510079189a2ed950/html5/thumbnails/28.jpg)
SOME OTHER TOOLS
Functional: Behat
Performance: jMeter
Security: Burp suite, OWASP Zap
Accessibility: Cynthia Says
Orchestrator: Your favourite CI tool
![Page 29: AUTOMATED TESTING 101 - DrupalCon...JOIN US FOR CONTRIBUTION SPRINT Friday, 29 September, 2017 First time Sprinter Workshop Mentored Core Sprint General Sprint 9:00-12:00 Room: Lehar](https://reader033.vdocument.in/reader033/viewer/2022042303/5ececdd2510079189a2ed950/html5/thumbnails/29.jpg)
HOW DID WE DO ITON OUR LAST PROJECT
![Page 30: AUTOMATED TESTING 101 - DrupalCon...JOIN US FOR CONTRIBUTION SPRINT Friday, 29 September, 2017 First time Sprinter Workshop Mentored Core Sprint General Sprint 9:00-12:00 Room: Lehar](https://reader033.vdocument.in/reader033/viewer/2022042303/5ececdd2510079189a2ed950/html5/thumbnails/30.jpg)
OUR TESTING FRAMEWORK
Commit -> linter
Push to repo -> unit tests
Branch protection -> peer review
Travis -> Lint, unit & E2E
![Page 31: AUTOMATED TESTING 101 - DrupalCon...JOIN US FOR CONTRIBUTION SPRINT Friday, 29 September, 2017 First time Sprinter Workshop Mentored Core Sprint General Sprint 9:00-12:00 Room: Lehar](https://reader033.vdocument.in/reader033/viewer/2022042303/5ececdd2510079189a2ed950/html5/thumbnails/31.jpg)
IN SUMMARY
Good testing means high quality
Automation makes life easier
Continuous Integration
Cover all software aspects
![Page 32: AUTOMATED TESTING 101 - DrupalCon...JOIN US FOR CONTRIBUTION SPRINT Friday, 29 September, 2017 First time Sprinter Workshop Mentored Core Sprint General Sprint 9:00-12:00 Room: Lehar](https://reader033.vdocument.in/reader033/viewer/2022042303/5ececdd2510079189a2ed950/html5/thumbnails/32.jpg)
THANK YOU FOR COMING!
AUTOMATED TESTING 101
Ezequiel “Zequi” Vázquez@RabbitLair
![Page 33: AUTOMATED TESTING 101 - DrupalCon...JOIN US FOR CONTRIBUTION SPRINT Friday, 29 September, 2017 First time Sprinter Workshop Mentored Core Sprint General Sprint 9:00-12:00 Room: Lehar](https://reader033.vdocument.in/reader033/viewer/2022042303/5ececdd2510079189a2ed950/html5/thumbnails/33.jpg)
WHAT DID YOU THINK?
Locate this session at the DrupalCon Vienna website:
http://vienna2017.drupal.org/schedule
Take the survey!
https://www.surveymonkey.com/r/drupalconvienna