SubprocessTfLauncher

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

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


IRemoteTest để chạy kiểm thử trên một bản cài đặt TF riêng biệt.

Chạy một quy trình java bên ngoài để chạy các chương trình kiểm thử. Dùng để chạy liên tục đơn vị TF hoặc kiểm thử chức năng.

Tóm tắt

Trường

public static final String ANDROID_SERIAL_VAR

Môi trường.

public static final String PARENT_PROC_TAG_NAME

public static final String SUBPROCESS_TAG_NAME

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

protected IBuildInfo mBuildInfo

protected mCmdArgs

protected IConfiguration mConfig

protected String mRootDir

protected IRunUtil mRunUtil

protected File mTmpDir

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

SubprocessTfLauncher()

Phương thức công khai

void run(TestInformation testInfo, ITestInvocationListener listener)

Chạy các bài kiểm thử và báo cáo kết quả cho trình nghe.

void setBuild(IBuildInfo buildInfo)

void setConfiguration(IConfiguration configuration)

Chèn IConfiguration đang sử dụng.

void setInvocationContext(IInvocationContext invocationContext)

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

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.

String getJava()
IRunUtil getRunUtil()

Trả về IRunUtil sẽ được 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 kiểm thử TF hoàn tất.

void preRun()

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

void setEventStreaming(boolean eventStreaming)

Đặt use-event-streaming.

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

Đặt IRunUtil.

Trường

ANDROID_SERIAL_VAR

public static final String ANDROID_SERIAL_VAR

Biến môi trường ảnh hưởng đến 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 truyền đến quy trình con TF để phân biệt quy trình con đó

mBuildInfo

protected IBuildInfo mBuildInfo

mCmdArgs

protected  mCmdArgs

mConfig

protected IConfiguration mConfig

mRootDir

protected String mRootDir

mRunUtil

protected IRunUtil mRunUtil

mTmpDir

protected File mTmpDir

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

SubprocessTfLauncher

public SubprocessTfLauncher ()

Phương thức công khai

chạy

public void run (TestInformation testInfo, 
                ITestInvocationListener listener)

Chạy các bài kiểm thử và báo cáo kết quả cho trình nghe.

Tham số
testInfo TestInformation: Đối tượng TestInformation chứa thông tin hữu ích để chạy các chương trình kiểm thử.

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

Gửi
DeviceNotAvailableException

setBuild

public void setBuild (IBuildInfo buildInfo)

Tham số
buildInfo IBuildInfo

setConfiguration

public void setConfiguration (IConfiguration configuration)

Chèn IConfiguration đang sử dụng.

Tham số
configuration IConfiguration

setInvocationContext

public void setInvocationContext (IInvocationContext invocationContext)

Tham số
invocationContext IInvocationContext

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

addJavaArguments

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.

Tham số
args : danh sách đối số hiện tại mà chúng ta cần thêm các đối số khác.

getJava

protected String getJava ()

Giá trị trả về
String

getRunUtil

protected IRunUtil getRunUtil ()

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

Giá trị trả về
IRunUtil

postRun

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

Các hành động cần thực hiện sau khi kiểm thử TF hoàn tất.

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

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

elapsedTime long: thời gian chạy các chương trình kiểm thử.

preRun

protected void preRun ()

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

setEventStreaming

protected void setEventStreaming (boolean eventStreaming)

Đặt use-event-streaming. Được hiển thị để kiểm thử đơn vị.

Tham số
eventStreaming boolean

setProtoReporting

protected void setProtoReporting (boolean protoReporting)

Tham số
protoReporting boolean

setRunUtil

protected void setRunUtil (IRunUtil runUtil)

Đặt IRunUtil. Được hiển thị để kiểm thử đơn vị.

Tham số
runUtil IRunUtil