How to use latest Junit with Eclipse ganymede? [message #554924] |
Tue, 24 August 2010 14:32  |
Eclipse User |
|
|
|
Sorry this isn't exactly related to SWT-Bot but has to do with my test environment (which I'm using to write SWT-Bot tests), and I know the people on this forum can be very helpful.
I am on Eclipse ganymede 3.4.2, which includes Junit 4.3. I noticed that the new version of Junit, as of 4.8. supports categories. Details here:
http://kentbeck.github.com/junit/doc/ReleaseNotes4.8.html
I was able to add the @Category notations by importing the junit 4.8.2 jars into a new plugin in my workspace and putting that plugin as a dependency of my test plugin. Doing so, I was able to get it to compile; however when I try to actually execute the tests, I get the following error at runtime: junit.framework.AssertionFailedError: No tests found in com.ibm.datatools.swtbot.tests.ods.BVTTestsODS, even though my tests are clearly marked with @Test annotation.
I'm not sure if I'm on the right track here. I found this post here:
http://www.coderanch.com/t/483119/Testing/run-JUnit-test-Ecl ipse
This guy was trying to do kind of a similar thing, with a similar error, and to fix it he finally ended up just upgrading his entire Eclipse. I'm hoping I won't have to do that, since we need to stay on this version of Eclipse because the product I'm testing is based off of this version. (Or could I use a different version of Eclipse for my testcase development as the 'target platform'? I don't think so right?).
Does anyone know how I can upgrade the version of Junit in Eclipse to Junit 4.8+ ?
Thanks in advance,
Steve
|
|
|
|
|
Re: How to use latest Junit with Eclipse ganymede? [message #635455 is a reply to message #555724] |
Tue, 26 October 2010 17:18  |
Eclipse User |
|
|
|
I think Ketan was talking about changing the JUnit that eclipse itself is reliant on, but there's no reason you can't use a different version for your own projects. I saw one post about tossing it into the eclipse 'dropins' folder, which I've never heard of, but typically the way to do this is create a Lib folder in your project and put the version of JUnit 4.8.x or whatever you want to use there. This is what I am doing and it works for my purposes.
dropins folder:
http://github.com/KINFOO/LuaEclipse/wiki/set-up-the-developm ent-environment
You would think there would be some way to do this via the Software Updates, since JUnit is such a fundamental library. From a brief reading, the way JUnit is integrated in with eclipse has changed with "Helios", so it seems this will soon change..
|
|
|
Powered by
FUDForum. Page generated in 0.04298 seconds