PrettyTestEventLogger
public
class
PrettyTestEventLogger
extends Object
implements
ITestInvocationListener
| java.lang.Object | |
| ↳ | com.android.tradefed.testtype.host.PrettyTestEventLogger |
הכלי Logger מתאים לאירועים ומתעד אותם כדי להקל על ניפוי הבאגים. היומן בצד המארח ובצד המכשיר יהיה זהה לחלוטין כדי שיהיה קל לחפש אותו.
סיכום
constructors ציבוריים | |
|---|---|
PrettyTestEventLogger(List<ITestDevice> devices, boolean methodLevelLogging)
|
|
methods ציבוריים | |
|---|---|
void
|
testEnded(TestDescription test, HashMap<String, MetricMeasurement.Metric> testMetrics)
הדוח מציג את סיום ההרצה של תרחיש בדיקה ספציפי. |
void
|
testFailed(TestDescription test, FailureDescription failure)
הודעה על כשל במקרה בדיקה ספציפי. |
void
|
testFailed(TestDescription test, String trace)
הודעה על כשל במקרה בדיקה ספציפי. |
void
|
testRunEnded(long elapsedTimeMillis, HashMap<String, MetricMeasurement.Metric> runMetrics)
דוחות על סיום הרצת הבדיקה. |
void
|
testRunStarted(String runName, int testCount)
הפונקציה מדווחת על התחלה של הרצת בדיקה. |
void
|
testStarted(TestDescription test)
הפונקציה מדווחת על תחילת בדיקה של תרחיש בדיקה מסוים. |
constructors ציבוריים
PrettyTestEventLogger
public PrettyTestEventLogger (List<ITestDevice> devices, boolean methodLevelLogging)
| פרמטרים | |
|---|---|
devices |
List |
methodLevelLogging |
boolean |
methods ציבוריים
testEnded
public void testEnded (TestDescription test, HashMap<String, MetricMeasurement.Metric> testMetrics)
הדוח מציג את סיום ההרצה של תרחיש בדיקה ספציפי.
אם לא בוצעה קריאה לפונקציה testFailed(TestDescription, FailureDescription), הבדיקה הזו עברה. הפונקציה מחזירה גם מדדים של מפתח/ערך שאולי הופקו במהלך ההפעלה של תרחיש הבדיקה.
| פרמטרים | |
|---|---|
test |
TestDescription: מזהה את הבדיקה |
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 elapsedTimeMillis,
HashMap<String, MetricMeasurement.Metric> runMetrics)דוחות על סיום הרצת הבדיקה. FIXME: We cannot have two Map<> interfaces with different type, so we have to use HashMap here.
| פרמטרים | |
|---|---|
elapsedTimeMillis |
long: הזמן שחלף שדווח על ידי המכשיר, באלפיות השנייה |
runMetrics |
HashMap: צמדי מפתח/ערך שמדווחים בסוף הרצת בדיקה עם Metric. |
testRunStarted
public void testRunStarted (String runName,
int testCount)הפונקציה מדווחת על התחלה של הרצת בדיקה.
| פרמטרים | |
|---|---|
runName |
String: השם של הרצת הבדיקה |
testCount |
int: המספר הכולל של הבדיקות בהרצת הבדיקה |
testStarted
public void testStarted (TestDescription test)
הפונקציה מדווחת על תחילת בדיקה של תרחיש בדיקה מסוים. בממשק הישן, מומלץ להשתמש ב-testStarted(TestDescription) בכל הזדמנות.
| פרמטרים | |
|---|---|
test |
TestDescription: מזהה את הבדיקה |