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/