IM試圖創建一個Junit的爲我的Eclipse應用程序,當我試圖運行測試JUnit的插件的JUnit插件測試:試圖創建JUnit我的Eclipse應用程序
public class QFPROMGridTest {
@Test public void test() {
System.out.println("Testing HGFYGFYYT");
assertTrue(true);
}
}
以下錯誤拋出,
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments: -version 3 -port 51827 -testLoaderClass org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader -loaderpluginname org.eclipse.jdt.junit4.runtime -classNames com.qualcomm.qti.fusemaster.junitTest.QFPROMGridTest -application org.eclipse.pde.junit.runtime.nonuithreadtestapplication -product org.eclipse.platform.ide -testpluginname com.qualcomm.qti.fusemaster.junitTest
Command-line arguments: -os linux -ws gtk -arch x86_64 -consoleLog -version 3 -port 51827 -testLoaderClass org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader -loaderpluginname org.eclipse.jdt.junit4.runtime -classNames com.qualcomm.qti.fusemaster.junitTest.QFPROMGridTest -application org.eclipse.pde.junit.runtime.nonuithreadtestapplication -product org.eclipse.platform.ide -data /prj/iceng/qsip1/workspaces/c_hgarik/fusemaster_workspace_Jan19/../junit-workspace -dev file:/prj/iceng/qsip1/workspaces/c_hgarik/fusemaster_workspace_Jan19/.metadata/.plugins/org.eclipse.pde.core/pde-junit/dev.properties -os linux -ws gtk -arch x86_64 -consoleLog -testpluginname com.qualcomm.qti.fusemaster.junitTest
!ENTRY org.eclipse.osgi 4 0 2015-02-24 01:38:45.002
!MESSAGE Application error
!STACK 1
junit.framework.AssertionFailedError
at junit.framework.Assert.fail(Assert.java:55)
at junit.framework.Assert.assertTrue(Assert.java:22)
at junit.framework.Assert.assertNotNull(Assert.java:256)
at junit.framework.Assert.assertNotNull(Assert.java:248)
at org.eclipse.pde.internal.junit.runtime.NonUIThreadTestApplication.getApplication(NonUIThreadTestApplication.java:103)
at org.eclipse.pde.internal.junit.runtime.NonUIThreadTestApplication.start(NonUIThreadTestApplication.java:36)
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:354)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
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:601)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
我們可以看到實際的測試嗎? – 2015-02-24 09:48:22
我想打印一個斷言屬實, 公共類QFPROMGridTest { \t @Test \t公共無效測試(){ \t \t的System.out.println( 「測試HGFYGFYYT」); \t \t assertTrue(true); \t} – 2015-02-24 09:50:54
您究竟如何運行測試?你執行什麼步驟? – 2015-02-24 09:54:40