Cedric, I think I am not conveying what I mean - I guess it would be better explained by example:
public class TestCounter implements IReporter, IInvokedMethodListener {
int count;
public void beforeInvocation(IInvokedMethod m, ITestResult r) {
count++;
}
public void afterInvocation(IInvokedMethod method, ITestResult testResult) { }
public void generateReport(List<XmlSuite> xmlSuites, List<ISuite> suites, String outputDirectory) {
System.out.println(count);
}
}
public class TestWithOneMethod {
@Test public void test() { assert System.nanoTime() > 0; }
}
As there is only one test method, I would expect that the counter would print "1" - with the current implementation it would print "2". If that is on purpose, it is worth mentioning it in the docs, as I and my colleagues find it counterintuitive. If not, I would be glad to work with you on fixing it.