Đã cài đặtInstrumentationsTest

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

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


Chạy tất cả các thiết bị đo được tìm thấy trên thiết bị hiện tại.

Bản tóm tắt

Nhà thầu xây dựng công cộng

InstalledInstrumentationsTest ()

Phương pháp công khai

ITestDevice getDevice ()

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

void run ( TestInformation testInfo, ITestInvocationListener listener)

Chạy thử nghiệm và báo cáo kết quả cho người nghe.

void setConfiguration ( IConfiguration configuration)

Tiêm IConfiguration đang sử dụng.

void setDevice ( ITestDevice device)

Tiêm thiết bị đang được thử nghiệm.

void setMetricCollectors ( collectors) setMetricCollectors ( collectors)

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

boolean shouldRetry (int attemptJustExecuted, previousResults, skipList) shouldRetry (int attemptJustExecuted, previousResults, skipList) shouldRetry (int attemptJustExecuted, previousResults, skipList)

Được ủy quyền từ ERROR(IRetryDecision#shouldRetry(IRemoteTest, int, List)/com.android.tradefed.retry.IRetryDecision#shouldRetry(com.android.tradefed.testtype.IRemoteTest,int,List) IRetryDecision#shouldRetry(IRemoteTest, int, List)) .

split (int shardCountHint)

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

Nhà thầu xây dựng công cộng

Đã cài đặtInstrumentationsTest

public InstalledInstrumentationsTest ()

Phương pháp công khai

lấy thiết bị

public ITestDevice getDevice ()

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

Trả lại
ITestDevice ITestDevice

chạy

public void run (TestInformation testInfo, 
                ITestInvocationListener listener)

Chạy thử nghiệm và báo cáo kết quả cho người nghe.

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

listener ITestInvocationListener : ITestInvocationListener của kết quả kiểm tra

Ném
DeviceNotAvailableException

setConfiguration

public void setConfiguration (IConfiguration configuration)

Tiêm IConfiguration đang sử dụng.

Thông số
configuration IConfiguration

bộThiết bị

public void setDevice (ITestDevice device)

Tiêm thiết bị đang được thử nghiệm.

Thông số
device ITestDevice : ITestDevice sẽ sử dụng

setMetricCollectors

public void setMetricCollectors ( collectors)

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

Thông số
collectors

nên thử lại

public boolean shouldRetry (int attemptJustExecuted, 
                 previousResults, 
                 skipList)

Được ủy quyền từ ERROR(IRetryDecision#shouldRetry(IRemoteTest, int, List)/com.android.tradefed.retry.IRetryDecision#shouldRetry(com.android.tradefed.testtype.IRemoteTest,int,List) IRetryDecision#shouldRetry(IRemoteTest, int, List)) . Quyết định xem có nên thử lại hay không. Đồng thời 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.).

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

previousResults : Danh sách TestRunResult của bài test vừa chạy.

skipList : Tập hợp các mục không nên thử lại.

Trả lại
boolean Đúng nếu chúng ta nên thử lại, Sai nếu không.

Ném
DeviceNotAvailableException

tách ra

public  split (int shardCountHint)

Phiên bản thay thế của split() cũng cung cấp shardCount đang cố gắng chạy. Điều này hữu ích đối với một số người chạy thử đôi khi không thể quyết định một cách tùy tiện.

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

Trả lại
một tập hợp các bài kiểm tra phụ sẽ được thực hiện riêng biệt hoặc null nếu bài kiểm tra hiện không thể phân chia được