PrettyTestEventLogger

public class PrettyTestEventLogger
extends Object implements ITestInvocationListener

java.lang.Object
   ↳ com.android.tradefed.testtype.host.PrettyTestEventLogger


यह कुकी, इवेंट से मेल खाने वाले लॉगर को सेट करती है और उन्हें लॉग करती है, ताकि डीबग करना आसान हो सके. होस्ट और डिवाइस, दोनों के लॉग एक जैसे होंगे, ताकि उन्हें आसानी से खोजा जा सके.

खास जानकारी

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

PrettyTestEventLogger( devices, boolean methodLevelLogging)

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

void testEnded(TestDescription test, testMetrics)

यह किसी टेस्ट केस के खत्म होने की जानकारी देता है.

void testFailed(TestDescription test, FailureDescription failure)

यह किसी टेस्ट केस के फ़ेल होने की जानकारी देता है.

void testFailed(TestDescription test, String trace)

यह किसी टेस्ट केस के फ़ेल होने की जानकारी देता है.

void testRunEnded(long elapsedTimeMillis, runMetrics)

यह कुकी, टेस्ट रन के खत्म होने की जानकारी देती है.

void testRunStarted(String runName, int testCount)

यह कुकी, टेस्ट रन की शुरुआत की रिपोर्ट करती है.

void testStarted(TestDescription test)

यह फ़ंक्शन, किसी टेस्ट केस के शुरू होने की जानकारी देता है.

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

PrettyTestEventLogger

public PrettyTestEventLogger ( devices, 
                boolean methodLevelLogging)

पैरामीटर
devices

methodLevelLogging boolean

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

testEnded

public void testEnded (TestDescription test, 
                 testMetrics)

यह किसी टेस्ट केस के खत्म होने की जानकारी देता है.

अगर testFailed(TestDescription, FailureDescription) को लागू नहीं किया गया था, तो यह टेस्ट पास हो गया. यह टेस्ट केस के एक्ज़ीक्यूशन के दौरान, जनरेट हुई किसी भी मुख्य/वैल्यू मेट्रिक को भी दिखाता है.

पैरामीटर
test TestDescription: इससे टेस्ट की पहचान होती है

testMetrics : भेजी गई मेट्रिक का ERROR(/Map)

testFailed

public void testFailed (TestDescription test, 
                FailureDescription failure)

यह किसी टेस्ट केस के फ़ेल होने की जानकारी देता है.

इसे testStarted और testEnded के बीच कॉल किया जाएगा.

पैरामीटर
test TestDescription: इससे टेस्ट की पहचान होती है

failure FailureDescription: FailureDescription में गड़बड़ी और उसके कॉन्टेक्स्ट के बारे में बताया गया हो.

testFailed

public void testFailed (TestDescription test, 
                String trace)

यह किसी टेस्ट केस के फ़ेल होने की जानकारी देता है.

इसे testStarted और testEnded के बीच कॉल किया जाएगा.

पैरामीटर
test TestDescription: इससे टेस्ट की पहचान होती है

trace String: गड़बड़ी का स्टैक ट्रेस

testRunEnded

public void testRunEnded (long elapsedTimeMillis, 
                 runMetrics)

यह कुकी, टेस्ट रन के खत्म होने की जानकारी देती है.

पैरामीटर
elapsedTimeMillis long: डिवाइस ने मिलीसेकंड में बीता हुआ समय रिपोर्ट किया

runMetrics : टेस्ट रन के आखिर में रिपोर्ट किए गए की-वैल्यू पेयर

testRunStarted

public void testRunStarted (String runName, 
                int testCount)

यह कुकी, टेस्ट रन की शुरुआत की रिपोर्ट करती है.

पैरामीटर
runName String: टेस्ट रन का नाम

testCount int: टेस्ट रन में कुल टेस्ट की संख्या

testStarted

public void testStarted (TestDescription test)

यह फ़ंक्शन, किसी टेस्ट केस के शुरू होने की जानकारी देता है. पुराना इंटरफ़ेस. जब भी हो सके, testStarted(com.android.tradefed.result.TestDescription) का इस्तेमाल करना चाहिए.

पैरामीटर
test TestDescription: इससे टेस्ट की पहचान होती है