PrettyTestEventLogger
public
class
PrettyTestEventLogger
extends Object
implements
ITestInvocationListener
| java.lang.Object | |
| ↳ | com.android.tradefed.testtype.host.PrettyTestEventLogger |
הכלי Logger מתאים לאירועים ומתעד אותם כדי להקל על ניפוי הבאגים. היומן בצד המארח ובצד המכשיר יהיה זהה לחלוטין כדי שיהיה קל לחפש אותו.
סיכום
constructors ציבוריים | |
|---|---|
PrettyTestEventLogger(
|
|
methods ציבוריים | |
|---|---|
void
|
testEnded(TestDescription test,
הדוח מציג את סיום ההרצה של תרחיש בדיקה ספציפי. |
void
|
testFailed(TestDescription test, FailureDescription failure)
הודעה על כשל במקרה בדיקה ספציפי. |
void
|
testFailed(TestDescription test, String trace)
הודעה על כשל במקרה בדיקה ספציפי. |
void
|
testRunEnded(long elapsedTimeMillis,
דוחות על סיום הרצת הבדיקה. |
void
|
testRunStarted(String runName, int testCount)
הפונקציה מחזירה את תחילת ההרצה של הבדיקה. |
void
|
testStarted(TestDescription test)
האירוע הזה מדווח על תחילת הרצה של תרחיש בדיקה מסוים. |
Constructors ציבוריים
PrettyTestEventLogger
public PrettyTestEventLogger (devices, boolean methodLevelLogging)
| פרמטרים | |
|---|---|
devices |
|
methodLevelLogging |
boolean |
methods ציבוריים
testEnded
public void testEnded (TestDescription test,testMetrics)
הדוח מציג את סיום ההרצה של תרחיש בדיקה ספציפי.
אם לא בוצעה קריאה לפונקציה testFailed(TestDescription, FailureDescription), הבדיקה הזו עברה. הפונקציה מחזירה גם מדדים של מפתח/ערך שאולי הופקו במהלך ההרצה של תרחיש הבדיקה.
| פרמטרים | |
|---|---|
test |
TestDescription: מזהה את הבדיקה |
testMetrics |
: ERROR(/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,
runMetrics) דוחות על סיום הרצת הבדיקה.
| פרמטרים | |
|---|---|
elapsedTimeMillis |
long: הזמן שחלף שדווח על ידי המכשיר, באלפיות השנייה |
runMetrics |
: צמדי מפתח/ערך שמדווחים בסוף הרצת בדיקה |
testRunStarted
public void testRunStarted (String runName,
int testCount)הפונקציה מחזירה את תחילת ההרצה של הבדיקה.
| פרמטרים | |
|---|---|
runName |
String: השם של הרצת הבדיקה |
testCount |
int: המספר הכולל של הבדיקות בהרצת הבדיקה |
testStarted
public void testStarted (TestDescription test)
האירוע הזה מדווח על תחילת הרצה של תרחיש בדיקה מסוים. בממשק הישן, מומלץ להשתמש ב-testStarted(com.android.tradefed.result.TestDescription) בכל הזדמנות.
| פרמטרים | |
|---|---|
test |
TestDescription: מזהה את הבדיקה |