SubprocessTfLauncher

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

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


Un IRemoteTest per eseguire test su un'installazione TF separata.

Avvia un processo Java esterno per eseguire i test. Utilizzato per eseguire continuamente i test delle unità o funzionali di TF.

Riepilogo

Campi

public static final String ANDROID_SERIAL_VAR

Ambiente

public static final String PARENT_PROC_TAG_NAME

public static final String SUBPROCESS_TAG_NAME

Il tag che verrà passato al sottoprocesso TF per distinguerlo

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 segnala il risultato all'ascoltatore.

void setBuild(IBuildInfo buildInfo)

void setConfiguration(IConfiguration configuration)

Invia 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 il IRunUtil che verrà utilizzato per il comando subprocess.

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

Azioni da intraprendere al termine del test TF.

void preRun()

Configurazione prima di eseguire il test.

void setEventStreaming(boolean eventStreaming)

Imposta use-event-streaming.

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

Imposta IRunUtil.

Campi

ANDROID_SERIAL_VAR

public static final String ANDROID_SERIAL_VAR

Variabile di ambiente che influisce sulla selezione di adb.

PARENT_PROC_TAG_NAME

public static final String PARENT_PROC_TAG_NAME

SUBPROCESS_TAG_NAME

public static final String SUBPROCESS_TAG_NAME

Il tag che verrà passato al sottoprocesso TF per distinguerlo

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 segnala il risultato all'ascoltatore.

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)

Invia 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 degli argomenti a cui dobbiamo aggiungere quelli aggiuntivi.

getJava

protected String getJava ()

Ritorni
String

getRunUtil

protected IRunUtil getRunUtil ()

Restituisce il IRunUtil che verrà utilizzato per il comando subprocess.

Ritorni
IRunUtil

postRun

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

Azioni da intraprendere al termine del test TF.

Parametri
listener ITestInvocationListener: l'ITestInvocationListener originale in cui segnalare i risultati.

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

elapsedTime long: il tempo necessario per eseguire i test.

preRun

protected void preRun ()

Configurazione prima di eseguire il test.

setEventStreaming

protected void setEventStreaming (boolean eventStreaming)

Imposta use-event-streaming. Esposto per i 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 i test delle unità.

Parametri
runUtil IRunUtil