課後資訊
public abstract @interface AfterClassWithInfo
implements Annotation
com.android.tradefed.testtype.junit4.AfterClassWithInfo |
與AfterClass
類似的保證,但註解的方法必須需要TestInformation
參數。在 AfterClass 方法之後執行。
使用TestInformation#properties()
可以幫助在靜態和非靜態上下文之間傳遞訊息。
例子:
@AfterClassWithInfo public static void afterClassWithInfo(TestInformation testInfo) {assertNotNull(device); }
也可以看看: