TestTimeoutEnforcer

public final class TestTimeoutEnforcer
extends ResultForwarder

java.lang.Object
com.android.tradefed.result.ResultForwarder
com.android.tradefed.testtype.TestTimeoutEnforcer


Belirli bir test senaryosunun yürütme süresini kontrol etmeye ve belirli bir zaman aşımını aşarsa başarısız olmaya izin veren dinleyiciler.

Bu uygulayıcının testleri kesintiye uğratmadığını ancak başarısız olmalarına neden olacağını unutmayın.

Özet

Alanlar

public static final String TEST_CASE_TIMEOUT_DESCRIPTION

public static final String TEST_CASE_TIMEOUT_OPTION

Kamu inşaatçıları

TestTimeoutEnforcer (long perTestCaseTimeout, TimeUnit unit, ITestInvocationListener... listeners)

Zorunlu kılmak için verilen zaman aşımı ile TestTimeoutEnforcer oluşturun.

TestTimeoutEnforcer (long perTestCaseTimeout, TimeUnit unit, listeners) TestTimeoutEnforcer (long perTestCaseTimeout, TimeUnit unit, listeners)

Zorunlu kılmak için verilen zaman aşımı ile TestTimeoutEnforcer oluşturun.

Genel yöntemler

void testAssumptionFailure ( TestDescription test, FailureDescription failure)

Bir atom testi, yanlış olan bir koşulu varsaydığını işaretlediğinde çağrılır

void testAssumptionFailure ( TestDescription test, String trace)

Bir atom testi, yanlış olan bir koşulu varsaydığını işaretlediğinde çağrılır

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

Bitiş zamanını doğrudan belirtebileceğimiz ERROR(/#testEnded(com.android.tradefed.result.TestDescription,Map)) alternatifi.

void testFailed ( TestDescription test, FailureDescription failure)

Bireysel test senaryosunun başarısızlığını bildirir.

void testFailed ( TestDescription test, String trace)

Bireysel test senaryosunun başarısızlığını bildirir.

void testIgnored ( TestDescription test)

Genellikle bir test yönteminin org.junit.Ignore ile açıklanması nedeniyle bir test çalıştırılmayacağı zaman çağrılır.

void testStarted ( TestDescription test, long startTime)

Testin ne zaman başladığını da belirttiğimiz testStarted(com.android.tradefed.result.TestDescription) alternatifi, doğru ölçüm için ERROR(/#testEnded(com.android.tradefed.result.TestDescription,long,Map)) ile birleştirilir. .

Alanlar

TEST_CASE_TIMEOUT_DESCRIPTION

public static final String TEST_CASE_TIMEOUT_DESCRIPTION

TEST_CASE_TIMEOUT_OPTION

public static final String TEST_CASE_TIMEOUT_OPTION

Kamu inşaatçıları

TestTimeoutEnforcer

public TestTimeoutEnforcer (long perTestCaseTimeout, 
                TimeUnit unit, 
                ITestInvocationListener... listeners)

Zorunlu kılmak için verilen zaman aşımı ile TestTimeoutEnforcer oluşturun.

Parametreler
perTestCaseTimeout long : Zaman aşımının değeri.

unit TimeUnit : perTestCaseTimeout'un ERROR(/TimeUnit) .

listeners ITestInvocationListener : İletilecek ITestInvocationListener .

TestTimeoutEnforcer

public TestTimeoutEnforcer (long perTestCaseTimeout, 
                TimeUnit unit, 
                 listeners)

Zorunlu kılmak için verilen zaman aşımı ile TestTimeoutEnforcer oluşturun.

Parametreler
perTestCaseTimeout long : Zaman aşımının değeri.

unit TimeUnit : perTestCaseTimeout'un ERROR(/TimeUnit) .

listeners : İletilecek ITestInvocationListener .

Genel yöntemler

testVarsayımBaşarısızlık

public void testAssumptionFailure (TestDescription test, 
                FailureDescription failure)

Bir atom testi, yanlış olan bir koşulu varsaydığını işaretlediğinde çağrılır

Parametreler
test TestDescription : testi tanımlar

failure FailureDescription : Arızayı ve içeriğini açıklayan FailureDescription .

testVarsayımBaşarısızlık

public void testAssumptionFailure (TestDescription test, 
                String trace)

Bir atom testi, yanlış olan bir koşulu varsaydığını işaretlediğinde çağrılır

Parametreler
test TestDescription : testi tanımlar

trace String : hatanın yığın izlemesi

testSonlandı

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

Bitiş zamanını doğrudan belirtebileceğimiz ERROR(/#testEnded(com.android.tradefed.result.TestDescription,Map)) alternatifi. Doğru ölçüm için testStarted(com.android.tradefed.result.TestDescription, long) ile birleştirin.

Parametreler
test TestDescription : testi tanımlar

endTime long : System.currentTimeMillis() aracılığıyla ölçülen, testin sona erdiği süre

testMetrics : yayılan metriklerin ERROR(/Map)

test başarısız

public void testFailed (TestDescription test, 
                FailureDescription failure)

Bireysel test senaryosunun başarısızlığını bildirir.

testStarted ve testEnded arasında çağrılacaktır.

Parametreler
test TestDescription : testi tanımlar

failure FailureDescription : Arızayı ve içeriğini açıklayan FailureDescription .

test başarısız

public void testFailed (TestDescription test, 
                String trace)

Bireysel test senaryosunun başarısızlığını bildirir.

testStarted ve testEnded arasında çağrılacaktır.

Parametreler
test TestDescription : testi tanımlar

trace String : hatanın yığın izlemesi

testYoksayıldı

public void testIgnored (TestDescription test)

Genellikle bir test yönteminin org.junit.Ignore ile açıklanması nedeniyle bir test çalıştırılmayacağı zaman çağrılır.

Parametreler
test TestDescription : testi tanımlar

testBaşladı

public void testStarted (TestDescription test, 
                long startTime)

Testin ne zaman başladığını da belirttiğimiz testStarted(com.android.tradefed.result.TestDescription) alternatifi, doğru ölçüm için ERROR(/#testEnded(com.android.tradefed.result.TestDescription,long,Map)) ile birleştirilir. .

Parametreler
test TestDescription : testi tanımlar

startTime long : System.currentTimeMillis() aracılığıyla ölçülen testin başladığı zaman