Test Execution Listener

"janpridal" <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.openide.devel
Message-ID <[email protected]>
Hi,
I'd like to create a module with following functionality: when user executes JUnit test in NetBeans project my module would perform some action like notifying an external system (test execution starts/ends with result).

I've noticed that for Maven projects the JUnit test is executed like this:

cd E:\commons; "JAVA_HOME=C:\\jdk1.8" cmd /c "\"\"E:\\NetBeans\\java\\maven\\bin\\mvn.bat\" -Dtest=commons.DateUtilsTest -Dmaven.ext.class.path=\"E:\\NetBeans\\java\\maven-nblib\\netbeans-eventspy.jar\" surefire:test\""

And it looks like that when Maven is not used in project, the JUnit test execution is performed differently.

Does it mean there's not a common layer that would allow me to listen for the events related to JUnit test execution? 

If there's not, is there a way how to listen for such event in case of Maven projects to start with?

I've found some stuff in SPI for Ant builds: AntLogger+AntEvent, is there something like that for Maven?

Thank you,
Jan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.