PhantomJS Cookbook Book Review

Book Reviews Published on:
Phantom Js Cookbook

Maybe you're a selenium automation engineer looking for more info on headless browser automation. Or you're a developer who wants to automate some unit tests. You might even be an engineer who is concerned about your application's performance. The PhantomJS Cookbook by Rob Fiesel has plenty of recipes to satisfy all three types of users.

In his PhantomJS Cookbook, Rob covers the fundamentals of the headless browser as well as a variety of testing tasks of varying degrees of difficulty.

The “who this book is for” claims that the book is written for experienced web designers who want to add some testing strategies to their development process.

That being said, I'm not a web designer, but I feel this book would be very helpful for experienced test automation engineers and architects as well.

PhantomJS Cookbook Sections

The PhantomJS Cookbook is broken down into eight main chapters that cover:

  1. Getting Started with PhantomJS
  2. The PhantomJS Core Modules
  3. Working with webpage objects
  4. Unit testing with PhantomJS
  5. Functional and End-to-end Testing with PhantomJS
  6. Network Monitoring and Performance Analysis
  7. Generating Images and Documents with PhantomJS
  8. Continuous Integration with PhantomJS

Of course, because the book contains so many recipes, not all of which may apply to your testing task, it doesn't need to be read from front to back. You can easily implement each recipe independent of anything that came before it.

phantomJS headless browser

What I LIked About The PhantomJS Cookbook

What I like most about this book is that it was written by someone that actually uses PhantomJS in his everyday job. Rob is a front-end developer at dealer.com and based on his experience, knows what works and what doesn't with PhantomJS.

This is not a book on theory; it is the real lowdown on what works with PhantomJS by someone who has years of hands on experience. Consequently, Rob's recipes cover the most common scenarios you'll likely face during your development efforts, so you'll be learning practical recipes you can put to work right away.

Of course, I'm a test automation engineer so most of my test efforts focus on end-to-end automation. It's no surprise, then, that my favorite chapter is the functional and end-end testing with PhantomJS chapter. The functional testing chapter has the following recipes:

  • How to run selenium tests with PhantomJS and GhostDriver
  • Using WebdriverJS as a selenium client for PhantomJS
  • Adding Poltergeist to a Capybara suite
  • Taking screenshots during tests with Poltergeist
  • Simulating precise mouse click with Poltergeist
  • Installing CasperJS
  • Interacting with web pages using CasperJS
  • End-to-end testing with CapserJS
  • Exporting test results from CasperJS in the XUnit format
  • Detecting visual regressions using PhantomCSS

I really enjoyed the sections on CasperJS. I just wished there had been a few more recipes focused on it.

Book Recommendation for the PhantomJS Cookbook

There are a lot of resources out there, but they are scattered. If you're just getting started building out a testing strategy for your web application, it can be intimidating, daunting and time-consuming to try to put it all together. Rob does the work for you by creating a one-stop, “go to” resource to help you jump start your PhantomJS efforts.

Rather than spend hours or even days combing the internet for the information you need to get started, save yourself some time and grab the PhantomJS Cookbook. You'll be a master PhantomJS chef in no time and will soon be serving up your very own automation awesomeness. Bon appétit!

Podcast About Test Automation

Test Talks Interview with Rob Friesel Author of the PhantomJS Cookbook

For a sneak peak of the kind of value Rob's PhantomJS Cookbook contains, be sure to check him out in episode 24 of my podcast series, TestTalks, which you won't find anywhere else. Listen now: –>http://www.testtalks/24<–

One response to “PhantomJS Cookbook Book Review”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Phantom Js Cookbook