This document discusses using CasperJS to automate testing of web analytics. It begins with an introduction on why automated testing is important. It then provides prerequisites for testing, including Python, PhantomJS/SlimerJS, Node.js, CasperJS. It outlines different levels of testing from beginner to advanced, including testing for data existence on page load, simulating user behavior to check for updated attribute values, and validating correct query parameter values in analytics beacons. It provides tips to avoid corrupting data and workarounds for basic authentication and bot detection. It concludes by discussing using these tests in continuous integration and automating test definition from documentation.