DelegatedInvocationThực thi

public class DelegatedInvocationExecution
extends InvocationExecution

java.lang.Object
com.android.tradefed.invoker.InvocationExecution
com.android.tradefed.invoker.DelegatedInvocationExecution


InvocationExecution ủy quyền thực thi cho một nhị phân Tradefed khác.

Bản tóm tắt

Lĩnh vực

public static final String DELEGATED_MODE_VAR

Nếu có, lệnh gọi đang thực thi trong chế độ được ủy quyền

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

DelegatedInvocationExecution ()

Phương pháp công khai

void doCleanUp ( IInvocationContext context, IConfiguration config, Throwable exception)

Thực hiện bước dọn dẹp target_preparer và multi_target_preparer.

void doSetup ( TestInformation testInfo, IConfiguration config, ITestLogger listener)

Thực hiện bước thiết lập target_preparer và multi_target_preparer.

void doTeardown ( TestInformation testInfo, IConfiguration config, ITestLogger logger, Throwable exception)

Thực hiện bước phân tích target_preparer và multi_target_preparer.

void reportLogs ( ITestDevice device, ITestLogger logger, TestInvocation.Stage stage)

Báo cáo một số nhật ký thiết bị ở giai đoạn khác nhau của lệnh gọi.

void runDevicePostInvocationTearDown ( IInvocationContext context, IConfiguration config, Throwable exception)

Gọi ITestDevice#postInvocationTearDown(Throwable) cho từng phần thiết bị của lệnh gọi.

void runDevicePreInvocationSetup ( IInvocationContext context, IConfiguration config, ITestLogger logger)

Gọi ERROR(ITestDevice#preInvocationSetup(IBuildInfo)/com.android.tradefed.device.ITestDevice#preInvocationSetup(com.android.tradefed.build.IBuildInfo) ITestDevice#preInvocationSetup(IBuildInfo)) cho từng phần thiết bị của lệnh gọi.

void runTests ( TestInformation info, IConfiguration config, ITestInvocationListener listener)

Chạy thử nghiệm.

boolean shardConfig ( IConfiguration config, TestInformation testInfo, IRescheduler rescheduler, ITestLogger logger)

Cố gắng phân chia cấu hình thành các cấu hình phụ để lên lịch lại để chạy song song trên nhiều tài nguyên.

Lĩnh vực

DELEGATED_MODE_VAR

public static final String DELEGATED_MODE_VAR

Nếu có, lệnh gọi đang thực thi trong chế độ được ủy quyền

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

DelegatedInvocationThực thi

public DelegatedInvocationExecution ()

Phương pháp công khai

doCleanUp

public void doCleanUp (IInvocationContext context, 
                IConfiguration config, 
                Throwable exception)

Thực hiện bước dọn dẹp target_preparer và multi_target_preparer. Các thiết bị có dọn dẹp không.

Thông số
context IInvocationContext : IInvocationContext của lệnh gọi.

config IConfiguration : IConfiguration của lần chạy thử nghiệm này.

exception Throwable : ngoại lệ ban đầu do quá trình chạy thử đưa ra.

doSetup

public void doSetup (TestInformation testInfo, 
                IConfiguration config, 
                ITestLogger listener)

Thực hiện bước thiết lập target_preparer và multi_target_preparer. Có tất cả các thiết lập thiết bị cần thiết để chạy thử nghiệm hay không.

Thông số
testInfo TestInformation : TestInformation của lệnh gọi.

config IConfiguration : IConfiguration của lần chạy thử nghiệm này.

listener ITestLogger : ITestLogger để báo cáo nhật ký lỗi thiết lập.

Ném
BuildError
DeviceNotAvailableException
TargetSetupError

doTeardown

public void doTeardown (TestInformation testInfo, 
                IConfiguration config, 
                ITestLogger logger, 
                Throwable exception)

Thực hiện bước phân tích target_preparer và multi_target_preparer. Các thiết bị có bị hỏng liên quan đến quá trình thiết lập hay không.

Thông số
testInfo TestInformation : TestInformation của lệnh gọi.

config IConfiguration : IConfiguration của lần chạy thử nghiệm này.

logger ITestLogger : ITestLogger để báo cáo nhật ký.

exception Throwable : ngoại lệ ban đầu do quá trình chạy thử đưa ra.

báo cáoNhật ký

public void reportLogs (ITestDevice device, 
                ITestLogger logger, 
                TestInvocation.Stage stage)

Báo cáo một số nhật ký thiết bị ở giai đoạn khác nhau của lệnh gọi. Ví dụ: logcat.

Thông số
device ITestDevice : Thiết bị báo cáo nhật ký.

logger ITestLogger : Trình ghi nhật ký.

stage TestInvocation.Stage : Giai đoạn của lệnh gọi mà chúng ta đang ở.

runDevicePostInvocationTearDown

public void runDevicePostInvocationTearDown (IInvocationContext context, 
                IConfiguration config, 
                Throwable exception)

Gọi ITestDevice#postInvocationTearDown(Throwable) cho từng phần thiết bị của lệnh gọi.

Thông số
context IInvocationContext : IInvocationContext của lệnh gọi.

config IConfiguration : IConfiguration của lần chạy thử nghiệm này.

exception Throwable : ngoại lệ ban đầu do quá trình chạy thử nghiệm đưa ra nếu có.

runDevicePreInvocationSetup

public void runDevicePreInvocationSetup (IInvocationContext context, 
                IConfiguration config, 
                ITestLogger logger)

Gọi ERROR(ITestDevice#preInvocationSetup(IBuildInfo)/com.android.tradefed.device.ITestDevice#preInvocationSetup(com.android.tradefed.build.IBuildInfo) ITestDevice#preInvocationSetup(IBuildInfo)) cho từng phần thiết bị của lệnh gọi.

Thông số
context IInvocationContext : IInvocationContext của lệnh gọi.

config IConfiguration : IConfiguration của lần chạy thử nghiệm này.

logger ITestLogger : ITestLogger để báo cáo nhật ký.

Ném
DeviceNotAvailableException
TargetSetupError

chạy thử nghiệm

public void runTests (TestInformation info, 
                IConfiguration config, 
                ITestInvocationListener listener)

Chạy thử nghiệm.

Thông số
info TestInformation : TestInformation để chạy thử nghiệm.

config IConfiguration : IConfiguration để chạy

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

phân đoạnConfig

public boolean shardConfig (IConfiguration config, 
                TestInformation testInfo, 
                IRescheduler rescheduler, 
                ITestLogger logger)

Cố gắng phân chia cấu hình thành các cấu hình phụ để lên lịch lại để chạy song song trên nhiều tài nguyên.

Nếu số lượng phân đoạn lớn hơn 1, nó sẽ chỉ tạo cấu hình cho từng phân đoạn bằng cách đặt chỉ mục phân đoạn và lên lịch lại cho chúng. Nếu số lượng phân đoạn không được đặt, nó sẽ chuyển sang IShardHelper#shardConfig .

Thông số
config IConfiguration : IConfiguration hiện tại.

testInfo TestInformation : TestInformation chứa thông tin của các bài kiểm tra.

rescheduler IRescheduler : IRescheduler .

logger ITestLogger : ITestLogger được sử dụng để ghi nhật ký tệp trong quá trình phân chia.

Trả lại
boolean đúng nếu bài kiểm tra bị phân chia. Ngược lại trả về false