junit 5 suggestions

Scott Morgan <[email protected]> Mon, 10 Mar 2014 15:41:55 -0500
Newsgroups gmane.comp.java.junit.user
Message-ID <CANEdHmhZWLp+O5cWFedisYZcyxue7uoRu=Jra4fm1U1eVf_VbA@mail.gmail.com>
Hi Again,

   Ok this is much easier to read;
https://github.com/adligo/junit/blob/master/diagrams/JUnit5RunApiSuggestion.jpg

The basic idea is;
Lets compare Apples to Apples (or in other words line up JUnit Test
Classes, Code Coverage and AssertionCounts)

It would involve adding parts of something like EclEmma to junit so that
the coverage and assertions would all be tracked in the same models.
Then the other statistics could be calculated and included with the JUnit
test results like;
percentage of instructions covered
percentage of lines covered
percentage of assertions to instructions
average instructions per line (this should be smallish (ie 1.1) for well
refactored code)

It would probably take us several years to implement, and break backward
compatibility.
So it makes sense for others to review it for some time and agree about the
api, before any real coding starts.

I think full blown statistics of junit tests would provide teams with
better insight to their junit testing effort.   I also do NOT think new
project prototypes should be 100% tested until some end to end api level
functional testing has occurred.
   After all junit 4.11 has about 700 junit tests of itself and I couldn't
reports of new junit tests to work with out altering the junit 4 api
slightly (and junit did use ant at one point to build itself).

If enough folks agree this is a good idea I would recommend the following
migration path;
1) Implement all the models, and tests of them
2) alter the JUnitCore class

Cheers,
Scott