Create advanced and efficient CasperJS tests for your web development projects This book will be extremely useful for web developers who are new to testing or who want to move from another testing solution to CasperJS. It is assumed that you are familiar with web development and have a good knowledge of JavaScript. Professional web development implies systematic testing. While JavaScript unit tests will validate your JavaScript library's quality, web functional testing is the only way to guarantee the expected behavior of your web pages. CasperJS is a fast and simple JavaScript testing API that can run on any platform, and it is currently one of the best and easiest ways to write your functional tests. Instant Testing with CasperJS will teach you how to write efficient and accurate tests for your professional web developments. This practical guide explains the various different CasperJS principles through clear and detailed examples, covering a large set of common use cases. This book will progressively cover everything you need to know from CasperJS basic principles to the most advanced testing practices. This book starts off by introducing you to the different testing assertions that you can perform with the CasperJS API. We will then move on to cover why bad timing between event triggering can ruin tests and learn strategies to avoid it. Finally, you will learn how to test efficient and complex web interactions like drag and drop, authentication, and file uploading. With Instant Testing with CasperJS, you will be able to set up an advanced and functional test suite for your web development projects quickly and efficiently.
I have been trying to learn casper for a while, I knew that it was a great tool to automate my UI testing but their website information is, sadly, not very well organized. This book is a short reference but quite enough to start a very decent test suite. In particular, I learned how to automate web pages interaction (out of a testing context) and how to write test cases that can even interact with jQuery.
I think that one of the things the book lacks of, is the inclusion of additional assertion libraries.
Totally recommended for those, like myself, with no background in casper.