UI Testing with CasperJS

CasperJS is an open source navigation scripting and testing utility written in Javascript for the PhantomJS WebKit headless browser and SlimerJS (Gecko). It eases the process of defining a full navigation scenario and provides useful high-level functions, methods and syntactic sugar for doing common tasks. PhantomJS is a headless WebKit scriptable with a JavaScript API. It has fast and native support for various web standards: DOM handling, CSS selector, JSON, Canvas, and SVG.

In this two-part article, Matthew Setter goes through the basics of using CasperJS, focusing on the e Tester API feature to test the form of a web site. The article provides a step-by step approach on how to do this with the necessary code. The second part of the article explores other features of the CasperJS that are HTTP authentication, mouse events, forms submission, impersonating user agent and AJAX requests. Each of these features is also explained in detail with code examples. These two parts are a good introduction to the features of CasperJS, an open source tools that you could add to your toolbox for functional testing.

Read the first part of this article on http://blog.newrelic.com/2013/06/04/simpler-ui-testing-with-casperjs-2/
Read the second part of this article on http://blog.newrelic.com/2013/07/29/simpler-ui/