2011-07-22 5 views
1

UIに依存するプラグインテストケースであるjunitプラグインテストを実行しようとしています。私はantを使用してコマンドラインからテストを実行し、ターゲットをui-testとして呼び出すことができます。テストベンチを起動して実行するワークベンチ。しかし、同じantがコアテストとしてターゲットを変更し、テストスイートの実行に失敗する。 "org.eclipse.swt.SWTException:runnableを実行できませんでした(java.lang.IllegalStateException:Workbenchがまだ作成されていません)。" テストケースは、windowtesterを使用して開発されました。antを使用して、Eclipse Junit Plugin UIテストをコアテストターゲットとしてヘッドレス形式で実行する方法を教えてください。

私はeclipse-test framework3.6.2 setupを行っています。

コアテストアプリケーションを使用したui-testではなく、コアテストを使用してヘッドレステストとしてUI依存テストケースを実行できる可能性があります。

のjava -jarプラグイン\ org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar -application org.eclipse.ant.core.antRunner -data E:\ HeadlessWT \ refactoring_folder -buildfile E:\ HeadlessWT \ワークスペース\ Test13.10は\ build.xmlの-DOS = win32の-Dws = win32の-Darch = x86_64の

エラーログは次のとおりです。

!SESSION 2011-07-21 16:45:26.593 ----------------------------------------------- 
eclipse.buildId=M20110210-1200 
java.version=1.6.0_26 
java.vendor=Sun Microsystems Inc. 
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US 
Framework arguments: -product org.eclipse.epp.package.jee.product -application org.eclipse.test.coretestapplication formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,E:\HeadlessWT\workspace\Test13.10\..\../connectionProfile.MyTestSuite1310.xml -testPluginName Test13.10 -className connectionProfile.MyTestSuite1310 
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product -data E:\HeadlessWT\workspace\Test13.10\..\../refactoring_folder -application org.eclipse.test.coretestapplication formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,E:\HeadlessWT\workspace\Test13.10\..\../connectionProfile.MyTestSuite1310.xml -testPluginName Test13.10 -className connectionProfile.MyTestSuite1310 -consolelog 

!ENTRY com.instantiations.eclipse 1 0 2011-07-21 16:45:30.203 
!MESSAGE UI test starting: connectionProfile.CreateConnProfile_testCreateConnProfile 

!ENTRY com.instantiations.eclipse 1 0 2011-07-21 16:45:30.281 
!MESSAGE 
************************************************* 
WindowTester Runtime 201009131510 
    OS: Windows 2003, amd64, 5.2 
    Java: Sun Microsystems Inc., 1.6.0_26 
    Spec: Java Platform API Specification, Sun Microsystems Inc., 1.6 
    VM: Java Virtual Machine Specification, Sun Microsystems Inc., 1.0 
************************************************* 


!ENTRY com.instantiations.eclipse 1 0 2011-07-21 16:45:30.437 
!MESSAGE Exception caught in SWTExecutionMonitor.waitUntilFinished(): 

!ENTRY com.instantiations.eclipse 4 0 2011-07-21 16:45:30.437 
!MESSAGE Unexpected exception 
!STACK 0 
org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.IllegalStateException: Workbench has not been created yet.) 
    at org.eclipse.swt.SWT.error(SWT.java:4083) 
    at org.eclipse.swt.SWT.error(SWT.java:3998) 
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:137) 
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4041) 
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660) 
    at com.windowtester.runtime.swt.internal.junit.SWTExecutionMonitor.doWaitForFinish(SWTExecutionMonitor.java:151) 
    at com.windowtester.internal.runtime.junit.core.AbstractExecutionMonitor.waitUntilFinished(AbstractExecutionMonitor.java:205) 
    at com.windowtester.internal.runtime.junit.core.SequenceRunner.waitUntilFinished(SequenceRunner.java:69) 
    at com.windowtester.internal.runtime.junit.core.SequenceRunner.exec(SequenceRunner.java:53) 
    at com.windowtester.runtime.common.UITestCaseCommon.runUITest(UITestCaseCommon.java:147) 
    at com.windowtester.runtime.common.UITestCaseCommon.runBare(UITestCaseCommon.java:128) 
    at junit.framework.TestResult$1.protect(TestResult.java:110) 
    at junit.framework.TestResult.runProtected(TestResult.java:128) 
    at junit.framework.TestResult.run(TestResult.java:113) 
    at junit.framework.TestCase.run(TestCase.java:124) 
    at junit.framework.TestSuite.runTest(TestSuite.java:232) 
    at junit.framework.TestSuite.run(TestSuite.java:227) 
    at junit.framework.TestSuite.runTest(TestSuite.java:232) 
    at junit.framework.TestSuite.run(TestSuite.java:227) 
    at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:376) 
    at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:209) 
    at org.eclipse.test.CoreTestApplication.runTests(CoreTestApplication.java:35) 
    at org.eclipse.test.CoreTestApplication.run(CoreTestApplication.java:31) 
    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.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:587) 
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:198) 
    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: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:620) 
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575) 
    at org.eclipse.equinox.launcher.Main.run(Main.java:1408) 
Caused by: java.lang.IllegalStateException: Workbench has not been created yet. 
    at org.eclipse.ui.PlatformUI.getWorkbench(PlatformUI.java:92) 
    at com.windowtester.runtime.swt.internal.finder.ShellFinder.getRootShell(ShellFinder.java:195) 
    at com.windowtester.runtime.swt.internal.finder.ShellFinder$3.run(ShellFinder.java:180) 
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) 
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134) 
    ... 37 more 

!ENTRY com.instantiations.eclipse 1 0 2011-07-21 16:45:30.781 
!MESSAGE UI test starting: crudauto.ValidatingPKCRUD_testValidatingPKCRUD 

!ENTRY com.instantiations.eclipse 1 0 2011-07-21 16:45:30.781 
!MESSAGE Exception caught in SWTExecutionMonitor.waitUntilFinished(): 

!ENTRY com.instantiations.eclipse 4 0 2011-07-21 16:45:30.781 
!MESSAGE Unexpected exception 
!STACK 0 
org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.IllegalStateException: Workbench has not been created yet.) 
    at org.eclipse.swt.SWT.error(SWT.java:4083) 
    at org.eclipse.swt.SWT.error(SWT.java:3998) 
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:137) 
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4041) 
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660) 
    at 
...... 
...... 
    ... 37 more 

答えて

1

ない可能。 Eclipseには、UIテストとコアテストの2つの異なるターゲットがあります。

関連する問題