How to best do cross-browser cross-platform visual CSS regression testing? [closed]

Background:
Visual CSS regression testing is where you screenshot (part of) one version of a webpage in a browser and compare it against a screenshot of the previous version of the same webpage in the same browser. This prevents unintentional changes from happening due to browser version upgrades or changes in the page itself (e.g. refactoring CSS), because we can diff the two screenshots and flag the new version for review by a human developer if there are any differences. If the difference(s) are intentional, the developer approves the change and marks the new screenshot as the new norm/reference/baseline screenshot. By taking screenshots of the same page in different browsers on different platforms, we can extend this to cross-browser cross-platform CSS regression testing.

With that long explanation now out of the way:
What is the best way to do cross-browser cross-platform CSS regression testing?

I’m trying to see what might be usable for Bootstrap.

2

You can write a small shell script (~5 lines) to launch a browser and capture the window with imagemagick’s import. I use this for Firefox:

firefox -no-remote "$1" &
sleep 10
window_id=$(xwininfo -tree -root | grep Navigator | awk '{print $1}')
import -window $window_id "$1.png"
wmctrl -c Firefox

The only unusual thing here is using wmctrl instead of kill to close Firefox, so it won’t go into recovery mode next time it runs. It should be pretty obvious how you can modify this for Chrome or other browsers (you may need to play around with xwininfo to figure out how to find the browser’s main window).

You can add a line or two to compare the new image with the previous one using imagemagick’s compare.

I’m interpreting this question as asking how to do this rather than asking for off-site resources, since that would be off-topic. There are a number of scripts floating around on the web that do more or less the same thing.

As of December 2014, the best options for cross-browser CSS regression testing seem to be:

  • CrossBrowserTesting.com
    • Proprietary cloud service; Costs money
    • Sounds like it can do the diff-ing and approval management and norm/reference/baseline tracking for you? I haven’t actually tried this service out.
  • WebdriverCSS
    • A Selenium-based tool that offers a web UI to track, review, and approve differences
    • Seems to be backed by Sauce Labs somewhat
  • Wraith-Selenium
    • A fork of Wraith that adds Selenium support. The original Wraith is limited to CasperJS (i.e. Firefox/Gecko & WebKit only).
    • Downside: Not sure if this project is established enough yet to survive long-term.
  • Depicted—dpxdt
    • Doesn’t support cross-browser testing directly, but it does offer a “Diff My Images” option to import screenshots taken from other tools (e.g. Selenium). (The default setup only uses PhantomJS.)
    • Offers a web UI to track, review, and approve differences

For cross-OS tests for the Selenium-based options, you either need to setup your own cluster of test machines or use a for-pay cloud option such as Sauce Labs, Browserstack, etc.
Both Sauce Labs and Browserstack currently offer free accounts for open-source projects.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật