Google cam kết thúc đẩy công bằng chủng tộc cho Cộng đồng người da đen. Xem cách thực hiện.

InstalledInstrumentationsTest

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ị được tìm thấy trên thiết bị hiện tại.

Bản tóm tắt

nhà thầu công cộng

InstalledInstrumentationsTest ()

Phương thức công khai

ITestDevice getDevice ()

Nhận thiết bị đượ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ị được kiểm tra.

void setMetricCollectors ( collectors) setMetricCollectors ( collectors)

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

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

Đượ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ố chạy.

nhà thầu công cộng

InstalledInstrumentationsTest

public InstalledInstrumentationsTest ()

Phương thức công khai

getDevice

public ITestDevice getDevice ()

Nhận thiết bị đượ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

thiết lập cấu hình

public void setConfiguration (IConfiguration configuration)

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

Thông số
configuration IConfiguration

thiết bị

public void setDevice (ITestDevice device)

Tiêm thiết bị được kiểm tra.

Thông số
device ITestDevice : ITestDevice để sử dụng

setMetricCollector

public void setMetricCollectors ( collectors)

Đặt danh sách IMetricCollector s đượ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)

Đượ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 bất kỳ thay đổi cần thiết nào đố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 tôi vừa chạy.

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

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ố chạy. Điều này hữu ích cho một số người chạy thử đôi khi không thể tùy ý quyết định.

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 con sẽ được thực hiện riêng biệt hoặc null giá trị nếu bài kiểm tra hiện không thể chia nhỏ