ShardListener

public class ShardListener
extends CollectingTestListener implements ISupportGranularResults

java.lang.object
com.android.tradefed.result.CollectingTestListener
com.android.tradefed.invoker.ShardListener


یک ITestInvocationListener که نتایج را از یک فراخوان جمع‌آوری می‌کند (معروف به تقسیم فراخوانی برای اجرای موازی منابع متعدد)، و آنها را به شنونده دیگری ارسال می‌کند.

خلاصه

سازندگان عمومی

ShardListener (ITestInvocationListener main)

یک ShardListener ایجاد کنید.

روش های عمومی

void invocationEnded (long elapsedTime)

void invocationFailed (FailureDescription failure)

void invocationFailed (Throwable cause)

void invocationStarted (IInvocationContext context)

void setSupportGranularResults (boolean enableGranularResults)
boolean supportGranularResults ()

void testLog (String dataName, LogDataType dataType, InputStreamSource dataStream)

void testLogSaved (String dataName, LogDataType dataType, InputStreamSource dataStream, LogFile logFile)

void testModuleEnded ()

void testModuleStarted (IInvocationContext moduleContext)

void testRunEnded (long elapsedTime, runMetrics) testRunEnded (long elapsedTime, runMetrics)

void testRunFailed (FailureDescription failure)

void testRunFailed (String failureMessage)

void testRunStarted (String name, int numTests, int attemptNumber, long startTime)

سازندگان عمومی

ShardListener

public ShardListener (ITestInvocationListener main)

یک ShardListener ایجاد کنید.

مولفه های
main ITestInvocationListener : ITestInvocationListener نتایج باید ارسال شوند. برای جلوگیری از برخورد با دیگر ShardListener ها، این شیء در هنگام ارسال نتایج در main همگام می شود. و نتایج فقط زمانی ارسال می‌شوند که بخش فراخوانی کامل شود.

روش های عمومی

فراخوان پایان یافت

public void invocationEnded (long elapsedTime)

مولفه های
elapsedTime long

فراخوان ناموفق بود

public void invocationFailed (FailureDescription failure)

مولفه های
failure FailureDescription

فراخوان ناموفق بود

public void invocationFailed (Throwable cause)

مولفه های
cause Throwable

invocationStarted

public void invocationStarted (IInvocationContext context)

مولفه های
context IInvocationContext

setSupportGranular Results

public void setSupportGranularResults (boolean enableGranularResults)

مولفه های
enableGranularResults boolean

supportGranular Results

public boolean supportGranularResults ()

برمی گرداند
boolean

testLog

public void testLog (String dataName, 
                LogDataType dataType, 
                InputStreamSource dataStream)

مولفه های
dataName String

dataType LogDataType

dataStream InputStreamSource

testLogSaved

public void testLogSaved (String dataName, 
                LogDataType dataType, 
                InputStreamSource dataStream, 
                LogFile logFile)

مولفه های
dataName String

dataType LogDataType

dataStream InputStreamSource

logFile LogFile

testModuleEnded

public void testModuleEnded ()

testModuleStarted

public void testModuleStarted (IInvocationContext moduleContext)

مولفه های
moduleContext IInvocationContext

testRunEnded

public void testRunEnded (long elapsedTime, 
                 runMetrics)

مولفه های
elapsedTime long

runMetrics

testRunFailed

public void testRunFailed (FailureDescription failure)

مولفه های
failure FailureDescription

testRunFailed

public void testRunFailed (String failureMessage)

مولفه های
failureMessage String

testRunStarted

public void testRunStarted (String name, 
                int numTests, 
                int attemptNumber, 
                long startTime)

مولفه های
name String

numTests int

attemptNumber int

startTime long