From 7705fa33944ca2193c860926cefc13b36fb9265c Mon Sep 17 00:00:00 2001 From: Mike Bailey <jmbailey@nps.edu> Date: Thu, 5 Sep 2019 14:10:19 -0700 Subject: [PATCH] Test classes now working with junit 5 --- build.xml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/build.xml b/build.xml index f8dc126cb5..5d9bf460ca 100644 --- a/build.xml +++ b/build.xml @@ -70,6 +70,30 @@ nbproject/build-impl.xml file. --> + + <!-- + JUnit 5 is not perfectly supported in Netbeans 11 at this time. This technique + will all the "Test Project" choice in the "Run" menu to properly run junit 5 + test. Running in other ways, such as individually, doesn't seem to work. + https://blogs.apache.org/netbeans/entry/junit-5-apache-ant-and + --> + + <target name="test" depends="compile-test,-pre-test-run"> + <java dir="${work.dir}" + classpath="${run.test.classpath}" + classname="org.junit.platform.console.ConsoleLauncher"> + <arg value="--scan-classpath"/> + <arg line="--reports-dir build/test/results"/> + </java> + <junitreport todir="build/test/results"> + <fileset dir="build/test/results"> + <include name="TEST-*.xml"/> + </fileset> + <report format="frames" todir="build/test/results/html"/> + </junitreport> + </target> + + <target name="jar-javadoc" depends="javadoc"> <mkdir dir="${basedir}/dist/javadoc"/> <jar destfile="${basedir}/dist/open-dis7-javadoc.jar" basedir="${basedir}/dist/javadoc"> -- GitLab