Test Çağrısı

public class TestInvocation
extends Object implements ITestInvocation

java.lang.Nesne
com.android.tradefed.invoker.TestInvokasyon


ITestInvocation varsayılan uygulaması.

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

Özet

iç içe sınıflar

enum TestInvocation.RunMode

Bir çağrının çalışabileceği farklı mod.

enum TestInvocation.Stage

Alanlar

public static final String COMMAND_ARGS_KEY

Komut satırının anahtarı öznitelikleri args

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ış bilgileri.

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

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

static boolean isSubprocess ( IConfiguration config)

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

void notifyInvocationForceStopped (String message, ErrorIdentifier errorId)

TradeFed'in durmasının talep edildiğini TestInvocation bildirin.

void notifyInvocationStopped (String message)

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

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

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

void registerExecutionFiles ( ExecutionFiles executionFiles)
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ı.

Alanlar

COMMAND_ARGS_KEY

public static final String COMMAND_ARGS_KEY

Komut satırının anahtarı öznitelikleri args

INVOCATION_EXTERNAL_DEPENDERCIES

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ürme istisnası

defaultStatus TestRecordProto.FailureStatus : Özel durum 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ış bilgileri.

İ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ıştırmasının IConfiguration .

rescheduler IRescheduler : Çağrının bölümlerini başka bir kaynakta/kaynaklarda yürütülmek üzere yeniden zamanlamak için IRescheduler

extraListeners ITestInvocationListener : ITestInvocationListener s, config ek olarak bildirilecek

atar
DeviceNotAvailableException

altişlem

public static boolean isSubprocess (IConfiguration config)

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

parametreler
config IConfiguration

İadeler
boolean

notifyInvocationForceDurduruldu

public void notifyInvocationForceStopped (String message, 
                ErrorIdentifier errorId)

TradeFed'in durmasının talep edildiğini TestInvocation bildirin.

parametreler
message String : Çağrıyı durdurmakla ilgili mesaj

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

notifyInvationStopped

public void notifyInvocationStopped (String message)

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

parametreler
message String : Çağrıyı durdurmakla ilgili mesaj

printStageSınırlayıcı

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

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

parametreler
phase TestInvocation.Stage

end boolean

registerYürütmeDosyaları

public void registerExecutionFiles (ExecutionFiles executionFiles)

parametreler
executionFiles ExecutionFiles

toString

public String toString ()

İadeler
String

Korumalı yöntemler

addInvokasyonMetrik

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

parametreler
key InvocationMetricLogger.InvocationMetricKey

value String

addInvokasyonMetrik

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

parametreler
key InvocationMetricLogger.InvocationMetricKey

value long

ApplyOtomatik Muhabirler

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 maruz bırakıldı.

parametreler
code CommandRunner.ExitCode

stack Throwable