Headless Miracles: Chromedriver Headless VS Chromdriver
You may have heard that we are running the cases in the headless mode so that we could accelerate the execution of the test cases. So is this true all the time? In this post, I have a little test to compare the headless mode in Chromedriver with version 2.33 and Chromedriver. The tests were run in Windows.
I am using Capybara, I have around 200 test cases written in Cucumber. Tests are running parallel with 15 execution lines. This execution is controlled by tags so we can get the execution time when a tag finished. With this way, we can compare the tag specific time differences and the total time difference. I am using the following Chromedriver instances written in env.rb file in the project.
You can see the result of the test in the table below. In total, we have got 3.77% gain in time with running the chromedriver in headless mode. What about the required resources for running the test. The following images show that the performance indicators of the machine that the tests run. Check the memory usage, processor usage, and network usage over time.
|Chromedriver in Headless Mode Windows Perfmon|
To sum up, the headless miracle is not true for chromedriver since getting 3,77% gain in time and almost the same resource requiring is not that good enough reason for calling it a miracle. If you say You are using Phantomjs, so it is better than Chromedriver, read this post. I am planning to test this for my case, when I do it I will add the result of the test.