junit 5 api purposal

Scott Morgan <[email protected]> Sun, 9 Mar 2014 05:27:48 -0500
Newsgroups gmane.comp.java.junit.user
Message-ID <CANEdHmhSyWOMu8GJ2-+L5+eAwS9oKOxq+c6WG-Ndnovb0DCb8Q@mail.gmail.com>
Hi All,

   I would like to purpose that junit 5 have a new method in the Result
class;

public List<I_TestStats> getTestStats();


Where I_TestStats looks something like this, and has a mutable and
immutable variant (TestStatsMutant, TestStats);


import org.junit.runner.notification.Failure;


public interface I_TestStats {

    public long getRunTime();

    public long getStartTime() ;

    public int getAssertCount() ;

    public String getMethodName() ;

    public Class<?> getTestClass();

    public boolean isPass();

    public Failure getFailure();

}


This is to fix a issue with ant's junit task calling @BeforeClass and
@AfterClass (I am writing a new ant junit task), and to provide more
information about what each test does getAssertCount();


I have it generally working on my machine now, with out tests for it
(although I am seeing 10 errors when I run it with mvn clean install).


Please let me know your thoughts,

Scott