Skip to main content



      Home
Home » Eclipse Projects » SWTBot » SWTBot with JUnit5?
SWTBot with JUnit5? [message #1817857] Sun, 01 December 2019 06:48 Go to next message
Eclipse UserFriend
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 09:11 Go to previous messageGo to next message
Eclipse UserFriend
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 05:39 Go to previous messageGo to next message
Eclipse UserFriend
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 08:29 Go to previous messageGo to next message
Eclipse UserFriend
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 10:22 Go to previous messageGo to next message
Eclipse UserFriend
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] Tue, 07 April 2020 23:38 Go to previous message
Eclipse UserFriend
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: Sat May 17 00:01:14 EDT 2025

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

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

Back to the top