Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » SWTBot cannot be found by <my-test-plugin> in headless (Running SWTBot test on existing application)
SWTBot cannot be found by <my-test-plugin> in headless [message #1851005] Thu, 24 March 2022 12:27
Uday Kumar is currently offline Uday KumarFriend
Messages: 2
Registered: September 2018
Junior Member

I am trying to Automate SWTBot test for my existing eclipse application by following the tutorial test are not running.

I followed the above tutorial as mention:

In order to run test from command-line, here is the generic process:

Install SWTBot in the application you want to test (this works)
Install your tests into the application you want to test (this works)
Running the test on the application (this doesn't work)

Here is the command-line argument I am using:

java \
 -Xms256M -Xmx2048M \
 -jar plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar \
 -application org.eclipse.swtbot.eclipse.junit.headless.swtbottestapplication \
 -product com.openedge.pdt.core.product \
 -testApplication org.eclipse.ui.ide.workbench \
 -data C:/Work/Worksapaces/12.6/dm-tests1 \
 -testPluginName com.openedge.pdt.core.tests \,C:/Work/Temp/eclipse-422/eclipse/report/AllTests.xml \ \
 -className com.openedge.pdt.core.tests.SampleTest \
 -os win32 -ws win32 -arch x86_64 \
 -consoleLog -debug

This give the below error:

Testcase: initializationError took 0.016 sec
        Caused an ERROR
java.lang.NoClassDefFoundError: LSWTBot;
        at java.base/java.lang.Class.getDeclaredFields0(Native Method)
        at java.base/java.lang.Class.privateGetDeclaredFields(
        at java.base/java.lang.Class.getDeclaredFields(
        at org.eclipse.swtbot.eclipse.junit.headless.EclipseTestRunner.getTest(
        at org.eclipse.swtbot.eclipse.junit.headless.EclipseTestRunner.<init>(
        at org.eclipse.swtbot.eclipse.junit.headless.UITestApplication.runTests(
        at org.eclipse.e4.ui.internal.workbench.swt.E4Testable.lambda$0(
        at java.base/
Caused by: java.lang.ClassNotFoundException: SWTBot cannot be found by com.openedge.pdt.core.tests_12.6.0.00
        at org.eclipse.osgi.internal.loader.BundleLoader.generateException(
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass0(
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(
        at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(
        at java.base/java.lang.ClassLoader.loadClass(

It seems SWTBot class is not found by my test plugin, but com.openedge.pdt.core.tests have all the required dependencies in its MANIFEST.
Please suggest, what I am missing

Thanks in advance!
Previous Topic:How to test the Workspace launcher dialog
Next Topic:Test class not found when run from command line
Goto Forum:

Current Time: Tue Jul 23 16:07:57 GMT 2024

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

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

Back to the top