BugreportCollector

public class BugreportCollector
extends Object implements ITestInvocationListener

java.lang.Object
   ↳ com.android.tradefed.result.BugreportCollector


ITestInvocationListener של העברה (pass-through) שמאגדת דוחות באגים כשמתרחשים אירועים שניתן להגדיר, ולאחר מכן קוראת ל-ITestInvocationListener#testLog על הצאצאים שלה אחרי כל דוח באגים שנאסף.

התנהגויות: (FIXME: finish this)

  • תיעוד אחרי כל בדיקת תוכנה שנכשלה
  • תיעוד אחרי כל בדיקת תוכנה
  • תיעוד אחרי כל בדיקת תוכנה שנכשלה
  • צילום

סיכום

כיתות בתצוגת עץ

enum BugreportCollector.Filter

 

enum BugreportCollector.Freq

 

enum BugreportCollector.Noun

 

class BugreportCollector.Predicate

תנאי מלא שמתאר מתי צריך לצלם דוח על באג. 

enum BugreportCollector.Relation

 

interface BugreportCollector.SubPredicate

 

שדות

public static final BugreportCollector.Predicate AFTER_FAILED_TESTCASES

תנאי מוגדר מראש שמופעל אחרי כל בדיקת תוכנה שנכשלה

public static final BugreportCollector.Predicate AT_START

תנאי מוגדרת מראש שמופעל כשהקריאה הראשונה מתחילה

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

BugreportCollector(ITestInvocationListener listener, ITestDevice testDevice)

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

void addPredicate(BugreportCollector.Predicate p)
void blockUntilIdle()

חוסמים עד שהאוסף לא אוסף דוחות באגים.

TestSummary getSummary()

void invocationEnded(long elapsedTime)

void invocationFailed(Throwable cause)

void invocationStarted(IInvocationContext context)

void setAsynchronous(boolean asynchronous)

מגדירים אם האיסוף של דוח הבאג יאסוף את דוח הבאג בשרשור אחר (asynchronous = true), או אם הוא יחסום את מבצע הקריאה החוזרת עד שדוח הבאג יתועד (asynchronous = false).

void setDescriptiveName(String name)

הגדרת השם התיאורי לשימוש בזמן תיעוד דוחות באגים.

void setDeviceWaitTime(int waitTime)

הגדרת משך הזמן (בשניות) להמתנה עד שהמכשיר יהיה אונליין לפני שננסה לצלם דוח באג.

void testAssumptionFailure(TestDescription test, String trace)

void testEnded(TestDescription test, testMetrics)
void testFailed(TestDescription test, String trace)

void testIgnored(TestDescription test)
void testLog(String dataName, LogDataType dataType, InputStreamSource dataStream)

void testRunEnded(long elapsedTime, runMetrics)

void testRunFailed(String errorMessage)

void testRunStarted(String runName, int testCount)

void testRunStopped(long elapsedTime)

void testStarted(TestDescription test)

שדות

AFTER_FAILED_TESTCASES

public static final BugreportCollector.Predicate AFTER_FAILED_TESTCASES

תנאי מוגדר מראש שמופעל אחרי כל בדיקת תוכנה שנכשלה

AT_START

public static final BugreportCollector.Predicate AT_START

תנאי מוגדרת מראש שמופעל כשהקריאה הראשונה מתחילה

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

BugreportCollector

public BugreportCollector (ITestInvocationListener listener, 
                ITestDevice testDevice)

פרמטרים
listener ITestInvocationListener

testDevice ITestDevice

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

addPredicate

public void addPredicate (BugreportCollector.Predicate p)

פרמטרים
p BugreportCollector.Predicate

blockUntilIdle

public void blockUntilIdle ()

חוסמים עד שהאוסף לא אוסף דוחות באגים. אם האוסף לא אוסף באופן פעיל דוח על באג, צריך לחזור מיד

getSummary

public TestSummary getSummary ()

החזרות
TestSummary

invocationEnded

public void invocationEnded (long elapsedTime)

פרמטרים
elapsedTime long

invocationFailed

public void invocationFailed (Throwable cause)

פרמטרים
cause Throwable

invocationStarted

public void invocationStarted (IInvocationContext context)

פרמטרים
context IInvocationContext

setAsynchronous

public void setAsynchronous (boolean asynchronous)

מגדירים אם האיסוף של דוח הבאג יאסוף את דוח הבאג בשרשור אחר (asynchronous = true), או אם הוא יחסום את מבצע הקריאה החוזרת עד שדוח הבאג יתועד (asynchronous = false).

פרמטרים
asynchronous boolean

setDescriptiveName

public void setDescriptiveName (String name)

הגדרת השם התיאורי לשימוש בזמן תיעוד דוחות באגים. אם null, הערך של BugreportCollector יחזור לברירת המחדל של סריאליזציה של שם האירוע שגרם לאיסוף דוח הבאג.

פרמטרים
name String

setDeviceWaitTime

public void setDeviceWaitTime (int waitTime)

הגדרת משך הזמן (בשניות) להמתנה עד שהמכשיר יהיה אונליין לפני שננסה לצלם דוח באג. אם הערך של המשתנה הוא שלילי, לא תתבצע בדיקה. כל DeviceNotAvailableException שנמצא במהלך הבדיקה הזו יירשם ביומן ויתעלם.

פרמטרים
waitTime int

testAssumptionFailure

public void testAssumptionFailure (TestDescription test, 
                String trace)

פרמטרים
test TestDescription

trace String

testEnded

public void testEnded (TestDescription test, 
                 testMetrics)

פרמטרים
test TestDescription

testMetrics

testFailed

public void testFailed (TestDescription test, 
                String trace)

פרמטרים
test TestDescription

trace String

testIgnored

public void testIgnored (TestDescription test)

פרמטרים
test TestDescription

testLog

public void testLog (String dataName, 
                LogDataType dataType, 
                InputStreamSource dataStream)

פרמטרים
dataName String

dataType LogDataType

dataStream InputStreamSource

testRunEnded

public void testRunEnded (long elapsedTime, 
                 runMetrics)

פרמטרים
elapsedTime long

runMetrics

testRunFailed

public void testRunFailed (String errorMessage)

פרמטרים
errorMessage String

testRunStarted

public void testRunStarted (String runName, 
                int testCount)

פרמטרים
runName String

testCount int

testRunStopped

public void testRunStopped (long elapsedTime)

פרמטרים
elapsedTime long

testStarted

public void testStarted (TestDescription test)

פרמטרים
test TestDescription