Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Ui Testing with Ghost Inspector


Published on

Jay Luker will be presenting an introduction to Ghost Inspector, a cloud-based web UI testing service that takes some (some!) of the pain away from creating browser-based, web application tests. Think Selenium, but for projects that are short on the resources, infrastructure and/or coding expertise to confidently develop and manage a suite of fully automated, “good-enough” UI tests.

Jay is a Senior Software Engineer at Harvard DCE where he works on back-end applications and software for analytics data collection, deployment automation, and integration testing for the Extension School’s video processing and delivery system. Previously he has been an IT Specialist at the Smithsonian Astrophysics Data System, and a Software Developer at Ex Libris.

Published in: Internet
  • Settling for less on valentine's? Then you need VigRX pLUS! ▲▲▲
    Are you sure you want to  Yes  No
    Your message goes here
  • Women usually act out of emotion, not logic. Take advantage of this and get your Ex back today! See how to ★★★
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

Ui Testing with Ghost Inspector

  1. 1. ui testing with ghost inspector a capstone for your testing pyramid jay luker | @lbjay senior software engineer, harvard dce
  2. 2. “self-taught” full-stack not a testing "expert" free, open-source small teams, smallish orgs lazy likes: python, rowing, jaywalking, mondays dislikes: tea, endless scroll, mis-implemented http status codes
  3. 3. this is not that other talk ● pytest ● pytest plugins ● ghost inspector ● pytest-ghostinspector
  4. 4. let's talk about... why we do automated testing the ideal "testing pyramid" ghost inspector how we're using ghost inspector at dce
  5. 5. why write automated tests? ● continuous feedback throughout the development cycle ● did this change break something? ● catch bugs earlier and faster ● help inform the writing of code and application architecture ● help specify code and application behavior
  6. 6. types of automated tests ● unit ● integration ● end-to-end
  7. 7. test scope continuum small (unit) large (e2e) fast cheap reliable isolated low test:value ratio run frequently verifies code behavior owned by developers created early short feedback loop "are we building the system right?" 👈 👈 👈 ¯_(ツ)_/¯ 👉 👈 ¯_(ツ)_/¯ 👉 👈 👈 ¯_(ツ)_/¯ slow expensive flakey integrated high test:value ratio run infrequently verifies real world behavior owned by anyone* created late long feedback loop "are we building the right system?"
  8. 8. the testing pyramid source:
  9. 9. pyramid vs ice cream cone source:
  10. 10. in summary... ● write tests ● not too much end-to-end / ui ● mostly unit
  11. 11. ghost inspector ● cloud-based ui testing service ● record tests ● manually build/edit tests ● execute tests ● schedule tests ● view & monitor test results ● receive notification of test outcomes
  12. 12. who the what now? ● it's like a browser*... ● in the cloud… ● that accesses your site… ● and does stuff… ● and verifies everything worked right… ● and then lets you know if it didn't * more specifically, a headless browser under the control of a webdriver
  13. 13. great things about ghost inspector ● free / cheap ● easy to get started ● high initial effort:value ratio ● well-written documentation ● intuitive interface ● api for running tests ● nothing to install locally ● tests allow custom variables & re-use
  14. 14. not so great things about ghost inspector ● slow, particularly on failures ● missing concurrency ● no test versioning ● documentation can be shallow ● test recorder tries hard but has limitations ● tests run remotely; firewalls / access control require hoop-jumping ● support is currently via e-mail only
  15. 15. things you will need ● a website or web application to test ● chrome (optional) ● knowledge of html and javascript ● knowledge of how to use chrome or firefox developer tools ● knowledge of how to interact with restful apis (optional) ● $$ for > free pricing tier (optional)
  16. 16. free tier details ● 100 tests / month ● 3 tests * daily schedule: boom ● all the bells & whistles ● link a (free) runscope account* and get 500 tests / month *
  17. 17. let's do this thing 1. create a ghost inspector account 2. install the chrome extension 3. login through the extension 4. record a test 5. edit the test steps 6. execute the test 7. view the results 8. repeat 5-7 as needed
  18. 18. demo!
  19. 19. test creation & editing tips ● adjust css selectors to be less brittle ● adjust css selectors to remove transient values ● chrome / firefox developer tools are your friend ● use variables for transient values ● remove unnecessary form input 'click' steps ● something not working? drop down to javascript ● start urls can contain variables! ● try changing the browser version
  20. 20. ghost inspector at dce ● dev team of ~10, including 2 full-time qa'ers ● cluster application on aws opsworks ● more ice cream cone than pyramid ● e2e testing objective is to validate production releases
  21. 21. test automation tools ● mh-opsworks: command-line cluster manager ● mh-ui-testing: command-line ui testing tool ● pytest-ghostinspector: pytest plugin for the ghost inspector api
  22. 22. thanks! ● email: ● slides: