Yes, what you're saying sounds right; I've seen a variety of things about new testrunner while searching.

After I sent the original, which was about converting an ant project from jUnit4 to jUnit5, I created a new project from scratch, on file. Then asked for a test.

It created a jUnit 5 test, to my surprise; had the jupiter imports. Ran the test and got

   /home/err/.nb/13-screen/cachedir/executor-snippets/junit.xml:184:
        The following error occurred while executing this line:
   /home/err/.nb/13-screen/cachedir/executor-snippets/junit.xml:128:
        The <classpath> or <modulepath> for <junit>
        must include junit.jar if not in Ant's own classpath
   BUILD FAILED (total time: 0 seconds)

Which seems to support what you're saying.

Any pointers for fixing this appreciated. Do I need to modify NB's ant installation? This is a new area for me.

-ernie

On 5/11/22 8:17 PM, Laszlo Kishalmi wrote:
Maybe you need to change the testrunner in the Ant task. AFAIN JUnit 5 uses a new TestRunner.

On 5/11/22 14:27, Ernie Rael wrote:
Hi all,

Feels like I'm in deep with this one.

Using NB-13, I have an old *ant* based project. I was using junit-4.13/JUnitParams-1.1.1. I needed to build a parameterized test, and decided to upgrade to junit-5. The junit-4 tests have been working fine.

Added the junit-5.6 library (comes bundled with NB-13) to the project, deleted old libs. Fixed up annotations and such. Tests don't run: "No tests"executed" see below for output. Seaching says it's OK to ignore the "warning...Status.STABLE" (though it would be nice to know how to get rid of them). See output below, there were no errors

I tried creating a new test, had options junit-4, junit (and testNG whatever that is). I selectd junit, but that seems to be junit-4 or earlier.

netbeans doc, https://netbeans.apache.org/kb/docs/java/junit-intro.html, talks about junit-3, junit-4.

Any ideas on what can I do to get the tests executing?

-ernie


ant -f /src/jvi-dev/jvi -Djavac.includes=com/raelity/jvi/core/FilePathTest.java -Dnb.internal.action.name=test.single -Dtest.includes=com/raelity/jvi/core/FilePathTest.java -Dtest.class=com.raelity.jvi.core.FilePathTest -Dignore.failing.tests=true test-single
init:
Deleting: /src/jvi-dev/jvi/build/built-jar.properties
deps-jar:
Updating property file: /src/jvi-dev/jvi/build/built-jar.properties
compile:
Created dir: /src/jvi-dev/jvi/build/test/classes
Compiling 1 source file to /src/jvi-dev/jvi/build/test/classes
warning: unknown enum constant Status.STABLE
  reason: class file for org.apiguardian.api.API$Status not found
warning: unknown enum constant Status.STABLE
...
100 warnings
Copied 3 empty directories to 3 empty directories under /src/jvi-dev/jvi/build/test/classes
compile-test-single:
Created dir: /src/jvi-dev/jvi/build/test/results
No tests executed.
test-single:
BUILD SUCCESSFUL (total time: 0 seconds)


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to