maven - How to get the JUnit surefire report programatically -


i need use junitcore run unit tests standalone jar test tool. have added surefire jars dependencies , there found class org.apache.maven.surefire.junitcore.junitcorerunlistener. in github sample of usage.

my intention xml report result running maven without maven @ runtime.

runlistener reporter = new junitcorerunlistener( new mockreporter(), new hashmap<string, testset>() ); junitcore jc = new junitcore(); jc.addlistener( reporter ); result r = jc.run( new computer(), apptest.class); jc.removelistener( reporter ); system.out.println( r ); 

this not working. correct approach xml output reporter?


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -