junit-plug-in-test [message #282549] |
Wed, 16 March 2005 12:34 |
Eclipse User |
|
|
|
Originally posted by: heinecke.blue-cable.de
Hi everyone,
I encountered a strange problem while running junit-plug-in-tests.
This is what I've done.
I created a TestCase as follows:
import junit.framework.TestCase;
public class UseCaseEditorTest extends TestCase
{
public void testUseCaseEditor() throws Exception
{
//...
}
}
When I run this test via run as junit-plug-in-test my test-workbench starts
an I could see my plug-in but I get the message:
Failed to execute runnable (java.lang.NoClassDefFoundError:
junit/framework/TestCase)
That is quite strange for me. Because I added the junit-jar to my project
and made my plug-in depending on:
<requires>
....
<import plugin="org.eclipse.pde.junit.runtime"/>
<import plugin="org.eclipse.jdt.junit.runtime"/>
<import plugin="org.eclipse.jdt.junit"/>
</requires>
So why eclipse can not find the TestCase???
Can anybody help?
Thanks in advance!
best regards
Andreas
|
|
|
|
Re: junit-plug-in-test [message #282610 is a reply to message #282553] |
Wed, 16 March 2005 21:33 |
Eclipse User |
|
|
|
Originally posted by: heinecke.blue-cable.de
Ingo,
I tried that but it doesn't work for me.
Is there anything different in a TestCase which is intended to be a plug-in
test from a "normal" TestCase which is intended to test a "normal" class?
many regards and thanks for help...
Andreas
Ingo Maier wrote:
> Andreas,
>
> I have just org.junit in my dependencies without the pde and jdt stuff.
> Have you tried that?
>
> Ingo
>
>
> Andreas Heinecke wrote:
>> Hi everyone,
>>
>> I encountered a strange problem while running junit-plug-in-tests.
>> This is what I've done.
>> I created a TestCase as follows:
>>
>> import junit.framework.TestCase;
>>
>> public class UseCaseEditorTest extends TestCase
>> {
>>
>> public void testUseCaseEditor() throws Exception
>> {
>> //...
>> }
>> }
>>
>> When I run this test via run as junit-plug-in-test my test-workbench
>> starts an I could see my plug-in but I get the message:
>> Failed to execute runnable (java.lang.NoClassDefFoundError:
>> junit/framework/TestCase)
>>
>> That is quite strange for me. Because I added the junit-jar to my project
>> and made my plug-in depending on:
>> <requires>
>> ....
>> <import plugin="org.eclipse.pde.junit.runtime"/>
>> <import plugin="org.eclipse.jdt.junit.runtime"/>
>> <import plugin="org.eclipse.jdt.junit"/>
>> </requires>
>>
>> So why eclipse can not find the TestCase???
>>
>> Can anybody help?
>>
>> Thanks in advance!
>>
>> best regards
>>
>> Andreas
|
|
|
Re: junit-plug-in-test [message #282615 is a reply to message #282610] |
Wed, 16 March 2005 21:56 |
Eclipse User |
|
|
|
Originally posted by: heinecke.blue-cable.de
I solved the problem!
Ingo, you gave the important hint!
It was my fault to integrate the JUnit.jar in the build path. But that is
wrong. The org.junit plug-in must be placed in the list of dependencies.
According to the newsgroup I must say it is a common problem to integrate
third-party .jar files in the build path. Compling will be without problems
but running your application will cause a ClassNotFound...bla bla.
Thats all for now...
Thank you for your help Ingo...
Many regards
Andreas
Andreas Heinecke wrote:
> Ingo,
>
> I tried that but it doesn't work for me.
> Is there anything different in a TestCase which is intended to be a
> plug-in test from a "normal" TestCase which is intended to test a "normal"
> class?
>
> many regards and thanks for help...
>
> Andreas
>
> Ingo Maier wrote:
>
>> Andreas,
>>
>> I have just org.junit in my dependencies without the pde and jdt stuff.
>> Have you tried that?
>>
>> Ingo
>>
>>
>> Andreas Heinecke wrote:
>>> Hi everyone,
>>>
>>> I encountered a strange problem while running junit-plug-in-tests.
>>> This is what I've done.
>>> I created a TestCase as follows:
>>>
>>> import junit.framework.TestCase;
>>>
>>> public class UseCaseEditorTest extends TestCase
>>> {
>>>
>>> public void testUseCaseEditor() throws Exception
>>> {
>>> //...
>>> }
>>> }
>>>
>>> When I run this test via run as junit-plug-in-test my test-workbench
>>> starts an I could see my plug-in but I get the message:
>>> Failed to execute runnable (java.lang.NoClassDefFoundError:
>>> junit/framework/TestCase)
>>>
>>> That is quite strange for me. Because I added the junit-jar to my
>>> project and made my plug-in depending on:
>>> <requires>
>>> ....
>>> <import plugin="org.eclipse.pde.junit.runtime"/>
>>> <import plugin="org.eclipse.jdt.junit.runtime"/>
>>> <import plugin="org.eclipse.jdt.junit"/>
>>> </requires>
>>>
>>> So why eclipse can not find the TestCase???
>>>
>>> Can anybody help?
>>>
>>> Thanks in advance!
>>>
>>> best regards
>>>
>>> Andreas
|
|
|
Powered by
FUDForum. Page generated in 0.02889 seconds