IInvocationExecution
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)
מפעילים את |
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. משויך לאחזור ה-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 |
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 כדי לדווח על כשלים בהורדת גרסאות build. |
| החזרות | |
|---|---|
boolean |
הערך True אם ההורדה של ה-build הושלמה, אחרת הערך False. |
| זריקות | |
|---|---|
|
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 משמש לרישום ביומן של קובץ במהלך חלוקה למקטעים. |
| החזרות | |
|---|---|
boolean |
true אם הבדיקה חולקה למקטעים. אחרת, מחזירים את הערך false
|