GranularRetriableTestWrapper
public
class
GranularRetriableTestWrapper
extends Object
implements
IRemoteTest,
ITestCollector
| java.lang.Object
|
| ↳ |
com.android.tradefed.testtype.suite.GranularRetriableTestWrapper
|
Một lớp trình bao bọc hoạt động trên IRemoteTest để phân tách IRemoteTest ở cấp trường hợp kiểm thử.
IRemoteTest có thể chứa nhiều trường hợp kiểm thử. Trước đây, các trường hợp kiểm thử này được coi là một tổng thể: Khi IRemoteTest chạy, tất cả các trường hợp kiểm thử sẽ chạy. Một số IRemoteTest (Những IRemoteTest triển khai ITestFilterReceiver) có thể chấp nhận danh sách cho phép gồm các trường hợp kiểm thử và chỉ chạy những trường hợp kiểm thử đó. Lớp này tận dụng tính năng hiện có và cung cấp một cách linh hoạt hơn để chạy bộ kiểm thử.
- Một trường hợp kiểm thử có thể được thử lại nhiều lần (trong cùng một lần chạy IRemoteTest) để giảm tỷ lệ thất bại không phải do lỗi kiểm thử.
- Các trường hợp kiểm thử được thử lại sẽ được thu thập linh động từ các lỗi chạy trước đó.
Lưu ý:
- Điều kiện tiên quyết để chạy một nhóm nhỏ các trường hợp kiểm thử là loại kiểm thử phải triển khai giao diện
ITestFilterReceiver.
- X là số lần thử lại tối đa tuỳ chỉnh.
Tóm tắt
Hàm khởi tạo công khai |
GranularRetriableTestWrapper(IRemoteTest test, ITestInvocationListener mainListener, int maxRunLimit)
|
GranularRetriableTestWrapper(IRemoteTest test, ModuleDefinition module, ITestInvocationListener mainListener, int maxRunLimit)
|
GranularRetriableTestWrapper(IRemoteTest test, ModuleDefinition module, ITestInvocationListener mainListener, int maxRunLimit, boolean useModuleResultsForwarder, boolean removeModuleBuffering, boolean collectKernelLog, int targetPreparerRetryCount)
|
Hàm khởi tạo công khai
GranularRetriableTestWrapper
public GranularRetriableTestWrapper (IRemoteTest test,
ITestInvocationListener mainListener,
int maxRunLimit)
| Tham số |
test |
IRemoteTest |
mainListener |
ITestInvocationListener |
maxRunLimit |
int |
GranularRetriableTestWrapper
public GranularRetriableTestWrapper (IRemoteTest test,
ModuleDefinition module,
ITestInvocationListener mainListener,
int maxRunLimit)
| Tham số |
test |
IRemoteTest |
module |
ModuleDefinition |
mainListener |
ITestInvocationListener |
maxRunLimit |
int |
GranularRetriableTestWrapper
public GranularRetriableTestWrapper (IRemoteTest test,
ModuleDefinition module,
ITestInvocationListener mainListener,
int maxRunLimit,
boolean useModuleResultsForwarder,
boolean removeModuleBuffering,
boolean collectKernelLog,
int targetPreparerRetryCount)
| Tham số |
test |
IRemoteTest |
module |
ModuleDefinition |
mainListener |
ITestInvocationListener |
maxRunLimit |
int |
useModuleResultsForwarder |
boolean |
removeModuleBuffering |
boolean |
collectKernelLog |
boolean |
targetPreparerRetryCount |
int |
Phương thức công khai
getExpectedTestsCount
public final int getExpectedTestsCount ()
Tính số lượng trường hợp kiểm thử trong IRemoteTest. Giá trị này phân biệt các trường hợp kiểm thử giống nhau được lên lịch lại nhiều lần.
getFinalTestRunResults
public final List<TestRunResult> getFinalTestRunResults ()
Nhận TestRunResults đã hợp nhất từ mỗi lần chạy IRemoteTest.
getResultListener
public ModuleListener getResultListener ()
Trả về trình nghe chứa tất cả kết quả.
getRetryCount
public int getRetryCount ()
setCollectTestsOnly
public void setCollectTestsOnly (boolean shouldCollectTest)
Bật hoặc tắt chế độ thu thập dữ liệu thử nghiệm
setDefaultLogCollectors
public void setDefaultLogCollectors (List<IMetricCollector> collectors)
setMarkTestsSkipped
public void setMarkTestsSkipped (boolean skipTestCases)
Đặt ModuleDefinition RunStrategy làm thuộc tính GranularRetriableTestWrapper.
| Tham số |
skipTestCases |
boolean: liệu có nên bỏ qua các trường hợp kiểm thử hay không. |