Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » JUnit Plugin Tests are not recognised by PDE test run
JUnit Plugin Tests are not recognised by PDE test run [message #16254] Wed, 13 August 2008 15:09 Go to next message
Roland Brand is currently offline Roland BrandFriend
Messages: 42
Registered: July 2009
Member
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 #20301 is a reply to message #16254] Tue, 09 September 2008 07:59 Go to previous messageGo to next message
Dora is currently offline DoraFriend
Messages: 4
Registered: July 2009
Junior Member
Hello Roland,
I have the same problem. Did you manage to solve it? Can you give me some
info?
I really can't find any info about this, so I look forward to hearing from
you.
Dora
Re: JUnit Plugin Tests are not recognised by PDE test run [message #20310 is a reply to message #20301] Tue, 09 September 2008 08:52 Go to previous messageGo to next message
Roland Brand is currently offline Roland BrandFriend
Messages: 42
Registered: July 2009
Member
Hi Dora

Sorry, I can't help you, I gave up on this topic. Seems like nobody is
using automated plugin tests.

Roland
Re: JUnit Plugin Tests are not recognised by PDE test run [message #20320 is a reply to message #20310] Tue, 09 September 2008 12:00 Go to previous messageGo to next message
Dora is currently offline DoraFriend
Messages: 4
Registered: July 2009
Junior Member
Hi again,
So you are not using automated plugin tests? not even in junit3?
Dora
Re: JUnit Plugin Tests are not recognised by PDE test run [message #20389 is a reply to message #16254] Tue, 09 September 2008 19:04 Go to previous messageGo to next message
Ketan Padegaonkar is currently offline Ketan PadegaonkarFriend
Messages: 873
Registered: July 2009
Senior Member
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 #21065 is a reply to message #20389] Thu, 11 September 2008 07:27 Go to previous messageGo to next message
Roland Brand is currently offline Roland BrandFriend
Messages: 42
Registered: July 2009
Member
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>
Re: JUnit Plugin Tests are not recognised by PDE test run [message #21079 is a reply to message #20320] Thu, 11 September 2008 07:30 Go to previous message
Roland Brand is currently offline Roland BrandFriend
Messages: 42
Registered: July 2009
Member
Hi Dora

I use plugin tests, but I have to start them manually. In my case, Junit3
doesn't work neither.
Re: JUnit Plugin Tests are not recognised by PDE test run [message #579238 is a reply to message #16254] Tue, 09 September 2008 07:59 Go to previous message
Dora is currently offline DoraFriend
Messages: 4
Registered: July 2009
Junior Member
Hello Roland,
I have the same problem. Did you manage to solve it? Can you give me some
info?
I really can't find any info about this, so I look forward to hearing from
you.
Dora
Re: JUnit Plugin Tests are not recognised by PDE test run [message #579255 is a reply to message #20301] Tue, 09 September 2008 08:52 Go to previous message
Roland Brand is currently offline Roland BrandFriend
Messages: 42
Registered: July 2009
Member
Hi Dora

Sorry, I can't help you, I gave up on this topic. Seems like nobody is
using automated plugin tests.

Roland
Re: JUnit Plugin Tests are not recognised by PDE test run [message #579268 is a reply to message #20310] Tue, 09 September 2008 12:00 Go to previous message
Dora is currently offline DoraFriend
Messages: 4
Registered: July 2009
Junior Member
Hi again,
So you are not using automated plugin tests? not even in junit3?
Dora
Re: JUnit Plugin Tests are not recognised by PDE test run [message #579424 is a reply to message #16254] Tue, 09 September 2008 19:04 Go to previous message
Ketan Padegaonkar is currently offline Ketan PadegaonkarFriend
Messages: 873
Registered: July 2009
Senior Member
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 07:27 Go to previous message
Roland Brand is currently offline Roland BrandFriend
Messages: 42
Registered: July 2009
Member
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>
Re: JUnit Plugin Tests are not recognised by PDE test run [message #579751 is a reply to message #20320] Thu, 11 September 2008 07:30 Go to previous message
Roland Brand is currently offline Roland BrandFriend
Messages: 42
Registered: July 2009
Member
Hi Dora

I use plugin tests, but I have to start them manually. In my case, Junit3
doesn't work neither.
Previous Topic:missing org.eclipse.pde.ui
Next Topic:ClassNotFoundException (org.eclipse.swt.widgets.Composite) when running the Testing Framework
Goto Forum:
  


Current Time: Fri Apr 19 10:37:19 GMT 2024

Powered by FUDForum. Page generated in 0.03136 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top