Test Çağrısı

public class TestInvocation
extends Object implements ITestInvocation

java.lang.Object
com.android.tradefed.invoker.TestInvocation


ITestInvocation varsayılan uygulaması.

IConfiguration dayalı olarak ana nesneleri yükler - yapıyı alır - hedefi hazırlar - testleri çalıştırır - sonuçları raporlar

Özet

sabitler

long AVAILABILITY_CHECK_TIMEOUT

alanlar

public static final String COMMAND_ARGS_KEY

Komut satırının anahtarı args nitelikleri

public static final String INVOCATION_EXTERNAL_DEPENDENCIES

public static final String TRADEFED_CONFIG_NAME

public static final String TRADEFED_END_HOST_LOG

public static final String TRADEFED_INVOC_COMPLETE_HOST_LOG

public static final String TRADEFED_LOG_NAME

kamu inşaatçılar

TestInvocation ()

Genel yöntemler

static IBuildInfo backFillBuildInfoForReporting (String commandLine)

İndirme hatası durumunda raporlama için bir IBuildInfo doldurmak için komut satırını kullanan yardımcı.

static FailureDescription createFailureFromException (Throwable exception, TestRecordProto.FailureStatus defaultStatus)

Bir çağırma istisnasından bir FailureDescription oluşturun.

IInvocationExecution createInvocationExec ( TestInvocation.RunMode mode)

İzlenmesi gereken çağırma yolunu oluşturun.

static String getDeviceLogName ( TestInvocation.Stage stage)
static String getEmulatorLogName ( TestInvocation.Stage stage)
ITestInvocation.ExitInformation getExitInfo ()

Verilen çağrının çıkış bilgisi.

void invoke ( IInvocationContext context, IConfiguration config, IRescheduler rescheduler, ITestInvocationListener... extraListeners)

Test çağrısını gerçekleştirin.

static boolean isSubprocess ( IConfiguration config)

Çağırma şu anda bir alt süreç kapsamındaysa true değerini döndürür.

void notifyInvocationForceStopped (String message, ErrorIdentifier errorId)

TestInvocation TradeFed'den durdurmasının istendiğini bildirin.

void notifyInvocationStopped (String message)

TestInvocation TradeFed'in sonunda kapanacağını bildirin.

static void printStageDelimiter ( TestInvocation.Stage phase, boolean end)

Çağırmanın belirli bir Aşaması için bir sınırlayıcı yazdırır.

void registerExecutionFiles ( ExecutionFiles executionFiles)
void setClearcutClient (ClearcutClient client)

Clearcut istemcisini metrikleri rapor etmesi için yönlendirin.

String toString ()

Korumalı yöntemler

void addInvocationMetric ( InvocationMetricLogger.InvocationMetricKey key, String value)
void addInvocationMetric ( InvocationMetricLogger.InvocationMetricKey key, long value)
void applyAutomatedReporters ( IConfiguration config)
void setExitCode ( CommandRunner.ExitCode code, Throwable stack)

Çıkış kodunu ayarlamak için yardımcı.

Sabitler

AVAILABILITY_CHECK_TIMEOUT

public static final long AVAILABILITY_CHECK_TIMEOUT

Sabit Değer: 180000 (0x000000000002bf20)

alanlar

COMMAND_ARGS_KEY

public static final String COMMAND_ARGS_KEY

Komut satırının anahtarı args nitelikleri

INVOCATION_EXTERNAL_DEPENDENCIES

public static final String INVOCATION_EXTERNAL_DEPENDENCIES

TRADEFED_CONFIG_NAME

public static final String TRADEFED_CONFIG_NAME

TRADEFED_END_HOST_LOG

public static final String TRADEFED_END_HOST_LOG

TRADEFED_INVOC_COMPLETE_HOST_LOG

public static final String TRADEFED_INVOC_COMPLETE_HOST_LOG

TRADEFED_LOG_NAME

public static final String TRADEFED_LOG_NAME

kamu inşaatçılar

Test Çağrısı

public TestInvocation ()

Genel yöntemler

backFillBuildInfoForReporting

public static IBuildInfo backFillBuildInfoForReporting (String commandLine)

İndirme hatası durumunda raporlama için bir IBuildInfo doldurmak için komut satırını kullanan yardımcı.

parametreler
commandLine String

İadeler
IBuildInfo

createFailureFromException

public static FailureDescription createFailureFromException (Throwable exception, 
                TestRecordProto.FailureStatus defaultStatus)

Bir çağırma istisnasından bir FailureDescription oluşturun.

parametreler
exception Throwable : Dönüştürülecek istisna

defaultStatus TestRecordProto.FailureStatus : İstisna bir IHarnessException değilse varsayılan olarak kullanılacak durum .

İadeler
FailureDescription

createInvocationExec

public IInvocationExecution createInvocationExec (TestInvocation.RunMode mode)

İzlenmesi gereken çağırma yolunu oluşturun.

parametreler
mode TestInvocation.RunMode : Şu anda çalıştığımız mod.

İadeler
IInvocationExecution Çağrıyı açıklayan IInvocationExecution .

getDeviceLogName

public static String getDeviceLogName (TestInvocation.Stage stage)

parametreler
stage TestInvocation.Stage

İadeler
String

getEmulatorLogName

public static String getEmulatorLogName (TestInvocation.Stage stage)

parametreler
stage TestInvocation.Stage

İadeler
String

getExitInfo

public ITestInvocation.ExitInformation getExitInfo ()

Verilen çağrının çıkış bilgisi.

İadeler
ITestInvocation.ExitInformation

çağırmak

public void invoke (IInvocationContext context, 
                IConfiguration config, 
                IRescheduler rescheduler, 
                ITestInvocationListener... extraListeners)

Test çağrısını gerçekleştirin.

parametreler
context IInvocationContext : testleri gerçekleştirmek için IInvocationContext .

config IConfiguration : Bu test çalışmasının IConfiguration .

rescheduler IRescheduler : IRescheduler , çağrının bölümlerini başka kaynaklarda yürütme için yeniden planlamak için

extraListeners ITestInvocationListener : ITestInvocationListener , config ek olarak bildirilecek

Atar
DeviceNotAvailableException

isAlt süreç

public static boolean isSubprocess (IConfiguration config)

Çağırma şu anda bir alt süreç kapsamındaysa true değerini döndürür.

parametreler
config IConfiguration

İadeler
boolean

NotifyInvocationForceStopped

public void notifyInvocationForceStopped (String message, 
                ErrorIdentifier errorId)

TestInvocation TradeFed'den durdurmasının istendiğini bildirin.

parametreler
message String : Çağırmayı durdurmakla ilişkili mesaj

errorId ErrorIdentifier : Zorla durdurmayla ilişkili tanımlayıcı

bildirim Çağırma Durduruldu

public void notifyInvocationStopped (String message)

TestInvocation TradeFed'in sonunda kapanacağını bildirin.

parametreler
message String : Çağırmayı durdurmakla ilişkili mesaj

printStageDelimiter

public static void printStageDelimiter (TestInvocation.Stage phase, 
                boolean end)

Çağırmanın belirli bir Aşaması için bir sınırlayıcı yazdırır.

parametreler
phase TestInvocation.Stage

end boolean

registerExecutionFiles

public void registerExecutionFiles (ExecutionFiles executionFiles)

parametreler
executionFiles ExecutionFiles

setClearcutClient

public void setClearcutClient (ClearcutClient client)

Clearcut istemcisini metrikleri rapor etmesi için yönlendirin.

parametreler
client ClearcutClient

toString

public String toString ()

İadeler
String

Korumalı yöntemler

addInvocationMetric

protected void addInvocationMetric (InvocationMetricLogger.InvocationMetricKey key, 
                String value)

parametreler
key InvocationMetricLogger.InvocationMetricKey

value String

addInvocationMetric

protected void addInvocationMetric (InvocationMetricLogger.InvocationMetricKey key, 
                long value)

parametreler
key InvocationMetricLogger.InvocationMetricKey

value long

uygulaOtomatik Raporlayıcılar

protected void applyAutomatedReporters (IConfiguration config)

parametreler
config IConfiguration

setÇıkışKodu

protected void setExitCode (CommandRunner.ExitCode code, 
                Throwable stack)

Çıkış kodunu ayarlamak için yardımcı. Test için sergilendi.

parametreler
code CommandRunner.ExitCode

stack Throwable