ITargetPreparer
public
interface
ITargetPreparer
implements
IDisableable
com.android.tradefed.targetprep.ITargetPreparer |
Prepara l'ambiente di test per l'esecuzione del test.
Ad esempio, installa software, modifica le impostazioni dell'ambiente per i test, lancia i target e così via.
Tieni presente che in una configurazione è possibile specificare più ITargetPreparer
. È consigliabile che ogni ITargetPreparer documenti chiaramente l'ambiente previsto prima e dopo la configurazione. Ad esempio, un ITargetPreparer che configura un dispositivo per i test deve essere eseguito dopo ITargetPreparer che installa il software.
Riepilogo
Metodi pubblici | |
---|---|
default
void
|
setUp(ITestDevice device, IBuildInfo buildInfo)
Questo metodo è deprecato.
Utilizza |
default
void
|
setUp(TestInformation testInformation)
Esegui la configurazione del target per i test. |
default
void
|
tearDown(TestInformation testInformation, Throwable e)
Esegui la pulizia/lo smantellamento del target dopo il test. |
default
void
|
tearDown(ITestDevice device, IBuildInfo buildInfo, Throwable e)
Questo metodo è deprecato.
Utilizza |
Metodi pubblici
setUp
public void setUp (ITestDevice device, IBuildInfo buildInfo)
Questo metodo è deprecato.
Utilizza setUp(com.android.tradefed.invoker.TestInformation)
Esegui la configurazione del target per i test.
Parametri | |
---|---|
device |
ITestDevice : il ITestDevice da preparare. |
buildInfo |
IBuildInfo : dati sulla build in test. |
Lanci | |
---|---|
TargetSetupError |
if fatal error occurred setting up environment |
BuildError |
Se si verifica un errore relativo a BuildInfo |
DeviceNotAvailableException |
if device became unresponsive |
setUp
public void setUp (TestInformation testInformation)
Esegui la configurazione del target per i test.
Parametri | |
---|---|
testInformation |
TestInformation : il TestInformation della chiamata. |
Lanci | |
---|---|
TargetSetupError |
if fatal error occurred setting up environment |
BuildError |
Se si verifica un errore durante la preparazione della build |
DeviceNotAvailableException |
if device became unresponsive |
tearDown
public void tearDown (TestInformation testInformation, Throwable e)
Esegui la pulizia/lo smantellamento del target dopo il test.
Parametri | |
---|---|
testInformation |
TestInformation : il TestInformation della chiamata. |
e |
Throwable : se l'invocazione è terminata con un'eccezione, questa sarà l'eccezione rilevata a livello di Invocation. In caso contrario, sarà null . |
Lanci | |
---|---|
DeviceNotAvailableException |
if device became unresponsive |
tearDown
public void tearDown (ITestDevice device, IBuildInfo buildInfo, Throwable e)
Questo metodo è deprecato.
Utilizza tearDown(com.android.tradefed.invoker.TestInformation, Throwable)
Esegui la pulizia/lo smantellamento del target dopo il test.
Parametri | |
---|---|
device |
ITestDevice : il ITestDevice da preparare. |
buildInfo |
IBuildInfo : dati sulla build in test. |
e |
Throwable : se l'invocazione è terminata con un'eccezione, questa sarà l'eccezione rilevata a livello di Invocation. In caso contrario, sarà null . |
Lanci | |
---|---|
DeviceNotAvailableException |
if device became unresponsive |