GranularRetriableTestWrapper
public class GranularRetriableTestWrapper
extends Object
implements IRemoteTest, ITestCollector
java.lang.Object | |
↳ | com.android.tradefed.testtype.suite.GranularRetriableTestWrapper |
פועלים על עטיפה בכיתה על IRemoteTest
כדי מגרסת IRemoteTest ברמת testcase. בדיקת IRemoteTest יכולה להכיל מספר מבחנים. בעבר מטפלים אלה נלקחו כמכלול: כאשר IRemoteTest פועל, כל המבחנים יפעלו. כמה IRemoteTest (אלה שמיישמים ITestFilterReceiver) יכולים לקבל רשימת מותרות של מבחנים ולהריץ רק את מבחני הבדיקה האלה. מחלקה זו מנצלת את התכונה הקיימת ומספקת דרך גמישה יותר להפעלת חבילת בדיקות.
- ניתן לנסות שוב פעם אחת את המבחן היחיד (בתוך אותה ריצת IRemoteTest) כדי להפחית את שיעורי הכישלונות שאינם מבחני שגיאה.
- המבחנים שנסונו שוב נאספים באופן דינמי מכשלים ריצה קודמים.
הערה:
- התנאי להפעלת קבוצת משנה של מקרי מבחן הוא כי סוג המבחן צריך ליישם את הממשק
ITestFilterReceiver
. - X הוא מספר ניסיון מקסימלי מותאם אישית.
סיכום
בוני ציבור | |
---|---|
GranularRetriableTestWrapper (IRemoteTest test, ITestInvocationListener mainListener, TestFailureListener failureListener, moduleLevelListeners, int maxRunLimit) GranularRetriableTestWrapper (IRemoteTest test, ITestInvocationListener mainListener, TestFailureListener failureListener, moduleLevelListeners, int maxRunLimit) | |
GranularRetriableTestWrapper (IRemoteTest test, ModuleDefinition module, ITestInvocationListener mainListener, TestFailureListener failureListener, moduleLevelListeners, int maxRunLimit) GranularRetriableTestWrapper (IRemoteTest test, ModuleDefinition module, ITestInvocationListener mainListener, TestFailureListener failureListener, moduleLevelListeners, int maxRunLimit) |
שיטות ציבוריות | |
---|---|
final int | getExpectedTestsCount () חשב את מספר testcases ב |
final | getFinalTestRunResults () קבל את TestRunResults הממוזגת מכל |
ModuleListener | getResultListener () מחזירה את המאזין המכיל את כל התוצאות. |
void | run (TestInformation testInfo, ITestInvocationListener listener) תזמן סדרה |
void | setCollectTestsOnly (boolean shouldCollectTest) מאפשר או משבית מצב איסוף בדיקות |
void | setInvocationContext (IInvocationContext moduleInvocationContext) הגדר את |
void | setLogSaver (ILogSaver logSaver) הגדר את מודול |
void | setMarkTestsSkipped (boolean skipTestCases) הגדר את |
void | setMetricCollectors ( runMetricCollectors) setMetricCollectors ( runMetricCollectors) הגדר את |
void | setModuleConfig ( IConfiguration moduleConfiguration) הגדר את |
void | setModuleId (String moduleId) הגדר את |
void | setRetryDecision ( IRetryDecision decision) מגדיר את |
בוני ציבור
GranularRetriableTestWrapper
public GranularRetriableTestWrapper (IRemoteTest test, ITestInvocationListener mainListener, TestFailureListener failureListener,moduleLevelListeners, int maxRunLimit)
פרמטרים | |
---|---|
test | IRemoteTest |
mainListener | ITestInvocationListener |
failureListener | TestFailureListener |
moduleLevelListeners | |
maxRunLimit | int |
GranularRetriableTestWrapper
public GranularRetriableTestWrapper (IRemoteTest test, ModuleDefinition module, ITestInvocationListener mainListener, TestFailureListener failureListener,moduleLevelListeners, int maxRunLimit)
פרמטרים | |
---|---|
test | IRemoteTest |
module | ModuleDefinition |
mainListener | ITestInvocationListener |
failureListener | TestFailureListener |
moduleLevelListeners | |
maxRunLimit | int |
שיטות ציבוריות
getExpectedTestsCount
public final int getExpectedTestsCount ()
חשב את מספר testcases ב IRemoteTest
. ערך זה מבדיל את אותם תיקי בדיקה המתוזמנים מחדש מספר פעמים.
החזרות | |
---|---|
int |
getFinalTestRunResults
public finalgetFinalTestRunResults ()
קבל את TestRunResults הממוזגת מכל IRemoteTest
ריצה.
החזרות | |
---|---|
getResultListener
public ModuleListener getResultListener ()
מחזירה את המאזין המכיל את כל התוצאות.
החזרות | |
---|---|
ModuleListener |
לָרוּץ
public void run (TestInformation testInfo, ITestInvocationListener listener)
תזמן סדרה IRemoteTest#run(TestInformation, ITestInvocationListener)
.
פרמטרים | |
---|---|
testInfo | TestInformation |
listener | ITestInvocationListener : המאזין ResultForwarder המכיל moduleListener חדש עבור כל ריצה. |
זורק | |
---|---|
DeviceNotAvailableException |
setCollectTestsOnly
public void setCollectTestsOnly (boolean shouldCollectTest)
מאפשר או משבית מצב איסוף בדיקות
setInvocationContext
public void setInvocationContext (IInvocationContext moduleInvocationContext)
הגדר את IInvocationContext
בתור GranularRetriableTestWrapper
תכונה.
פרמטרים | |
---|---|
moduleInvocationContext | IInvocationContext : לעטיפה משתמשת InvocationContext כדי לאתחל את MetricCollector בעת הצורך. |
setLogSaver
public void setLogSaver (ILogSaver logSaver)
הגדר את מודול ILogSaver
בתור GranularRetriableTestWrapper
תכונה.
פרמטרים | |
---|---|
logSaver | ILogSaver : המאזינים עבור כל מחזור הבדיקה צריכה לשמור את היומנים. |
setMarkTestsSkipped
public void setMarkTestsSkipped (boolean skipTestCases)
הגדר את ModuleDefinition
RunStrategy בתור GranularRetriableTestWrapper
תכונה.
פרמטרים | |
---|---|
skipTestCases | boolean : אם testcases צריך לדלג עליו. |
setMetricCollectors
public void setMetricCollectors (runMetricCollectors)
הגדר את ModuleDefinition
runMetricCollector של כ GranularRetriableTestWrapper
תכונה.
פרמטרים | |
---|---|
runMetricCollectors |
setModuleConfig
public void setModuleConfig (IConfiguration moduleConfiguration)
הגדר את ModuleDefinition
של ModuleConfig בתור GranularRetriableTestWrapper
תכונה.
פרמטרים | |
---|---|
moduleConfiguration | IConfiguration : ספקו את מדדי מודול. |
setModuleId
public void setModuleId (String moduleId)
הגדר את ModuleDefinition
שם בתור GranularRetriableTestWrapper
תכונה.
פרמטרים | |
---|---|
moduleId | String : שמו של moduleDefinition. |
setRetryDecision
public void setRetryDecision (IRetryDecision decision)
מגדיר את IRetryDecision
לשמש.
פרמטרים | |
---|---|
decision | IRetryDecision |