Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Huxley and the Flying Robot Monkeys

Sean Moubry
September 06, 2014

Huxley and the Flying Robot Monkeys

Unleash a cloud of minions to do your bidding!

Making CSS changes to existing projects is hard. Big refactors are even harder. Small changes to one component can impact others, creating unintended visual regressions. It sucks. It creates friction, discouraging you from changing *anything* lest you break something that already works.

Imagine a utopian future where as soon as a developer commits CSS changes, robots go through every page of the website taking screenshots, looking for differences. Those robots exist. And they'd love to meet you.

In this talk, you'll learn how to implement both personal and designer/developer team workflows for automated visual testing. We'll cover the basics of setting up Huxley, Facebook's new system for visual regression testing, and some related technologies. We'll also cover best practices—such as ways of spinning-up remote workers in the cloud for taking screenshots. This talk is an introduction to the world of continuous integration for designers and front-end developers.

http://moubry.com/hux

Sean Moubry

September 06, 2014
Tweet

Other Decks in Design

Transcript

  1. S E A N M O U B R Y

    ← I look like this on Twitter. ! You can follow me: @moubry
  2. Sabre Corporation is a leading technology provider
 to the global

    travel and tourism industry. ! Sabre processed over $100 billion of travel spend in 2013. ! Sabre is headquartered in Southlake, Texas and employs ~10,000 people in ~60 countries around the world.
  3. View the details of your trip plus relevant messages Quickly

    view all items in your itinerary Store all past and upcoming trips in one place
  4. Most human beings have an infinite capacity for taking things

    for granted. ! That we do not learn very much from the lessons of history is the most important of all the lessons of history. ! —Aldous Huxley
  5. These are tools that you don’t actively use. You tell

    them—or schedule them—to do work, and they return with the results when they’re done. ! task runners build tools compilation ! cron, grunt, gulp, rake, etc. Asynchronous Tools
  6. Knowing the inventor is part of ! ! ! !

    ! ! ! ! ! ! ! ! the experience of using open source.
  7. Selenium The modern era of web testing
 began at ThoughtWorks

    in 2004. Jason
 Huggins @hugs Paul
 Hammant @paul_hammant
  8. How do you describe a login page? zeplin.io It signs

    me in.! ! ! It shows an error
 if the password is wrong.
  9. A test! written in Ruby! run by Selenium.! ! Runs

    before each test → ! ! Test #1 success case → ! Test #2 error case → ! ! (This is cool.)
  10. A test! written in Ruby! run by Selenium.! ! Runs

    before each test → ! ! Test #1 success case → ! Test #2 error case → ! ! (This is cool.) This is how I see this file when I first open it:
  11. Prerequisites Things you need to know about: ! 1. Selenium

    2. Command line 3. Source control (Git)
  12. Prerequisites Things you need to know about: ! 1. Selenium

    2. Command line 3. Source control (Git)
  13. Prerequisites Things you need to know about: ! 1. Selenium

    2. Command line 3. Source control (Git)
  14. • It’s premiere feature is interaction recording • But loading

    up the app is slow • And playing back interactions is slow • And running against an app is super brittle • So if an external service is slow you get a false positive! ! These are terrible things that have been true for automated testing on the web for the past 10 years. ! ! Huxley does not fix that. How Huxley Sucks
  15. OOCSS ACSS BEM SMACSS Object Oriented CSS by Nicole Sullivan

    ! Atomic CSS by Brad Frost ! Block Element Modifier by Vitaly Harisov, et al. ! Scalable Modular Architecture by Jonathan Snook MODULARIZATION TECHNIQUES
  16. YES → ! NO → Generated Pattern Library Use KSS

    or Styledocco. ! ! ! ! ! In-Context Pattern Library Use this as a baseline to refactor your code into a more modular state. ASK YOURSELF
 ARE YOU MODULAR?
  17. SUMMARY Humans are visual testers. Robots are better at catching

    regressions. ! Automate manual processes. Consider doing it in the cloud. ! Comparing screenshots is a great way to catch regressions.
  18. CALL TO ACTION Get the Huxley example project working on

    your computer. ! Setup Huxley with
 one of your projects. ! Refactor with confidence.
  19. Thomas Henry Huxley! Evolutionary biologist ! Contemporary of Charles Darwin.

    ! Controversialist (known as
 “Darwin’s bulldog”). ! Coined the term “agnostic”.
  20. CHANGE We have to learn to manage change. ! Everything

    changes. 
 You will change.
 So will the business, your bosses, the customers, and the requirements.
  21. CHANGE C3P0 outlasted his inventor. ! So will your code,

    probably. ! Leave them something that
 will take care of itself.
 
 Leave them tests, documentation,
 and now screenshots.