NameMangleListener

public abstract class NameMangleListener
extends Object implements ITestInvocationListener

java.lang.object
com.android.tradefed.result.NameMangleListener


یک شنونده پروکسی برای ترجمه روش تست، کلاس و نام بسته به عنوان نتایج گزارش می شود.

خلاصه

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

NameMangleListener (ITestInvocationListener listener)

روش های عمومی

TestSummary getSummary ()

void invocationEnded (long elapsedTime)

void invocationFailed (Throwable cause)

void invocationStarted (IInvocationContext context)

void testAssumptionFailure (TestDescription test, String trace)

void testEnded (TestDescription test, testMetrics) testEnded (TestDescription test, testMetrics)

void testFailed (TestDescription test, String trace)

void testIgnored (TestDescription test)

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

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

void testRunFailed (String errorMessage)

void testRunStarted (String runName, int testCount)

void testRunStopped (long elapsedTime)

void testStarted (TestDescription test)

روش های محافظت شده

TestDescription mangleTestId (TestDescription test)

این روش بر روی تمام TestDescription هایی اجرا می شود که به testStarted(com.android.tradefed.result.TestDescription) ، testFailed(com.android.tradefed.result.TestDescription, String) و ITestLifeCycleReceiver.testEnded(com.android.tradefed.result.TestDescription, HashMap) فراخوانی می دهد.

String mangleTestRunName (String name)

این متد روی همه نام‌های اجرای آزمایشی که به callback testRunStarted(String, int) ارسال می‌شوند اجرا می‌شود.

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

NameMangleListener

public NameMangleListener (ITestInvocationListener listener)

مولفه های
listener ITestInvocationListener

روش های عمومی

دریافت خلاصه

public TestSummary getSummary ()

برمی گرداند
TestSummary

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

public void invocationEnded (long elapsedTime)

مولفه های
elapsedTime long

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

public void invocationFailed (Throwable cause)

مولفه های
cause Throwable

invocationStarted

public void invocationStarted (IInvocationContext context)

مولفه های
context IInvocationContext

آزمون فرض شکست

public void testAssumptionFailure (TestDescription test, 
                String trace)

مولفه های
test TestDescription

trace String

تست پایان یافت

public void testEnded (TestDescription test, 
                 testMetrics)

مولفه های
test TestDescription

testMetrics

تست شکست خورد

public void testFailed (TestDescription test, 
                String trace)

مولفه های
test TestDescription

trace String

تست نادیده گرفته شد

public void testIgnored (TestDescription test)

مولفه های
test TestDescription

testLog

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

مولفه های
dataName String

dataType LogDataType

dataStream InputStreamSource

testRunEnded

public void testRunEnded (long elapsedTime, 
                 runMetrics)

مولفه های
elapsedTime long

runMetrics

testRunFailed

public void testRunFailed (String errorMessage)

مولفه های
errorMessage String

testRunStarted

public void testRunStarted (String runName, 
                int testCount)

مولفه های
runName String

testCount int

testRunStopped

public void testRunStopped (long elapsedTime)

مولفه های
elapsedTime long

تست شروع شد

public void testStarted (TestDescription test)

مولفه های
test TestDescription

روش های محافظت شده

mangleTestId

protected TestDescription mangleTestId (TestDescription test)

این روش بر روی تمام TestDescription هایی اجرا می شود که به testStarted(com.android.tradefed.result.TestDescription) ، testFailed(com.android.tradefed.result.TestDescription, String) و ITestLifeCycleReceiver.testEnded(com.android.tradefed.result.TestDescription, HashMap) فراخوانی می دهد. این روش باید TestDescription احتمالاً متفاوتی را برگرداند که به پایین‌دست ITestInvocationListener که در حین ساخت مشخص شده است ارسال می‌شود.

پیاده سازی باید مراقب باشد که TestDescription اصلی را تغییر ندهد.

پیاده سازی پیش فرض شناسه ورودی را از طریق اصلاح نشده عبور می دهد.

مولفه های
test TestDescription

برمی گرداند
TestDescription

mangleTestRunName

protected String mangleTestRunName (String name)

این متد روی همه نام‌های اجرای آزمایشی که به callback testRunStarted(String, int) ارسال می‌شوند اجرا می‌شود. این روش باید نام اجرای آزمایشی متفاوتی را برگرداند که به پایین‌دستی ITestInvocationListener که در حین ساخت مشخص شده بود ارسال می‌شود.

پیاده سازی باید مراقب باشد که نام اجرای اصلی را تغییر ندهید.

پیاده‌سازی پیش‌فرض نام اجرای آزمایشی ورودی را بدون تغییر می‌گذراند.

مولفه های
name String

برمی گرداند
String