Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tycho-user] problem testing with SWTBot and Tycho

Hi all,

I need some help here... :(

I've create a little project, Eclipse RCP Mail, to learn to use tycho with swtbot. but don't know why is not working....

I've tried to follow this page as possible: https://docs.sonatype.org/display/TYCHO/How+to+run+SWTBot+tests+with+Tycho

This is my plugin config:

<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<version>0.13.0-SNAPSHOT</version>
<configuration>
<useUIHarness>true</useUIHarness>
<useUIThread>false</useUIThread>
<!-- <product>org.eclipse.sdk.ide</product> -->
<product>org.cvg.osgi.examples.tycho.rcpmail.product</product>
<showEclipseLog>true</showEclipseLog>
<argLine>${ui.test.vmargs}</argLine>
<!-- <application>org.eclipse.ui.ide.workbench</application> -->
<dependencies>
<dependency>
<type>p2-installable-unit</type>
<artifactId>org.eclipse.swtbot.eclipse.core</artifactId>
<version>2.0.4</version>
</dependency>
<dependency>
<type>p2-installable-unit</type>
<artifactId>org.eclipse.swtbot.eclipse.finder</artifactId>
<version>2.0.4</version>
</dependency>
<dependency>
<type>p2-installable-unit</type>
<artifactId>org.eclipse.swtbot.eclipse.junit4.headless</artifactId>
<version>2.0.4</version>
</dependency>
<dependency>
<type>p2-installable-unit</type>
<artifactId>org.eclipse.swtbot.junit4_x</artifactId>
<version>2.0.4</version>
</dependency>
<dependency>
<type>p2-installable-unit</type>
<artifactId>org.eclipse.swtbot.swt.finder</artifactId>
<version>2.0.4</version>
</dependency>
<dependency>
<type>p2-installable-unit</type>
<artifactId>org.eclipse.swtbot.eclipse.finder</artifactId>
<version>2.0.4</version>
</dependency>
<dependency>
<type>p2-installable-unit</type>
<artifactId>org.hamcrest</artifactId>
<version>1.1.0</version>
</dependency>
<dependency>
<type>p2-installable-unit</type>
<artifactId>org.cvg.osgi.examples.tycho.rcpmail</artifactId>
<version>1.1.0.qualifier</version>
</dependency>
<dependency>
<type>p2-installable-unit</type>
<artifactId>org.eclipse.sdk.ide</artifactId>
<version>0.0.0</version>
</dependency>
<dependency>
<type>p2-installable-unit</type>
<artifactId>org.eclipse.ui.workbench.compatibility</artifactId>
<version>0.0.0</version>
</dependency>
</dependencies>
</configuration>
</plugin>

and this is the log:

!SESSION 2011-06-28 20:18:21.911 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_24
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments: -application org.eclipse.tycho.surefire.osgibooter.uitest -testproperties /Users/cvgaviao/Development/Development_Projects/OPENSOURCE/cvg-fork/cvg-osgi/org.cvg.osgi.examples/org.cvg.osgi.examples.tycho/org.cvg.osgi.examples.tycho.rcpmail.test/target/surefire.properties -product org.cvg.osgi.examples.tycho.rcpmail.product -nouithread Command-line arguments: -debug -consolelog -data /Users/cvgaviao/Development/Development_Projects/OPENSOURCE/cvg-fork/cvg-osgi/org.cvg.osgi.examples/org.cvg.osgi.examples.tycho/org.cvg.osgi.examples.tycho.rcpmail.test/target/work/data -dev file:/Users/cvgaviao/Development/Development_Projects/OPENSOURCE/cvg-fork/cvg-osgi/org.cvg.osgi.examples/org.cvg.osgi.examples.tycho/org.cvg.osgi.examples.tycho.rcpmail.test/target/dev.properties -application org.eclipse.tycho.surefire.osgibooter.uitest -testproperties /Users/cvgaviao/Development/Development_Projects/OPENSOURCE/cvg-fork/cvg-osgi/org.cvg.osgi.examples/org.cvg.osgi.examples.tycho/org.cvg.osgi.examples.tycho.rcpmail.test/target/surefire.properties -product org.cvg.osgi.examples.tycho.rcpmail.product -nouithread

Starting application: 8119
***WARNING: Display must be created on main thread due to Cocoa restrictions. !SESSION 2011-06-28 20:35:35.501 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_24
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments: -application org.eclipse.tycho.surefire.osgibooter.uitest -testproperties /Users/cvgaviao/Development/Development_Projects/OPENSOURCE/cvg-fork/cvg-osgi/org.cvg.osgi.examples/org.cvg.osgi.examples.tycho/org.cvg.osgi.examples.tycho.rcpmail.test/target/surefire.properties -product org.cvg.osgi.examples.tycho.rcpmail.product -nouithread Command-line arguments: -debug -consolelog -data /Users/cvgaviao/Development/Development_Projects/OPENSOURCE/cvg-fork/cvg-osgi/org.cvg.osgi.examples/org.cvg.osgi.examples.tycho/org.cvg.osgi.examples.tycho.rcpmail.test/target/work/data -dev file:/Users/cvgaviao/Development/Development_Projects/OPENSOURCE/cvg-fork/cvg-osgi/org.cvg.osgi.examples/org.cvg.osgi.examples.tycho/org.cvg.osgi.examples.tycho.rcpmail.test/target/dev.properties -application org.eclipse.tycho.surefire.osgibooter.uitest -testproperties /Users/cvgaviao/Development/Development_Projects/OPENSOURCE/cvg-fork/cvg-osgi/org.cvg.osgi.examples/org.cvg.osgi.examples.tycho/org.cvg.osgi.examples.tycho.rcpmail.test/target/surefire.properties -product org.cvg.osgi.examples.tycho.rcpmail.product -nouithread

!ENTRY org.eclipse.osgi 4 0 2011-06-28 20:35:43.933
!MESSAGE Application error
!STACK 1
org.eclipse.swt.SWTException: Invalid thread access
    at org.eclipse.swt.SWT.error(SWT.java:4282)
    at org.eclipse.swt.SWT.error(SWT.java:4197)
    at org.eclipse.swt.SWT.error(SWT.java:4168)
    at org.eclipse.swt.widgets.Display.error(Display.java:1065)
    at org.eclipse.swt.widgets.Display.createDisplay(Display.java:822)
    at org.eclipse.swt.widgets.Display.create(Display.java:805)
    at org.eclipse.swt.graphics.Device.<init>(Device.java:130)
    at org.eclipse.swt.widgets.Display.<init>(Display.java:696)
    at org.eclipse.swt.widgets.Display.<init>(Display.java:687)
    at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:711)
    at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:161)
at org.eclipse.ui.internal.ide.application.IDEApplication.createDisplay(IDEApplication.java:153) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:95) at org.eclipse.tycho.surefire.osgibooter.UITestApplication.runApplication(UITestApplication.java:31) at org.eclipse.tycho.surefire.osgibooter.AbstractUITestApplication.run(AbstractUITestApplication.java:114) at org.eclipse.tycho.surefire.osgibooter.UITestApplication.start(UITestApplication.java:37) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
An error has occurred. See the log file
/Users/cvgaviao/Development/Development_Projects/OPENSOURCE/cvg-fork/cvg-osgi/org.cvg.osgi.examples/org.cvg.osgi.examples.tycho/org.cvg.osgi.examples.tycho.rcpmail.test/target/work/data/.metadata/.log.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Cvg-OSGi : Parent POM for examples built with Tycho  SUCCESS [0.001s]
[INFO] Cvg-OSGi : RCPmail Example Application ........ SUCCESS [2.140s]
[INFO] Cvg-OSGi : RCPmail Example Feature ............ SUCCESS [0.533s]
[INFO] Cvg-OSGi : RCPmail Example Application Test ... FAILURE [20.177s]
[INFO] Cvg-OSGi : RCPmail Example Product and Repository  SKIPPED


could someone help to identify what I'm doing wrong here?

regards

Cristiano


Back to the top