LogcatCrashResultForwarder
public
class
LogcatCrashResultForwarder
extends ResultForwarder
| java.lang.Object | ||
| ↳ | com.android.tradefed.result.ResultForwarder | |
| ↳ | com.android.tradefed.result.LogcatCrashResultForwarder | |
מאזין מיוחד: במקרה של כשלים (קריסה של תהליך המדידה), הוא ינסה לחלץ את הקריסה מ-logcat ולהוסיף אותה להודעת הכשל שמשויכת לבדיקה.
סיכום
ערכים קבועים | |
|---|---|
String |
ERROR_MESSAGE
הודעת שגיאה מיוחדת מהמדידה כשמשהו משתבש בצד המכשיר. |
String |
INCOMPLETE_MESSAGE
|
int |
MAX_NUMBER_CRASH
|
String |
SYSTEM_CRASH_MESSAGE
|
שדות | |
|---|---|
public
static
final
List<String> |
TIMEOUT_MESSAGES
|
constructors ציבוריים | |
|---|---|
LogcatCrashResultForwarder(ITestDevice device, ITestInvocationListener... listeners)
|
|
methods ציבוריים | |
|---|---|
ITestDevice
|
getDevice()
|
void
|
setPackageName(String packageName)
|
void
|
testEnded(TestDescription test, long endTime, HashMap<String, MetricMeasurement.Metric> testMetrics)
חלופה ל- |
void
|
testFailed(TestDescription test, FailureDescription failure)
הודעה על כשל במקרה בדיקה ספציפי. |
void
|
testFailed(TestDescription test, String trace)
הודעה על כשל במקרה בדיקה ספציפי. |
void
|
testRunEnded(long elapsedTime, HashMap<String, MetricMeasurement.Metric> runMetrics)
דוחות על סיום הרצת הבדיקה. |
void
|
testRunFailed(FailureDescription error)
הפעלת הבדיקה של הדוחות נכשלה בגלל כשל שמתואר ב- |
void
|
testRunFailed(String errorMessage)
הפעלת הבדיקה של הדוחות נכשלה בגלל שגיאה חמורה. |
void
|
testStarted(TestDescription test, long startTime)
חלופה ל- |
ערכים קבועים
ERROR_MESSAGE
public static final String ERROR_MESSAGE
הודעת שגיאה מיוחדת מהמדידה כשמשהו משתבש בצד המכשיר.
ערך קבוע: "התהליך קרס".
INCOMPLETE_MESSAGE
public static final String INCOMPLETE_MESSAGE
ערך קבוע: "Test run failed to complete"
MAX_NUMBER_CRASH
public static final int MAX_NUMBER_CRASH
ערך קבוע: 3 (0x00000003)
SYSTEM_CRASH_MESSAGE
public static final String SYSTEM_CRASH_MESSAGE
ערך קבוע: "המערכת קרסה".
שדות
TIMEOUT_MESSAGES
public static final List<String> TIMEOUT_MESSAGES
constructors ציבוריים
LogcatCrashResultForwarder
public LogcatCrashResultForwarder (ITestDevice device, ITestInvocationListener... listeners)
| פרמטרים | |
|---|---|
device |
ITestDevice |
listeners |
ITestInvocationListener |
methods ציבוריים
setPackageName
public void setPackageName (String packageName)
| פרמטרים | |
|---|---|
packageName |
String |
testEnded
public void testEnded (TestDescription test, long endTime, HashMap<String, MetricMeasurement.Metric> testMetrics)
חלופה ל-testEnded(TestDescription,Map) שבה אפשר לציין את שעת הסיום ישירות. אפשר לשלב עם testStarted(TestDescription,long) כדי לקבל מדידה מדויקת.
| פרמטרים | |
|---|---|
test |
TestDescription: מזהה את הבדיקה |
endTime |
long: השעה שבה הבדיקה הסתיימה, נמדדת באמצעות System.currentTimeMillis() |
testMetrics |
HashMap: Map של המדדים שנפלטים |
testFailed
public void testFailed (TestDescription test, FailureDescription failure)
הודעה על כשל במקרה בדיקה ספציפי.
הפונקציה הזו תופעל בין testStarted לבין testEnded.
| פרמטרים | |
|---|---|
test |
TestDescription: מזהה את הבדיקה |
failure |
FailureDescription: FailureDescription תיאור הכשל וההקשר שלו. |
testFailed
public void testFailed (TestDescription test, String trace)
הודעה על כשל במקרה בדיקה ספציפי.
הפונקציה הזו תופעל בין testStarted לבין testEnded.
| פרמטרים | |
|---|---|
test |
TestDescription: מזהה את הבדיקה |
trace |
String: דוח קריסות של הכשל |
testRunEnded
public void testRunEnded (long elapsedTime,
HashMap<String, MetricMeasurement.Metric> runMetrics)דוחות על סיום הרצת הבדיקה. FIXME: We cannot have two Map<> interfaces with different type, so we have to use HashMap here.
| פרמטרים | |
|---|---|
elapsedTime |
long: הזמן שחלף שדווח על ידי המכשיר, באלפיות השנייה |
runMetrics |
HashMap: צמדי מפתח/ערך שמדווחים בסוף הרצת בדיקה עם Metric. |
testRunFailed
public void testRunFailed (FailureDescription error)
הפעלת הבדיקה של הדוחות נכשלה בגלל כשל שמתואר ב-FailureDescription.
| פרמטרים | |
|---|---|
error |
FailureDescription: FailureDescription תיאור הכשל וההקשר שלו. |
testRunFailed
public void testRunFailed (String errorMessage)
הפעלת הבדיקה של הדוחות נכשלה בגלל שגיאה חמורה.
| פרמטרים | |
|---|---|
errorMessage |
String: String תיאור הסיבה לכישלון ההרצה. |
testStarted
public void testStarted (TestDescription test, long startTime)
חלופה ל-testStarted(TestDescription) שבה מציינים גם את תאריך ההתחלה של הבדיקה, בשילוב עם testEnded(TestDescription,long,Map) למדידה מדויקת.
| פרמטרים | |
|---|---|
test |
TestDescription: מזהה את הבדיקה |
startTime |
long: השעה שבה הבדיקה התחילה, נמדדת באמצעות System.currentTimeMillis() |