automated-testing-final
TRANSCRIPT
![Page 1: automated-testing-final](https://reader035.vdocument.in/reader035/viewer/2022062420/55c5285fbb61ebe6158b4616/html5/thumbnails/1.jpg)
Ben EmmonsWeb & Mobile Services, UITSAutomated Testing
![Page 2: automated-testing-final](https://reader035.vdocument.in/reader035/viewer/2022062420/55c5285fbb61ebe6158b4616/html5/thumbnails/2.jpg)
10/28/2014
Why automation?
![Page 3: automated-testing-final](https://reader035.vdocument.in/reader035/viewer/2022062420/55c5285fbb61ebe6158b4616/html5/thumbnails/3.jpg)
10/28/2014
“Any time you have a human at a keyboard doing
ANYTHING, that process will not scale.”
- Chad Smith, Global Knowledge
![Page 4: automated-testing-final](https://reader035.vdocument.in/reader035/viewer/2022062420/55c5285fbb61ebe6158b4616/html5/thumbnails/4.jpg)
10/28/2014
One Site
![Page 5: automated-testing-final](https://reader035.vdocument.in/reader035/viewer/2022062420/55c5285fbb61ebe6158b4616/html5/thumbnails/5.jpg)
10/28/2014
Easy Patching
![Page 6: automated-testing-final](https://reader035.vdocument.in/reader035/viewer/2022062420/55c5285fbb61ebe6158b4616/html5/thumbnails/6.jpg)
10/28/2014
One Multisite
![Page 7: automated-testing-final](https://reader035.vdocument.in/reader035/viewer/2022062420/55c5285fbb61ebe6158b4616/html5/thumbnails/7.jpg)
10/28/2014
Medium Patching
![Page 8: automated-testing-final](https://reader035.vdocument.in/reader035/viewer/2022062420/55c5285fbb61ebe6158b4616/html5/thumbnails/8.jpg)
10/28/2014
Multiple Environments
![Page 9: automated-testing-final](https://reader035.vdocument.in/reader035/viewer/2022062420/55c5285fbb61ebe6158b4616/html5/thumbnails/9.jpg)
10/28/2014
Arduous Patching
![Page 10: automated-testing-final](https://reader035.vdocument.in/reader035/viewer/2022062420/55c5285fbb61ebe6158b4616/html5/thumbnails/10.jpg)
10/28/2014
340+ Sites
![Page 11: automated-testing-final](https://reader035.vdocument.in/reader035/viewer/2022062420/55c5285fbb61ebe6158b4616/html5/thumbnails/11.jpg)
10/28/2014
Sisyphean Patching
![Page 12: automated-testing-final](https://reader035.vdocument.in/reader035/viewer/2022062420/55c5285fbb61ebe6158b4616/html5/thumbnails/12.jpg)
10/28/2014
Solution?
![Page 13: automated-testing-final](https://reader035.vdocument.in/reader035/viewer/2022062420/55c5285fbb61ebe6158b4616/html5/thumbnails/13.jpg)
10/28/2014
Automate Security Audits
![Page 14: automated-testing-final](https://reader035.vdocument.in/reader035/viewer/2022062420/55c5285fbb61ebe6158b4616/html5/thumbnails/14.jpg)
10/28/2014
Automate Patching
![Page 15: automated-testing-final](https://reader035.vdocument.in/reader035/viewer/2022062420/55c5285fbb61ebe6158b4616/html5/thumbnails/15.jpg)
10/28/2014
Automate Syncing
…and clearing cache, and renewing SLAs,
and security scan reminders,and customer notifications,
and…
![Page 16: automated-testing-final](https://reader035.vdocument.in/reader035/viewer/2022062420/55c5285fbb61ebe6158b4616/html5/thumbnails/16.jpg)
10/28/2014
Automated Testing
![Page 17: automated-testing-final](https://reader035.vdocument.in/reader035/viewer/2022062420/55c5285fbb61ebe6158b4616/html5/thumbnails/17.jpg)
10/28/2014
Why is that so hard?
![Page 18: automated-testing-final](https://reader035.vdocument.in/reader035/viewer/2022062420/55c5285fbb61ebe6158b4616/html5/thumbnails/18.jpg)
10/28/2014
First, pick engine(s)
Gotchas:• IE can only run reliably on a Windows OS
Ramification: testing solution requires Windows• Latest Safari will only run on Mac hardware
Ramification: no AWS option and good luck hosting a Mac in the UITS server room…
![Page 19: automated-testing-final](https://reader035.vdocument.in/reader035/viewer/2022062420/55c5285fbb61ebe6158b4616/html5/thumbnails/19.jpg)
10/28/2014
Next, pick driver
Gotchas:• IE Compatibility Mode is not reliable: http://stackoverflow.com/a/11418046
• TrifleJS is “very much in beta” and cannot emulate versions on Windows Server 2012
• WebDriver is slow• Node.js solutions target a specific layout engine• Very little Sahi documentation and small community
![Page 20: automated-testing-final](https://reader035.vdocument.in/reader035/viewer/2022062420/55c5285fbb61ebe6158b4616/html5/thumbnails/20.jpg)
10/28/2014
Unit testing?
![Page 21: automated-testing-final](https://reader035.vdocument.in/reader035/viewer/2022062420/55c5285fbb61ebe6158b4616/html5/thumbnails/21.jpg)
10/28/2014
… How about Functional?
![Page 22: automated-testing-final](https://reader035.vdocument.in/reader035/viewer/2022062420/55c5285fbb61ebe6158b4616/html5/thumbnails/22.jpg)
10/28/2014
… Ready to run the tests?
![Page 23: automated-testing-final](https://reader035.vdocument.in/reader035/viewer/2022062420/55c5285fbb61ebe6158b4616/html5/thumbnails/23.jpg)
10/28/2014
… Don’t forget your CSS!
![Page 24: automated-testing-final](https://reader035.vdocument.in/reader035/viewer/2022062420/55c5285fbb61ebe6158b4616/html5/thumbnails/24.jpg)
10/28/2014
Why bother?
- Jackson Murtha
http://iterate.blendinteractive.com/preventing-upgrade-headaches-with-selenium-webdriver/
![Page 25: automated-testing-final](https://reader035.vdocument.in/reader035/viewer/2022062420/55c5285fbb61ebe6158b4616/html5/thumbnails/25.jpg)
10/28/2014
Making the right choice• Avoid choice paralysis http://addyosmani.com/blog/front-end-choice-paralysis/
“The challenge is that when presented with an abundance of choice, you can feel increasingly unsure of whether yours is the right one. Instead of being happy with our decisions, we’re filled with anxiety. Did I pick the wrong one? Would I have been better off with something else? What would my friends have used? ... If you’re an experienced developer speaking to someone stuck on a decision, try to help them simplify their options.” - Addy Osmani
• Unit vs. Functional http://www.helpscout.net/blog/functional-testing-casperjs/ “No one cares that your Unit tests are passing if your application doesn’t function. Unit testing makes sure you are using quality ingredients. Functional testing makes sure your application doesn't taste like crap. ... [In] the real world, most developers barely have time for one kind of automated test, let alone two. If that describes you, I would strongly encourage you to go with Functional testing.” - Brett Jones
![Page 26: automated-testing-final](https://reader035.vdocument.in/reader035/viewer/2022062420/55c5285fbb61ebe6158b4616/html5/thumbnails/26.jpg)
10/28/2014
Our Stack• Amazon Web Services: https://aws.amazon.com/
• Selenium Grid: https://code.google.com/p/selenium/wiki/Grid2
• IE, Ff, Ch: https://github.com/conceptsandtraining/modernie_selenium
• Safari: UITS Mac colo or Sauce Labs free• Mobile: http://appium.io/
• WebdriverIO: http://webdriver.io/
• Unit Testing: Buster.jshttps://github.com/webdriverio/webdriverio/blob/master/examples/webdriverjs.with.buster.js
• WebdriverCSS: https://github.com/webdriverio/webdrivercss
• WebdriverCSS Adminpanel: https://github.com/webdriverio/webdrivercss-adminpanel
![Page 27: automated-testing-final](https://reader035.vdocument.in/reader035/viewer/2022062420/55c5285fbb61ebe6158b4616/html5/thumbnails/27.jpg)
10/28/2014
Eas(ier) Button
• Getting a test environment up and running is half the battle. Do yourself a favor and just pay out.• If getting budgetary approval is akin to an act of
Congress, at the very least use our AWS CloudFormation template: https://bitbucket.org/uitsweb/selenium-grid-ec2
![Page 28: automated-testing-final](https://reader035.vdocument.in/reader035/viewer/2022062420/55c5285fbb61ebe6158b4616/html5/thumbnails/28.jpg)
10/28/2014
Demo
![Page 29: automated-testing-final](https://reader035.vdocument.in/reader035/viewer/2022062420/55c5285fbb61ebe6158b4616/html5/thumbnails/29.jpg)
10/28/2014
Demo
![Page 30: automated-testing-final](https://reader035.vdocument.in/reader035/viewer/2022062420/55c5285fbb61ebe6158b4616/html5/thumbnails/30.jpg)
10/28/2014
Demo
![Page 31: automated-testing-final](https://reader035.vdocument.in/reader035/viewer/2022062420/55c5285fbb61ebe6158b4616/html5/thumbnails/31.jpg)
10/28/2014
Demo
![Page 32: automated-testing-final](https://reader035.vdocument.in/reader035/viewer/2022062420/55c5285fbb61ebe6158b4616/html5/thumbnails/32.jpg)
10/28/2014
Demo
http://www.whatsmybrowser.org/ node wdio.js
![Page 33: automated-testing-final](https://reader035.vdocument.in/reader035/viewer/2022062420/55c5285fbb61ebe6158b4616/html5/thumbnails/33.jpg)
10/28/2014
Demo
http://coolepochcountdown.com/ node wdcss.js
![Page 34: automated-testing-final](https://reader035.vdocument.in/reader035/viewer/2022062420/55c5285fbb61ebe6158b4616/html5/thumbnails/34.jpg)
10/28/2014
Demo
http://coolepochcountdown.com/ node wdcss.js
![Page 35: automated-testing-final](https://reader035.vdocument.in/reader035/viewer/2022062420/55c5285fbb61ebe6158b4616/html5/thumbnails/35.jpg)
10/28/2014
Next Steps• Update Selenium Grid template to use NAT private
subnet• Firewall exception to allow AWS Selenium Grid to
access test sites (or use SSH reverse proxy)• Update Selenium Grid template to use Modern.IE VMs• Drush script for dynamically obtaining top menu links• Update our Drupal automation tool to launch (and
respond to) automated testing of top site pages• Set up Appium on Mac OS X server and arrange colo• Profit!
![Page 36: automated-testing-final](https://reader035.vdocument.in/reader035/viewer/2022062420/55c5285fbb61ebe6158b4616/html5/thumbnails/36.jpg)
10/28/2014
Questions?