Sous-processusTfLauncher
public abstract class SubprocessTfLauncher
extends Object
implements IBuildReceiver , IInvocationContextReceiver , IRemoteTest , IConfigurationReceiver
java.lang.Object | |
↳ | com.android.tradefed.testtype.SubprocessTfLauncher |
Un IRemoteTest
pour exécuter des tests sur une installation TF distincte.
Lance un processus java externe pour exécuter les tests. Utilisé pour exécuter l'unité TF ou des tests fonctionnels en continu.
Résumé
Des champs | |
---|---|
public static final String | ANDROID_SERIAL_VAR Env. |
public static final String | PARENT_PROC_TAG_NAME |
public static final String | SUBPROCESS_TAG_NAME La balise qui sera transmise au sous-processus TF pour le différencier |
protected IBuildInfo | mBuildInfo |
protected | mCmdArgs |
protected IConfiguration | mConfig |
protected String | mRootDir |
protected IRunUtil | mRunUtil |
protected File | mTmpDir
|
Constructeurs publics | |
---|---|
SubprocessTfLauncher () |
Méthodes publiques | |
---|---|
void | run ( TestInformation testInfo, ITestInvocationListener listener) Exécute les tests et rapporte le résultat à l'auditeur. |
void | setBuild ( IBuildInfo buildInfo) |
void | setConfiguration ( IConfiguration configuration) Injecte la |
void | setInvocationContext ( IInvocationContext invocationContext) |
Méthodes protégées | |
---|---|
void | addJavaArguments ( args) addJavaArguments ( args) Permet d'ajouter des paramètres Java supplémentaires à l'invocation du sous-processus. |
String | getJava () |
IRunUtil | getRunUtil () Renvoie le |
void | postRun ( ITestInvocationListener listener, boolean exception, long elapsedTime) Actions à entreprendre une fois le test TF terminé. |
void | preRun () Configuration avant d'exécuter le test. |
void | setEventStreaming (boolean eventStreaming) Définissez use-event-streaming. |
void | setProtoReporting (boolean protoReporting) |
void | setRunUtil ( IRunUtil runUtil) Définissez IRunUtil. |
Des champs
ANDROID_SERIAL_VAR
public static final String ANDROID_SERIAL_VAR
Env. variable qui affecte la sélection adb.
PARENT_PROC_TAG_NAME
public static final String PARENT_PROC_TAG_NAME
SUBPROCESS_TAG_NAME
public static final String SUBPROCESS_TAG_NAME
La balise qui sera transmise au sous-processus TF pour le différencier
mBuildInfo
protected IBuildInfo mBuildInfo
mCmdArgs
protectedmCmdArgs
mConfig
protected IConfiguration mConfig
mRootDir
protected String mRootDir
mRunUtil
protected IRunUtil mRunUtil
mTmpDir
protected File mTmpDir
Constructeurs publics
Sous-processusTfLauncher
public SubprocessTfLauncher ()
Méthodes publiques
courir
public void run (TestInformation testInfo, ITestInvocationListener listener)
Exécute les tests et rapporte le résultat à l'auditeur.
Paramètres | |
---|---|
testInfo | TestInformation : L'objet TestInformation contenant des informations utiles pour exécuter des tests. |
listener | ITestInvocationListener : l' ITestInvocationListener des résultats des tests |
Lance | |
---|---|
DeviceNotAvailableException |
setConfiguration
public void setConfiguration (IConfiguration configuration)
Injecte la IConfiguration
en cours d'utilisation.
Paramètres | |
---|---|
configuration | IConfiguration |
setInvocationContextsetInvocationContext
public void setInvocationContext (IInvocationContext invocationContext)
Paramètres | |
---|---|
invocationContext | IInvocationContext |
Méthodes protégées
addJavaArguments
protected void addJavaArguments (args)
Permet d'ajouter des paramètres Java supplémentaires à l'invocation du sous-processus.
Paramètres | |
---|---|
args |
obtenirJava
protected String getJava ()
Retour | |
---|---|
String |
getRunUtil
protected IRunUtil getRunUtil ()
Renvoie le IRunUtil
qui sera utilisé pour la commande de sous-processus.
Retour | |
---|---|
IRunUtil |
post-exécution
protected void postRun (ITestInvocationListener listener, boolean exception, long elapsedTime)
Actions à entreprendre une fois le test TF terminé.
Paramètres | |
---|---|
listener | ITestInvocationListener : l' ITestInvocationListener d'origine où rapporter les résultats. |
exception | boolean : Vrai si une exception a été déclenchée dans le test. |
elapsedTime | long : le temps d'exécution des tests. |
pré-exécution
protected void preRun ()
Configuration avant d'exécuter le test.
setEventStreaming
protected void setEventStreaming (boolean eventStreaming)
Définissez use-event-streaming. Exposé pour les tests unitaires.
Paramètres | |
---|---|
eventStreaming | boolean |
setProtoReporting
protected void setProtoReporting (boolean protoReporting)
Paramètres | |
---|---|
protoReporting | boolean |
setRunUtil
protected void setRunUtil (IRunUtil runUtil)
Définissez IRunUtil. Exposé pour les tests unitaires.
Paramètres | |
---|---|
runUtil | IRunUtil |