Re: JUnit 4 Tests
Randall Wood <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.openide.devel |
|---|---|
| Message-ID | <[email protected]> |
My understanding is that I can write JUnit 3 tests that can run within a modular netbeans-platform module (or suite of modules) is that I need to use NbTestCase (extends JUnit 3 TestCase) and NbTestSuite (extends JUnit 3 TestSuite). Since JUnit 4 tests do not extend TestCase or TestSuite, is there something special I have to do to set JUnit 4 tests up so they can load NetBeans modules they depend on (I cannot rely on running the tests within the NetBeans IDE since I will be using Travis CI and AppVeyor to run CI tests). Randall Wood JMRI Developer - http://jmri.org Alexandria Software - http://alexandriasoftware.com Northern Virginia NTRAK - http://nvntrak.org > On Sep 1, 2016, at 6:43 AM, Eduard <[email protected]> wrote: > > The NB IDE supports both Junit 4 and 3, I assume you know that. Any Junit 4 annotations will be executed when yiou run the tests. > > In that light, I find your question confusing. What do you mean by "platform aware"? In my thinking a unit test only relates to the class-under-test so they shouldn't be made aware of anything else, like a platform. > > Please give us some more information on what you are looking for. > > Cheers > Eduard de Jong > > Randall Wood wrote: >> I have a large project that I am scoping the effort of porting to the NetBeans platform that has about 1900 test classes written in the JUnit 4. Is there any guidance on making JUnit 4 tests platform aware? >> >> I am aware of the ability to change JUnit 3 tests to be platform aware, but would rather use a solution that uses the Java 4 annotations syntax. >> >> Randall Wood >> JMRI Developer - http://jmri.org <http://jmri.org/> >> Alexandria Software - http://alexandriasoftware.com <http://alexandriasoftware.com/> >> Northern Virginia NTRAK - http://nvntrak.org <http://nvntrak.org/> >> >> >> >> >