When comparing xvfb vs Zombie.js, the Slant community recommends Zombie.js for most people. In the question“What are the best headless browsers for testing?” Zombie.js is ranked 4th while xvfb is ranked 8th. The most important reason people chose Zombie.js is:
Zombie is built on node.js, making it very easy to integrate with your project and into your testing toolchain. It only requires JavaScript to run.
Ranked in these QuestionsQuestion Ranking
Pros
Pro You can launch REAL browser using xvfb
Just test in real-world browser - xvfb makes it possible to launch them without the real screen.
Pro Runs on Node.js
Zombie is built on node.js, making it very easy to integrate with your project and into your testing toolchain. It only requires JavaScript to run.
Pro Fully featured api based interaction and assertion
The way the api is built makes it very easy to add to your test framework.
Pro Claims to be "Insanely Fast"
It's a lot faster than fully fletched browsers and a lot lighter. Partly because it really only focuses on headless loading of pages along with their JavaScript (not taking really care of rendering or more visual resources).
Cons
Con xvfb is no browser
Con Problem with ports
If you are running multiple instances on some browser and you use xvfb to run instances on agents on Bamboo or Jenkins you will potentially have a problem with using ports.
The first instance you are starting takes on a port on the agent and then the second instance that would be run doesn't have a port to go to.
You can partially solve the problem by dynamically assigning the next available port to the new instance that comes to be executed.
This only works if we assume that all the instances start in different time intervals, but what you cannot know is which instance is going to get a port first if they start at the same time, then the instances will crash, those that started at the same time.
Con Support has waned
As of August 19, 2016, Zombie hasn't received a commit since January 2016. Issues get comments like "patch welcome".
Con Stale documentation
Full API documentation has been missing since the start, making it frustrating to use.
Con Fails to load many sites
As its JavaScript and DOM engine are mostly "just good enough" and because by design it'll report all errors and stop there, many complex sites will not load properly through Zombie.js.
Con No screen-shot
As it doesn't render the page, you cannot get a screenshot to for testing or reporting test failures.