SubprocessTfLauncher

public abstract class SubprocessTfLauncher
extends Object implements IBuildReceiver , IInvocationContextReceiver , IRemoteTest , IConfigurationReceiver

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


IRemoteTest để chạy thử nghiệm đối với cài đặt TF riêng.

Khởi chạy một quy trình java bên ngoài để chạy thử nghiệm. Được sử dụng để chạy đơn vị TF hoặc kiểm tra chức năng liên tục.

Bản tóm tắt

Lĩnh vực

public static final String ANDROID_SERIAL_VAR

Env.

public static final String PARENT_PROC_TAG_NAME

public static final String SUBPROCESS_TAG_NAME

Thẻ sẽ được chuyển đến quy trình con TF để phân biệt nó

protected IBuildInfo mBuildInfo

protected mCmdArgs

protected IConfiguration mConfig

protected String mRootDir

protected IRunUtil mRunUtil

protected File mTmpDir

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

SubprocessTfLauncher ()

Phương pháp công khai

void run ( TestInformation testInfo, ITestInvocationListener listener)

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

void setBuild ( IBuildInfo buildInfo)

void setConfiguration ( IConfiguration configuration)

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

void setInvocationContext ( IInvocationContext invocationContext)

Phương pháp được bảo vệ

void addJavaArguments ( args) addJavaArguments ( args)

Cho phép thêm các tham số java bổ sung vào lệnh gọi quy trình con.

String getJava ()
IRunUtil getRunUtil ()

Trả về IRunUtil sẽ được sử dụng cho lệnh quy trình con.

void postRun ( ITestInvocationListener listener, boolean exception, long elapsedTime)

Các hành động cần thực hiện sau khi bài kiểm tra TF kết thúc.

void preRun ()

Thiết lập trước khi chạy thử nghiệm.

void setEventStreaming (boolean eventStreaming)

Đặt phát trực tuyến sự kiện sử dụng.

void setProtoReporting (boolean protoReporting)
void setRunUtil ( IRunUtil runUtil)

Đặt IRunUtil.

Lĩnh vực

ANDROID_SERIAL_VAR

public static final String ANDROID_SERIAL_VAR

Env. biến ảnh hưởng đến việc lựa chọn adb.

PARENT_PROC_TAG_NAME

public static final String PARENT_PROC_TAG_NAME

SUBPROCESS_TAG_NAME

public static final String SUBPROCESS_TAG_NAME

Thẻ sẽ được chuyển đến quy trình con TF để phân biệt nó

mBuildInfo

protected IBuildInfo mBuildInfo

mCmdArgs

protected  mCmdArgs

mConfig

protected IConfiguration mConfig

mRootDir

protected String mRootDir

mRunUtil

protected IRunUtil mRunUtil

mTmpDir

protected File mTmpDir

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

SubprocessTfLauncher

public SubprocessTfLauncher ()

Phương pháp công khai

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

setBuild

public void setBuild (IBuildInfo buildInfo)

Thông số
buildInfo IBuildInfo

setConfiguration

public void setConfiguration (IConfiguration configuration)

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

Thông số
configuration IConfiguration

setInvocationContext

public void setInvocationContext (IInvocationContext invocationContext)

Thông số
invocationContext IInvocationContext

Phương pháp được bảo vệ

thêmJavaArguments

protected void addJavaArguments ( args)

Cho phép thêm các tham số java bổ sung vào lệnh gọi quy trình con.

Thông số
args : danh sách các đối số hiện tại mà chúng ta cần thêm các đối số bổ sung.

getJava

protected String getJava ()

Trả lại
String

getRunUtil

protected IRunUtil getRunUtil ()

Trả về IRunUtil sẽ được sử dụng cho lệnh quy trình con.

Trả lại
IRunUtil

bàiChạy

protected void postRun (ITestInvocationListener listener, 
                boolean exception, 
                long elapsedTime)

Các hành động cần thực hiện sau khi bài kiểm tra TF kết thúc.

Thông số
listener ITestInvocationListener : ITestInvocationListener gốc nơi báo cáo kết quả.

exception boolean : Đúng nếu ngoại lệ được nêu ra trong bài kiểm tra.

elapsedTime long : thời gian thực hiện để chạy thử nghiệm.

chạy trước

protected void preRun ()

Thiết lập trước khi chạy thử nghiệm.

setEventTruyền phát

protected void setEventStreaming (boolean eventStreaming)

Đặt phát trực tuyến sự kiện sử dụng. Tiếp xúc để thử nghiệm đơn vị.

Thông số
eventStreaming boolean

setProtoBáo cáo

protected void setProtoReporting (boolean protoReporting)

Thông số
protoReporting boolean

setRunUtil

protected void setRunUtil (IRunUtil runUtil)

Đặt IRunUtil. Tiếp xúc để thử nghiệm đơn vị.

Thông số
runUtil IRunUtil