Re: Test Execution Listener
Milos Kleint <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.openide.devel |
|---|---|
| Message-ID | <CAA8Y1+uS3rPebEwkiJ=uhARdJgu2DXGXjPZx38FgwGQr2xppHw@mail.gmail.com> |
Please note that test execution is performed by the underlying build tool. Eg. Maven might execute tests even for mvn install, but the ide will not populate the test retults window at all. I assume you are after a listener on the test tesults window population but wanted to point out the difference. There is maven.junit module in netbeans sources i believe that deals wtih the rest population. Milos On Saturday, March 12, 2016, janpridal <[email protected]> wrote: > 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 > > > > >