DeviceJUnit4ClassRunner.TestLogData
public static class DeviceJUnit4ClassRunner.TestLogData
extends ExternalResource
java.lang.Object |
↳ | org.junit.rules.ExternalResource |
| ↳ | com.android.tradefed.testtype.DeviceJUnit4ClassRunner.TestLogData |
ExternalResource
ve TestRule
uygulanması. Bu kural, bir test durumu sırasında günlüklerin günlüğe kaydedilmesine izin verir (@Test içinde). Günlük listesinin testler arasında temizlenmesini garanti eder, böylece aynı kural nesnesi yeniden kullanılabilir.
Example:
@Rule
public TestLogData logs = new TestLogData();
@Test
public void testFoo() {
logs.addTestLog("logcat", LogDataType.LOGCAT, new FileInputStreamSource(logcatFile));
}
@Test
public void testFoo2() {
logs.addTestLog("logcat2", LogDataType.LOGCAT, new FileInputStreamSource(logcatFile2));
}
Özet
kamu inşaatçılar
TestGünlüğüVerileri
public TestLogData ()
Genel yöntemler
public final void addTestLog (String dataName,
LogDataType dataType,
InputStreamSource dataStream)
parametreler |
---|
dataName | String |
dataType | LogDataType |
dataStream | InputStreamSource |
uygula
public Statement apply (Statement base,
Description description)
parametreler |
---|
base | Statement |
description | Description |