JUnit Plugin Tests are not recognised by PDE test run [message #16254] |
Wed, 13 August 2008 11:09  |
Eclipse User |
|
|
|
Hi,
I'm trying to automate my Plugin Tests with Ant. I'm using JUnit4, which
works fine when I start the Test via the Eclipse IDE.
When starting from command-line ant I get the message
[java] PDE Test Run Started - running 1 tests ...
[java] Test Tree Entry - Description: 1,xxxx,true,1
[java] Test Tree Entry - Description:
2,warning(junit.framework.TestSuite$1),false,1
[java] Test Started - 1 - warning(junit.framework.TestSuite$1)
[java] Test Failed - 1 - warning(junit.framework.TestSuite$1) -
status: FAILED, trace: junit.framework.AssertionFailedError: No tests
found in xxxx
[java] at junit.framework.Assert.fail(Assert.java:47)
[java] at junit.framework.TestSuite$1.runTest(TestSuite.java:90)
[java] at junit.framework.TestCase.runBare(TestCase.java:130)
[java] at
junit.framework.TestResult$1.protect(TestResult.java:106)
[java] at
junit.framework.TestResult.runProtected(TestResult.java:124)
[java] at junit.framework.TestResult.run(TestResult.java:109)
[java] at junit.framework.TestCase.run(TestCase.java:120)
[java] at junit.framework.TestSuite.runTest(TestSuite.java:230)
[java] at junit.framework.TestSuite.run(TestSuite.java:225)
[java] at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestRefer ence.run(JUnit3TestReference.java:130)
[java] at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(Test Execution.java:38)
[java] at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:460)
[java] at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:673)
[java] at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:386)
[java] at
org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:62)
[java] at
org.eclipse.pde.internal.junit.runtime.UITestApplication$1.r un(UITestApplication.java:114)
[java] at
org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
What also concerns me is the fact, that the PDE test run is obviously
using JUnit 3 instead of 4.
The ant script to start the test looks like this:
<java dir="${testeclipse.dir}"
classname="org.eclipse.equinox.launcher.Main"
fork="yes"
classpathref="pde.test.class.path">
<arg line="-application org.eclipse.pde.junit.runtime.uitestapplication
-consoleLog -data ${reports.dir} -clean -port ${pde.test.port}
-testpluginname xxxx -debug -classnames ${test.classes.list}"/>
</java>
What am I doing wrong?
Roland
|
|
|
|
|
|
Re: JUnit Plugin Tests are not recognised by PDE test run [message #20389 is a reply to message #16254] |
Tue, 09 September 2008 15:04   |
Eclipse User |
|
|
|
I'm not sure what's the issue here, I could tell you what's working for us:
public class EclipseTideCoreTestSuite extends TestSuite {
public EclipseTideCoreTestSuite() {
addTestSuite(BulletPointAutoEditStrategyTest.class);
addTestSuite(ChangeMethodSignatureRefactoringTest.class);
...
}
public void testFoolJunitDoNotThrowAnError() throws Exception {
}
}
Also we run the test using -className EclipseTideCoreTestSuite instead
of -classnames
Roland Brand wrote:
> Hi,
>
> I'm trying to automate my Plugin Tests with Ant. I'm using JUnit4, which
> works fine when I start the Test via the Eclipse IDE.
>
> When starting from command-line ant I get the message
>
> [java] PDE Test Run Started - running 1 tests ...
> [java] Test Tree Entry - Description: 1,xxxx,true,1
> [java] Test Tree Entry - Description:
> 2,warning(junit.framework.TestSuite$1),false,1
> [java] Test Started - 1 - warning(junit.framework.TestSuite$1)
> [java] Test Failed - 1 - warning(junit.framework.TestSuite$1) -
> status: FAILED, trace: junit.framework.AssertionFailedError: No tests
> found in xxxx
> [java] at junit.framework.Assert.fail(Assert.java:47)
> [java] at junit.framework.TestSuite$1.runTest(TestSuite.java:90)
> [java] at junit.framework.TestCase.runBare(TestCase.java:130)
> [java] at junit.framework.TestResult$1.protect(TestResult.java:106)
> [java] at
> junit.framework.TestResult.runProtected(TestResult.java:124)
> [java] at junit.framework.TestResult.run(TestResult.java:109)
> [java] at junit.framework.TestCase.run(TestCase.java:120)
> [java] at junit.framework.TestSuite.runTest(TestSuite.java:230)
> [java] at junit.framework.TestSuite.run(TestSuite.java:225)
> [java] at
> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestRefer ence.run(JUnit3TestReference.java:130)
>
> [java] at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(Test Execution.java:38)
>
> [java] at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:460)
>
> [java] at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:673)
>
> [java] at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:386)
>
> [java] at
> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:62)
>
> [java] at
> org.eclipse.pde.internal.junit.runtime.UITestApplication$1.r un(UITestApplication.java:114)
>
> [java] at
> org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
>
>
> What also concerns me is the fact, that the PDE test run is obviously
> using JUnit 3 instead of 4.
>
> The ant script to start the test looks like this:
>
> <java dir="${testeclipse.dir}"
> classname="org.eclipse.equinox.launcher.Main"
> fork="yes"
> classpathref="pde.test.class.path">
> <arg line="-application
> org.eclipse.pde.junit.runtime.uitestapplication -consoleLog -data
> ${reports.dir} -clean -port ${pde.test.port} -testpluginname xxxx -debug
> -classnames ${test.classes.list}"/>
> </java>
>
>
> What am I doing wrong?
>
> Roland
>
>
|
|
|
|
|
|
|
|
Re: JUnit Plugin Tests are not recognised by PDE test run [message #579424 is a reply to message #16254] |
Tue, 09 September 2008 15:04  |
Eclipse User |
|
|
|
I'm not sure what's the issue here, I could tell you what's working for us:
public class EclipseTideCoreTestSuite extends TestSuite {
public EclipseTideCoreTestSuite() {
addTestSuite(BulletPointAutoEditStrategyTest.class);
addTestSuite(ChangeMethodSignatureRefactoringTest.class);
...
}
public void testFoolJunitDoNotThrowAnError() throws Exception {
}
}
Also we run the test using -className EclipseTideCoreTestSuite instead
of -classnames
Roland Brand wrote:
> Hi,
>
> I'm trying to automate my Plugin Tests with Ant. I'm using JUnit4, which
> works fine when I start the Test via the Eclipse IDE.
>
> When starting from command-line ant I get the message
>
> [java] PDE Test Run Started - running 1 tests ...
> [java] Test Tree Entry - Description: 1,xxxx,true,1
> [java] Test Tree Entry - Description:
> 2,warning(junit.framework.TestSuite$1),false,1
> [java] Test Started - 1 - warning(junit.framework.TestSuite$1)
> [java] Test Failed - 1 - warning(junit.framework.TestSuite$1) -
> status: FAILED, trace: junit.framework.AssertionFailedError: No tests
> found in xxxx
> [java] at junit.framework.Assert.fail(Assert.java:47)
> [java] at junit.framework.TestSuite$1.runTest(TestSuite.java:90)
> [java] at junit.framework.TestCase.runBare(TestCase.java:130)
> [java] at junit.framework.TestResult$1.protect(TestResult.java:106)
> [java] at
> junit.framework.TestResult.runProtected(TestResult.java:124)
> [java] at junit.framework.TestResult.run(TestResult.java:109)
> [java] at junit.framework.TestCase.run(TestCase.java:120)
> [java] at junit.framework.TestSuite.runTest(TestSuite.java:230)
> [java] at junit.framework.TestSuite.run(TestSuite.java:225)
> [java] at
> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestRefer ence.run(JUnit3TestReference.java:130)
>
> [java] at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(Test Execution.java:38)
>
> [java] at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:460)
>
> [java] at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:673)
>
> [java] at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:386)
>
> [java] at
> org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunne r.main(RemotePluginTestRunner.java:62)
>
> [java] at
> org.eclipse.pde.internal.junit.runtime.UITestApplication$1.r un(UITestApplication.java:114)
>
> [java] at
> org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
>
>
> What also concerns me is the fact, that the PDE test run is obviously
> using JUnit 3 instead of 4.
>
> The ant script to start the test looks like this:
>
> <java dir="${testeclipse.dir}"
> classname="org.eclipse.equinox.launcher.Main"
> fork="yes"
> classpathref="pde.test.class.path">
> <arg line="-application
> org.eclipse.pde.junit.runtime.uitestapplication -consoleLog -data
> ${reports.dir} -clean -port ${pde.test.port} -testpluginname xxxx -debug
> -classnames ${test.classes.list}"/>
> </java>
>
>
> What am I doing wrong?
>
> Roland
>
>
|
|
|
Re: JUnit Plugin Tests are not recognised by PDE test run [message #579730 is a reply to message #20389] |
Thu, 11 September 2008 03:27  |
Eclipse User |
|
|
|
Hi Ketan
Thank you for your reply. I adapted my starting script according to your
hint. Unfortunately it still doesn't work. I get the same output as before.
My new starting part looks like this:
<java dir="${testeclipse.dir}"
classname="org.eclipse.equinox.launcher.Main"
fork="yes"
classpathref="pde.test.class.path">
<arg line="-application org.eclipse.pde.junit.runtime.uitestapplication
-consoleLog -data ${reports.dir} -clean -port ${pde.test.port}
-testpluginname xxxx -debug -className MyTestSuite"/>
</java>
|
|
|
|
Powered by
FUDForum. Page generated in 0.04388 seconds