Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
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 kiểm thử JUnit4 cũng hỗ trợ IDeviceTest
. Phải được chỉ định phía trên JUnit4
Kiểm thử bằng chú thích RunWith.
Tóm tắt
Hàm khởi tạo công khai
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)
Tham số |
notifier |
RunNotifier |
setAbi
public void setAbi (IAbi abi)
public void setTestInformation (TestInformation testInformation)
Tham số |
testInformation |
TestInformation |
Phương thức được bảo vệ
createTest
protected Object createTest ()
Chúng tôi sẽ ghi đè createTest để thiết lập thiết bị.
runchild
protected void runChild (FrameworkMethod method,
RunNotifier notifier)
Tham số |
method |
FrameworkMethod |
notifier |
RunNotifier |
withSau lớp học
protected Statement withAfterClasses (Statement statement)
Tham số |
statement |
Statement |
withTrước Lớp
protected Statement withBeforeClasses (Statement statement)
Tham 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: 2024-08-29 UTC.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2024-08-29 UTC."],[],[]]