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 6881967
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:11:44+00:00 2026-05-27T05:11:44+00:00

I have a maven project in netbeans 6.9.1, in there a junit 4.4 test

  • 0

I have a maven project in netbeans 6.9.1, in there a junit 4.4 test class.

In netbeans context menu I can “clean and build” my project and in output I can see, that my test class was found and run by surefire.

Now I choose from context menu “debug test file”, in output it goes like

— maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ < project-name> —
Compiling 2 source files to < project-path>\target\test-classes

— maven-surefire-plugin:2.7.2:test (default-cli) @ < project-name> —
Surefire report directory: < project-path>\target\surefire-reports


T E S T S


There are no tests to run.

What I’ve checked so far:

  • Build project finds test files, but nonetheless < testSourceDirectory> is there and correct

  • There is only one junit – 4.4 in *.pom dependencies

  • class file itself looks like

    import junit.framework.TestCase;

    import org.junit.Test;

    public class SomeTest extends TestCase
    {
    @Test
    public void testFoo() throws Exception { /—/}
    }

  • netbeans action description for debug looks like

    execute goal: test-compile surefire:test

    set properties :
    jpda.listen=true
    maven.surefire.debug=-Xdebug -Xrunjdwp:transport=dt_socket,server=n,address=${jpda.address}
    jpda.stopclass=${packageClassName}
    failIfNoTests=false // this is my addition, w/o it still failed
    forkMode=once
    test=${className}

  • there is no surefire plugin section anywhere in project *.pom files

  • 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-27T05:11:44+00:00Added an answer on May 27, 2026 at 5:11 am

    This isn’t really a netbeans question.

    You’ve defined JUnit 3 tests, but you’re trying to run them with a JUnit 4 runner. Surefire uses the following rule to determine which runner to use (from maven-surefire-plugin Junit)

    if the JUnit version in the project >= 4.7 and the parallel attribute has ANY value
        use junit47 provider
    if JUnit >= 4.0 is present
        use junit4 provider
    else
        use junit3.8.1
    

    You’ve got junit 4.4 in your project, so it’s using junit4. Since you’ve only got 2 test classes, the best option is to redefine your tests to be JUnit 4 tests. Remove the extends TestCase, add @Test/@Before/@After annotations to your tests, and remove the JUnit 3 stuff altogether.

    For more information on doing the migration, see Best way to automagically migrate tests from JUnit 3 to JUnit 4?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Netbeans to build a Maven project, and have the JTidy java
I have a Maven project with JavaScript code. There is a special javascript compiler
I have following situation: I have a Maven war project in NetBeans 6.7 I
I have a Maven project in Netbeans 7.1 IDE. I'd like to add the
I have a maven project with the following hierarchy as created with NetBeans: root/
I have bunch of groovy scripts in various directories (not necessarily netbeans/maven project dirs).
I'm using netbeans, project: 'maven OSGI bundle', i have bundle activator running fine in
I have a Maven project that has always worked fine in Netbeans, but upgrading
I have a Java project in Netbeans. It runs fine with Maven. So I
I have a Maven Project Built in Netbeans 6.9... I want to export .html

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.