0

I configured the UI automation tests (serenity+cucumber) to run in parallel.

Some of the tests fails randomly on the server where the xvfb display plugin is used. The tests are running parallel all right locally with regular browser. Also the tests are running all good on Jenkins in case are executed sequence way (one by one).

The tests are failing because some elements cannot be find on the screen. The capture screenshots shows those elements.

I think the problem is coming from the xvfb plugin. The server starts at the beginning:

Xvfb starting$ /usr/bin//Xvfb -displayfd 2 -screen 0 1920x1080x24 -fbdir /opt/jenkins/xvfb-263-..fbdir2220451985689606010 -a

I think the cause is some multithreading issue. The different threads are using the same xvfb server with on display configuration. Should I configure each thread to use his dedicated Xvfb display? If yes then how can I configure to create multiple displays at the beginning of the test and allocate them to each thread?

0 Answers0