Hi Geertjan

I didn't remove any dialog.

Not near a laptop at present but I don't remember seeing that dialog for a
few versions now... maybe it only showed when you had a lower version of
java that could support JUnit 3 or 4. But then again at lease in NB 8.2 if
you had a java 8 project no dialog showed.

I implemented my approach based on the opinion from the JUnit 5 docs(I
think) that JUnit 5 is the more java 8 specific version to use (or
something to that effect. Can't remember the actual wording).

I guess I didn't think many other people use Ant based projects in 2018.
Any changes in further from me will have that consideration.

Regards

John

On Fri 18 Jan 2019, 13:07 Geertjan Wielenga <
[email protected] wrote:

> I was looking at this today and I can't find the "Select JUnit Version"
> dialog, which is there in the tutorial, but not in Apache NetBeans 10:
>
> https://netbeans.org/kb/docs/java/junit-intro.html
>
> @John McDonnell <[email protected]>, I guess you removed that
> dialog so that only JUnit 5 tests can now be created? I'm not sure about
> that in retrospect -- I think we should let the user choose which JUnit
> version they want to use and not assume JUnit 5 for all cases?
>
> Gj
>
>
> On Mon, Jan 14, 2019 at 9:16 PM John McDonnell <[email protected]>
> wrote:
>
>> 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 <[email protected]> wrote:
>>
>>> On Fri, Jan 11, 2019 at 9:38 AM Peter Hull <[email protected]>
>>> 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