java - JUnit RunNotifier and fireTestRunFinished -


i'm trying execute arquillian tests ant (1.8.2, junit4 support) seems ant task not call runnotifier.firetestrunfinished() , arquillian test runner counts on undeploy arquillian-jmx war container. eclipse integration of junit calls firerestrunfinished methods , works correctly there.

i looked around junit javadoc , saw in runnotifier:

public void firetestrunfinished(result result) not invoke. 

moreover, class javadoc description says this:

future evolution of class move firetestrunstarted(description) , firetestrunfinished(result) separate class since should called once per run.

but doesn't specify moved.

looking around sourcecode of junit, saw place firetestrunfinished invoked inside method:

/**  * not use. testing purposes only.  */ public result run(runner runner) {     result result= new result();     runlistener listener= result.createlistener();     fnotifier.addfirstlistener(listener);     try {         fnotifier.firetestrunstarted(runner.getdescription());         runner.run(fnotifier);         fnotifier.firetestrunfinished(result);     } {         removelistener(listener);     }     return result; } 

as can see, says...do not invoke.

my question is, junit planning notifying custom runners when tests have finished running? if current api isn't used, there else available? right options either modify arquillian runner not depend on runlistener anymore or ant task call runnotifier.firetestrunfinished. either way, have change code don't own...and that's not first option.

...or can extend arquillian runner, override run() method , runlistener after super.run().

does see other way around this?


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -