ModuleResultsAndMetricsForwarder
public
class
ModuleResultsAndMetricsForwarder
extends ResultAndLogForwarder
| java.lang.Object | |||
| ↳ | com.android.tradefed.result.ResultForwarder | ||
| ↳ | com.android.tradefed.result.ResultAndLogForwarder | ||
| ↳ | com.android.tradefed.result.ModuleResultsAndMetricsForwarder | ||
הרחבה של ResultAndLogForwarder שמוסיפה מדדים נוספים שקשורים למודול לתוצאות הבדיקה.
סיכום
constructors ציבוריים | |
|---|---|
ModuleResultsAndMetricsForwarder(ITestInvocationListener... listeners)
|
|
methods ציבוריים | |
|---|---|
void
|
setAttemptIsolation(CurrentInvocation.IsolationGrade isolation)
מגדירים אם הניסיון צריך להיות מדווח כמבודד. |
void
|
setMarkTestsSkipped(boolean skip)
האם לסמן את כל תרחישי הבדיקה כתרחישים שדילגו עליהם. |
void
|
setModuleId(String moduleId)
|
void
|
setTestMappingSources(List<String> testMappingSources)
הגדרת מקורות למיפוי בדיקות שיוכנסו למדדים. |
void
|
testEnded(TestDescription test, HashMap<String, MetricMeasurement.Metric> testMetrics)
הדוח מציג את סיום ההרצה של תרחיש בדיקה ספציפי. |
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
|
testRunEnded(long elapsedTimeMillis, Map<String, String> runMetrics)
|
void
|
testRunFailed(FailureDescription failure)
הפעלת הבדיקה של הדוחות נכשלה בגלל כשל שמתואר ב- |
void
|
testRunFailed(String errorMessage)
הפעלת הבדיקה של הדוחות נכשלה בגלל שגיאה חמורה. |
void
|
testRunStarted(String runName, int testCount, int attemptNumber)
הפונקציה מדווחת על התחלה של הרצת בדיקה. |
void
|
testRunStarted(String runName, int testCount, int attemptNumber, long startTime)
הפונקציה מדווחת על התחלה של הרצת בדיקה. |
void
|
testStarted(TestDescription test, long startTime)
חלופה ל- |
void
|
testStarted(TestDescription test)
הפונקציה מדווחת על תחילת בדיקה של תרחיש בדיקה מסוים. |
constructors ציבוריים
ModuleResultsAndMetricsForwarder
public ModuleResultsAndMetricsForwarder (ITestInvocationListener... listeners)
| פרמטרים | |
|---|---|
listeners |
ITestInvocationListener |
methods ציבוריים
setAttemptIsolation
public void setAttemptIsolation (CurrentInvocation.IsolationGrade isolation)
מגדירים אם הניסיון צריך להיות מדווח כמבודד.
| פרמטרים | |
|---|---|
isolation |
CurrentInvocation.IsolationGrade |
setMarkTestsSkipped
public void setMarkTestsSkipped (boolean skip)
האם לסמן את כל תרחישי הבדיקה כתרחישים שדילגו עליהם.
| פרמטרים | |
|---|---|
skip |
boolean |
setModuleId
public void setModuleId (String moduleId)
| פרמטרים | |
|---|---|
moduleId |
String |
setTestMappingSources
public void setTestMappingSources (List<String> testMappingSources)
הגדרת מקורות למיפוי בדיקות שיוכנסו למדדים.
| פרמטרים | |
|---|---|
testMappingSources |
List |
testEnded
public void testEnded (TestDescription test, HashMap<String, MetricMeasurement.Metric> testMetrics)
הדוח מציג את סיום ההרצה של תרחיש בדיקה ספציפי.
אם לא בוצעה קריאה לפונקציה testFailed(TestDescription, FailureDescription), הבדיקה הזו עברה. הפונקציה מחזירה גם מדדים של מפתח/ערך שאולי הופקו במהלך ההפעלה של תרחיש הבדיקה.
| פרמטרים | |
|---|---|
test |
TestDescription: מזהה את הבדיקה |
testMetrics |
HashMap: Map של המדדים שנפלטים |
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. |
testRunEnded
public void testRunEnded (long elapsedTimeMillis,
Map<String, String> runMetrics)| פרמטרים | |
|---|---|
elapsedTimeMillis |
long |
runMetrics |
Map |
testRunFailed
public void testRunFailed (FailureDescription failure)
הפעלת הבדיקה של הדוחות נכשלה בגלל כשל שמתואר ב-FailureDescription.
| פרמטרים | |
|---|---|
failure |
FailureDescription: FailureDescription תיאור הכשל וההקשר שלו. |
testRunFailed
public void testRunFailed (String errorMessage)
הפעלת הבדיקה של הדוחות נכשלה בגלל שגיאה חמורה.
| פרמטרים | |
|---|---|
errorMessage |
String: String תיאור הסיבה לכישלון ההרצה. |
testRunStarted
public void testRunStarted (String runName,
int testCount,
int attemptNumber)הפונקציה מדווחת על התחלה של הרצת בדיקה.
| פרמטרים | |
|---|---|
runName |
String: השם של הרצת הבדיקה |
testCount |
int: המספר הכולל של הבדיקות בהרצת הבדיקה |
attemptNumber |
int: מספר ההזמנה, שמזהה את הניסיונות השונים של אותו runName
שמופעל מספר פעמים. הערך של attemptNumber מתחיל מ-0 וצריך לעלות בכל פעם
שמתבצעת הרצה חדשה. לדוגמה, אם מבצעים ניסיון חוזר של בדיקה 3 פעמים, צריכות להיות 4 הרצות בסך הכול
באותו runName, והערך של attemptNumber יהיה מ-0 עד 3. |
testRunStarted
public void testRunStarted (String runName,
int testCount,
int attemptNumber,
long startTime)הפונקציה מדווחת על התחלה של הרצת בדיקה.
| פרמטרים | |
|---|---|
runName |
String: השם של הרצת הבדיקה |
testCount |
int: המספר הכולל של הבדיקות בהרצת הבדיקה |
attemptNumber |
int: מספר ההזמנה, שמזהה את הניסיונות השונים של אותו runName
שמופעל מספר פעמים. הערך של attemptNumber מתחיל מ-0 וצריך לעלות בכל פעם שמבוצעת ריצה חדשה. לדוגמה, אם מבצעים 3 ניסיונות חוזרים של בדיקה, צריכות להיות 4 ריצות בסך הכול עם אותו runName, והערך של attemptNumber יהיה מ-0 עד 3. |
startTime |
long: השעה שבה ההפעלה התחילה, נמדדת באמצעות System.currentTimeMillis() |
testStarted
public void testStarted (TestDescription test, long startTime)
חלופה ל-testStarted(TestDescription) שבה מציינים גם את תאריך ההתחלה של הבדיקה, בשילוב עם testEnded(TestDescription,long,Map) למדידה מדויקת.
| פרמטרים | |
|---|---|
test |
TestDescription: מזהה את הבדיקה |
startTime |
long: השעה שבה הבדיקה התחילה, נמדדת באמצעות System.currentTimeMillis() |
testStarted
public void testStarted (TestDescription test)
הפונקציה מדווחת על תחילת בדיקה של תרחיש בדיקה מסוים. בממשק הישן, מומלץ להשתמש ב-testStarted(TestDescription) בכל הזדמנות.
| פרמטרים | |
|---|---|
test |
TestDescription: מזהה את הבדיקה |