Çağrı Yürütme

public interface IInvocationExecution

com.android.tradefed.invoker.IIInvocationExecution


Bir çağrının parçası olarak yapılacak eylemleri açıklayan arayüz. TestInvocation , çağrıların sırasını sağlar.

Özet

Genel yöntemler

default void cleanUpBuilds ( IInvocationContext context, IConfiguration config)

build_provider temizleme adımını yürütün.

default void doCleanUp ( IInvocationContext context, IConfiguration config, Throwable exception)

target_preparer ve multi_target_preparer temizleme adımını yürütün.

default void doSetup ( TestInformation testInfo, IConfiguration config, ITestLogger logger)

target_preparer ve multi_target_preparer kurulum adımını yürütün.

default void doTeardown ( TestInformation testInfo, IConfiguration config, ITestLogger logger, Throwable exception)

target_preparer ve multi_target_preparer sökme adımını yürütün.

default boolean fetchBuild ( TestInformation testInfo, IConfiguration config, IRescheduler rescheduler, ITestInvocationListener listener)

Çağrının build_provider adımını yürütün.

abstract void reportLogs ( ITestDevice device, ITestLogger logger, TestInvocation.Stage stage)

Çağrının farklı aşamalarında bazı cihaz günlüklerini bildirin.

default void runDevicePostInvocationTearDown ( IInvocationContext context, IConfiguration config, Throwable exception)

Çağrının her bir aygıt parçası için ITestDevice#postInvocationTearDown(Throwable) .

default void runDevicePreInvocationSetup ( IInvocationContext context, IConfiguration config, ITestLogger logger)

Çağrının her cihaz bölümü için ERROR(ITestDevice#preInvocationSetup(IBuildInfo)/com.android.tradefed.device.ITestDevice#preInvocationSetup(com.android.tradefed.build.IBuildInfo) ITestDevice#preInvocationSetup(IBuildInfo)) .

default void runTests ( TestInformation info, IConfiguration config, ITestInvocationListener listener)

Testi çalıştırır.

default boolean shardConfig ( IConfiguration config, TestInformation testInfo, IRescheduler rescheduler, ITestLogger logger)

Yapılandırmayı, birden çok kaynakta paralel olarak çalışacak şekilde yeniden zamanlanacak şekilde alt yapılandırmalara bölmeye çalışın.

Genel yöntemler

cleanUpBuilds

public void cleanUpBuilds (IInvocationContext context, 
                IConfiguration config)

build_provider temizleme adımını yürütün. Yapı getirme ile ilişkili.

parametreler
context IInvocationContext : IInvocationContext .

config IConfiguration : Bu test çalıştırmasının IConfiguration .

temizlik

public void doCleanUp (IInvocationContext context, 
                IConfiguration config, 
                Throwable exception)

target_preparer ve multi_target_preparer temizleme adımını yürütün. Cihazlar temizleniyor mu?

parametreler
context IInvocationContext : IInvocationContext .

config IConfiguration : Bu test çalıştırmasının IConfiguration .

exception Throwable : test çalışması tarafından oluşturulan orijinal istisna.

kurulum

public void doSetup (TestInformation testInfo, 
                IConfiguration config, 
                ITestLogger logger)

target_preparer ve multi_target_preparer kurulum adımını yürütün. Testin çalışması için gereken tüm cihaz kurulumunu yapar.

parametreler
testInfo TestInformation : TestInformation .

config IConfiguration : Bu test çalıştırmasının IConfiguration .

logger ITestLogger : kurulum hataları günlüklerini bildirmek için ITestLogger .

atar
com.android.tradefed.targetprep.TargetSetupError
com.android.tradefed.targetprep.BuildError
DeviceNotAvailableException
BuildError
TargetSetupError

doTeardown

public void doTeardown (TestInformation testInfo, 
                IConfiguration config, 
                ITestLogger logger, 
                Throwable exception)

target_preparer ve multi_target_preparer sökme adımını yürütün. Cihazlar kurulumla ilişkili olarak yırtılır mı?

parametreler
testInfo TestInformation : TestInformation .

config IConfiguration : Bu test çalıştırmasının IConfiguration .

logger ITestLogger : Günlükleri raporlamak için ITestLogger .

exception Throwable : test çalışması tarafından oluşturulan orijinal istisna.

atar
Throwable

getir

public boolean fetchBuild (TestInformation testInfo, 
                IConfiguration config, 
                IRescheduler rescheduler, 
                ITestInvocationListener listener)

Çağrının build_provider adımını yürütün.

parametreler
testInfo TestInformation : TestInformation .

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

listener ITestInvocationListener : derleme indirme hatalarını bildirmek için ITestInvocation .

İadeler
boolean Derlemeyi başarıyla indirdiysek true, aksi takdirde false.

atar
com.android.tradefed.build.BuildRetrievalError
DeviceNotAvailableException
BuildRetrievalError

rapor günlükleri

public abstract void reportLogs (ITestDevice device, 
                ITestLogger logger, 
                TestInvocation.Stage stage)

Çağrının farklı aşamalarında bazı cihaz günlüklerini bildirin. Örneğin: logcat.

parametreler
device ITestDevice : Günlüklerin raporlanacağı cihaz.

logger ITestLogger : Günlükler için günlükçü.

stage TestInvocation.Stage : İçinde bulunduğumuz invokasyon aşaması.

runDevicePostInvocationTearDown

public void runDevicePostInvocationTearDown (IInvocationContext context, 
                IConfiguration config, 
                Throwable exception)

Çağrının her bir aygıt parçası için ITestDevice#postInvocationTearDown(Throwable) .

parametreler
context IInvocationContext : IInvocationContext .

config IConfiguration : Bu test çalıştırmasının IConfiguration .

exception Throwable : Varsa, çalışan test tarafından oluşturulan orijinal istisna.

runDeviceÖn Çağırma Kurulumu

public void runDevicePreInvocationSetup (IInvocationContext context, 
                IConfiguration config, 
                ITestLogger logger)

Çağrının her cihaz bölümü için ERROR(ITestDevice#preInvocationSetup(IBuildInfo)/com.android.tradefed.device.ITestDevice#preInvocationSetup(com.android.tradefed.build.IBuildInfo) ITestDevice#preInvocationSetup(IBuildInfo)) .

parametreler
context IInvocationContext : IInvocationContext .

config IConfiguration : Bu test çalıştırmasının IConfiguration .

logger ITestLogger : Günlükleri raporlamak için ITestLogger .

atar
com.android.tradefed.device.DeviceNotAvailableException
TargetSetupError
DeviceNotAvailableException

runTestler

public void runTests (TestInformation info, 
                IConfiguration config, 
                ITestInvocationListener listener)

Testi çalıştırır.

parametreler
info TestInformation : Testlerin birlikte çalıştırılacağı TestInformation .

config IConfiguration : çalıştırılacak IConfiguration

listener ITestInvocationListener : test sonuçlarının ITestInvocationListener

atar
Throwable

shardConfig

public boolean shardConfig (IConfiguration config, 
                TestInformation testInfo, 
                IRescheduler rescheduler, 
                ITestLogger logger)

Yapılandırmayı, birden çok kaynakta paralel olarak çalışacak şekilde yeniden zamanlanacak şekilde alt yapılandırmalara bölmeye çalışın.

Bir parça sayısı 1'den büyükse, parça endeksleri ayarlayarak her parça için yapılandırmalar oluşturacak ve bunları yeniden planlayacaktır. Bir parça sayısı ayarlanmazsa, IShardHelper#shardConfig geri döner.

parametreler
config IConfiguration : geçerli IConfiguration .

testInfo TestInformation : Testlerin bilgilerini tutan TestInformation .

rescheduler IRescheduler : IRescheduler .

logger ITestLogger : ITestLogger , parçalama sırasında dosyayı günlüğe kaydetmek için kullanılır.

İadeler
boolean test parçalandıysa true . Aksi takdirde false