Hi Maherzia,

It's a well known issue:
http://jenkins-ci.361315.n4.nabble.com/run-GUI-tool-on-windows-slave-td3477033.html
http://forgetfulprogrammer.wordpress.com/2011/09/21/netbeans-gui-tests-on-jenkins-windows/

Xavier


On 01/31/2014 02:08 PM, Maherzia BELAAZI wrote:

Thanks Matthias

Yes I'm using a headless server Jenkins.

But I'm working on Windows so I can't use XVnc plugin.

*From:*tycho-user-boun...@eclipse.org [mailto:tycho-user-boun...@eclipse.org] *On Behalf Of *Matthias Sohn
*Sent:* vendredi 31 janvier 2014 09:46
*To:* SWTBot developers list
*Cc:* tycho-u...@eclipse.org
*Subject:* Re: [tycho-user] [swtbot-dev] Run swtbot tests using tycho/Maven

On Fri, Jan 31, 2014 at 9:23 AM, Maherzia BELAAZI <maherzia.bela...@st.com <mailto:maherzia.bela...@st.com>> wrote:

Hello,

I'm tryning to run swtbot using tycho/Maven, I'm getting this error :

/Running com.st.mlpc.test.MLPCTest/

/!ENTRY com.st.mlpc.test 4 0 2014-01-31 09:02:01.072/

/!MESSAGE Could not initialize bot/

/!STACK 0/

/java.lang.IllegalStateException: *Could not find a display*/

/ at org.eclipse.swtbot.swt.finder.utils.SWTUtils.display(SWTUtils.java:250)/

/ at org.eclipse.swtbot.swt.finder.finders.ControlFinder.<init>(ControlFinder.java:82)/

/ at org.eclipse.swtbot.swt.finder.finders.ControlFinder.<init>(ControlFinder.java:72)/

/        at org.eclipse.swtbot.swt.finder.SWTBot.<init>(SWTBot.java:115)/

/ at org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot.<init>(SWTWorkbenchBot.java:58)/

*_My pom.xml :_*

<packaging>eclipse-test-plugin</packaging>

  <build>

    <plugins>

       <plugin>

<groupId>org.eclipse.tycho</groupId>

<artifactId>tycho-surefire-plugin</artifactId>

<version>0.16.0</version>

            <configuration>

*<useUIHarness>true</useUIHarness>*

*<useUIThread>false</useUIThread>*

<product>com.st.platform.st_ide</product>

<application>com.st.platform.st_ide</application>

<testSuite>com.st.mlpc.test</testSuite>

<testClass>com.st.mlpc.test.MLPCTest</testClass>

              <argLine>-Xms512m -Xmx1024m</argLine>

            </configuration>

        </plugin>

</plugins>

  </build>

Any help is so welcome.

Thanks in advance,

Maherzia

looks like you are running that on a headless server, in Hudson/Jenkins enable the XVnc plugin

and start a window manager in a shell step before starting the tests

In EGit we use metacity as the window manager

metacity --replace --sm-disable &

--

Matthias



_______________________________________________
swtbot-dev mailing list
swtbot-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/swtbot-dev

_______________________________________________
swtbot-dev mailing list
swtbot-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/swtbot-dev

Reply via email to