Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 529197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:03:59+00:00 2026-05-13T09:03:59+00:00

I am trying to automate pde tests, using pde-maven-plugin, maven calls, or ant tasks.

  • 0

I am trying to automate pde tests, using pde-maven-plugin, maven calls, or ant tasks. I followed instructions from the article Automating Eclipse PDE Unit Tests using Ant to create the test.xml

Tests failed, first because No Tests Found

junit.framework.AssertionFailedError: junit.framework.AssertionFailedError: No tests found in com.example.TestSuite
    at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)

I searched and found that I should use JUnit4Adapter, but doing that I got ClassCastException, here’s the stack trace

java.lang.ClassCastException: junit.framework.JUnit4TestAdapter cannot be cast to junit.framework.Test
    at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestLoader.getTest(JUnit3TestLoader.java:108)
    at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestLoader.loadTests(JUnit3TestLoader.java:59)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:452)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.main(RemotePluginTestRunner.java:62)
    at org.eclipse.pde.internal.junit.runtime.CoreTestApplication.run(CoreTestApplication.java:23)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:574)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1287)

Here’s my plugin dependencies:

Require-Bundle: 
 org.eclipse.ui,
 org.eclipse.core.runtime,
 org.eclipse.jdt.core;bundle-version="3.4.2",
 org.eclipse.jdt.launching;bundle-version="3.4.1",
 org.eclipse.core.resources;bundle-version="3.4.1",
 org.apache.xerces;bundle-version="2.9.0",
 org.junit4;bundle-version="4.3.1"

and the test class

package com.example;

import junit.framework.JUnit4TestAdapter;
import junit.framework.Test;

import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;

@RunWith(Suite.class)
@SuiteClasses( { SimpleTests.class})
public class TestSuite {

    public static Test suite() {

        return new JUnit4TestAdapter(TestSuite.class);
    }

}

any idea how to fix?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T09:04:00+00:00Added an answer on May 13, 2026 at 9:04 am

    It is fixed by adding next lines when invoking org.eclipse.equinox.launcher.Main:

    <arg line="-testLoaderClass org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader"/>
    <arg line="-loaderpluginname org.eclipse.jdt.junit4.runtime"/>
    

    Here’s the full java ant task:

    <java dir="${plugin.dir}"  
        fork="yes"
        classname="org.eclipse.equinox.launcher.Main"
        classpathref="equinox.launcher.class.path"
        jvm="${jvm}">
        <arg line="-application ${application}"/>
        <arg line="-data ${test.reports.dir}/output/ws"/>
        <arg line="-port ${pde.test.port}"/>
        <arg line="-dev bin -clean -debug"/>
        <arg line="-testpluginname ${plugin.name}"/>
        <arg line="-testLoaderClass org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader"/>
        <arg line="-loaderpluginname org.eclipse.jdt.junit4.runtime"/>
        <arg line="-classnames ${test.classes.list}"/>
        <jvmarg line="${vmargs}"/>
    </java>    
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to automate the selection of items (using jQuery) from the autocomplete dropdown
I'm trying to automate the download of some data from a webform. I'm using
I am trying to automate various tasks in ArcGIS Desktop (using ArcMap generally) with
I am trying to automate data extraction from a website and I really don't
I'm trying to automate the build of a project in Delphi 2009. I'm using
I'm trying to automate a VB6 build where different apps are built from the
So I'm trying to automate a pretty tedious data gathering process from hundreds of
I am trying to automate a web application having javascript. I am using WWW::Scripter
I'm trying to automate InstallShield from my build process, and I need to set
Am trying to automate the process of uploading an artifact generated by Maven into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.