TestInvocation

public class TestInvocation
extends Object implements ITestInvocation

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


ITestInvocation öğesinin varsayılan uygulaması.

IConfiguration değerine göre önemli nesneleri yükler - derlemeyi alır - hedefi hazırlar - testleri çalıştırır - sonuçları raporlar

Özet

Sabitler

long AVAILABILITY_CHECK_TIMEOUT

Fields'ın oynadığı filmler

public static final String COMMAND_ARGS_KEY

Komut satırı args özelliklerinin anahtarı

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

Herkese açık kurucular

TestInvocation()

Herkese açık yöntemler

static IBuildInfo backFillBuildInfoForReporting(String commandLine)

İndirme hatası durumunda raporlama için IBuildInfo değerini doldurmak üzere komut satırını kullanan yardımcı program.

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

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

IInvocationExecution createInvocationExec(TestInvocation.RunMode mode)

Uygulanması gereken çağrı yolunu oluşturun.

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

Belirtilen ç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ğırma şu anda bir alt süreç kapsamındaysa doğru değerini döndürür.

void notifyInvocationForceStopped(String message, ErrorIdentifier errorId)

TestInvocation'e TradeFed'in durdurulması istendiğini bildirin.

void notifyInvocationStopped(String message)

TestInvocation'e TradeFed'in kullanımdan kaldırılacağını bildirin.

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

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

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

Metrikleri raporlamak için net istemciyi iletin.

static boolean shouldSkipBugreportError(Throwable t)

Hata raporunun atlanması gerektiğinde hataları tanımlayan yardımcı yöntem

String toString()

Korunan 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)

Fields'ın oynadığı filmler

COMMAND_ARGS_KEY

public static final String COMMAND_ARGS_KEY

Komut satırı args özelliklerinin anahtarı

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

Herkese açık kurucular

TestInvocation

public TestInvocation ()

Herkese açık yöntemler

backFillBuildInfoForReporting

public static IBuildInfo backFillBuildInfoForReporting (String commandLine)

İndirme hatası durumunda raporlama için IBuildInfo değerini doldurmak üzere komut satırını kullanan yardımcı program.

Parametreler
commandLine String

İlerlemeler
IBuildInfo

createFailureFromException

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

Bir çağrı istisnasından 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.

İlerlemeler
FailureDescription

createInvocationExec

public IInvocationExecution createInvocationExec (TestInvocation.RunMode mode)

Uygulanması gereken çağrı yolunu oluşturun.

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

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

getDeviceLogName

public static String getDeviceLogName (TestInvocation.Stage stage)

Parametreler
stage TestInvocation.Stage

İlerlemeler
String

getEmulatorLogName

public static String getEmulatorLogName (TestInvocation.Stage stage)

Parametreler
stage TestInvocation.Stage

İlerlemeler
String

getExitInfo

public ITestInvocation.ExitInformation getExitInfo ()

Belirtilen çağrının çıkış bilgileri.

İlerlemeler
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ğırmanın başka kaynaklarda yürütülecek şekilde yeniden planlanması için IRescheduler

extraListeners ITestInvocationListener: config'dekilere ek olarak bildirim gönderilecek ITestInvocationListener'ler

Atışlar
DeviceNotAvailableException

isSubprocess

public static boolean isSubprocess (IConfiguration config)

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

Parametreler
config IConfiguration

İlerlemeler
boolean

notifyInvocationForceStopped

public void notifyInvocationForceStopped (String message, 
                ErrorIdentifier errorId)

TestInvocation'e TradeFed'in durdurulması istendiğini bildirin.

Parametreler
message String: Çağrıyı durdurmayla ilişkili mesaj

errorId ErrorIdentifier: Zorunlu durdurma ile ilişkili tanımlayıcı

notifyInvocationStopped

public void notifyInvocationStopped (String message)

TestInvocation'e TradeFed'in kullanımdan kaldırılacağını bildirin.

Parametreler
message String: Çağrıyı durdurmayla ilişkili mesaj

printStageDelimiter

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

Çağrının belirli bir aşaması için bir ayırı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)

Metrikleri raporlamak için net istemciyi iletin.

Parametreler
client ClearcutClient

shouldSkipBugreportError

public static boolean shouldSkipBugreportError (Throwable t)

Hata raporunun atlanması gerektiğinde hataları tanımlayan yardımcı yöntem

Parametreler
t Throwable

İlerlemeler
boolean

toString

public String toString ()

İlerlemeler
String

Korunan 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

applyAutomatedReporters

protected void applyAutomatedReporters (IConfiguration config)

Parametreler
config IConfiguration

setExitCode

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

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

Parametreler
code CommandRunner.ExitCode

stack Throwable