SubprocessTfLauncher

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

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


Un IRemoteTest per l'esecuzione di test su un'installazione TF separata.

Avvia un processo Java esterno per eseguire i test. Utilizzato per l'esecuzione continua di test funzionali o delle unità TF.

Riepilogo

Costanti

String ANDROID_SERIAL_VAR

Env.

String PARENT_PROC_TAG_NAME

String SUBPROCESS_TAG_NAME

Il tag che verrà trasmesso al sottoprocesso TF per differenziarlo

Campi

protected IBuildInfo mBuildInfo

protected mCmdArgs

protected IConfiguration mConfig

protected String mRootDir

protected IRunUtil mRunUtil

protected File mTmpDir

Costruttori pubblici

SubprocessTfLauncher()

Metodi pubblici

void run(TestInformation testInfo, ITestInvocationListener listener)

Esegue i test e comunica il risultato al listener.

void setBuild(IBuildInfo buildInfo)

void setConfiguration(IConfiguration configuration)

Inserisce il IConfiguration in uso.

void setInvocationContext(IInvocationContext invocationContext)

Metodi protetti

void addJavaArguments( args)

Consente di aggiungere parametri Java aggiuntivi all'invocazione del sottoprocesso.

String getJava()
IRunUtil getRunUtil()

Restituisce IRunUtil che verrà utilizzato per il comando del sottoprocesso.

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

Azioni da intraprendere al termine del test TF.

void preRun()

Configurazione prima dell'esecuzione del test.

void setEventStreaming(boolean eventStreaming)

Imposta use-event-streaming.

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

Imposta IRunUtil.

Costanti

ANDROID_SERIAL_VAR

public static final String ANDROID_SERIAL_VAR

Variabile di ambiente che influisce sulla selezione di adb.

Constant Value: "ANDROID_SERIAL"

PARENT_PROC_TAG_NAME

public static final String PARENT_PROC_TAG_NAME

Valore costante: "parentprocess"

SUBPROCESS_TAG_NAME

public static final String SUBPROCESS_TAG_NAME

Il tag che verrà trasmesso al sottoprocesso TF per differenziarlo

Constant Value: "subprocess"

Campi

mBuildInfo

protected IBuildInfo mBuildInfo

mCmdArgs

protected  mCmdArgs

mConfig

protected IConfiguration mConfig

mRootDir

protected String mRootDir

mRunUtil

protected IRunUtil mRunUtil

mTmpDir

protected File mTmpDir

Costruttori pubblici

SubprocessTfLauncher

public SubprocessTfLauncher ()

Metodi pubblici

run

public void run (TestInformation testInfo, 
                ITestInvocationListener listener)

Esegue i test e comunica il risultato al listener.

Parametri
testInfo TestInformation: l'oggetto TestInformation contenente informazioni utili per eseguire i test.

listener ITestInvocationListener: il ITestInvocationListener dei risultati del test

Lanci
DeviceNotAvailableException

setBuild

public void setBuild (IBuildInfo buildInfo)

Parametri
buildInfo IBuildInfo

setConfiguration

public void setConfiguration (IConfiguration configuration)

Inserisce il IConfiguration in uso.

Parametri
configuration IConfiguration

setInvocationContext

public void setInvocationContext (IInvocationContext invocationContext)

Parametri
invocationContext IInvocationContext

Metodi protetti

addJavaArguments

protected void addJavaArguments ( args)

Consente di aggiungere parametri Java aggiuntivi all'invocazione del sottoprocesso.

Parametri
args : l'elenco corrente di argomenti a cui dobbiamo aggiungere quelli aggiuntivi.

getJava

protected String getJava ()

Ritorni
String

getRunUtil

protected IRunUtil getRunUtil ()

Restituisce IRunUtil che verrà utilizzato per il comando del sottoprocesso.

Ritorni
IRunUtil

postRun

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

Azioni da intraprendere al termine del test TF.

Parametri
listener ITestInvocationListener: il ITestInvocationListener originale in cui segnalare i risultati.

exception boolean: True se è stata generata un'eccezione all'interno del test.

elapsedTime long: il tempo impiegato per eseguire i test.

preRun

protected void preRun ()

Configurazione prima dell'esecuzione del test.

setEventStreaming

protected void setEventStreaming (boolean eventStreaming)

Imposta use-event-streaming. Esposto per il test delle unità.

Parametri
eventStreaming boolean

setProtoReporting

protected void setProtoReporting (boolean protoReporting)

Parametri
protoReporting boolean

setRunUtil

protected void setRunUtil (IRunUtil runUtil)

Imposta IRunUtil. Esposto per il test delle unità.

Parametri
runUtil IRunUtil