IIinvocationExecution

public interface IInvocationExecution

com.android.tradefed.invoker.IInvocationExecution


ממשק המתאר את הפעולות שייעשו כחלק מהזמנה. ההזמנה TestInvocation עצמה מבטיחה את סדר השיחות.

סיכום

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

default void cleanUpBuilds ( IInvocationContext context, IConfiguration config)

בצע את שלב הניקוי build_provider.

default void doCleanUp ( IInvocationContext context, IConfiguration config, Throwable exception)

בצע את שלב הניקוי של target_preparer ו- multi_target_preparer.

default void doSetup ( TestInformation testInfo, IConfiguration config, ITestLogger logger)

בצע את שלב ההגדרה של target_preparer ו-multi_target_preparer.

default void doTeardown ( TestInformation testInfo, IConfiguration config, ITestLogger logger, Throwable exception)

בצע את שלב ההסרה של target_preparer ו- multi_target_preparer.

default boolean fetchBuild ( TestInformation testInfo, IConfiguration config, IRescheduler rescheduler, ITestInvocationListener listener)

בצע את שלב build_provider של ההזמנה.

abstract void reportLogs ( ITestDevice device, ITestLogger logger, TestInvocation.Stage stage)

דווח על כמה יומני מכשירים בשלבים שונים של הפנייה.

default void runDevicePostInvocationTearDown ( IInvocationContext context, IConfiguration config, Throwable exception)

הפעל את ITestDevice#postInvocationTearDown(Throwable) עבור כל חלק מהמכשיר של הפנייה.

default void runDevicePreInvocationSetup ( IInvocationContext context, IConfiguration config, ITestLogger logger)

הפעל את ERROR(ITestDevice#preInvocationSetup(IBuildInfo)/com.android.tradefed.device.ITestDevice#preInvocationSetup(com.android.tradefed.build.IBuildInfo) ITestDevice#preInvocationSetup(IBuildInfo)) בכל חלק של התקן.

default void runTests ( TestInformation info, IConfiguration config, ITestInvocationListener listener)

מפעיל את הבדיקה.

default boolean shardConfig ( IConfiguration config, TestInformation testInfo, IRescheduler rescheduler, ITestLogger logger)

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

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

cleanUpBuilds

public void cleanUpBuilds (IInvocationContext context, 
                IConfiguration config)

בצע את שלב הניקוי build_provider. משויך להבאת ה-build.

פרמטרים
context IInvocationContext : IInvocationContext של הקריאה.

config IConfiguration : IConfiguration של הפעלת בדיקה זו.

doCleanUp

public void doCleanUp (IInvocationContext context, 
                IConfiguration config, 
                Throwable exception)

בצע את שלב הניקוי של target_preparer ו- multi_target_preparer. האם המכשירים מנקים.

פרמטרים
context IInvocationContext : IInvocationContext של הקריאה.

config IConfiguration : IConfiguration של הפעלת בדיקה זו.

exception Throwable : החריג המקורי שנגרם על ידי ריצת הבדיקה.

doSetup

public void doSetup (TestInformation testInfo, 
                IConfiguration config, 
                ITestLogger logger)

בצע את שלב ההגדרה של target_preparer ו-multi_target_preparer. האם כל הגדרות ההתקנים הנדרשות להפעלת הבדיקה.

פרמטרים
testInfo TestInformation : ה- TestInformation של ההזמנה.

config IConfiguration : IConfiguration של הפעלת בדיקה זו.

logger ITestLogger : ה- ITestLogger לדיווח על יומני כשלים בהתקנה.

זורק
com.android.tradefed.targetprep.TargetSetupError
com.android.tradefed.targetprep.BuildError
com.android.tradefed.device.DeviceNotAvailableException
BuildError
DeviceNotAvailableException
TargetSetupError

doTeardown

public void doTeardown (TestInformation testInfo, 
                IConfiguration config, 
                ITestLogger logger, 
                Throwable exception)

בצע את שלב ההסרה של target_preparer ו- multi_target_preparer. האם המכשירים מתקלקלים הקשורים להגדרה.

פרמטרים
testInfo TestInformation : ה- TestInformation של ההזמנה.

config IConfiguration : IConfiguration של הפעלת בדיקה זו.

logger ITestLogger : ה- ITestLogger לדיווח על יומנים.

exception Throwable : החריג המקורי שנגרם על ידי ריצת הבדיקה.

זורק
ניתן לזרוק

fetchBuild

public boolean fetchBuild (TestInformation testInfo, 
                IConfiguration config, 
                IRescheduler rescheduler, 
                ITestInvocationListener listener)

בצע את שלב build_provider של ההזמנה.

פרמטרים
testInfo TestInformation : ה- TestInformation של ההזמנה.

config IConfiguration : IConfiguration של הפעלת בדיקה זו.

rescheduler IRescheduler : IRescheduler , לתזמון מחדש של חלקים מההזמנה לביצוע במשאב(ים) אחר

listener ITestInvocationListener : ה- ITestInvocation לדווח על כשלים בהורדה של build.

החזרות
boolean נכון אם הורדנו בהצלחה את ה-build, לא נכון אחרת.

זורק
com.android.tradefed.build.BuildRetrievalError
com.android.tradefed.device.DeviceNotAvailableException
BuildRetrievalError
DeviceNotAvailableException

דוח יומני

public abstract void reportLogs (ITestDevice device, 
                ITestLogger logger, 
                TestInvocation.Stage stage)

דווח על כמה יומני מכשירים בשלבים שונים של הפנייה. לדוגמה: logcat.

פרמטרים
device ITestDevice : המכשיר שממנו יש לדווח על יומנים.

logger ITestLogger : לוגר היומנים.

stage TestInvocation.Stage : שלב ההזמנה בה אנו נמצאים.

runDevicePostInvocationTearDown

public void runDevicePostInvocationTearDown (IInvocationContext context, 
                IConfiguration config, 
                Throwable exception)

הפעל את ITestDevice#postInvocationTearDown(Throwable) עבור כל חלק מהמכשיר של הפנייה.

פרמטרים
context IInvocationContext : IInvocationContext של הקריאה.

config IConfiguration : IConfiguration של הפעלת בדיקה זו.

exception Throwable : החריג המקורי שנזרק על ידי הבדיקה שפועלת, אם בכלל.

הפעל DevicePreInvocationSetup

public void runDevicePreInvocationSetup (IInvocationContext context, 
                IConfiguration config, 
                ITestLogger logger)

הפעל את ERROR(ITestDevice#preInvocationSetup(IBuildInfo)/com.android.tradefed.device.ITestDevice#preInvocationSetup(com.android.tradefed.build.IBuildInfo) ITestDevice#preInvocationSetup(IBuildInfo)) בכל חלק של התקן.

פרמטרים
context IInvocationContext : IInvocationContext של הקריאה.

config IConfiguration : IConfiguration של הפעלת בדיקה זו.

logger ITestLogger : ה- ITestLogger לדיווח על יומנים.

זורק
com.android.tradefed.device.DeviceNotAvailableException
com.android.tradefed.targetprep.TargetSetupError
DeviceNotAvailableException
TargetSetupError

runTests

public void runTests (TestInformation info, 
                IConfiguration config, 
                ITestInvocationListener listener)

מפעיל את הבדיקה.

פרמטרים
info TestInformation : ה- TestInformation שאפשר להריץ איתו בדיקות.

config IConfiguration : IConfiguration להפעלה

listener ITestInvocationListener : ה- ITestInvocationListener של תוצאות הבדיקה

זורק
ניתן לזרוק

shardConfig

public boolean shardConfig (IConfiguration config, 
                TestInformation testInfo, 
                IRescheduler rescheduler, 
                ITestLogger logger)

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

אם ספירת הרסיסים גדולה מ-1, היא פשוט תיצור הגדרות עבור כל רסיס על ידי הגדרת מדדי רסיס ותזמון מחדש שלהם. אם לא מוגדרת ספירת רסיסים, היא תחזור ל- IShardHelper#shardConfig .

פרמטרים
config IConfiguration : ה- IConfiguration הנוכחית.

testInfo TestInformation : ה- TestInformation שמכיל את המידע של הבדיקות.

rescheduler IRescheduler : ה- IRescheduler .

logger ITestLogger : ITestLogger משמש לרישום קבצים במהלך ריסוק.

החזרות
boolean נכון אם הבדיקה נחתכה. אחרת החזר false