GranularRetriableTestWrapper.StartEndCollector

public class GranularRetriableTestWrapper.StartEndCollector
extends ResultAndLogForwarder

java.lang.Object
   ↳ com.android.tradefed.result.ResultForwarder
     ↳ com.android.tradefed.result.ResultAndLogForwarder
       ↳ com.android.tradefed.testtype.suite.GranularRetriableTestWrapper.StartEndCollector


כלי עזר לשיעור שיעזור לכם לזהות מקרים שבהם חסרים נתוני התחלה וסיום של ריצה.

סיכום

שדות

public TestDescription mCurrentTest

public boolean mRunEndedReported

public boolean mRunStartReported

public boolean mTestInProgress

‫methods ציבוריים

void testEnded(TestDescription test, long endTime, Map<String, String> testMetrics)
void testEnded(TestDescription test, long endTime, HashMap<String, MetricMeasurement.Metric> testMetrics)

חלופה ל-testEnded(TestDescription,Map) שבה אפשר לציין את שעת הסיום ישירות.

void testEnded(TestDescription test, Map<String, String> testMetrics)
void testEnded(TestDescription test, HashMap<String, MetricMeasurement.Metric> testMetrics)

הדוח מציג את סיום ההרצה של תרחיש בדיקה ספציפי.

void testRunEnded(long elapsedTimeMillis, Map<String, String> runMetrics)
void testRunEnded(long elapsedTime, HashMap<String, MetricMeasurement.Metric> runMetrics)

דוחות על סיום הרצת הבדיקה.

void testRunStarted(String runName, int testCount)

הפונקציה מדווחת על התחלה של הרצת בדיקה.

void testRunStarted(String runName, int testCount, int attemptNumber, long startTime)

הפונקציה מדווחת על התחלה של הרצת בדיקה.

void testRunStarted(String runName, int testCount, int attemptNumber)

הפונקציה מדווחת על התחלה של הרצת בדיקה.

void testStarted(TestDescription test, long startTime)

חלופה ל-testStarted(TestDescription) שבה מציינים גם את תאריך ההתחלה של הבדיקה, בשילוב עם testEnded(TestDescription,long,Map) למדידה מדויקת.

void testStarted(TestDescription test)

הפונקציה מדווחת על תחילת בדיקה של תרחיש בדיקה מסוים.

שדות

mCurrentTest

public TestDescription mCurrentTest

mRunEndedReported

public boolean mRunEndedReported

mRunStartReported

public boolean mRunStartReported

mTestInProgress

public boolean mTestInProgress

‫methods ציבוריים

testEnded

public void testEnded (TestDescription test, 
                long endTime, 
                Map<String, String> testMetrics)

פרמטרים
test TestDescription

endTime long

testMetrics 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 של המדדים שנפלטים

testEnded

public void testEnded (TestDescription test, 
                Map<String, String> testMetrics)

פרמטרים
test TestDescription

testMetrics Map

testEnded

public void testEnded (TestDescription test, 
                HashMap<String, MetricMeasurement.Metric> testMetrics)

הדוח מציג את סיום ההרצה של תרחיש בדיקה ספציפי.

אם לא בוצעה קריאה לפונקציה testFailed(TestDescription, FailureDescription), הבדיקה הזו עברה. הפונקציה מחזירה גם מדדים של מפתח/ערך שאולי הופקו במהלך ההפעלה של תרחיש הבדיקה.

פרמטרים
test TestDescription: מזהה את הבדיקה

testMetrics HashMap: Map של המדדים שנפלטים

testRunEnded

public void testRunEnded (long elapsedTimeMillis, 
                Map<String, String> runMetrics)

פרמטרים
elapsedTimeMillis long

runMetrics Map

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.

testRunStarted

public void testRunStarted (String runName, 
                int testCount)

הפונקציה מדווחת על התחלה של הרצת בדיקה.

פרמטרים
runName String: השם של הרצת הבדיקה

testCount int: המספר הכולל של הבדיקות בהרצת הבדיקה

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()

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.

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: מזהה את הבדיקה