News for hackers. Stuff that matters.
Re:Huxley, an app that helps fight CSS and UI regression by taitems on Tuesday July 30, 2013 @08:29PM (#6131081)
For anyone looking for a non-Python way of doing this, PhantomCSS will achieve nearly all of this. The main difference between the two is that Huxley seems to listen and re-perform actions, instead of needing them to be scripted.

We've had PhantomCSS running on a living style-guide/style tile on check in and can even fail the build on TeamCity. It's resemble.js under the hood to do the pixel-by-pixel comparison and will spit out a percentage difference, fail screenshots etc.

EDIT: Link added https://github.com/Huddle/PhantomCSS

Re:Huxley, an app that helps fight CSS and UI regression by peterhunt on Tuesday July 30, 2013 @08:42PM (#6131126)
Just to clarify, it's written in Python but you don't have to write any Python code to use it. Just a teeny config file that contains a test name and a URL.
Re:Huxley, an app that helps fight CSS and UI regression by nirvdrum on Tuesday July 30, 2013 @09:09PM (#6131226)
Nifty project. It'd be nice to add in automated analysis and make it a full Web Consistency Testing tool (disclaimer: a project I work on a lot): http://webconsistencytesting.com/

The three major problems with screenshot based tools are: 1) hard to adapt to acceptable levels of element shifting; 2) hard to extract semantic understanding of what broke; and 3) if it's not automated and you test a lot of pages in a lot of browsers, they simply won't get compared. But adapting this shouldn't be too hard.

Re:Huxley, an app that helps fight CSS and UI regression by aphexairlines on Tuesday July 30, 2013 @11:49PM (#6131791)
Why Resemble.js instead of http://pdiff.sourceforge.net/ ? Here's a presentation from a Google team using pdiff for front-end continuous deployment: http://www.youtube.com/watch?v=UMnZiTL0tUc
Re:Huxley, an app that helps fight CSS and UI regression by bslatkin on Wednesday July 31, 2013 @02:34AM (#6132204)
The project for that is here: https://github.com/bslatkin/dpxdt
Re:Huxley, an app that helps fight CSS and UI regression by hkmurakami on Tuesday July 30, 2013 @09:15PM (#6131248)
Totally thought this would be named after Aldous Huxley, the author of Brave New World, but the answer was quite cool anyways:

So we named it after the guy who coined the term "agnostic", Thomas Henry Huxley.

Re:Huxley, an app that helps fight CSS and UI regression by sync on Tuesday July 30, 2013 @09:04PM (#6131201)
Looks quite awesome! It would be helpful to include some installation instructions for those of us unfamiliar with python libraries... do I use pip? do I use easy_install? do I git clone and then do something with setup.py?
Re:Huxley, an app that helps fight CSS and UI regression by peterhunt on Tuesday July 30, 2013 @09:17PM (#6131252)
I fixed this and actually put it on PyPI :) pip install huxley should do the trick.
Re:Huxley, an app that helps fight CSS and UI regression by ds_ on Wednesday July 31, 2013 @05:50AM (#6132682)
Would anyone pay for this as a service? i.e. you enter a bunch of urls and screen sizes, then get sent nice emails with request stats, screenshots and pdiffs with easy integration into your deployment workflow.
Re:Huxley, an app that helps fight CSS and UI regression by andreasklinger on Wednesday July 31, 2013 @06:51AM (#6132844)
You could try to address "non-dev people" with this kind of tool.

"Alerts when your shop breaks" Basically CI but on the live system (with a testuser) and daily report emails and instant alerts.

Re:Huxley, an app that helps fight CSS and UI regression by abritishguy on Wednesday July 31, 2013 @06:32AM (#6132785)
I'd just integrate it into travis.
Re:Huxley, an app that helps fight CSS and UI regression by achalv on Tuesday July 30, 2013 @07:53PM (#6130921)
Pretty awesome. I could definitely see myself using this.
Re:Huxley, an app that helps fight CSS and UI regression by cburgmer on Wednesday July 31, 2013 @02:53AM (#6132260)
Here is a project that gathers all available solutions around CSS testing: http://csste.st
Re:Huxley, an app that helps fight CSS and UI regression by abritishguy on Wednesday July 31, 2013 @05:07AM (#6132586)
Is there a way to test responsive designs with this? Can you set the device metrics?
Re:Huxley, an app that helps fight CSS and UI regression by peterhunt on Wednesday July 31, 2013 @05:30AM (#6132645)
Like window size? You can from the Python API, I just didn't include the option in the Huxleyfile. I've opened an issue here https://github.com/facebook/huxley/issues/2

Pixel ratio, I'm afraid, would be quite difficult.

Re:Huxley, an app that helps fight CSS and UI regression by faramarz on Tuesday July 30, 2013 @08:29PM (#6131078)
Is there a visual output? I'm not sure i understand this project
Re:Huxley, an app that helps fight CSS and UI regression by peterhunt on Tuesday July 30, 2013 @08:41PM (#6131124)
It writes a .huxley dir that contains screenshots and a log of user actions. It can replay these user actions programmatically and if the screen shots have changed it will save new ones to disk. You can use a tool like Kaleidoscope to compare the old ones with the new ones (we use git to keep the old ones around).

When you commit, the tests will be updated and the new screenshots will be part of the code review.

Additionally, you can run it in continuous integration mode which will break the build if screenshots are out of date.

Re:Huxley, an app that helps fight CSS and UI regression by abritishguy on Wednesday July 31, 2013 @05:06AM (#6132583)
Just to clarify, if I want to run this as part of travis then I should have the screenshots under source control and when I intentionally change the UI I should run it locally and push the new screenshot as part of the commit but when I don't intend to change the UI it will fail the build if something changes.
Re:Huxley, an app that helps fight CSS and UI regression by peterhunt on Wednesday July 31, 2013 @09:13AM (#6133395)
Yep!
Re:Huxley, an app that helps fight CSS and UI regression by faramarz on Wednesday July 31, 2013 @03:14PM (#6136165)
That's quite amazing! Thanks for the write up! Will look into it