@BeforeClass(alwaysRun = true)
public Long beforeClassStartTime() {
return TimeUnit.MILLISECONDS.toMinutes(System.currentTimeMillis());
}
@AfterClass(alwaysRun = true)
public void afterClassEndTime(ITestClass testClass) {
Long endTime = TimeUnit.MILLISECONDS.toMinutes(System.currentTimeMillis());
Long durationInMinutes = endTime - beforeClassStartTime();
this.logger.log("Duration of the test class: " + testClass.getName() + " is " + durationInMinutes);
}
Take a look at the list of legal injections:
http://testng.org/doc/documentation-main.html#native-dependency-injection
ITestClass is not one of them. ITestContext should work.
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-users...@googlegroups.com.
To post to this group, send email to testng...@googlegroups.com.
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.