Thiết bịJUnit4ClassRunner
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
. Phải được chỉ định ở trên Thử nghiệm 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ả có nghĩa là mang nhật ký cho các phóng viên. |
class | DeviceJUnit4ClassRunner.MetricAnnotation Chú thích giả có nghĩa là mang số liệu 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 . |
nhà thầu công cộng
Thiết bịJUnit4ClassRunner
public DeviceJUnit4ClassRunner (Class<?> klass)
Phương thức 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ạoTest
protected Object createTest ()
Chúng tôi ghi đè createTest để đặt thiết bị.
chạyTrẻ em
protected void runChild (FrameworkMethod method,
RunNotifier notifier)
Thông số |
---|
method | FrameworkMethod |
notifier | RunNotifier |
với AfterClasses
protected Statement withAfterClasses (Statement statement)
Thông số |
---|
statement | Statement |
with BeforeClasses
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-04-28 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"
}]