Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Use Junit 4.7 with SWTBot
Use Junit 4.7 with SWTBot [message #492144] Mon, 19 October 2009 06:41 Go to next message
speedracer  is currently offline speedracer
Messages: 19
Registered: August 2009
Junior Member
Hello,

I use SWTBot with eclipse 3.4.2. is there a chance to use the newest version of junit (4.7)?

And if yes, what should I change for that? Should I only include it or must I contribute the swtbot plugins?
Re: Use Junit 4.7 with SWTBot [message #492158 is a reply to message #492144] Mon, 19 October 2009 07:54 Go to previous messageGo to next message
Ketan Padegaonkar is currently offline Ketan Padegaonkar
Messages: 873
Registered: July 2009
Senior Member
Eclipse the jdt-junit plugin in 3.4.2 depends on a particular version of
junit, changing the version by dropping in a new junit may not work. You
may try changing things though and see how it goes.

--
Ketan
http://studios.thoughtworks.com/twist | http://twitter.com/ketanpkr


On 19/10/09 12:11 PM, speedracer wrote:
> Hello,
>
> I use SWTBot with eclipse 3.4.2. is there a chance to use the newest
> version of junit (4.7)?
>
> And if yes, what should I change for that? Should I only include it or
> must I contribute the swtbot plugins?
Re: Use Junit 4.7 with SWTBot [message #492168 is a reply to message #492144] Mon, 19 October 2009 08:57 Go to previous messageGo to next message
speedracer  is currently offline speedracer
Messages: 19
Registered: August 2009
Junior Member
Hello,

thanks,

what is a good way to make this changes.

I hava an idea.

I generate a new plugin from the junit 4.7 jar.

Then I remove all dependencies and import packages of the junit4.3.jar from the swtbot plugins and add the junit 4.7 plugins as dependencie.

After that I build swtbot as a new version and add this to my eclipse installation.

Is that a good way, or not?

[Updated on: Mon, 19 October 2009 08:58]

Report message to a moderator

Re: Use Junit 4.7 with SWTBot [message #492190 is a reply to message #492168] Mon, 19 October 2009 11:42 Go to previous messageGo to next message
Ketan Padegaonkar is currently offline Ketan Padegaonkar
Messages: 873
Registered: July 2009
Senior Member
You could try dropping in the junit 4.5 bundle from eclipse 3.5 (and
picking up the eclipse 3.5 version of swtbot) and see how far you can go.

--
Ketan
http://studios.thoughtworks.com/twist | http://twitter.com/ketanpkr

On 19/10/09 2:27 PM, speedracer wrote:
> Hello,
>
> thanks,
>
> what is a good way to make this changes.
> I hava an idea.
>
> I generate a new plugin from the junit 4.7 jar.
>
> Then I remove all dependencies and import packages of the junit4.3.jar
> from the swtbot plugins and add the junit 4.7 plugins as dependencie.
>
> After that I build swtbot as a new version and add this to my eclipse
> installation.
>
> Is that a good way, or not?
Re: Use Junit 4.7 with SWTBot [message #492201 is a reply to message #492144] Mon, 19 October 2009 12:44 Go to previous messageGo to next message
speedracer  is currently offline speedracer
Messages: 19
Registered: August 2009
Junior Member
> You could try dropping in the junit 4.5 bundle from eclipse 3.5 and
> picking up the eclipse 3.5 version of swtbot) and see how far you can go.

Hello Ketan,

can you explain me that.

Dit you mean, I should use the eclipse 3.5 version of the plugin org.eclipse.swtbot.junit4_x with the junit 4.5 libary? or have I misunderstood you?
Re: Use Junit 4.7 with SWTBot [message #492208 is a reply to message #492201] Mon, 19 October 2009 13:35 Go to previous messageGo to next message
Ketan Padegaonkar is currently offline Ketan Padegaonkar
Messages: 873
Registered: July 2009
Senior Member
1. Download eclipse 3.5
2. copy the org.junit4 plugin from eclipse 3.5 to eclipse 3.4
(overwriting it)
3. download swtbot for eclipse 3.5
4. copy the org.eclipse.swtbot.junit4_x because it works with junit>=4.3.

--
Ketan
http://studios.thoughtworks.com/twist | http://twitter.com/ketanpkr

On 19/10/09 6:14 PM, speedracer wrote:
>> You could try dropping in the junit 4.5 bundle from eclipse 3.5 and
>> picking up the eclipse 3.5 version of swtbot) and see how far you can go.
>
> Hello Ketan,
>
> can you explain me that.
>
> Dit you mean, I should use the eclipse 3.5 version of the plugin
> org.eclipse.swtbot.junit4_x with the junit 4.5 libary? or have I
> misunderstood you?
Re: Use Junit 4.7 with SWTBot [message #492250 is a reply to message #492144] Mon, 19 October 2009 15:15 Go to previous messageGo to next message
speedracer  is currently offline speedracer
Messages: 19
Registered: August 2009
Junior Member
Thanks for the detailed replay.

But unfortunately, that doesnt function.

I dont get any compile errors bt when I start the test class as an swtbot test, I get the following exception.

Quote:
Exception in thread "WorkbenchTestable" java.lang.IllegalArgumentException: No Classloader found for plug-in org.eclipse.jdt.junit4.runtime
at org.eclipse.swtbot.eclipse.core.RemotePluginTestRunner.getCl assLoader(RemotePluginTestRunner.java:79)
at org.eclipse.swtbot.eclipse.core.RemotePluginTestRunner.readP luginArgs(RemotePluginTestRunner.java:94)
at org.eclipse.swtbot.eclipse.core.RemotePluginTestRunner.init( RemotePluginTestRunner.java:84)
at org.eclipse.swtbot.eclipse.core.RemotePluginTestRunner.main( RemotePluginTestRunner.java:63)
at org.eclipse.swtbot.eclipse.core.UITestApplication.runTests(U ITestApplication.java:117)
at org.eclipse.ui.internal.testing.WorkbenchTestable$1.run(Work benchTestable.java:68)
at java.lang.Thread.run(Unknown Source)



But a normal Jnit Test for a single class does function
Re: Use Junit 4.7 with SWTBot [message #492331 is a reply to message #492250] Tue, 20 October 2009 03:20 Go to previous message
Ketan Padegaonkar is currently offline Ketan Padegaonkar
Messages: 873
Registered: July 2009
Senior Member
On 19/10/09 8:45 PM, speedracer wrote:
> Thanks for the detailed replay.
> But unfortunately, that doesnt function.
> I dont get any compile errors bt when I start the test class as an
> swtbot test, I get the following exception.
>
> Quote:
>> Exception in thread "WorkbenchTestable"
>> java.lang.IllegalArgumentException: No Classloader found for plug-in
>> org.eclipse.jdt.junit4.runtime

That's because the org.eclipse.jdt.junit4.runtime depends on junit4
between the range 4.2-4.4 as such it does not load up because the junit
version is 4.7.

You may need to additionally muck around with the
org.eclipse.jdt.junit4.runtime (possibly other plugins as well) and
change it's manifest (and delete the signatures in META-INF)

I'd recommend filing a bug on jdt and asking them for a workaround (I've
copied the jdt newsgroup)

--
Ketan
http://studios.thoughtworks.com/twist | http://twitter.com/ketanpkr
Previous Topic:clickLink fails if the linkText is too long
Next Topic:Re: [swtbot-dev] Workaround for Native Dialogs
Goto Forum:
  


Current Time: Sat Nov 01 09:11:34 GMT 2014

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

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