RemoteInvocationExecution

public class RemoteInvocationExecution
extends InvocationExecution

java.lang.Object
   ↳ com.android.tradefed.invoker.InvocationExecution
     ↳ com.android.tradefed.invoker.RemoteInvocationExecution


Triển khai InvocationExecution để điều khiển quá trình thực thi từ xa.

Tóm tắt

Các lớp học lồng ghép

class RemoteInvocationExecution.FileOptionValueTransformer

 

Hằng số

String GLOBAL_REMOTE_CONFIG

long JOIN_CLEAN_TIMEOUT_MS

long LAUNCH_EXTRA_DEVICE

long NEW_USER_TIMEOUT

String PROTO_RESULT_NAME

long PULL_RESULT_TIMEOUT

long PUSH_TF_TIMEOUT

String REMOTE_CONFIG

long REMOTE_PROCESS_RUNNING_WAIT

String REMOTE_USER_DIR

long SETUP_REMOTE_DIR_TIMEOUT

String START_FEATURE_SERVER

String STDERR_FILE

String STDOUT_FILE

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

RemoteInvocationExecution()

Phương thức công khai

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

Thực hiện bước cleanUp target_preparer và multi_target_preparer.

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

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 tháo dỡ target_preparer và multi_target_preparer.

boolean fetchBuild(TestInformation testInfo, IConfiguration config, IRescheduler rescheduler, ITestInvocationListener listener)

Thực thi bước build_provider của lệnh gọi.

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

Chạy kiểm thử.

Phương thức được bảo vệ

void customizeDevicePreInvocation(IConfiguration config, IInvocationContext context)

Cho phép tuỳ chỉnh một số thành phần của thiết bị trước preInvocationSetup.

String getAdbVersion()

Trả về phiên bản adb đang được dùng cho lệnh gọi.

Hằng số

GLOBAL_REMOTE_CONFIG

public static final String GLOBAL_REMOTE_CONFIG

Giá trị không đổi: "global-remote-configuration"

JOIN_CLEAN_TIMEOUT_MS

public static final long JOIN_CLEAN_TIMEOUT_MS

Giá trị hằng số: 120000 (0x000000000001d4c0)

LAUNCH_EXTRA_DEVICE

public static final long LAUNCH_EXTRA_DEVICE

Giá trị hằng số: 900000 (0x00000000000dbba0)

NEW_USER_TIMEOUT

public static final long NEW_USER_TIMEOUT

Giá trị hằng số: 300000 (0x00000000000493e0)

PROTO_RESULT_NAME

public static final String PROTO_RESULT_NAME

Giá trị không đổi: "output.pb"

PULL_RESULT_TIMEOUT

public static final long PULL_RESULT_TIMEOUT

Giá trị hằng số: 180000 (0x000000000002bf20)

PUSH_TF_TIMEOUT

public static final long PUSH_TF_TIMEOUT

Giá trị hằng số: 150000 (0x00000000000249f0)

REMOTE_CONFIG

public static final String REMOTE_CONFIG

Giá trị không đổi: "configuration"

REMOTE_PROCESS_RUNNING_WAIT

public static final long REMOTE_PROCESS_RUNNING_WAIT

Giá trị hằng số: 15000 (0x0000000000003a98)

REMOTE_USER_DIR

public static final String REMOTE_USER_DIR

Giá trị không đổi: "/home/{$USER}/"

SETUP_REMOTE_DIR_TIMEOUT

public static final long SETUP_REMOTE_DIR_TIMEOUT

Giá trị hằng số: 600000 (0x00000000000927c0)

START_FEATURE_SERVER

public static final String START_FEATURE_SERVER

Giá trị không đổi: "START_FEATURE_SERVER"

STDERR_FILE

public static final String STDERR_FILE

Giá trị không đổi: "screen-VM_tradefed-stderr.txt"

STDOUT_FILE

public static final String STDOUT_FILE

Giá trị không đổi: "screen-VM_tradefed-stdout.txt"

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

RemoteInvocationExecution

public RemoteInvocationExecution ()

Phương thức công khai

doCleanUp

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

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

Tham số
context IInvocationContext: IInvocationContext của lời gọi.

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

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

doSetup

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

Thực hiện bước thiết lập target_preparer và multi_target_preparer. Thiết lập tất cả các thiết bị cần thiết để chạy kiểm thử.

Tham số
testInfo TestInformation: TestInformation của lời gọi.

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

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

Gửi
BuildError
DeviceNotAvailableException
TargetSetupError

doTeardown

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

Thực hiện bước tháo dỡ target_preparer và multi_target_preparer. Tháo rời các thiết bị liên quan đến quá trình thiết lập.

Tham số
testInfo TestInformation: TestInformation của lời gọi.

config IConfiguration: IConfiguration của lần chạy kiểm thử 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ử nghiệm tạo ra.

fetchBuild

public boolean fetchBuild (TestInformation testInfo, 
                IConfiguration config, 
                IRescheduler rescheduler, 
                ITestInvocationListener listener)

Thực thi bước build_provider của lệnh gọi.

Tham số
testInfo TestInformation: TestInformation của lời gọi.

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

rescheduler IRescheduler: IRescheduler, để lên lịch lại các phần của lệnh gọi để thực thi trên(các) tài nguyên khác

listener ITestInvocationListener: ITestInvocation để báo cáo lỗi tải xuống bản dựng.

Giá trị trả về
boolean True nếu chúng ta tải bản dựng xuống thành công, false nếu không.

Gửi
BuildRetrievalError
DeviceNotAvailableException

runTests

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

Chạy kiểm thử.

Tham số
info TestInformation: TestInformation để chạy kiểm thử.

config IConfiguration: IConfiguration để chạy

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

Phương thức được bảo vệ

customizeDevicePreInvocation

protected void customizeDevicePreInvocation (IConfiguration config, 
                IInvocationContext context)

Cho phép tuỳ chỉnh một số thành phần của thiết bị trước preInvocationSetup.

Tham số
config IConfiguration: Cấu hình của lệnh gọi.

context IInvocationContext: Ngữ cảnh gọi hiện tại.

getAdbVersion

protected String getAdbVersion ()

Trả về phiên bản adb đang được dùng cho lệnh gọi.

Giá trị trả về
String