Automation Testing

PhantomJS Cookbook Book Review

By Test Guild
  • Share:
Join the Guild for FREE

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<–

A bearded man with blue glasses and a black-and-white jacket smiles at a microphone in a studio setting.

About Joe Colantonio

Joe Colantonio is the founder of TestGuild, an industry-leading platform for automation testing and software testing tools. With over 25 years of hands-on experience, he has worked with top enterprise companies, helped develop early test automation tools and frameworks, and runs the largest online automation testing conference, Automation Guild.

Joe is also the author of Automation Awesomeness: 260 Actionable Affirmations To Improve Your QA & Automation Testing Skills and the host of the TestGuild podcast, which he has released weekly since 2014, making it the longest-running podcast dedicated to automation testing. Over the years, he has interviewed top thought leaders in DevOps, AI-driven test automation, and software quality, shaping the conversation in the industry.

With a reach of over 400,000 across his YouTube channel, LinkedIn, email list, and other social channels, Joe’s insights impact thousands of testers and engineers worldwide.

He has worked with some of the top companies in software testing and automation, including Tricentis, Keysight, Applitools, and BrowserStack, as sponsors and partners, helping them connect with the right audience in the automation testing space.

Follow him on LinkedIn or check out more at TestGuild.com.

Comments are closed.

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

5 Top Model Context Protocol Automation Tools (MCP Guide 2025)

Posted on 04/09/2025

What is Model Context Protocol (MCP) Model Context Protocol (MCP) is an open ...

What is TDD (Test Driven Development)

Posted on 04/05/2025

What is Test-Driven Development (TDD)? Test-Driven Development is a software development approach that ...

The Best Open Source API Testing Tools for 2025

Posted on 04/01/2025

Here is my list of the best open source API testing tools for ...