Give Phantomjs a try for your test environment! It is a stable, easy to use and powerful friend.