Launching Unit Tests with the Testframework for an RCP Application [message #458440] |
Mon, 20 November 2006 12:16  |
Eclipse User |
|
|
|
Hi all,
I am setting up an Integration Buildsystem for a RCP Application. After
building the product, I want to run the Unit tests. To do this I created
a test.xml. This snippet shows the call to the libary.xml of the test
plugin:
<target name="suite">
<delete dir="${tests-workspace}" quiet="true"/>
<echo message="stx-folder: ${tests-workspace}"/>
<ant target="ui-test" antfile="${library-file}"
dir="${stixdb_test_app}">
<property name="data-dir" value="${tests-workspace}"/>
<property name="plugin-name" value="${plugin-name}"/>
<property name="classname"
value="de.aysada.stixdb.AllStiXDBTests"/>
</ant>
</target>
This launches the Test but I got this Exception:
[java] [java] junit.framework.AssertionFailedError
[java] [java] at
junit.framework.Assert.fail(Assert.java:47)
[java] [java] at
junit.framework.Assert.assertTrue(Assert.java:20)
[java] [java] at
junit.framework.Assert.assertNotNull(Assert.java:220)
[java] [java] at
junit.framework.Assert.assertNotNull(Assert.java:213)
[java] [java] at
org.eclipse.test.UITestApplication.getApplication(UITestAppl ication.java:93)
[java] [java] at
org.eclipse.test.UITestApplication.run(UITestApplication.jav a:49)
[java] [java] at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:78)
[java] [java] at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:92)
[java] [java] at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:68)
[java] [java] at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:400)
[java] [java] at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
[java] [java] at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] [java] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
[java] [java] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
[java] [java] at
java.lang.reflect.Method.invoke(Method.java:585)
[java] [java] at
org.eclipse.core.launcher.Main.invokeFramework(Main.java:336 )
[java] [java] at
org.eclipse.core.launcher.Main.basicRun(Main.java:280)
[java] [java] at
org.eclipse.core.launcher.Main.run(Main.java:977)
[java] [java] at
org.eclipse.core.launcher.Main.main(Main.java:952)
In the code I saw, that I have to set the Test Application ID. I found
no property to set this.
My quick solution is to patch the libary.xml and it works.
What is the correct way to specify the test application?
karsten
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05570 seconds