Я пытаюсь запустить тест плагина junit, который зависит от пользовательского интерфейса.Я могу запустить тест из командной строки, используя ant и вызывая цель как ui-test.Запуск рабочей среды и выполнение набора тестов.Но тот же самый муравей, который меняет цель в качестве core-test, выполняет набор тестов неудачно.результаты, приводящие к исключению типа "org.eclipse.swt.SWTException: не удалось выполнить runnable (java.lang.IllegalStateException: Workbench еще не был создан.)" Тестовый пример разработан с использованием windowtester.
Я выполнилeclipse-test framework3.6.2 setup.
Возможно, что зависимый от пользовательского интерфейса тестовый сценарий может быть запущен как тестирование без головы с использованием core-test вместо ui-test с использованием приложения core test .?
java -jar plugins \ 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 \ workspace \ workspacebuild.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