Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Selenium UI tests too slow on Jenkins on Firefox (with xvfb)

I am running Selenium UI tests on Jenkins using Firefox driver, and they are executing extremely slow as compared to local execution. Specifically, it is taking almost 4 times the time it takes to run locally. That's too inefficient.

Locally I run it on Windows or Mac, not Linux. The Jenkins job, however runs on Linux.

The details of the environment is below:

  • Jenkins (running on Linux on a virtual machine)
  • Xvfb for emulating browser (no display attached to the VM)
  • Firefox 38
  • Java 8

I am not sure if a Jenkins configuration or anything else would make it faster. Could it be the VM causing it? Everything is running just fine, but it's the slowness that's causing the inefficiency.

Any ideas to improve the performance would be greatly appreciated.

like image 780
techjourneyman Avatar asked Nov 09 '22 08:11

techjourneyman


1 Answers

The problem was essentially rooted into the disk IO of the Jenkins slave that was running the tests. The local machines (Mac or Windows) are very fast and usually have SSDs as the disk type. Updating the Jenkins slave to something that has better hardware resources and faster disk IO solved the problem.

like image 141
techjourneyman Avatar answered Nov 15 '22 05:11

techjourneyman