DeviceJUnit4ClassRunner
public class DeviceJUnit4ClassRunner
extends BlockJUnit4ClassRunner
implements IAbiReceiver , ISetOptionReceiver , ITestInformationReceiver
java.lang.Object |
↳ | org.junit.runner.Runner |
| ↳ | org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod> |
| | ↳ | org.junit.runners.BlockJUnit4ClassRunner |
| | | ↳ | com.android.tradefed.testtype.DeviceJUnit4ClassRunner |
Trình chạy thử JUnit4 cũng hỗ trợ IDeviceTest
. Nên được chỉ định ở trên Kiểm tra JUnit4 với chú thích RunWith.
Bản tóm tắt
Các lớp lồng nhau |
---|
class | DeviceJUnit4ClassRunner.LogAnnotation Chú thích giả nhằm mục đích mang nhật ký đến cho các phóng viên. |
class | DeviceJUnit4ClassRunner.MetricAnnotation Chú thích giả nhằm mục đích mang số liệu đến cho các phóng viên. |
class | DeviceJUnit4ClassRunner.TestLogData Triển khai ExternalResource và TestRule . |
class | DeviceJUnit4ClassRunner.TestMetrics Triển khai ExternalResource và TestRule . |
Phương pháp được bảo vệ |
---|
Object | createTest () Chúng tôi ghi đè createTest để thiết lập thiết bị. |
void | runChild (FrameworkMethod method, RunNotifier notifier) |
Statement | withAfterClasses (Statement statement) |
Statement | withBeforeClasses (Statement statement) |
Nhà thầu xây dựng công cộng
DeviceJUnit4ClassRunner
public DeviceJUnit4ClassRunner (Class<?> klass)
Phương pháp công khai
getAbi
public IAbi getAbi ()
chạy
public void run (RunNotifier notifier)
Thông số |
---|
notifier | RunNotifier |
setAbi
public void setAbi (IAbi abi)
public void setTestInformation (TestInformation testInformation)
Thông số |
---|
testInformation | TestInformation |
Phương pháp được bảo vệ
tạo thử nghiệm
protected Object createTest ()
Chúng tôi ghi đè createTest để thiết lập thiết bị.
chạy con
protected void runChild (FrameworkMethod method,
RunNotifier notifier)
Thông số |
---|
method | FrameworkMethod |
notifier | RunNotifier |
withAfterClasses
protected Statement withAfterClasses (Statement statement)
Thông số |
---|
statement | Statement |
với các lớp trước
protected Statement withBeforeClasses (Statement statement)
Thông số |
---|
statement | Statement |
Nội dung và mã mẫu trên trang này phải tuân thủ các giấy phép như mô tả trong phần Giấy phép nội dung. Java và OpenJDK là nhãn hiệu hoặc nhãn hiệu đã đăng ký của Oracle và/hoặc đơn vị liên kết của Oracle.
Cập nhật lần gần đây nhất: 2023-12-01 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Thiếu thông tin tôi cần"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Quá phức tạp/quá nhiều bước"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Đã lỗi thời"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"Vấn đề về bản dịch"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Vấn đề về mẫu/mã"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Khác"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Dễ hiểu"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Giúp tôi giải quyết được vấn đề"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Khác"
}]