swtBot UI tests execution using maven tycho [message #1064453] |
Wed, 19 June 2013 11:08 |
Deepak Malhotra Messages: 2 Registered: June 2013 |
Junior Member |
|
|
Hello,
I have a swtBot test project which has automated tests for my custom eclipse plugin. I was looking for ways to run the tests headlessly and found it can be done with maven tycho.
I configured my swtBot test project with maven tycho to run the swtBot tests headlessly. Refer to the pom.xml which is attached. The maven tycho build was successful for the project but on running the tests I'm seeing the below exception.
Running com.ebay.soa.service.automation.firstTestCase Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.141 sec <<< FA ILURE! com.ebay.soa.service.automation.firstTestCase Time elapsed: 0 sec <<< ERROR! java.lang.IllegalStateException: Could not find a display at org.eclipse.swtbot.swt.finder.utils.SWTUtils.display(SWTUtils.java:25 0) at org.eclipse.swtbot.swt.finder.finders.ControlFinder.(ControlFin der.java:82) at org.eclipse.swtbot.swt.finder.finders.ControlFinder.(ControlFin der.java:72) at org.eclipse.swtbot.swt.finder.SWTBot.(SWTBot.java:115) at org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot.(SWTWorkbench Bot.java:58) at com.ebay.soa.service.automation.firstTestCase.beforeClass(firstTestCa se.java:52) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:60) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:611) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(Framework Method.java:45) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCal lable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMe thod.java:42) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores. java:27) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.ja va:30) at org.junit.runners.ParentRunner.run(ParentRunner.java:300) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet. java:62) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes tSet(AbstractDirectoryTestSuite.java:140) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(Ab stractDirectoryTestSuite.java:127) at org.apache.maven.surefire.Surefire.run(Surefire.java:177) at org.eclipse.tycho.surefire.osgibooter.OsgiSurefireBooter.run(OsgiSure fireBooter.java:72) at org.eclipse.tycho.surefire.osgibooter.HeadlessTestApplication.run(Hea dlessTestApplication.java:21) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:60) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:611) at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithEx ception(EclipseAppContainer.java:587) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandl e.java:198) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runAppli cation(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(Ec lipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.ja va:353) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.ja va:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:60) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:611) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584) at org.eclipse.equinox.launcher.Main.run(Main.java:1438) at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
I'm encountering : java.lang.IllegalStateException: Could not find a display exception while test execution. Anybody who encountered this or knows a workaround for the same?
Please let me know if u need more information on tycho configuration or project structure.
-
Attachment: pom.xml.txt
(Size: 1.27KB, Downloaded 234 times)
[Updated on: Wed, 19 June 2013 11:09] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03450 seconds