Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » SWTBot with JUnit5?
SWTBot with JUnit5? [message #1817857] Sun, 01 December 2019 11:48 Go to next message
Frank Benoit is currently offline Frank BenoitFriend
Messages: 179
Registered: July 2009
Senior Member
Hi SWTBot team,

Is there today a way to run SWTBot with JUnit5 ?

regards
Frank
Re: SWTBot with JUnit5? [message #1817897 is a reply to message #1817857] Mon, 02 December 2019 14:11 Go to previous messageGo to next message
Patrick Tasse is currently offline Patrick TasseFriend
Messages: 84
Registered: July 2009
Member
Hi Frank,

I have never tried it. If you can try it, and it doesn't work, please report your findings in a bug. And if you are able to contribute the necessary fixes, we will be happy to review them!

Thanks,
Patrick
Re: SWTBot with JUnit5? [message #1818171 is a reply to message #1817897] Mon, 09 December 2019 10:39 Go to previous messageGo to next message
Aparna Argade is currently offline Aparna ArgadeFriend
Messages: 60
Registered: October 2010
Member
Hi,
Here I'm able to run swtbot test with JUnit5 after changing all files in org.eclipse.swtbot.eclipse.core plugin.
We can hope for JUnit5 support soon. This can force SWTBot to increase minimum supported java version from 1.6 to 1.8.
-Aparna
Re: SWTBot with JUnit5? [message #1821394 is a reply to message #1818171] Wed, 12 February 2020 13:29 Go to previous messageGo to next message
Andreas Sewe is currently offline Andreas SeweFriend
Messages: 1
Registered: February 2020
Junior Member
Quote:
Here I'm able to run swtbot test with JUnit5 after changing all files in org.eclipse.swtbot.eclipse.core plugin.

Hi Aparna. I am curious? How were you able use JUnit 5 in SWTBot tests. I always run into this problem:
Exception in thread "WorkbenchTestable" java.lang.IllegalArgumentException: Error: test loader org.eclipse.jdt.internal.junit5.runner.JUnit5TestLoader not found:
org.junit.platform.commons.util.PreconditionViolationException: Cannot create Launcher without at least one TestEngine; consider adding an engine implementation JAR to the classpath
    at org.junit.platform.commons.util.Preconditions.condition(Preconditions.java:295)
    at org.junit.platform.launcher.core.DefaultLauncher.<init>(DefaultLauncher.java:58)
    at org.junit.platform.launcher.core.LauncherFactory.create(LauncherFactory.java:91)
    at org.junit.platform.launcher.core.LauncherFactory.create(LauncherFactory.java:67)
    at org.eclipse.jdt.internal.junit5.runner.JUnit5TestLoader.<init>(JUnit5TestLoader.java:34)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at java.lang.Class.newInstance(Class.java:442)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.createRawTestLoader(RemoteTestRunner.java:370)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.createLoader(RemoteTestRunner.java:365)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.defaultInit(RemoteTestRunner.java:309)
    at org.eclipse.swtbot.eclipse.core.RemotePluginTestRunner.init(RemotePluginTestRunner.java:85)
    at org.eclipse.swtbot.eclipse.core.RemotePluginTestRunner.main(RemotePluginTestRunner.java:63)
    at org.eclipse.swtbot.eclipse.core.UITestApplication.runTests(UITestApplication.java:120)
    at org.eclipse.e4.ui.internal.workbench.swt.E4Testable.lambda$0(E4Testable.java:76)
    at java.lang.Thread.run(Thread.java:748)
Re: SWTBot with JUnit5? [message #1821401 is a reply to message #1821394] Wed, 12 February 2020 15:22 Go to previous messageGo to next message
Aparna Argade is currently offline Aparna ArgadeFriend
Messages: 60
Registered: October 2010
Member
Hi Andreas,
You may track the bug 559531 and the patch that is under progress.
The current patch works for me for eclipse platforms with Junit5.
I will shortly upload a revision on the patch that should work on both older platforms(JUnit4 tests) and newer platforms (both JUnit4 and JUnit5).
If you try the patch, please let us know your findings.
Regards,
Aparna
Re: SWTBot with JUnit5? [message #1824101 is a reply to message #1821401] Wed, 08 April 2020 03:38 Go to previous message
Aparna Argade is currently offline Aparna ArgadeFriend
Messages: 60
Registered: October 2010
Member
Hi all,
It's a pleasure to inform you all that the patch for JUnit5 support is merged.
It is now available at http://download.eclipse.org/technology/swtbot/snapshots
"SWTBot - JUnit5 Support" feature needs to be selected while updating swtbot.

SWTBot version is changed to 3.0.0.

Let's get started for JUnit5 based SWTBot tests!
Thank you Andreas and Patrick for testing the patch.
Aparna
Previous Topic:popup menu in NatTable could'nt be found
Next Topic:SWTBotNatTable opens dialog twice
Goto Forum:
  


Current Time: Fri Apr 26 12:56:41 GMT 2024

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

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

Back to the top