IInvocationExecution

public interface IInvocationExecution

com.android.tradefed.invoker.IInvocationExecution


Çağrının bir parçası olarak yapılacak işlemleri açıklayan arayüz. TestInvocation çağrısı, çağrıların sırasını kendisi belirler.

Özet

Herkese açık 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 cleanUp adımını yürütün.

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

target_preparer ve multi_target_preparer setUp adımlarını yürütün.

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

target_preparer ve multi_target_preparer teardown 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)

Bazı cihaz günlüklerini çağrının farklı aşamalarında raporlayın.

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

Çağrının her cihaz parçası için ITestDevice.postInvocationTearDown(Throwable) çağrısı yapın.

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

Çağrının her cihaz parçası için ERROR(ITestDevice.preInvocationSetup(IBuildInfo)/com.android.tradefed.device.ITestDevice#preInvocationSetup(com.android.tradefed.build.IBuildInfo) ITestDevice.preInvocationSetup(IBuildInfo)) çağrısı yapın.

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ı alt yapılandırmalara bölmeyi deneyin. Böylece, paralel olarak birden fazla kaynakta çalışacak şekilde yeniden planlanabilir.

Herkese açık yöntemler

cleanUpBuilds

public void cleanUpBuilds (IInvocationContext context, 
                IConfiguration config)

build_provider temizleme adımını yürütün. Derleme getirmeyle ilişkilidir.

Parametreler
context IInvocationContext: Çağrının IInvocationContext.

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

doCleanUp

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

target_preparer ve multi_target_preparer cleanUp adımını yürütün. Cihazlar temizlenir.

Parametreler
context IInvocationContext: Çağrının IInvocationContext.

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

exception Throwable: Testin çalışmasıyla ortaya çıkan orijinal istisna.

doSetup

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

target_preparer ve multi_target_preparer setUp adımlarını yürütün. Testin çalışması için gereken tüm cihazlar kurulu mu?

Parametreler
testInfo TestInformation: Çağrının TestInformation.

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

logger ITestLogger: Kurulum hatalarını bildirmek için ITestLogger.

Atışlar
com.android.tradefed.targetprep.TargetSetupError
com.android.tradefed.targetprep.BuildError
com.android.tradefed.device.DeviceNotAvailableException
BuildError
DeviceNotAvailableException
TargetSetupError

doTeardown

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

target_preparer ve multi_target_preparer teardown adımını yürütün. Kurulumla ilişkili cihazlar kaldırılır mı?

Parametreler
testInfo TestInformation: Çağrının TestInformation.

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

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

exception Throwable: Testin çalışmasıyla ortaya çıkan orijinal istisna.

Atışlar
Atılabil.

fetchBuild

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: Çağrının TestInformation.

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

rescheduler IRescheduler: Çağırmanın bölümlerini başka kaynaklarda yürütmek için yeniden planlamak amacıyla IRescheduler

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

İlerlemeler
boolean Derlemeyi başarıyla indirdiysek doğru, aksi takdirde yanlış değerini alır.

Atışlar
com.android.tradefed.build.BuildRetrievalError
com.android.tradefed.device.DeviceNotAvailableException
BuildRetrievalError
DeviceNotAvailableException

reportLogs

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

Bazı cihaz günlüklerini çağrının farklı aşamalarında raporlayın. Örneğin: logcat.

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

logger ITestLogger: Günlüklerin günlüğe kaydedicisi.

stage TestInvocation.Stage: Çağrının hangi aşamasında olduğumuzu belirtir.

runDevicePostInvocationTearDown

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

Çağrının her cihaz parçası için ITestDevice.postInvocationTearDown(Throwable) çağrısı yapın.

Parametreler
context IInvocationContext: Çağrının IInvocationContext.

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

exception Throwable: Çalışan test tarafından oluşturulan orijinal istisna (varsa).

runDevicePreInvocationSetup

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

Çağrının her cihaz parçası için ERROR(ITestDevice.preInvocationSetup(IBuildInfo)/com.android.tradefed.device.ITestDevice#preInvocationSetup(com.android.tradefed.build.IBuildInfo) ITestDevice.preInvocationSetup(IBuildInfo)) çağrısı yapın.

Parametreler
context IInvocationContext: Çağrının IInvocationContext.

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

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

Atışlar
com.android.tradefed.device.DeviceNotAvailableException
com.android.tradefed.targetprep.TargetSetupError
DeviceNotAvailableException
TargetSetupError

runTests

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

Testi çalıştırır.

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

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

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

Atışlar
Atılabil.

shardConfig

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

Yapılandırmayı alt yapılandırmalara bölmeyi deneyin. Böylece, paralel olarak birden fazla kaynakta çalışacak şekilde yeniden planlanabilir.

Bir bölüm sayısı 1'den fazlaysa bölüm dizinlerini ayarlayarak her bölüm için yapılandırmalar oluşturur ve bunları yeniden planlar. Bir bölüm sayısı ayarlanmazsa IShardHelper.shardConfig değerine geri döner.

Parametreler
config IConfiguration: Mevcut IConfiguration.

testInfo TestInformation: Test bilgilerini içeren TestInformation.

rescheduler IRescheduler: IRescheduler.

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

İlerlemeler
boolean Test bölmelere ayrıldıysa doğru değerini döndürür. Aksi takdirde false döndürülür.