This looks familiar...

This was around the area where I got stuck.  I had found
https://github.com/apache/incubator-netbeans/tree/master/java/java.j2seproject/src/org/netbeans/modules/java/j2seproject/resources
where theres a reference to j2seproject3:junit in the build-impl.xsl but
dont believe I made it too much further.

Regards

John

On Mon, 14 Jan 2019 at 15:23, Peter Hull <peterhul...@gmail.com> wrote:

> On Fri, Jan 11, 2019 at 9:38 AM Peter Hull <peterhul...@gmail.com> wrote:
> > If I can, I will try and manually get JUnit 5 tests working and make
> > list of what I had to add/change.
> I do need a bit more help on this (John McDonnell?)
> I added these files to netbeans/extide/ant/lib:
> * junit-platform-commons-1.3.1.jar
> * junit-platform-engine-1.3.1.jar
> * junit-platform-launcher-1.3.1.jar
>
> I made sure the library JUnit-5.3.1 was in the Test Libraries for my
> project
>
> And added this target to my project's build.xml file:
>     <target name="test-five" depends="compile-test,-pre-test-run">
>         <junitlauncher>
>             <classpath>
>                 <path path="${run.test.classpath}"/>
>             </classpath>
>             <testclasses>
>                 <fileset dir="${build.test.classes.dir}">
>                     <include name="**/*Test.class"/>
>                 </fileset>
>                 <listener type="legacy-brief" sendSysOut="true"/>
>                 <listener type="legacy-xml" sendSysErr="true"
> sendSysOut="true"/>
>             </testclasses>
>         </junitlauncher>
>     </target>
>
> Now running the target 'test-five' does run my tests (the framework
> for which was generated by NB) but there is no integration with the
> IDE.
> According to the docs, the "legacy-*" listeners produce output
> compatible with JUnit4 so if we could hook into these it should be OK.
> Looking at the existing test targets in the build.xml and
> build-impl.xml, I can't figure out how they work - it seems like NB
> provides some extra tasks to ant which are called things like
> j2seproject3:junit and j2seproject3:test-impl but I can't see where
> they come from.
>
> Any hints from those who know?
>
> Thanks
> Pete
>

Reply via email to