Tests4j

"Scott Morgan [email protected] [junit]" <[email protected]> Mon, 12 Jan 2015 18:30:41 -0600
Newsgroups gmane.comp.java.junit.user
Message-ID <CANEdHmieTPvF=8bikA7a_=riQb3-7jCD7rvZYEW5yOd64cd2bQ@mail.gmail.com>
Hi All,

   I just thought I should mention that I will have a working prototype
published on GitHub in the next few months (by April) of tests4j.adligo.org.

It is a concurrent api to run tests with pluggable code coverage.  It also
has the ability to assert dependencies (which class called which),
code coverage (source file A has 78% coverage) and a pluggable assertion
api;
 assertUniform(Object expected, Object actual);
 assertNotUniform(String message, Object expected, Object actual);
  Anyone can add Uniform implementations to do anything and inject them to
tests4j, the uniform implementation is chosen by the expected class name.
It is roughly based on JUnit 3, TestCases are called Trials and are run
concurrently.
There are currently three types of trials;
    SourceFileTrails (allows coverage assertion at the source file level)
    ApiTrials (allows coverage assertion anywhere under the package level)
    UseCaseTrials
It is using jaxb to write out results to files or streams  (storing jacoco
probes as base64).
It has a way to pass parameters to Trials;
   @BeforeTrial
   public static void beforeTrial(Map<String,Object> map);
   I will probably write a xml input file schema for easy use of the
parameter api as well.
There has been some work to include a way to write/include use cases with
out having running tests for them using xml files included in the jar files
(requirements.xml, use_case_A.xml, use_case_B.xml etc).
   This use case idea would allow non developers to simply write/modify xml
files in English or any other language stating what the system or project
should do so that developers could map the English to a @Test method later
on using something like;
   @Test
   @UseCase ("Parallel park car.")
   public void testParallelPark() {
   ....
   }
   This would also allow tests4j to state at the end of a trial run, what
percentage of use cases;
A) have corresponding tests
B) have passed

In addition I have spent some time dreaming up a new development process
that would involve a new system called Intelligence4j.
Intelligence4j would initially be a decoupling of the test chart from CI
server (I.E. junit chart in Hudson), and would eventually become a hub for
all information about development (what built where, who wrote it, which
tests passed).  This would allow CI server builds to push to a common
location (from multiple operating systems), which could also capture
developer builds.

You may want to take a look at tests4j.adligo.org (after it is on GitHub)
before dumping a lot of time into development, since this has been the
focus of most of my effort for the entire year of 2014.  Also I thought I
should just throw out all of these ideas, as it may provide some food for
thought if the junit community is anxious to dive in to a new round of
junit.

Cheers,
Scott

PS here a sneak peak of how it looks when testing itself :)_
Note coverage units are jacoco probe hits.
Also it will probably NOT have a eclipse plugin to run it this year,
perhaps 2016,
however it can be run from eclipse using main methods.

------------------------Test Results-------------------------

                Tests completed in 29.743 seconds.

                Package Coverage;

                        +org.adligo.gwt_refs was covered 97.17% with 1
source files, 1 child packages and 240/247 coverage units.

                        +org.adligo.tests4j.models.shared.association was
covered 70.1% with 6 source files and 136/194 coverage units.

                        +org.adligo.tests4j.models.shared.coverage was
covered 40.61% with 18 source files and 147/362 coverage units.

                        +org.adligo.tests4j.models.shared.metadata was
covered 58.92% with 12 source files and 109/185 coverage units.


+org.adligo.tests4j.models.shared.reference_groups.jse was covered 61.8%
with 8 source files, 3 child packages and 55/89 coverage units.

                        +org.adligo.tests4j.models.shared.results was
covered 68.99% with 15 source files and 247/358 coverage units.

                        +org.adligo.tests4j.run.api was covered 60.53% with
2 source files and 23/38 coverage units.

                        +org.adligo.tests4j.run.common was covered 52.9%
with 32 source files and 155/293 coverage units.

                        +org.adligo.tests4j.run.discovery was covered
54.53% with 18 source files and 307/563 coverage units.

                        +org.adligo.tests4j.run.helpers was covered 58.32%
with 24 source files and 473/811 coverage units.

                        +org.adligo.tests4j.run.io was covered 81.65% with
5 source files and 129/158 coverage units.

                        +org.adligo.tests4j.run.memory was covered 64.1%
with 3 source files and 100/156 coverage units.

                        +org.adligo.tests4j.run.output was covered 18.18%
with 5 source files and 18/99 coverage units.

                        +org.adligo.tests4j.run.remote was covered 5.38%
with 6 source files, 1 child packages and 14/260 coverage units.

                        +org.adligo.tests4j.run.xml.io.coverage.v1_0 was
covered 0.0% with 6 source files and 0/35 coverage units.

                        +org.adligo.tests4j.run.xml.io.params.v1_0 was
covered 0.0% with 6 source files and 0/53 coverage units.

                        +org.adligo.tests4j.run.xml.io.requirements.v1_0
was covered 1.23% with 10 source files and 1/81 coverage units.

                        +org.adligo.tests4j.run.xml.io.test_result.v1_0 was
covered 0.0% with 4 source files and 0/27 coverage units.

                        +org.adligo.tests4j.run.xml.io.trial_result.v1_0
was covered 1.2% with 10 source files and 1/83 coverage units.


+org.adligo.tests4j.run.xml.io.trial_run_result.v1_0 was covered 1.82% with
5 source files and 1/55 coverage units.

                        +org.adligo.tests4j.run.xml.io.use_cases.v1_0 was
covered 2.63% with 5 source files and 1/38 coverage units.

                        +org.adligo.tests4j.run.xml_bindings.conversion was
covered 28.28% with 12 source files and 28/99 coverage units.

                        +org.adligo.tests4j.run.xml_bindings.io was covered
11.76% with 5 source files and 14/119 coverage units.

                        +org.adligo.tests4j.shared.asserts was covered
75.55% with 12 source files, 4 child packages and 1233/1632 coverage units.

                        +org.adligo.tests4j.shared.common was covered
63.13% with 16 source files and 137/217 coverage units.

                        +org.adligo.tests4j.shared.en was covered 100.0%
with 9 source files and 136/136 coverage units.

                        +org.adligo.tests4j.shared.i18n was covered 100.0%
with 0 source files and 0/0 coverage units.

                        +org.adligo.tests4j.shared.output was covered
48.42% with 6 source files and 46/95 coverage units.

                        +org.adligo.tests4j.shared.xml was covered 82.41%
with 3 source files and 89/108 coverage units.

                        +org.adligo.tests4j.system.shared.api was covered
55.08% with 16 source files and 130/236 coverage units.

                        +org.adligo.tests4j.system.shared.report.summary
was covered 71.32% with 23 source files and 194/272 coverage units.

                        +org.adligo.tests4j.system.shared.trials was
covered 43.33% with 21 source files and 78/180 coverage units.

                        +org.adligo.tests4j_4jacoco.plugin was covered
59.16% with 4 source files, 9 child packages and 940/1589 coverage units.

                        +org.adligo.tests4j_4mockito was covered 21.74%
with 9 source files and 60/276 coverage units.

                Tests: 3130/3134

                Unique/Assertions: 30310/1328431

                All Trials 576/576 Trials with 57.0% coverage;


                        Passed!


------------------------Test Results End---------------------

>
>