BeforeClassWithInfo

public abstract @interface BeforeClassWithInfo
implements Annotation

com.android.tradefed.testtype.junit4.BeforeClassWithInfo


Có các đảm bảo tương tự như BeforeClass, nhưng phương thức được chú thích phải yêu cầu tham số TestInformation. Chạy TRƯỚC các phương thức beforeClass.

Việc sử dụng TestInformation.properties() có thể giúp truyền thông tin giữa ngữ cảnh tĩnh và không tĩnh.

Ví dụ:

@BeforeClassWithInfo public static void beforeClassWithInfo(TestInformation testInfo) { assertNotNull(device); }

Xem thêm: