Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » RCP Testing Tool » Running RCPTT using Maven with Xvfb(How do I run RCPTT using Maven with Xvfb?)
Running RCPTT using Maven with Xvfb [message #1807457] Thu, 30 May 2019 13:47 Go to next message
Karl Anthony Ng is currently offline Karl Anthony NgFriend
Messages: 5
Registered: September 2012
Junior Member
I'm trying to run RCPTT tests in TeamCity with a Linux agent and I'm currently getting an error org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed].

I think this is because Eclipse needs to be run using Xvfb. How do I write my pom.xml in such a way that the application that RCPTT spawns will run using Xvfb, for example xvfb-run /path/to/Eclipse.

My pom.xml looks something like this...
    <build>
        <plugins>
            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <id>shutdown-xvfb-startup</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <tasks>
                                <echo message="Ending (startup) xvfb ..." />
                                <exec executable="pkill">
                                    <arg value="Xvfb" />
                                </exec>
                            </tasks>
                        </configuration>
                    </execution>
                    <execution>
                        <id>start-xvfb</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <tasks>
                                <echo message="Starting xvfb ..." />
                                <exec executable="Xvfb" spawn="true">
                                    <arg value=":1" />
                                </exec>
                            </tasks>
                        </configuration>
                    </execution>
                    <execution>
                        <id>shutdown-xvfb-shutdown</id>
                        <phase>test</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <tasks>
                                <echo message="Ending (shutdown) xvfb ..." />
                                <exec executable="pkill">
                                    <arg value="Xvfb" />
                                </exec>
                            </tasks>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.eclipse.rcptt</groupId>
                <artifactId>rcptt-maven-plugin</artifactId>
                <version>${rcptt-maven-version}</version>
                <extensions>true</extensions>
                <configuration>
                    <runner>
                        <version>2.3.0</version>
                        <vmArgs>
                            <vmArg>-Xms128m</vmArg>
                            <vmArg>-Xmx768m</vmArg>
                            <vmArg>-XX:PermSize=128M</vmArg>
                            <vmArg>-XX:MaxPermSize=192M</vmArg>
                        </vmArgs>
                    </runner>
                    <aut>
                        <explicit>eclipse_linux.zip</explicit>
                    </aut>
                    <suites>
                        <suite>TestSuiteSample</suite>
                    </suites>
                </configuration>
            </plugin>
        </plugins>
Re: Running RCPTT using Maven with Xvfb [message #1807566 is a reply to message #1807457] Mon, 03 June 2019 16:19 Go to previous message
Niklaus Giger is currently offline Niklaus GigerFriend
Messages: 30
Registered: August 2011
Member
On my Debian Linux system I just call Quote:
xvfb-run -a mvn -V clean install
to run the RCPTT tests.

This works also in my Jenkins where I use the XVFB plugin.

Best regards

Niklaus
Previous Topic:Doubts in modeling using Matelo
Next Topic:Unable to install RCPTT 2.1 on eclipse neon from Eclipse Marketplace/ via P2
Goto Forum:
  


Current Time: Sat Oct 05 16:12:08 GMT 2024

Powered by FUDForum. Page generated in 0.04173 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top