TestRunSonucu
public class TestRunResult
extends Object
java.lang.Nesne | |
↳ | com.android.tradefed.result.TestRunResult |
Tek bir test çalıştırmasının sonuçlarını tutar.
Doğru sayıda test tutar ve tamamlanmamış testleri izler.
İplik güvenli değil! Test* geri aramaları sırayla çağrılmalıdır
Özet
Alanlar | |
---|---|
public static final String | ERROR_DIVIDER
|
Kamu inşaatçıları | |
---|---|
TestRunResult () Boş bir |
Genel yöntemler | |
---|---|
getCompletedTests () Tamamlanmış testler kümesini alır. | |
long | getElapsedTime () Geçerli çalıştırmanın geçen süresini döndürür. |
int | getExpectedTestCount () Bu TestRunResult'un sahip olmayı beklediği test senaryolarının sayısını alır. |
getFailedTests () Başarısız testler kümesini alır. | |
String | getName () |
int | getNumAllFailedTests () Başarısızlık durumundaki toplam test sayısını döndür (başarısız, varsayım hatası) |
int | getNumCompleteTests () Bu çalıştırmadaki tamamlanmış testlerin sayısını, yani durumu != eksik olarak alır. |
int | getNumTests () Bu çalıştırmadaki test sayısını alır. |
int | getNumTestsInState (TestResult.TestStatus status) Bu çalıştırma için verilen durumdaki test sayısını alır. |
getPassedTests () Geçilen testler kümesini alır. | |
FailureDescription | getRunFailureDescription () Çalıştırma hatası tanımlayıcısını döndürür, çalıştırma başarısız olmadıysa |
String | getRunFailureMessage () Çalıştırma hatası hata mesajını döndürün, çalıştırma başarısız olmadıysa |
MultiMap <String, LogFile > | getRunLoggedFiles () Bu test durumuyla ilişkili tüm günlüğe kaydedilen dosyayı içeren haritanın bir kopyasını döndürür. |
getRunMetrics () | |
getRunProtoMetrics () | |
long | getStartTime () İlk testRunStart çağrısının başlangıç zamanını döndürür. |
getTestResults () Test sonuçlarının bir haritasını döndürür. | |
getTestsResultsInState (TestResult.TestStatus status) Belirli bir durumdaki tüm | |
String | getTextSummary () Sonuçları açıklayan kullanıcı dostu bir dize döndürür. |
boolean | hasFailedTests () |
boolean | isRunComplete () |
boolean | isRunFailure () |
static TestRunResult | merge ( testRunResults) merge ( testRunResults) |
static TestRunResult | merge ( testRunResults, MergeStrategy strategy) merge ( testRunResults, MergeStrategy strategy) Aynı testRunName'in birden çok TestRunResults değerini birleştirin. |
void | resetRunFailure () Çalıştırma hatası durumunu sıfırlayın. |
void | setAggregateMetrics (boolean metricAggregation) |
void | setRunComplete (boolean runComplete) |
void | testAssumptionFailure ( TestDescription test, String trace) |
void | testAssumptionFailure ( TestDescription test, FailureDescription failure) |
void | testEnded ( TestDescription test, long endTime, testMetrics) testEnded ( TestDescription test, long endTime, testMetrics) |
void | testEnded ( TestDescription test, testMetrics) testEnded ( TestDescription test, testMetrics) |
void | testFailed ( TestDescription test, FailureDescription failure) |
void | testFailed ( TestDescription test, String trace) |
void | testIgnored ( TestDescription test) |
void | testLogSaved (String dataName, LogFile logFile) Günlüğe kaydedilmekte olan bir dosya hakkındaki bilgiler depolanır ve devam eden test senaryosu veya test çalıştırmasıyla ilişkilendirilir. |
void | testRunEnded (long elapsedTime, runMetrics) testRunEnded (long elapsedTime, runMetrics) Yeni proto metrikleri kullanan yeni arayüz. |
void | testRunFailed ( FailureDescription failureDescription) |
void | testRunFailed (String errorMessage) |
void | testRunStarted (String runName, int testCount, long startTime) Bir test çalıştırmasının başladığını bildirin. |
void | testRunStarted (String runName, int testCount) Bir test çalıştırmasının başladığını bildirin. |
void | testRunStopped (long elapsedTime) |
void | testStarted ( TestDescription test, long startTime) |
void | testStarted ( TestDescription test) |
Alanlar
ERROR_DIVIDER
public static final String ERROR_DIVIDER
Kamu inşaatçıları
Genel yöntemler
getCompletedTestler
publicgetCompletedTests ()
Tamamlanmış testler kümesini alır.
İadeler | |
---|---|
getElapsedTime
public long getElapsedTime ()
Geçerli çalıştırmanın geçen süresini döndürür.
İadeler | |
---|---|
long |
getExpectedTestCount
public int getExpectedTestCount ()
Bu TestRunResult'un sahip olmayı beklediği test senaryolarının sayısını alır. Gerçek sayı, test kazaları nedeniyle beklenen sayıdan daha az olabilir. Normalde, böyle bir uyumsuzluk, bir test çalıştırması başarısızlığını gösterir.
İadeler | |
---|---|
int |
getFailedTestler
publicgetFailedTests ()
Başarısız testler kümesini alır.
İadeler | |
---|---|
getName
public String getName ()
İadeler | |
---|---|
String | test çalıştırması adı |
getNumAllFailedTestleri
public int getNumAllFailedTests ()
Başarısızlık durumundaki toplam test sayısını döndür (başarısız, varsayım hatası)
İadeler | |
---|---|
int |
getNumCompleteTestleri
public int getNumCompleteTests ()
Bu çalıştırmadaki tamamlanmış testlerin sayısını, yani durumu != eksik olarak alır.
İadeler | |
---|---|
int |
getNumTests
public int getNumTests ()
Bu çalıştırmadaki test sayısını alır.
İadeler | |
---|---|
int |
getNumTestsInState
public int getNumTestsInState (TestResult.TestStatus status)
Bu çalıştırma için verilen durumdaki test sayısını alır.
parametreler | |
---|---|
status | TestResult.TestStatus |
İadeler | |
---|---|
int |
getPassedTestler
publicgetPassedTests ()
Geçilen testler kümesini alır.
İadeler | |
---|---|
getRunFailureDescription
public FailureDescription getRunFailureDescription ()
Çalıştırma hatası tanımlayıcısını döndürür, çalıştırma başarısız olmadıysa null
.
İadeler | |
---|---|
FailureDescription |
getRunFailureMessage
public String getRunFailureMessage ()
Çalıştırma hatası hata mesajını döndürün, çalıştırma başarısız olmadıysa null
.
İadeler | |
---|---|
String |
getRunLoggedFiles
public MultiMap<String, LogFile> getRunLoggedFiles ()
Bu test durumuyla ilişkili tüm günlüğe kaydedilen dosyayı içeren haritanın bir kopyasını döndürür.
İadeler | |
---|---|
MultiMap <String, LogFile > |
getRunProtoMetrics
publicgetRunProtoMetrics ()
İadeler | |
---|---|
yeni protokol biçimiyle test çalıştırması metriklerinin bir ERROR(/Map) . |
GetStartTime
public long getStartTime ()
İlk testRunStart çağrısının başlangıç zamanını döndürür.
İadeler | |
---|---|
long |
getTestResults
publicgetTestResults ()
Test sonuçlarının bir haritasını döndürür.
İadeler | |
---|---|
getTestsResultsInState
publicgetTestsResultsInState (TestResult.TestStatus status)
Belirli bir durumdaki tüm TestResult
döndürür.
parametreler | |
---|---|
status | TestResult.TestStatus |
İadeler | |
---|---|
getTextSummary
public String getTextSummary ()
Sonuçları açıklayan kullanıcı dostu bir dize döndürür.
İadeler | |
---|---|
String |
HasFailedTestler
public boolean hasFailedTests ()
İadeler | |
---|---|
boolean | test çalıştırmasında herhangi bir başarısız veya hata testi varsa true . |
isRunComplete
public boolean isRunComplete ()
İadeler | |
---|---|
boolean | test çalıştırması biterse true . |
isRunFailure
public boolean isRunFailure ()
İadeler | |
---|---|
boolean | test çalıştırması başarısız olursa true . |
birleştirmek
public static TestRunResult merge (testRunResults)
parametreler | |
---|---|
testRunResults |
İadeler | |
---|---|
TestRunResult |
Ayrıca bakınız:
birleştirmek
public static TestRunResult merge (testRunResults, MergeStrategy strategy)
Aynı testRunName'in birden çok TestRunResults değerini birleştirin. Bir test senaryosu birden fazla TestRunResults'da görünüyorsa ancak farklı sonuçlara sahipse (örneğin, "önyükleme-test cihazı", BAŞARISIZ-BAŞARISIZ-GEÇTİ sonucuyla üç kez çalışır), BAŞARISIZ çalıştırmalardan tüm yığın izlerini birleştirir ve durum için son çalıştırma sonucuna güveniriz, metrikler, günlük dosyaları, başlangıç/bitiş zamanı.
parametreler | |
---|---|
testRunResults | |
strategy | MergeStrategy : sonuçları birleştirmek için benimsenen birleştirme stratejisi. |
İadeler | |
---|---|
TestRunResult | testRunResults'dan birleştirilmiş verileri içeren son TestRunResult. |
resetRunFailure
public void resetRunFailure ()
Çalıştırma hatası durumunu sıfırlayın.
Yeniden deneme sırasında bazen çalıştırma hatası durumunun sıfırlanması gerekir. Bu, gerçek bir arızayı temizlemekten kaçınmak için dikkatle yapılmalıdır.
setAgregaMetrics
public void setAggregateMetrics (boolean metricAggregation)
parametreler | |
---|---|
metricAggregation | boolean |
setRunComplete
public void setRunComplete (boolean runComplete)
parametreler | |
---|---|
runComplete | boolean |
testVarsayımBaşarısızlık
public void testAssumptionFailure (TestDescription test, String trace)
parametreler | |
---|---|
test | TestDescription |
trace | String |
testVarsayımBaşarısızlık
public void testAssumptionFailure (TestDescription test, FailureDescription failure)
parametreler | |
---|---|
test | TestDescription |
failure | FailureDescription |
testBitti
public void testEnded (TestDescription test, long endTime,testMetrics)
parametreler | |
---|---|
test | TestDescription |
endTime | long |
testMetrics |
testBitti
public void testEnded (TestDescription test,testMetrics)
parametreler | |
---|---|
test | TestDescription |
testMetrics |
test başarısız
public void testFailed (TestDescription test, FailureDescription failure)
parametreler | |
---|---|
test | TestDescription |
failure | FailureDescription |
test başarısız
public void testFailed (TestDescription test, String trace)
parametreler | |
---|---|
test | TestDescription |
trace | String |
testGünlüğüKaydedildi
public void testLogSaved (String dataName, LogFile logFile)
Günlüğe kaydedilmekte olan bir dosya hakkındaki bilgiler depolanır ve devam eden test senaryosu veya test çalıştırmasıyla ilişkilendirilir.
parametreler | |
---|---|
dataName | String : verilere başvuran ad. |
logFile | LogFile : Nesnenin kaydedildiği yeri ve bununla ilgili bilgileri temsil eden LogFile nesnesi. |
testRunBitti
public void testRunEnded (long elapsedTime,runMetrics)
Yeni proto metrikleri kullanan yeni arayüz.
parametreler | |
---|---|
elapsedTime | long |
runMetrics |
testRunFailed
public void testRunFailed (FailureDescription failureDescription)
parametreler | |
---|---|
failureDescription | FailureDescription |
testRunFailed
public void testRunFailed (String errorMessage)
parametreler | |
---|---|
errorMessage | String |
testÇalıştırıldı
public void testRunStarted (String runName, int testCount, long startTime)
Bir test çalıştırmasının başladığını bildirin.
parametreler | |
---|---|
runName | String : izleme amacıyla test çalıştırmasıyla ilişkilendirilen ad. |
testCount | int : test çalıştırmasıyla ilişkili beklenen test senaryolarının sayısı. |
startTime | long |
testÇalıştırıldı
public void testRunStarted (String runName, int testCount)
Bir test çalıştırmasının başladığını bildirin.
parametreler | |
---|---|
runName | String : izleme amacıyla test çalıştırmasıyla ilişkilendirilen ad. |
testCount | int : test çalıştırmasıyla ilişkili beklenen test senaryolarının sayısı. |
testRunStopped
public void testRunStopped (long elapsedTime)
parametreler | |
---|---|
elapsedTime | long |
testBaşladı
public void testStarted (TestDescription test, long startTime)
parametreler | |
---|---|
test | TestDescription |
startTime | long |