II הזמנה הוצאה לפועל
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) בצע את שלב setUp 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) הפעל את |
default void | runDevicePreInvocationSetup (IInvocationContext context, IConfiguration config, ITestLogger logger) להפעיל את |
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. קשור לאוסף הבנייה.
פרמטרים | |
---|---|
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)
בצע את שלב setUp target_preparer ו- multi_target_preparer. האם כל התקנת המכשירים הנדרשת להפעלת הבדיקה.
פרמטרים | |
---|---|
testInfo | TestInformation : את TestInformation של השבעה. |
config | IConfiguration : את IConfiguration של המבחן הזה. |
logger | ITestLogger : את ITestLogger לדווח יומני כשלי התקנה. |
זורק | |
---|---|
| com.android.tradefed.targetprep.TargetSetupError |
| com.android.tradefed.targetprep.BuildError |
DeviceNotAvailableException | |
BuildError | |
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 : למעט המקורי נזרק על ידי והרצתו. |
זורק | |
---|---|
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 כשלים להוריד לבנות את הדוח. |
החזרות | |
---|---|
boolean | נכון אם הורדנו בהצלחה את ה build, שקר אחרת. |
זורק | |
---|---|
| com.android.tradefed.build.BuildRetrievalError |
DeviceNotAvailableException | |
BuildRetrievalError |
reportLogs
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 : למעט המקורי נזרק על ידי והרצתו אם בכלל. |
runDevicePreInvocationSetup
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 |
TargetSetupError | |
DeviceNotAvailableException |
runTests
public void runTests (TestInformation info, IConfiguration config, ITestInvocationListener listener)
מבצע את המבחן.
פרמטרים | |
---|---|
info | TestInformation : את TestInformation כדי להריץ בדיקות עם. |
config | IConfiguration : את IConfiguration כדי ריצה |
listener | ITestInvocationListener : את ITestInvocationListener של תוצאות הבדיקה |
זורק | |
---|---|
Throwable |
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 המשמש להתחברות קובץ במהלך sharding. |
החזרות | |
---|---|
boolean | נכון אם הבדיקה הייתה מרוסקת. בתמורה אחרת false |