InstalledInstrumentationsTest

public class InstalledInstrumentationsTest
extends Object implements IAutoRetriableTest, IConfigurationReceiver, IDeviceTest, IMetricCollectorReceiver, IShardableTest

java.lang.Object
   ↳ com.android.tradefed.testtype.InstalledInstrumentationsTest


Chạy tất cả các phương thức đo lường tìm thấy trên thiết bị hiện tại.

Tóm tắt

Hàm khởi tạo công khai

InstalledInstrumentationsTest()

Phương thức công khai

ITestDevice getDevice()

Lấy thiết bị đang được kiểm thử.

void run(TestInformation testInfo, ITestInvocationListener listener)

Chạy các kiểm thử và báo cáo kết quả cho trình nghe.

void setConfiguration(IConfiguration configuration)

Chèn IConfiguration đang dùng.

void setDevice(ITestDevice device)

Chèn thiết bị đang kiểm thử.

void setMetricCollectors(List<IMetricCollector> collectors)

Đặt danh sách IMetricCollector được xác định cho lần chạy thử nghiệm.

boolean shouldRetry(int attemptJustExecuted, List<TestRunResult> previousResults, Set<String> skipList)

Được uỷ quyền từ IRetryDecision.shouldRetry(IRemoteTest,int,List).

Collection<IRemoteTest> split(int shardCountHint)

Phiên bản thay thế của split() cũng cung cấp shardCount được cố gắng chạy.

Hàm khởi tạo công khai

InstalledInstrumentationsTest

public InstalledInstrumentationsTest ()

Phương thức công khai

getDevice

public ITestDevice getDevice ()

Lấy thiết bị đang được kiểm thử.

Giá trị trả về
ITestDevice ITestDevice

chạy

public void run (TestInformation testInfo, 
                ITestInvocationListener listener)

Chạy các kiểm thử và báo cáo kết quả cho trình nghe.

Tham số
testInfo TestInformation: Đối tượng TestInformation chứa thông tin hữu ích để chạy các kiểm thử.

listener ITestInvocationListener: ITestInvocationListener kết quả kiểm thử

Gửi
DeviceNotAvailableException

setConfiguration

public void setConfiguration (IConfiguration configuration)

Chèn IConfiguration đang dùng.

Tham số
configuration IConfiguration

setDevice

public void setDevice (ITestDevice device)

Chèn thiết bị đang kiểm thử.

Tham số
device ITestDevice: ITestDevice cần sử dụng

setMetricCollectors

public void setMetricCollectors (List<IMetricCollector> collectors)

Đặt danh sách IMetricCollector được xác định cho lần chạy thử nghiệm.

Tham số
collectors List

shouldRetry

public boolean shouldRetry (int attemptJustExecuted, 
                List<TestRunResult> previousResults, 
                Set<String> skipList)

Được uỷ quyền từ IRetryDecision.shouldRetry(IRemoteTest,int,List). Quyết định xem có nên thử lại hay không. Đồng thời, hãy thực hiện mọi thay đổi cần thiết đối với IRemoteTest để thử lại (Áp dụng bộ lọc, chuẩn bị cho lần chạy tiếp theo, v.v.).

Tham số
attemptJustExecuted int: Số lần thử mà chúng ta vừa chạy.

previousResults List: Danh sách TestRunResult của kiểm thử vừa chạy.

skipList Set: Nhóm các mục không nên thử lại.

Giá trị trả về
boolean True nếu chúng ta nên thử lại, False nếu không.

Gửi
DeviceNotAvailableException

chia hoá đơn

public Collection<IRemoteTest> split (int shardCountHint)

Phiên bản thay thế của split() cũng cung cấp shardCount được cố gắng chạy. Điều này hữu ích cho một số trình chạy kiểm thử không thể tuỳ ý quyết định đôi khi.

Tham số
shardCountHint int: số lượng phân đoạn đã thử.

Giá trị trả về
Collection<IRemoteTest> một tập hợp các kiểm thử phụ sẽ được thực thi riêng biệt hoặc null nếu kiểm thử hiện không phân đoạn được