ci for css
play

CI FOR CSS Creating a Visual Regression Testing Workflow Presented - PowerPoint PPT Presentation

CI FOR CSS Creating a Visual Regression Testing Workflow Presented by Kate Kligman May 13, 2015 2 Pantheon.io Visual Regression Testing? 3 Pantheon.io Middle image CC by SA 3.0 Hans-Werner34 at en.wikipedia


  1. CI FOR CSS Creating a Visual Regression Testing Workflow Presented by Kate Kligman May 13, 2015 2 Pantheon.io •

  2. Visual Regression Testing? 3 Pantheon.io • Middle image CC by SA 3.0 Hans-Werner34 at en.wikipedia http://en.wikipedia.org/wiki/Eye_tracking#/media/File:Eye_tracking_thru_glass.JPG Snellen chart CC by SA 3.0 http://commons.wikimedia.org/wiki/File:Snellen_chart.svg

  3. About this Session ‣ Why visual regression testing? ‣ Headless Testing • Wraith ‣ Full Browser Testing • Selenium • WebdriverCSS ‣ Questions 4 Pantheon.io •

  4. About Me @KateKligman 5 Pantheon.io •

  5. Visual Regression Testing Challenges ‣ Platform challenges • Fonts, form controls • Rendering engines ‣ Content challenges • Dynamic content • Environment setup ‣ Workflow challenges • Navigation • Baseline tracking 15 Pantheon.io •

  6. TITLE TEXT WRAITH

  7. Wraith Image Gallery 17 Pantheon.io •

  8. Wraith Comparisons 18 Pantheon.io •

  9. Wraith Setup Wraith Initialization Wraith Folder Structure wraith $ wraith setup configs create configs/config.yaml config.yaml create javascript/snap.js javascript snap.js shots gallery.html Each URL path gets it’s bootstrap.min.cs own screenshot folder. thumbnails mypage 19 Pantheon.io •

  10. Wraith Configuration configs/config.yaml browser : phantomjs (can also use slimerjs) snap_file : javascript/snap.js directory : shots domains : dev: http://dev-panolopy-dreams.pantheon.io test: http://test-panolopy-dreams.pantheon.io 20 Pantheon.io •

  11. Wraith URL Configuration configs/config.yaml paths : home: / login: /user/login great-vegetables: /content/great-vegetables lovely-vegetables: /content/lovely-vegetables screen_widths : - 320 - 600 - 768 - 1024 21 Pantheon.io •

  12. Running Wraith $ wraith capture config 22 Pantheon.io •

  13. Wraith Responsive Gallery Difference detected 23 Pantheon.io •

  14. Wraith Artifacts wraith/shots/home Automated Checks 320__dev.png 320__test.png 320__diff.png 320__data.txt Each text file contains a number that represents the image difference. 600__dev.png 600__test.png 600__diff.png 600__data.txt 24 Pantheon.io •

  15. Limiting Test Coverage Static Header Dynamic Content Block 25 Pantheon.io •

  16. Wraith CSS Selector Gallery 26 Pantheon.io •

  17. Wraith CSS Selectors with CasperJS Casper Setup Wraith Folder Structure wraith $ wraith setup_casper configs create configs/component.yaml config.yaml create javascript/casper.js component.yaml javascript snap.js Separate configs for casper.js casper.js navigation. shots … 27 Pantheon.io •

  18. Wraith CSS Selector Configuration Running it Edit configs/component.yaml $ wraith capture component browser: phantomjs: casperjs snap_file: javascript/casper.js paths: header: path: / selector: "header" 28 Pantheon.io •

  19. Wraith CSS Selector Gallery 29 Pantheon.io •

  20. Wraith History Mode Capture and test with a single baseline image set. Edit configs/config.yaml or configs/component.yaml directory : shots history_dir : shots_history domains : test: http://test-panolopy-dreams.pantheon.io 30 Pantheon.io •

  21. Wraith History Mode Commands Capture the Baseline $ wraith history config Compare the Baseline $ wraith latest config 31 Pantheon.io •

  22. Wraith History Mode Gallery 32 Pantheon.io •

  23. Wraith Summary ‣ Render with Webkit (Chrome) or Gecko (Firefox). ‣ Test two websites against each other (or a single baseline image set). ‣ Use selectors to limit coverage. 33 Pantheon.io •

  24. FULL BROWSER TESTING Selenium

  25. Selenium: Do it Yourself? 35 Pantheon.io •

  26. Hosted Services 36 Pantheon.io •

  27. WebdriverCSS ‣ Use Selenium for cross-browser testing ‣ Test directly in JavaScript with WebdriverIO ‣ Include and exclude capture regions with selectors. 37 Pantheon.io •

  28. Limiting Test Coverage Static Header Dynamic Content Block 38 Pantheon.io •

  29. WebdriverCSS: Hide the Carousel 39 Pantheon.io •

  30. WebdriverCSS: Exclude Regions .webdrivercss('panolopy', { name: 'home', exclude: '#carousel' }, ...) 40 Pantheon.io •

  31. Try Visual Regression Testing ‣ Prevent visual mistakes. ‣ Open source tools for a variety of setups. ‣ Cross-browser testing options with Selenium. 41 Pantheon.io •

  32. Resources ‣ Headless Testing • https://github.com/BBC-News/wraith • http://casperjs.org/ • https://github.com/Huddle/PhantomCSS ‣ Full Browser Testing • http://www.seleniumhq.org/ • http://webdriver.io/ • https://github.com/webdriverio/webdrivercss • http://shoov.io/ 42 Pantheon.io •

  33. Questions? 43 Pantheon.io Images CC by SA 3.0 http://en.wikipedia.org/wiki/Eye_tracking#/media/File:Eye_tracking_thru_glass.JPG http://commons.wikimedia.org/wiki/File:Snellen_chart.svg •

  34. THANK YOU! To evaluate this session: losangeles2015.drupal.org/schedule

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend