Test Çağrısı

public class TestInvocation
extends Object implements ITestInvocation

Java.lang.Nesne
🎃 com.android.tradefed.invoker.TestInvocation


Varsayılan ITestInvocation uygulaması.

IConfiguration öğesine göre büyük nesneleri yükler - derlemeyi alır - hedef hazırlar - testleri çalıştırır - sonuçları raporlar

Özet

İç içe yerleştirilmiş sınıflar

enum TestInvocation.RunMode

Çağrının karşılaşabileceği farklı mod. 

enum TestInvocation.Stage

 

Fields'ın oynadığı filmler

public static final String COMMAND_ARGS_KEY

Komut satırı bağımsız değişkenleri özelliklerinin anahtarı

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

Herkese açık yöntemler

static IBuildInfo backFillBuildInfoForReporting(String commandLine)

Aşağıdaki durumlarda raporlama için bir IBuildInfo doldurmak amacıyla komut satırını kullanan yardımcı indirme hatası.

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

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

IInvocationExecution createInvocationExec(TestInvocation.RunMode mode)

İzlenmesi 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ğrı şu anda bir alt işlem kapsamındaysa true değerini döndürür.

void notifyInvocationStopped(String message, ErrorIdentifier errorId)

TestInvocation, TradeFed'in durdurulmasının istendiğini 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)
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 ayarlama yardımcısı.

Fields'ın oynadığı filmler

COMMAND_ARGS_KEY

public static final String COMMAND_ARGS_KEY

Komut satırı bağımsız değişkenleri özelliklerinin anahtarı

TRADEFED_YAPILANDIRMA_ADI

public static final String TRADEFED_CONFIG_NAME

TRADEFED_END_HOST_LOG

public static final String TRADEFED_END_HOST_LOG

TRADEFED_INVOC_COMPLETE_HOST_GÜNLÜĞÜ

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

Herkese açık yöntemler

Raporlama İçin BackFillBuildInfo

public static IBuildInfo backFillBuildInfoForReporting (String commandLine)

Aşağıdaki durumlarda raporlama için bir IBuildInfo doldurmak amacıyla komut satırını kullanan yardımcı indirme hatası.

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üşüm istisnası

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

İlerlemeler
FailureDescription

createInvocationExec

public IInvocationExecution createInvocationExec (TestInvocation.RunMode mode)

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

Parametreler
mode TestInvocation.RunMode: Şu anda kullandığımız mod.

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

getCihazGünlükAdı

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 değeri.

rescheduler IRescheduler: IRescheduler, çağrının bazı bölümlerinin yeniden planlanması için başka kaynakta yürütme

extraListeners ITestInvocationListener: Aşağıdakilere ek olarak bilgilendirilecek ITestInvocationListener sn. config

Fırlatma
DeviceNotAvailableException

Alt İşlem

public static boolean isSubprocess (IConfiguration config)

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

Parametreler
config IConfiguration

İlerlemeler
boolean

bildirimInvocationDurduruldu

public void notifyInvocationStopped (String message, 
                ErrorIdentifier errorId)

TestInvocation, TradeFed'in durdurulmasının istendiğini bildirin.

Parametreler
message String: Çağrının durdurulmasıyla ilişkili mesaj

errorId ErrorIdentifier

PrintStageSınırlayıcı

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

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

otomatik muhabirleri uygula

protected void applyAutomatedReporters (IConfiguration config)

Parametreler
config IConfiguration

setÇıkışKodu

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

Çıkış kodunu ayarlama yardımcısı. Test amacıyla kullanıma sunuldu.

Parametreler
code CommandRunner.ExitCode

stack Throwable