Introduction
In addition to being a popular solution for fast front-end unit tests, PhantomJS has emerged as a compelling component of functional or end-to-end test solutions. As we have noted several times already, the headless nature of PhantomJS gives it some unique characteristics that can help streamline the testing process, especially on certain systems where setting up test automation with traditional browsers may be more cumbersome.
In this chapter, we will learn about functional testing strategies with PhantomJS. We will survey several different functional testing tools, including Selenium, Poltergeist (a driver for Capybara), and CasperJS. We will also learn how to apply PhantomJS as part of the overall testing stack.