visual css regression testing with webdriver io
play

Visual/CSS Regression Testing with WebDriver.io/WebDriverCSS - PowerPoint PPT Presentation

Visual/CSS Regression Testing with WebDriver.io/WebDriverCSS DrupalCamp Florida March 5, 2016 Who am I? Lisa Ridley, Director of Client Success, Savas Labs (savaslabs.com) Responsibilities: Project Manager and Lead Developer


  1. Visual/CSS Regression Testing with WebDriver.io/WebDriverCSS DrupalCamp Florida March 5, 2016

  2. Who am I? • Lisa Ridley, Director of Client Success, Savas Labs (savaslabs.com) • Responsibilities: Project Manager and Lead Developer • Automated Testing Champion (Functional, Behavioral, Acceptance, Visual) • drupal.org: lhridley • Twitter: lhridley • Github: github.com/lhridley • LinkedIn: https://www.linkedin.com/in/lisahridley • Blog: www.codementality.com 2

  3. 3

  4. What is Regression Testing? 4

  5. How do you regression test the visual components of a user interface? 5

  6. What if you could take a “before" and “after” picture…. …and could easily compare those pictures to each other? 6

  7. …And, what if you could automate that process… …and run it using multiple browser / operating system combinations, and even mobile devices 7

  8. Enter Selenium and WebDriverCSS 8

  9. Requirements • Node Package Manager • NodeJS • Selenium Standalone Server • GraphicsMagick or ImageMagick • webdriver.io • WebdriverCSS plugin for webdriver.io • PhantomJS, Chrome/ChromeDriver, Firefox (Iceweasel may work) • Font Packages (for Linux; OS X and Windows may have plenty installed) • xvfb (for running Chrome/Firefox headless; not needed for PhantomJS) • Testing framework (I use Mocha; Jasmine and Cucumber also work) 9

  10. How do they work? 10

  11. What does that look like? Baseline Comparison Diff Image 11

  12. Skillsets Needed to Write Tests for using WebDriverCSS Javascript 12

  13. What does a test look like? 13

  14. it('This is the home page', function(done){ client .init() .url(‘https://website.testbuild.us/') .pause(2000) .webdrivercss('frontpage',[ { name: 'page', elem: ‘#page', }, ], function(err,res) { assert.ifError(err); assert.ok(res.page[0].isWithinMisMatchTolerance); } ) .call(done) .end(); }); 14

  15. Let’s Look at this in Action 15

  16. Exclude, Hide, Remove • Exclude — overlays a blackout area on the specified element • Hide — applies “visibility: hidden” • Remove — applies “display: none” 16

  17. Selenium / WebdriverCSS / Testing Framework Documentation • http://webdriver.io/guide.html • http://webdriver.io/api.html • https://github.com/webdriverio/webdrivercss • http://www.seleniumhq.org/projects/webdriver/ • https://nodejs.org • https://mochajs.org/ • phantomjs.org/documentation/ 17

  18. BrowserStack Documentation • https://www.browserstack.com/automate/capabilities • https://www.browserstack.com/automate/node#setting-os-and- browser • https://www.browserstack.com/automate/node#configure- capabilities • https://www.browserstack.com/automate/node#setting-local-tunnel 18

  19. Questions? 19

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