CollectingTestListener

public class CollectingTestListener
extends Object implements ITestInvocationListener, ILogSaverListener

java.lang.Object
   ↳ com.android.tradefed.result.CollectingTestListener


Tüm test sonuçlarını toplayacak bir ITestInvocationListener.

Bu nesnede kullanılan veri yapıları iş parçacığı açısından güvenli olsa da ITestInvocationListener geri çağırma işlevleri doğru sırada çağrılmalıdır.

Özet

Herkese açık kurucular

CollectingTestListener()

Herkese açık yöntemler

IBuildInfo getBuildInfo()

Bu yöntem kullanımdan kaldırılmıştır. getInvocationContext()'dan IBuildInfo'e güvenin.

TestRunResult getCurrentRunResults()

Mevcut test çalıştırmasının sonuçlarını alır.

int getExpectedTests()

Beklenen test sayısını döndürür.

IInvocationContext getInvocationContext()

invocationStarted(com.android.tradefed.invoker.IInvocationContext) üzerinden bildirilen çağrı bağlamını döndürme

getMergedTestRunResults()

Farklı denemelerdeki tüm çalıştırmalar için birleştirilmiş sonuç koleksiyonunu döndürme.

IInvocationContext getModuleContextForRunResult(String testRunName)

Sonuçlarla ilişkili modülün IInvocationContext değerini döndürür.

MultiMap<String, LogFile> getModuleLogFiles()

Modülle ilişkili tüm günlük dosyalarını içeren haritanın bir kopyasını döndürür

MultiMap<String, LogFile> getNonAssociatedLogFiles()

Bir test çalıştırması veya modülle ilişkili olmayan, günlük kaydı yapılan tüm dosyaları içeren haritanın bir kopyasını döndürür.

int getNumAllFailedTestRuns()

Başarısız durumdaki test çalıştırmalarının toplam sayısını döndürür

int getNumAllFailedTests()

Başarısızlık durumundaki testlerin toplam sayısını döndürür (yalnızca başarısız, varsayım hataları buna dahil edilmez).

int getNumTestsInState(TestResult.TestStatus status)

Bu çalıştırma için belirli durumdaki testlerin sayısını döndürür.

int getNumTotalTests()

Tüm çalıştırmalar için tamamlanan testlerin toplam sayısını döndürür.

IBuildInfo getPrimaryBuildInfo()

invocationStarted(com.android.tradefed.invoker.IInvocationContext) aracılığıyla bildirilen birincil derleme bilgilerini döndürme.

getRunResults()

Bu yöntem kullanımdan kaldırılmıştır. getMergedTestRunResults() kullanın

TestRunResult getTestRunAtAttempt(String testRunName, int attempt)

Tek bir deneme için TestRunResult döndürün.

int getTestRunAttemptCount(String testRunName)

Belirli bir test çalıştırma adının deneme sayısını döndürür.

getTestRunAttempts(String testRunName)

Belirli bir test çalıştırmasının TestRunResult için tüm girişimlerini alır.

getTestRunForAttempts(int attempt)

Belirli bir denemeyle ilgili tüm sonuçları alır.

getTestRunNames()

Tüm test çalıştırmalarının tüm adlarını döndürür.

boolean hasFailedTests()

Çağrıda başarısız testler veya varsayım hatası olan testler olup olmadığını döndürür.

boolean hasTestRunResultsForName(String testRunName)

Belirli bir test çalıştırma adının sonuç içerip içermediğini döndürür.

void invocationEnded(long elapsedTime)

void invocationFailed(Throwable cause)

void invocationStarted(IInvocationContext context)

void logAssociation(String dataName, LogFile logFile)

void setBuildInfo(IBuildInfo buildInfo)

Bu yöntem kullanımdan kaldırılmıştır. Artık test için gerekli değildir.

void setMergeStrategy(MergeStrategy strategy)

Sonuçları birleştirirken kullanılacak MergeStrategy değerini belirler.

void testAssumptionFailure(TestDescription test, String trace)
void testAssumptionFailure(TestDescription test, FailureDescription failure)
void testEnded(TestDescription test, long endTime, testMetrics)

void testEnded(TestDescription test, testMetrics)

void testFailed(TestDescription test, FailureDescription failure)
void testFailed(TestDescription test, String trace)

void testIgnored(TestDescription test)
void testModuleEnded()
void testModuleStarted(IInvocationContext moduleContext)
void testRunEnded(long elapsedTime, runMetrics)

void testRunFailed(FailureDescription failure)

void testRunFailed(String errorMessage)

void testRunStarted(String name, int numTests, int attemptNumber)

void testRunStarted(String name, int numTests)

void testRunStarted(String name, int numTests, int attemptNumber, long startTime)

void testRunStopped(long elapsedTime)

void testStarted(TestDescription test, long startTime)

void testStarted(TestDescription test)

Korunan yöntemler

final void clearModuleLogFiles()

Modül dosyasının temizlenmesine izin verir. Böylece, modülleri çok uzun süre taşımaktan kaçınmış oluruz.

final void clearResultsForName(String testRunName)

Belirli bir çalıştırma adının sonuçlarını temizlemenize olanak tanır.

void setIsAggregrateMetrics(boolean aggregate)

"Toplu metrikler" seçeneğini etkinleştirin veya devre dışı bırakın

Herkese açık kurucular

CollectingTestListener

public CollectingTestListener ()

Herkese açık yöntemler

getBuildInfo

public IBuildInfo getBuildInfo ()

Bu yöntem kullanımdan kaldırılmıştır.
getInvocationContext() satıcısından IBuildInfo fiyatlı
.

Derleme bilgilerini döndürür.

İlerlemeler
IBuildInfo

getCurrentRunResults

public TestRunResult getCurrentRunResults ()

Mevcut test çalıştırmasının sonuçlarını alır.

Sonuçların eksik olabileceğini unutmayın. Sonuçları işlemeden önce TestRunResult.isRunComplete() ve/veya (@link TestRunResult#isRunFailure()} değerini test etmeniz önerilir.

İlerlemeler
TestRunResult Son test çalıştırması sırasında toplanan verileri temsil eden TestRunResult

getExpectedTests

public int getExpectedTests ()

Beklenen test sayısını döndürür. Bazı testler çalıştırılmamışsa getNumTotalTests() ile farklılık gösterebilir.

İlerlemeler
int

getInvocationContext

public IInvocationContext getInvocationContext ()

invocationStarted(com.android.tradefed.invoker.IInvocationContext) üzerinden bildirilen çağrı bağlamını döndürme

İlerlemeler
IInvocationContext

getMergedTestRunResults

public  getMergedTestRunResults ()

Farklı denemelerdeki tüm çalıştırmalar için birleştirilmiş sonuç koleksiyonunu döndürme.

Birden fazla sonuç varsa her test çalıştırması birleştirilir ve en son test sonucu, önceki çalıştırmaların test sonuçlarını geçersiz kılar. Test çalıştırmaları, deneme sayısına göre sıralanır.

Aynı denemeyle ilgili metrikler, aggregate-metrics tarafından belirlenen tercihe göre birleştirilir. Nihai metrikler, son denemedeki metrikler olacaktır.

İlerlemeler

getModuleContextForRunResult

public IInvocationContext getModuleContextForRunResult (String testRunName)

Sonuçlarla ilişkili modülün IInvocationContext değerini döndürür.

Parametreler
testRunName String: {testRunStarted(String, int)} tarafından verilen ad.

İlerlemeler
IInvocationContext Söz konusu ad için sonuç yoksa belirli bir test çalıştırma adı null ile ilgili modülün IInvocationContext

getModuleLogFiles

public MultiMap<String, LogFile> getModuleLogFiles ()

Modülle ilişkili tüm günlük dosyalarını içeren haritanın bir kopyasını döndürür

İlerlemeler
MultiMap<String, LogFile>

getNonAssociatedLogFiles

public MultiMap<String, LogFile> getNonAssociatedLogFiles ()

Bir test çalıştırması veya modülle ilişkili olmayan, günlük kaydı yapılan tüm dosyaları içeren haritanın bir kopyasını döndürür.

İlerlemeler
MultiMap<String, LogFile>

getNumAllFailedTestRuns

public int getNumAllFailedTestRuns ()

Başarısız durumdaki test çalıştırmalarının toplam sayısını döndürür

İlerlemeler
int

getNumAllFailedTests

public int getNumAllFailedTests ()

Başarısızlık durumundaki testlerin toplam sayısını döndürür (yalnızca başarısız, varsayım hataları buna dahil edilmez).

İlerlemeler
int

getNumTestsInState

public int getNumTestsInState (TestResult.TestStatus status)

Bu çalıştırma için belirli durumdaki testlerin sayısını döndürür.

Parametreler
status TestResult.TestStatus

İlerlemeler
int

getNumTotalTests

public int getNumTotalTests ()

Tüm çalıştırmalar için tamamlanan testlerin toplam sayısını döndürür.

İlerlemeler
int

getPrimaryBuildInfo

public IBuildInfo getPrimaryBuildInfo ()

invocationStarted(com.android.tradefed.invoker.IInvocationContext) aracılığıyla bildirilen birincil derleme bilgilerini döndürme. Birincil derleme, çalışan yapılandırmanın ilk derleme sağlayıcısı tarafından döndürülen derlemedir. Bağlam yoksa (test durumu için derleme yoksa) null döndürülür.

İlerlemeler
IBuildInfo

getRunResults

public  getRunResults ()

Bu yöntem kullanımdan kaldırılmıştır.
getMergedTestRunResults()'u kullanma

Tüm test çalıştırmalarının sonuçlarını döndürür.

İlerlemeler

getTestRunAtAttempt

public TestRunResult getTestRunAtAttempt (String testRunName, 
                int attempt)

Tek bir deneme için TestRunResult döndürün.

Parametreler
testRunName String: {testRunStarted(String, int)} tarafından verilen ad.

attempt int: Deneme kimliği.

İlerlemeler
TestRunResult Belirtilen ad ve deneme kimliği için TestRunResult veya ad ve deneme kimliği yoksa null.

getTestRunAttemptCount

public int getTestRunAttemptCount (String testRunName)

Belirli bir test çalıştırma adının deneme sayısını döndürür.

Parametreler
testRunName String: {testRunStarted(String, int)} tarafından verilen ad.

İlerlemeler
int

getTestRunAttempts

public  getTestRunAttempts (String testRunName)

Belirli bir test çalıştırmasının TestRunResult için tüm girişimlerini alır.

Parametreler
testRunName String: {testRunStarted(String, int)} tarafından verilen ad.

İlerlemeler
Belirli bir test çalıştırması için tüm TestRunResult, deneme sayısına göre sıralanır.

getTestRunForAttempts

public  getTestRunForAttempts (int attempt)

Belirli bir denemeyle ilgili tüm sonuçları alır.

Parametreler
attempt int: Sonuç almak istediğimiz deneme.

İlerlemeler
Belirli bir deneme için tüm TestRunResult.

getTestRunNames

public  getTestRunNames ()

Tüm test çalıştırmalarının tüm adlarını döndürür.

Bu test çalıştırmaları, farklı girişimlerle birden çok kez çalıştırılmış olabilir.

İlerlemeler

hasFailedTests

public boolean hasFailedTests ()

Çağrıda başarısız testler veya varsayım hatası olan testler olup olmadığını döndürür.

İlerlemeler
boolean

hasTestRunResultsForName

public boolean hasTestRunResultsForName (String testRunName)

Belirli bir test çalıştırma adının sonuç içerip içermediğini döndürür.

Parametreler
testRunName String: {testRunStarted(String, int)} tarafından verilen ad.

İlerlemeler
boolean

invocationEnded

public void invocationEnded (long elapsedTime)

Parametreler
elapsedTime long

invocationFailed

public void invocationFailed (Throwable cause)

Parametreler
cause Throwable

invocationStarted

public void invocationStarted (IInvocationContext context)

Parametreler
context IInvocationContext

logAssociation

public void logAssociation (String dataName, 
                LogFile logFile)

Parametreler
dataName String

logFile LogFile

setBuildInfo

public void setBuildInfo (IBuildInfo buildInfo)

Bu yöntem kullanımdan kaldırılmıştır.
Artık test için gerekli değildir.

Derleme bilgilerini ayarlayın. Yalnızca test için kullanılmalıdır.

Parametreler
buildInfo IBuildInfo

setMergeStrategy

public void setMergeStrategy (MergeStrategy strategy)

Sonuçları birleştirirken kullanılacak MergeStrategy değerini belirler.

Parametreler
strategy MergeStrategy

testAssumptionFailure

public void testAssumptionFailure (TestDescription test, 
                String trace)

Parametreler
test TestDescription

trace String

testAssumptionFailure

public void testAssumptionFailure (TestDescription test, 
                FailureDescription failure)

Parametreler
test TestDescription

failure FailureDescription

testEnded

public void testEnded (TestDescription test, 
                long endTime, 
                 testMetrics)

Parametreler
test TestDescription

endTime long

testMetrics

testEnded

public void testEnded (TestDescription test, 
                 testMetrics)

Parametreler
test TestDescription

testMetrics

testFailed

public void testFailed (TestDescription test, 
                FailureDescription failure)

Parametreler
test TestDescription

failure FailureDescription

testFailed

public void testFailed (TestDescription test, 
                String trace)

Parametreler
test TestDescription

trace String

testIgnored

public void testIgnored (TestDescription test)

Parametreler
test TestDescription

testModuleEnded

public void testModuleEnded ()

testModuleStarted

public void testModuleStarted (IInvocationContext moduleContext)

Parametreler
moduleContext IInvocationContext

testRunEnded

public void testRunEnded (long elapsedTime, 
                 runMetrics)

Parametreler
elapsedTime long

runMetrics

testRunFailed

public void testRunFailed (FailureDescription failure)

Parametreler
failure FailureDescription

testRunFailed

public void testRunFailed (String errorMessage)

Parametreler
errorMessage String

testRunStarted

public void testRunStarted (String name, 
                int numTests, 
                int attemptNumber)

Parametreler
name String

numTests int

attemptNumber int

testRunStarted

public void testRunStarted (String name, 
                int numTests)

Parametreler
name String

numTests int

testRunStarted

public void testRunStarted (String name, 
                int numTests, 
                int attemptNumber, 
                long startTime)

Parametreler
name String

numTests int

attemptNumber int

startTime long

testRunStopped

public void testRunStopped (long elapsedTime)

Parametreler
elapsedTime long

testStarted

public void testStarted (TestDescription test, 
                long startTime)

Parametreler
test TestDescription

startTime long

testStarted

public void testStarted (TestDescription test)

Parametreler
test TestDescription

Korunan yöntemler

clearModuleLogFiles

protected final void clearModuleLogFiles ()

Modül dosyasının temizlenmesine izin verir. Böylece, modülleri çok uzun süre taşımaktan kaçınmış oluruz.

clearResultsForName

protected final void clearResultsForName (String testRunName)

Belirli bir çalıştırma adının sonuçlarını temizlemenize olanak tanır. Yalnızca sonuçlar toplayıcı gibi bazı durumlarda kullanılmalıdır.

Parametreler
testRunName String

setIsAggregrateMetrics

protected void setIsAggregrateMetrics (boolean aggregate)

"Toplu metrikler" seçeneğini etkinleştirin veya devre dışı bırakın

Parametreler
aggregate boolean