The purpose of performance monitoring is to detect issues and minimize their impact on your end users. There are several different ways to do this, one of which is synthetic testing. Synthetic testing involves simulating real users by loading critical pages and transaction flows such as logging in and, if you’re an ecommerce company, checking out. This simulation should accurately represent the typical behavior of your users. Synthetic transaction testing for websites can come in two forms: browser emulation and real browsers.
Another variation of browser emulation is a headless browser. Headless browsers are simply browsers without a Graphical User Interface (GUI) often used for automation for testing purposes. There are some benefits to not having a UI; it’s more lightweight, less resource intensive, and scripted automation executes quickly.
Real browsers refer to the browsers that most of us are familiar with like Chrome, Safari, Internet Explorer, Firefox, Opera, etc. Real browsers include a GUI and often many other features that enrich the browsing experience. The GUI and additional features make real browsers heavier, more resource intensive, and slower to execute automated commands. Like headless browsers, they also allow you to change the user-agent string to imitate other browsers when communicating with servers.
Chrome vs. PhantomJS
To put it simply, you need to test where your users are—focus on testing the most common and critical user flows from vantage points where most of your users are (ISP and location) using similar technology. Since it currently leads the browser market share, it’s most beneficial to run synthetic tests on Chrome as opposed to relying on headless browser tests to tell you if your users are experiencing issues.