Skip to content

Java with Ant - JUnit Bug #7819

Open
Open
@antoniojvelezq

Description

@antoniojvelezq

Apache NetBeans version

Apache NetBeans 23

What happened

I created a simple unit test, but it generates the following error when running the test:

/home/ajvelez/.cache/netbeans/23/executor-snippets/junit.xml:184: The following error occurred while executing this line:
/home/ajvelez/.cache/netbeans/23/executor-snippets/junit.xml:128: The or for must include junit.jar if not in Ant's own classpath

Language / Project Type / NetBeans Component

Java / Java with Ant / JUnit execute

How to reproduce

Create a Java with Ant y execute the next test

public class NewEmptyJUnitTest {
    
    public NewEmptyJUnitTest() {   }

     @Test
     public void hello() {
         assertEquals(20, 20);
     }
}

Did this work correctly in an earlier version?

No / Don't know

Operating System

Fedora 40

JDK

JDK17 and JDK22

Apache NetBeans packaging

Apache NetBeans provided installer

Anything else

No response

Are you willing to submit a pull request?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    Ant[ci] enable "build tools" testsJava[ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form)kind:bugBug report or fixneeds:triageRequires attention from one of the committerstests

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions