SottoprocessoTfLauncher
public abstract class SubprocessTfLauncher
extends Object
implements IBuildReceiver , IInvocationContextReceiver , IRemoteTest , IConfigurationReceiver
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 eseguire continuamente l'unità TF o test funzionali.
Riepilogo
Campi | |
---|---|
public static final String | ANDROID_SERIAL_VAR Inv. |
public static final String | PARENT_PROC_TAG_NAME |
public static final String | SUBPROCESS_TAG_NAME Il tag che verrà passato al sottoprocesso TF per differenziarlo |
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 i risultati all'ascoltatore. |
void | setBuild ( IBuildInfo buildInfo) |
void | setConfiguration ( IConfiguration configuration) Inietta la |
void | setInvocationContext ( IInvocationContext invocationContext) |
Metodi protetti | |
---|---|
void | addJavaArguments ( args) addJavaArguments ( args) Consenti di aggiungere parametri Java aggiuntivi all'invocazione del sottoprocesso. |
String | getJava () |
IRunUtil | getRunUtil () Restituisce l' |
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
Inv. variabile che influenza la selezione 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 differenziarlo
mCmdArgs
protectedmCmdArgs
mRootDir
protected String mRootDir
mTmpDir
protected File mTmpDir
Costruttori pubblici
SottoprocessoTfLauncher
public SubprocessTfLauncher ()
Metodi pubblici
correre
public void run (TestInformation testInfo, ITestInvocationListener listener)
Esegue i test e segnala i risultati all'ascoltatore.
Parametri | |
---|---|
testInfo | TestInformation : l'oggetto TestInformation contenente informazioni utili per eseguire i test. |
listener | ITestInvocationListener : ITestInvocationListener dei risultati del test |
Lancia | |
---|---|
DeviceNotAvailableException |
setConfigurazione
public void setConfiguration (IConfiguration configuration)
Inietta la IConfiguration
in uso.
Parametri | |
---|---|
configuration | IConfiguration |
setInvocationContext
public void setInvocationContext (IInvocationContext invocationContext)
Parametri | |
---|---|
invocationContext | IInvocationContext |
Metodi protetti
addJavaArguments
protected void addJavaArguments (args)
Consenti di aggiungere parametri Java aggiuntivi all'invocazione del sottoprocesso.
Parametri | |
---|---|
args |
getJava
protected String getJava ()
ritorna | |
---|---|
String |
getRunUtil
protected IRunUtil getRunUtil ()
Restituisce l' IRunUtil
che verrà utilizzato per il comando del processo secondario.
ritorna | |
---|---|
IRunUtil |
postEsegui
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 riportare i risultati. |
exception | boolean : vero se è stata sollevata un'eccezione all'interno del test. |
elapsedTime | long : il tempo impiegato per eseguire i test. |
precorsa
protected void preRun ()
Configurazione prima di eseguire il test.
setEventStreaming
protected void setEventStreaming (boolean eventStreaming)
Imposta use-event-streaming. Esposto per test unitari.
Parametri | |
---|---|
eventStreaming | boolean |
setProtoReporting
protected void setProtoReporting (boolean protoReporting)
Parametri | |
---|---|
protoReporting | boolean |
setRunUtil
protected void setRunUtil (IRunUtil runUtil)
Imposta IRunUtil. Esposto per test unitari.
Parametri | |
---|---|
runUtil | IRunUtil |