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)

void testFailed(TestDescription test, String trace)

void testIgnored(TestDescription test)

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

void 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)

यह तरीका, testRunStarted(String, int) कॉलबैक में पास किए गए सभी टेस्ट रन के नामों पर चलाया जाता है.

पब्लिक कंस्ट्रक्टर

NameMangleListener

public NameMangleListener (ITestInvocationListener listener)

पैरामीटर
listener ITestInvocationListener

सार्वजनिक तरीके

getSummary

public TestSummary getSummary ()

रिटर्न
TestSummary

invocationEnded

public void invocationEnded (long elapsedTime)

पैरामीटर
elapsedTime long

invocationFailed

public void invocationFailed (Throwable cause)

पैरामीटर
cause Throwable

invocationStarted

public void invocationStarted (IInvocationContext context)

पैरामीटर
context IInvocationContext

testAssumptionFailure

public void testAssumptionFailure (TestDescription test, 
                String trace)

पैरामीटर
test TestDescription

trace String

testEnded

public void testEnded (TestDescription test, 
                 testMetrics)

पैरामीटर
test TestDescription

testMetrics

testFailed

public void testFailed (TestDescription test, 
                String trace)

पैरामीटर
test TestDescription

trace String

testIgnored

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

testStarted

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)

यह तरीका, testRunStarted(String, int) कॉलबैक में पास किए गए सभी टेस्ट रन के नामों पर चलाया जाता है. इस तरीके से, टेस्ट रन का ऐसा नाम दिखना चाहिए जो शायद अलग हो. इसे डाउनस्ट्रीम ITestInvocationListener में पास किया जाएगा, जिसे कॉन्स्ट्रक्शन के दौरान बताया गया था.

लागू करने के दौरान, ओरिजनल रन के नाम में बदलाव न करें.

डिफ़ॉल्ट रूप से लागू होने पर, आने वाले टेस्ट रन का नाम बिना किसी बदलाव के पास किया जाता है.

पैरामीटर
name String

रिटर्न
String