I am trying to test using TestNG/Spring/ and Maven Surefire 2.4.1. My test suite runs great from within eclipse as individual tests or as a whole suite. When I try and run the tests in Maven Surefire, however, they fail. It appears Surefire is not calling the correct @BeforeMethod method. (When running the whole suite, or an individual test.)
>From testing it, it seems Surefire calls the @BeforeMethod in the base class, but not in extending classes if they override it. I am extending Springs AbstractTestNGSpringContextTests, and it is calling the base class methods, not my extending classes @BeforeMethod and @AfterMethod. Interestingly, it seems to call the correct @BeforeClass method. Any ideas? -- View this message in context: http://www.nabble.com/TestNG-%40BeforeMethod-not-working-on-subclasses.-tp15418799p15418799.html Sent from the Surefire - Developer mailing list archive at Nabble.com.
