I think part of the disconnect might be in the understanding of what TestNG calls a "test". A test, in testNG terminology, is a logical grouping of testMethods within a suite. A single "test" will span all of the classes in the src/test/java directory unless something is done to break them up. There is no notification based on class unless the test methods for each class are included in separate tests. The default behavior for TestNG in the surefire plugin is to lump all the test methods from all the test classes into one test. That is why only one onStart is called. I have only been using testNG since v5.6 so I don't know when this changed, if it did. However there are ways around this.
We use @Test annotations on our test classes with suiteName and testName set so that the methods in each class are segregated into separate tests. Hope this helps clear up any confusion. Thanks, Dana H. P'Simer Dana.P'[EMAIL PROTECTED] -----Original Message----- From: Dan Fabulich [mailto:[EMAIL PROTECTED] Sent: Thursday, March 20, 2008 1:25 PM To: Maven Developers List Cc: [EMAIL PROTECTED]; Maven Users List Subject: Re: surefire and testng integration issues with surefire-2.4.2 Jason Chaffee wrote: > Maybe our disconnect is about callbacks after the class vs. the method. > That could be where the misunderstanding is coming from. Sure, that could be. I claim that logging per-method is *way* too much logging. Don't you agree? In JUnit we can log per-class or per-method, but in TestNG we can only log per-method. I think that means we should complain to the TestNG team! :-) What do you think? -Dan --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]