[Problem]No context available outside of the request service lifecycle [message #1723111] |
Thu, 11 February 2016 17:32  |
Andre Lopes Messages: 2 Registered: February 2016 |
Junior Member |
|
|
Hi,
I'm trying to add some swtbot tests to an existing RCP application, but whenever I execute the test through the Eclipse IDE, I get the following error:
Quote:
!SESSION 2016-02-11 17:20:52.285 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.7.0_79
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments: -version 3 -port 61365 -testLoaderClass org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader -loaderpluginname org.eclipse.jdt.junit4.runtime -classNames org.eclipsecon.swtbot.example.MyFirstTest -application org.eclipse.swtbot.eclipse.core.swtbottestapplication -testApplication org.eclipse.ui.ide.workbench -testpluginname foo.bar.tests
Command-line arguments: -os macosx -ws cocoa -arch x86_64 -consoleLog -console -version 3 -port 61365 -testLoaderClass org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader -loaderpluginname org.eclipse.jdt.junit4.runtime -classNames org.eclipsecon.swtbot.example.MyFirstTest -application org.eclipse.swtbot.eclipse.core.swtbottestapplication -testApplication org.eclipse.ui.ide.workbench -data /Users/xxxx/developer/workspaces/myws/../junit-workspace -dev file:/Users/xxx/developer/workspaces/myws/.metadata/.plugins/org.eclipse.pde.core/pde-junit/dev.properties -os macosx -ws cocoa -arch x86_64 -consoleLog -console -testpluginname foo.bar.tests
!ENTRY org.eclipse.osgi 4 0 2016-02-11 17:20:53.821
!MESSAGE Application error
!STACK 1
java.lang.IllegalStateException: No context available outside of the request service lifecycle.
at org.eclipse.rwt.internal.service.ContextProvider.getContext(ContextProvider.java:107)
at org.eclipse.rwt.internal.service.ContextProvider.getStateInfo(ContextProvider.java:160)
at org.eclipse.rwt.SessionSingletonBase.getInstance(SessionSingletonBase.java:84)
at org.eclipse.ui.internal.Workbench.getInstance(Workbench.java:378)
at org.eclipse.ui.internal.Workbench.getWorkbenchTestable(Workbench.java:618)
at org.eclipse.ui.PlatformUI.getTestableObject(PlatformUI.java:182)
at org.eclipse.swtbot.eclipse.core.UITestApplication.start(UITestApplication.java:50)
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:369)
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:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
at org.eclipse.equinox.launcher.Main.main(Main.java:1384)
The test class is the following
@RunWith(SWTBotJunit4ClassRunner.class)
public class MyFirstTest {
private static SWTWorkbenchBot bot;
@BeforeClass
public static void beforeClass() throws Exception {
bot = new SWTWorkbenchBot();
}
@Test
public void canCreateANewJavaProject() throws Exception {
System.out.println( "Start bot...ing" );
}
}
EDIT-1: My current target platform is the following in the attached screen shot
What am I missing here?
[Updated on: Fri, 12 February 2016 10:22] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.01405 seconds