TestInvocation

public class TestInvocation
extends Object implements ITestInvocation

java.lang.Object
com.android.tradefed.invoker.TestInvocation


יישום ברירת מחדל של ITestInvocation .

טוען אובייקטים עיקריים בהתבסס על IConfiguration - מאחזר build - מכין יעד - מפעיל בדיקות - מדווח על תוצאות

סיכום

קבועים

long AVAILABILITY_CHECK_TIMEOUT

שדות

public static final String COMMAND_ARGS_KEY

מפתח שורת הפקודה תכונות args

public static final String INVOCATION_EXTERNAL_DEPENDENCIES

public static final String TRADEFED_CONFIG_NAME

public static final String TRADEFED_END_HOST_LOG

public static final String TRADEFED_INVOC_COMPLETE_HOST_LOG

public static final String TRADEFED_LOG_NAME

בנאים ציבוריים

TestInvocation ()

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

static IBuildInfo backFillBuildInfoForReporting (String commandLine)

עוזר שמשתמש בשורת הפקודה למילוי חוזר של IBuildInfo לדיווח במקרה של כשל בהורדה.

static FailureDescription createFailureFromException (Throwable exception, TestRecordProto.FailureStatus defaultStatus)

צור FailureDescription מחריג הזמנה.

IInvocationExecution createInvocationExec ( TestInvocation.RunMode mode)

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

static String getDeviceLogName ( TestInvocation.Stage stage)
static String getEmulatorLogName ( TestInvocation.Stage stage)
ITestInvocation.ExitInformation getExitInfo ()

מידע היציאה של ההזמנה הנתונה.

void invoke ( IInvocationContext context, IConfiguration config, IRescheduler rescheduler, ITestInvocationListener... extraListeners)

בצע את קריאת הבדיקה.

static boolean isSubprocess ( IConfiguration config)

מחזירה true אם הפנייה נמצאת כעת בטווח של תהליך משנה.

void notifyInvocationForceStopped (String message, ErrorIdentifier errorId)

הודע ל- TestInvocation ש-TradeFed התבקש להפסיק.

void notifyInvocationStopped (String message)

הודע ל- TestInvocation ש-TradeFed ייסגר בסופו של דבר.

static void printStageDelimiter ( TestInvocation.Stage phase, boolean end)

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

void registerExecutionFiles ( ExecutionFiles executionFiles)
void setClearcutClient (ClearcutClient client)

העבר את לקוח ה-clearcut כדי לדווח על מדדים.

static boolean shouldSkipBugreportError (Throwable t)

שיטת עוזר המזהה שגיאות כאשר יש לדלג על דוח הבאג

String toString ()

שיטות מוגנות

void addInvocationMetric ( InvocationMetricLogger.InvocationMetricKey key, String value)
void addInvocationMetric ( InvocationMetricLogger.InvocationMetricKey key, long value)
void applyAutomatedReporters ( IConfiguration config)
void setExitCode ( CommandRunner.ExitCode code, Throwable stack)

עוזר להגדיר את קוד היציאה.

קבועים

AVAILABILITY_CHECK_TIMEOUT

public static final long AVAILABILITY_CHECK_TIMEOUT

ערך קבוע: 180000 (0x0000000000002bf20)

שדות

COMMAND_ARGS_KEY

public static final String COMMAND_ARGS_KEY

מפתח שורת הפקודה תכונות args

INVOCATION_EXTERNAL_DEPENDENCIES

public static final String INVOCATION_EXTERNAL_DEPENDENCIES

TRADEFED_CONFIG_NAME

public static final String TRADEFED_CONFIG_NAME

TRADEFED_END_HOST_LOG

public static final String TRADEFED_END_HOST_LOG

TRADEFED_INVOC_COMPLETE_HOST_LOG

public static final String TRADEFED_INVOC_COMPLETE_HOST_LOG

TRADEFED_LOG_NAME

public static final String TRADEFED_LOG_NAME

בנאים ציבוריים

TestInvocation

public TestInvocation ()

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

backFillBuildInfoForReporting

public static IBuildInfo backFillBuildInfoForReporting (String commandLine)

עוזר שמשתמש בשורת הפקודה למילוי חוזר של IBuildInfo לדיווח במקרה של כשל בהורדה.

פרמטרים
commandLine String

החזרות
IBuildInfo

createFailureFromException

public static FailureDescription createFailureFromException (Throwable exception, 
                TestRecordProto.FailureStatus defaultStatus)

צור FailureDescription מחריג הזמנה.

פרמטרים
exception Throwable : החריג להמרה

defaultStatus TestRecordProto.FailureStatus : הסטטוס לשימוש כברירת מחדל אם החריג אינו IHarnessException .

החזרות
FailureDescription

createInvocationExec

public IInvocationExecution createInvocationExec (TestInvocation.RunMode mode)

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

פרמטרים
mode TestInvocation.RunMode : המצב שבו אנו פועלים כעת.

החזרות
IInvocationExecution IInvocationExecution המתאר את ההזמנה.

getDeviceLogName

public static String getDeviceLogName (TestInvocation.Stage stage)

פרמטרים
stage TestInvocation.Stage

החזרות
String

getEmulatorLogName

public static String getEmulatorLogName (TestInvocation.Stage stage)

פרמטרים
stage TestInvocation.Stage

החזרות
String

getExitInfo

public ITestInvocation.ExitInformation getExitInfo ()

מידע היציאה של ההזמנה הנתונה.

החזרות
ITestInvocation.ExitInformation

לעורר

public void invoke (IInvocationContext context, 
                IConfiguration config, 
                IRescheduler rescheduler, 
                ITestInvocationListener... extraListeners)

בצע את קריאת הבדיקה.

פרמטרים
context IInvocationContext : IInvocationContext לביצוע בדיקות.

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

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

extraListeners ITestInvocationListener : ITestInvocationListener יש להודיע, בנוסף לאלו config

זורק
DeviceNotAvailableException

isSubprocess

public static boolean isSubprocess (IConfiguration config)

מחזירה true אם הפנייה נמצאת כעת בטווח של תהליך משנה.

פרמטרים
config IConfiguration

החזרות
boolean

notifyInvocationForceStopped

public void notifyInvocationForceStopped (String message, 
                ErrorIdentifier errorId)

הודע ל- TestInvocation ש-TradeFed התבקש להפסיק.

פרמטרים
message String : ההודעה המשויכת להפסקת ההתקשרות

errorId ErrorIdentifier : מזהה המשויך לעצירה הכפויה

notifyInvocationStopped

public void notifyInvocationStopped (String message)

הודע ל- TestInvocation ש-TradeFed ייסגר בסופו של דבר.

פרמטרים
message String : ההודעה המשויכת להפסקת ההתקשרות

printStageDelimiter

public static void printStageDelimiter (TestInvocation.Stage phase, 
                boolean end)

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

פרמטרים
phase TestInvocation.Stage

end boolean

registerExecutionFiles

public void registerExecutionFiles (ExecutionFiles executionFiles)

פרמטרים
executionFiles ExecutionFiles

setClearcutClient

public void setClearcutClient (ClearcutClient client)

העבר את לקוח ה-clearcut כדי לדווח על מדדים.

פרמטרים
client ClearcutClient

shouldSkipBugreportError

public static boolean shouldSkipBugreportError (Throwable t)

שיטת עוזר המזהה שגיאות כאשר יש לדלג על דוח הבאג

פרמטרים
t Throwable

החזרות
boolean

toString

public String toString ()

החזרות
String

שיטות מוגנות

addInvocationMetric

protected void addInvocationMetric (InvocationMetricLogger.InvocationMetricKey key, 
                String value)

פרמטרים
key InvocationMetricLogger.InvocationMetricKey

value String

addInvocationMetric

protected void addInvocationMetric (InvocationMetricLogger.InvocationMetricKey key, 
                long value)

פרמטרים
key InvocationMetricLogger.InvocationMetricKey

value long

להחיל מדווחים אוטומטיים

protected void applyAutomatedReporters (IConfiguration config)

פרמטרים
config IConfiguration

setExitCode

protected void setExitCode (CommandRunner.ExitCode code, 
                Throwable stack)

עוזר להגדיר את קוד היציאה. נחשף לבדיקה.

פרמטרים
code CommandRunner.ExitCode

stack Throwable