I realise this is a non-trivial task, but is there a way to regression test the styling and rendered layout of a web application?
I\'ve found it straightforward to unit t
If you're developing in Ruby, take a look at the rspec-page-regression gem. It's an RSpec plugin that lets you compare requested page snapshots against an expected image. It works with Poltergeist, which is a Capybara driver that uses PhantomJS and supports rendering page snapshots.
Rspec-page-regression provides an RSPec matcher that lets you do things like
context "user page" do
before(:each) do
visit user_path
end
it { page.should match_expected }
context "popup help" do
before(:each) do
click_button "Help"
end
it { page.should match_expected }
end
end
And it provides a mechanism to manage the expectation images.
Disclaimer: I'm the author of the gem.