RemoteInvocationExecution
public
class
RemoteInvocationExecution
extends InvocationExecution
java.lang.Object | ||
↳ | com.android.tradefed.invoker.InvocationExecution | |
↳ | com.android.tradefed.invoker.RemoteInvocationExecution |
Triển khai InvocationExecution
để 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ố | |
---|---|
long |
JOIN_CLEAN_TIMEOUT_MS
|
long |
LAUNCH_EXTRA_DEVICE
|
long |
NEW_USER_TIMEOUT
|
long |
PULL_RESULT_TIMEOUT
|
long |
PUSH_TF_TIMEOUT
|
long |
REMOTE_PROCESS_RUNNING_WAIT
|
long |
SETUP_REMOTE_DIR_TIMEOUT
|
Trường | |
---|---|
public
static
final
String |
GLOBAL_REMOTE_CONFIG
|
public
static
final
String |
PROTO_RESULT_NAME
|
public
static
final
String |
REMOTE_CONFIG
|
public
static
final
String |
REMOTE_USER_DIR
|
public
static
final
String |
START_FEATURE_SERVER
|
public
static
final
String |
STDERR_FILE
|
public
static
final
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 thi bước cleanUp của target_preparer và multi_target_preparer. |
void
|
doSetup(TestInformation testInfo, IConfiguration config, ITestLogger logger)
Thực thi bước setUp target_preparer và multi_target_preparer. |
void
|
doTeardown(TestInformation testInfo, IConfiguration config, ITestLogger logger, Throwable exception)
Thực thi 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ố thiết bị trước khi preInvocationSetup. |
String
|
getAdbVersion()
Trả về phiên bản adb đang được sử dụng cho lệnh gọi. |
Hằng số
JOIN_CLEAN_TIMEOUT_MS
public static final long JOIN_CLEAN_TIMEOUT_MS
Giá trị không đổi: 120000 (0x000000000001d4c0)
LAUNCH_EXTRA_DEVICE
public static final long LAUNCH_EXTRA_DEVICE
Giá trị không đổi: 900000 (0x00000000000dbba0)
NEW_USER_TIMEOUT
public static final long NEW_USER_TIMEOUT
Giá trị không đổi: 300000 (0x00000000000493e0)
PULL_RESULT_TIMEOUT
public static final long PULL_RESULT_TIMEOUT
Giá trị không đổi: 180000 (0x000000000002bf20)
PUSH_TF_TIMEOUT
public static final long PUSH_TF_TIMEOUT
Giá trị không đổi: 150000 (0x00000000000249f0)
REMOTE_PROCESS_RUNNING_WAIT
public static final long REMOTE_PROCESS_RUNNING_WAIT
Giá trị không đổi: 15000 (0x0000000000003a98)
SETUP_REMOTE_DIR_TIMEOUT
public static final long SETUP_REMOTE_DIR_TIMEOUT
Giá trị không đổi: 600000 (0x00000000000927c0)
Trường
GLOBAL_REMOTE_CONFIG
public static final String GLOBAL_REMOTE_CONFIG
PROTO_RESULT_NAME
public static final String PROTO_RESULT_NAME
REMOTE_CONFIG
public static final String REMOTE_CONFIG
REMOTE_USER_DIR
public static final String REMOTE_USER_DIR
START_FEATURE_SERVER
public static final String START_FEATURE_SERVER
STDERR_FILE
public static final String STDERR_FILE
STDOUT_FILE
public static final String STDOUT_FILE
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 thi bước cleanUp của target_preparer và multi_target_preparer. Thiết bị có dọn dẹp không.
Tham số | |
---|---|
context |
IInvocationContext : IInvocationContext của lệnh 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 kiểm thử đang chạy gửi. |
doSetup
public void doSetup (TestInformation testInfo, IConfiguration config, ITestLogger logger)
Thực thi bước setUp target_preparer và multi_target_preparer. Tất cả các thiết bị có được thiết lập theo yêu cầu để chạy kiểm thử không.
Tham số | |
---|---|
testInfo |
TestInformation : TestInformation của lệnh 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 thi bước tháo dỡ target_preparer và multi_target_preparer. Các thiết bị có bị huỷ liên kết với chế độ thiết lập không.
Tham số | |
---|---|
testInfo |
TestInformation : TestInformation của lệnh 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 kiểm thử đang chạy gửi. |
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ệnh 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 cần chạy |
listener |
ITestInvocationListener : ITestInvocationListener của kết quả kiểm thử |
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ố thiết bị trước khi 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 sử dụng cho lệnh gọi.
Giá trị trả về | |
---|---|
String |