I wanna run selenium tests from TeamCity using Maven at Linux server without display.
While running Selenium tests I'm getting the following error in TeamCity:
Failed to execute goal org.codehaus.mojo:selenium-maven-plugin:2.3:xvfb (xvfb) on project my-project:
It appears that the configured display is already in use: :1
I installed x11-fonts*, xvfb, firefox, extracted DISPLAY=localhost:1, started xvfb
In pom.xml I added the following plugin:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>selenium-maven-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<id>xvfb</id>
<phase>pre-integration-test</phase>
<goals>
<goal>xvfb</goal>
</goals>
<configuration>
<display>:1</display>
</configuration>
</execution>
<execution>
<id>selenium</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start-server</goal>
</goals>
<configuration>
<background>true</background>
</configuration>
</execution>
</executions>
</plugin>
Do you have any ideas how to fix this problem?
UPD: xvfb is running using commmand
Xvfb :1 -screen 0 1920x1200x24 > /dev/null 2>&1 &
UPD: Before I've tried not to run xvfb before running tests, but was getting:
Execution xvfb of goal org.codehaus.mojo:selenium-maven-plugin:2.3:xvfb failed: Execute failed: java.io.IOException: Cannot run program "xauth": java.io.IOException: error=2, No such file or directory