FilteredResultForwarder

public class FilteredResultForwarder
extends ResultForwarder

java.lang.Object
   ↳ com.android.tradefed.result.ResultForwarder
     ↳ com.android.tradefed.result.FilteredResultForwarder


וריאנט של ResultForwarder שמאפשר לדווח רק על רשימת היתרים של TestDescription.

סיכום

קונסטרוקטורים גלויים לכולם

FilteredResultForwarder( allowedTests, ITestInvocationListener... listeners)

שיטות ציבוריות

void testAssumptionFailure(TestDescription test, FailureDescription failure)

הקריאה מתבצעת כשבדיקה אטומית מסמנת שהיא מניחה תנאי שהוא שקר

void testAssumptionFailure(TestDescription test, String trace)

הקריאה מתבצעת כשבדיקה אטומית מסמנת שהיא מניחה תנאי שהוא שקר

void testEnded(TestDescription test, testMetrics)

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

void testEnded(TestDescription test, long endTime, testMetrics)

חלופה ל-ERROR(/#testEnded(com.android.tradefed.result.TestDescription,Map)), שבה אפשר לציין את שעת הסיום ישירות.

void testFailed(TestDescription test, FailureDescription failure)

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

void testFailed(TestDescription test, String trace)

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

void testIgnored(TestDescription test)

הקריאה מתבצעת כשבדיקה לא מופעלת, בדרך כלל כי השיטה לבדיקה מסומנת ב-org.junit.Ignore.

void testStarted(TestDescription test, long startTime)

חלופה ל-testStarted(com.android.tradefed.result.TestDescription) שבה מציינים גם את מועד ההתחלה של הבדיקה, בשילוב עם ERROR(/#testEnded(com.android.tradefed.result.TestDescription,long,Map)) למדידה מדויקת.

void testStarted(TestDescription test)

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

קונסטרוקטורים גלויים לכולם

FilteredResultForwarder

public FilteredResultForwarder ( allowedTests, 
                ITestInvocationListener... listeners)

פרמטרים
allowedTests

listeners ITestInvocationListener

שיטות ציבוריות

testAssumptionFailure

public void testAssumptionFailure (TestDescription test, 
                FailureDescription failure)

הקריאה מתבצעת כשבדיקה אטומית מסמנת שהיא מניחה תנאי שהוא שקר

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

failure FailureDescription: FailureDescription שמתאר את התקלה ואת ההקשר שלה.

testAssumptionFailure

public void testAssumptionFailure (TestDescription test, 
                String trace)

הקריאה מתבצעת כשבדיקה אטומית מסמנת שהיא מניחה תנאי שהוא שקר

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

trace String: סטאק טריי של הכשל

testEnded

public void testEnded (TestDescription test, 
                 testMetrics)

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

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

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

testMetrics : ERROR(/Map) של המדדים שמונפקים

testEnded

public void testEnded (TestDescription test, 
                long endTime, 
                 testMetrics)

חלופה ל-ERROR(/#testEnded(com.android.tradefed.result.TestDescription,Map)), שבה אפשר לציין את שעת הסיום ישירות. כדי לקבל מדידה מדויקת, כדאי לשלב את הקוד עם testStarted(com.android.tradefed.result.TestDescription, long).

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

endTime long: השעה שבה הסתיים הבדיקה, נמדדת באמצעות System.currentTimeMillis()

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: סטאק טריי של הכשל

testIgnored

public void testIgnored (TestDescription test)

הקריאה מתבצעת כשבדיקה לא מופעלת, בדרך כלל כי השיטה לבדיקה מסומנת ב-org.junit.Ignore.

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

testStarted

public void testStarted (TestDescription test, 
                long startTime)

חלופה ל-testStarted(com.android.tradefed.result.TestDescription) שבה מציינים גם את מועד ההתחלה של הבדיקה, בשילוב עם ERROR(/#testEnded(com.android.tradefed.result.TestDescription,long,Map)) למדידה מדויקת.

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

startTime long: השעה שבה הבדיקה התחילה, נמדדת באמצעות System.currentTimeMillis()

testStarted

public void testStarted (TestDescription test)

דיווח על התחלת מקרה בדיקה ספציפי. ממשק ישן יותר, עדיף להשתמש ב-testStarted(com.android.tradefed.result.TestDescription) כשהדבר אפשרי.

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