EventsLoggerListener
public
class
EventsLoggerListener
extends Object
implements
ILogSaverListener
java.lang.Object | |
↳ | com.android.tradefed.result.EventsLoggerListener |
ऐसा लिसनर जो मिलने वाले सभी इवेंट को किसी फ़ाइल में लॉग करता है
खास जानकारी
पब्लिक कंस्ट्रक्टर | |
---|---|
EventsLoggerListener(String name)
|
सार्वजनिक तरीके | |
---|---|
File
|
getLoggedEvents()
|
void
|
invocationEnded(long elapsedTime)
यह रिपोर्ट दिखाती है कि अनुरोध पूरा हो गया है या किसी गड़बड़ी की वजह से पूरा नहीं हो सका. |
void
|
invocationFailed(FailureDescription failure)
किसी गड़बड़ी की वजह से, इंवोकेशन पूरा न होने की रिपोर्ट दिखाता है. |
void
|
invocationSkipped(SkipReason reason)
किसी अनुरोध को 'अभी नहीं' के तौर पर रिपोर्ट करता है |
void
|
invocationStarted(IInvocationContext context)
टेस्ट को शुरू करने के बारे में रिपोर्ट करता है. |
void
|
logAssociation(String dataName, LogFile logFile)
कुछ मामलों में, लॉग को टेस्ट केस से ज़्यादा से ज़्यादा जोड़ा जाना चाहिए. हालांकि, डायरेक्ट |
void
|
testAssumptionFailure(TestDescription test, String trace)
जब कोई परमाणु टेस्ट फ़्लैग करता है कि वह किसी ऐसी शर्त को मानता है जो गलत है, तब इसे कॉल किया जाता है |
void
|
testAssumptionFailure(TestDescription test, FailureDescription failure)
जब कोई परमाणु टेस्ट फ़्लैग करता है कि वह किसी ऐसी शर्त को मानता है जो गलत है, तब इसे कॉल किया जाता है |
void
|
testEnded(TestDescription test, long endTime,
|
void
|
testFailed(TestDescription test, FailureDescription failure)
किसी टेस्ट केस के फ़ेल होने की रिपोर्ट करता है. |
void
|
testFailed(TestDescription test, String trace)
किसी टेस्ट केस के फ़ेल होने की रिपोर्ट करता है. |
void
|
testIgnored(TestDescription test)
जब कोई टेस्ट नहीं चलेगा, तब इसे कॉल किया जाएगा. आम तौर पर, ऐसा इसलिए होता है, क्योंकि टेस्ट के तरीके को org.junit.Ignore के साथ एनोटेट किया गया है. |
void
|
testModuleEnded()
मॉड्यूल के चलने के खत्म होने की रिपोर्ट दिखाता है. |
void
|
testModuleStarted(IInvocationContext moduleContext)
किसी मॉड्यूल के चलने की शुरुआत की रिपोर्ट करता है. |
void
|
testRunEnded(long elapsedTimeMillis,
टेस्ट रन खत्म होने की रिपोर्ट दिखाता है. |
void
|
testRunFailed(FailureDescription failure)
|
void
|
testRunFailed(String errorMessage)
किसी गंभीर गड़बड़ी की वजह से, रिपोर्ट की जांच पूरी नहीं हो सकी. |
void
|
testRunStarted(String runName, int testCount, int attemptNumber)
टेस्ट रन शुरू होने की जानकारी देता है. |
void
|
testRunStarted(String runName, int testCount)
टेस्ट रन शुरू होने की जानकारी देता है. |
void
|
testRunStarted(String runName, int testCount, int attemptNumber, long startTime)
टेस्ट रन शुरू होने की जानकारी देता है. |
void
|
testSkipped(TestDescription test, SkipReason reason)
जब किसी टेस्ट को स्किप किया जाता है और वह किसी ऐसी वजह से नहीं चलता है जिसकी आम तौर पर उम्मीद नहीं की जाती, तब यह ट्रिगर होता है. |
void
|
testStarted(TestDescription test, long startTime)
|
पब्लिक कंस्ट्रक्टर
EventsLoggerListener
public EventsLoggerListener (String name)
पैरामीटर | |
---|---|
name |
String |
सार्वजनिक तरीके
getLoggedEvents
public File getLoggedEvents ()
रिटर्न | |
---|---|
File |
invocationEnded
public void invocationEnded (long elapsedTime)
यह रिपोर्ट दिखाती है कि अनुरोध पूरा हो गया है या किसी गड़बड़ी की वजह से पूरा नहीं हो सका.
TradeFederation फ़्रेमवर्क इसे अपने-आप कॉल करेगा.
पैरामीटर | |
---|---|
elapsedTime |
long : कॉल को शुरू करने में लगा समय, मिलीसेकंड में |
invocationFailed
public void invocationFailed (FailureDescription failure)
किसी गड़बड़ी की वजह से, इंवोकेशन पूरा न होने की रिपोर्ट दिखाता है.
TradeFederation फ़्रेमवर्क इसे अपने-आप कॉल करेगा.
पैरामीटर | |
---|---|
failure |
FailureDescription : FailureDescription , जिसमें गड़बड़ी की वजह बताई गई है |
invocationSkipped
public void invocationSkipped (SkipReason reason)
किसी अनुरोध को 'अभी नहीं' के तौर पर रिपोर्ट करता है
पैरामीटर | |
---|---|
reason |
SkipReason |
invocationStarted
public void invocationStarted (IInvocationContext context)
टेस्ट को शुरू करने के बारे में रिपोर्ट करता है.
TradeFederation फ़्रेमवर्क इसे अपने-आप कॉल करेगा. एक से ज़्यादा डिवाइसों की रिपोर्टिंग के लिए, रिपोर्टर को इस तरीके को बदलना होगा.
पैरामीटर | |
---|---|
context |
IInvocationContext : बोलकर निर्देश देने की सुविधा के बारे में जानकारी |
logAssociation
public void logAssociation (String dataName, LogFile logFile)
कुछ मामलों में, लॉग को टेस्ट केस से ज़्यादा से ज़्यादा जोड़ा जाना चाहिए. हालांकि, डायरेक्ट testLogSaved(String, com.android.tradefed.result.LogDataType, com.android.tradefed.result.InputStreamSource, com.android.tradefed.result.LogFile)
callback पर ऐसा करना संभव नहीं है. इसलिए, इस कॉलबैक की मदद से, साफ़ तौर पर एक बेहतर असोसिएशन दिया जा सकता है.
पैरामीटर | |
---|---|
dataName |
String : डेटा का नाम |
logFile |
LogFile : वह LogFile जो पहले लॉग किया गया था और जो जांच के उदाहरण से जुड़ा होना चाहिए. |
testAssumptionFailure
public void testAssumptionFailure (TestDescription test, String trace)
जब कोई परमाणु टेस्ट फ़्लैग करता है कि वह किसी ऐसी शर्त को मानता है जो गलत है, तब इसे कॉल किया जाता है
पैरामीटर | |
---|---|
test |
TestDescription : टेस्ट की पहचान करता है |
trace |
String : गड़बड़ी का स्टैक ट्रेस |
testAssumptionFailure
public void testAssumptionFailure (TestDescription test, FailureDescription failure)
जब कोई परमाणु टेस्ट फ़्लैग करता है कि वह किसी ऐसी शर्त को मानता है जो गलत है, तब इसे कॉल किया जाता है
पैरामीटर | |
---|---|
test |
TestDescription : टेस्ट की पहचान करता है |
failure |
FailureDescription : FailureDescription गड़बड़ी और उसके संदर्भ के बारे में बताना. |
testEnded
public void testEnded (TestDescription test, long endTime,testMetrics)
ERROR(/#testEnded(com.android.tradefed.result.TestDescription,Map))
का विकल्प, जहां हम सीधे तौर पर खत्म होने का समय बता सकते हैं. सटीक मेज़रमेंट के लिए, testStarted(com.android.tradefed.result.TestDescription, long)
के साथ जोड़ें.
पैरामीटर | |
---|---|
test |
TestDescription : टेस्ट की पहचान करता है |
endTime |
long : टेस्ट खत्म होने का समय, जिसे System.currentTimeMillis() से मेज़र किया जाता है |
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 : गड़बड़ी का स्टैक ट्रेस |
testIgnored
public void testIgnored (TestDescription test)
जब कोई टेस्ट नहीं चलेगा, तब इसे कॉल किया जाएगा. आम तौर पर, ऐसा इसलिए होता है, क्योंकि टेस्ट के तरीके को org.junit.Ignore के साथ एनोटेट किया गया है.
पैरामीटर | |
---|---|
test |
TestDescription : टेस्ट की पहचान करता है |
testModuleEnded
public void testModuleEnded ()
मॉड्यूल के चलने के खत्म होने की रिपोर्ट दिखाता है.
testModuleStarted
public void testModuleStarted (IInvocationContext moduleContext)
किसी मॉड्यूल के चलने की शुरुआत की रिपोर्ट करता है. यह कॉलबैक testModuleEnded()
से जुड़ा है और क्रम में शामिल करना ज़रूरी नहीं है. इसका इस्तेमाल सिर्फ़ उस रन के दौरान किया जाता है जिसमें
मॉड्यूल का इस्तेमाल किया जाता है: suite based runners.
पैरामीटर | |
---|---|
moduleContext |
IInvocationContext : मॉड्यूल का IInvocationContext . |
testRunEnded
public void testRunEnded (long elapsedTimeMillis,runMetrics)
टेस्ट रन खत्म होने की रिपोर्ट दिखाता है.
पैरामीटर | |
---|---|
elapsedTimeMillis |
long : डिवाइस से मिलीसेकंड में, बीत चुका समय |
runMetrics |
: टेस्ट रन के आखिर में रिपोर्ट किए गए की-वैल्यू पेयर |
testRunFailed
public void testRunFailed (FailureDescription failure)
FailureDescription
की बताई गई गड़बड़ी की वजह से, रिपोर्ट की जांच पूरी नहीं हो सकी.
पैरामीटर | |
---|---|
failure |
FailureDescription : FailureDescription गड़बड़ी और उसके संदर्भ के बारे में बताना. |
testRunFailed
public void testRunFailed (String errorMessage)
किसी गंभीर गड़बड़ी की वजह से, रिपोर्ट की जांच पूरी नहीं हो सकी.
पैरामीटर | |
---|---|
errorMessage |
String : String , जिसमें रन न होने की वजह बताई गई है. |
testRunStarted
public void testRunStarted (String runName, int testCount, int attemptNumber)
टेस्ट रन शुरू होने की जानकारी देता है.
पैरामीटर | |
---|---|
runName |
String : टेस्ट रन का नाम |
testCount |
int : टेस्ट रन में टेस्ट की कुल संख्या |
attemptNumber |
int : ऑर्डर नंबर, एक ही runName के अलग-अलग प्रयासों की पहचान करता है, जो कई बार चलाए जाते हैं. attemptNumber का इंडेक्स 0 से शुरू होता है और हर बार नया रन होने पर, इसकी वैल्यू बढ़नी चाहिए. उदाहरण के लिए, किसी टेस्ट को तीन बार फिर से चलाया जाता है, तो एक ही runName के तहत कुल चार रन होने चाहिए और attemptNumber की वैल्यू 0 से 3 के बीच होनी चाहिए. |
testRunStarted
public void testRunStarted (String runName, int testCount)
टेस्ट रन शुरू होने की जानकारी देता है.
पैरामीटर | |
---|---|
runName |
String : टेस्ट रन का नाम |
testCount |
int : टेस्ट रन में टेस्ट की कुल संख्या |
testRunStarted
public void testRunStarted (String runName, int testCount, int attemptNumber, long startTime)
टेस्ट रन शुरू होने की जानकारी देता है.
पैरामीटर | |
---|---|
runName |
String : टेस्ट रन का नाम |
testCount |
int : टेस्ट रन में टेस्ट की कुल संख्या |
attemptNumber |
int : ऑर्डर नंबर, एक ही runName के अलग-अलग प्रयासों की पहचान करता है, जो कई बार चलाए जाते हैं. attemptNumber का इंडेक्स 0 से शुरू होता है और हर बार नया रन होने पर, इसकी वैल्यू बढ़नी चाहिए. उदाहरण के लिए, किसी टेस्ट को तीन बार फिर से चलाया जाता है, तो उसी runName के तहत कुल चार रन होने चाहिए और attemptNumber की वैल्यू 0 से 3 के बीच होनी चाहिए. |
startTime |
long : रन शुरू होने का समय, जिसे System.currentTimeMillis() से मेज़र किया जाता है |
testSkipped
public void testSkipped (TestDescription test, SkipReason reason)
जब किसी टेस्ट को स्किप किया जाता है और वह किसी ऐसी वजह से नहीं चलता है जिसकी आम तौर पर उम्मीद नहीं की जाती, तब यह ट्रिगर होता है. इन टेस्ट को फिर से चलाकर, सही तरीके से लागू करने की कोशिश की जाएगी.
पैरामीटर | |
---|---|
test |
TestDescription : टेस्ट की पहचान करता है |
reason |
SkipReason : SkipReason |
testStarted
public void testStarted (TestDescription test, long startTime)
testStarted(com.android.tradefed.result.TestDescription)
का विकल्प, जिसमें हम यह भी बताते हैं कि जांच कब शुरू की गई थी. सटीक मेज़रमेंट के लिए, इसे ERROR(/#testEnded(com.android.tradefed.result.TestDescription,long,Map))
के साथ जोड़ा जाता है.
पैरामीटर | |
---|---|
test |
TestDescription : टेस्ट की पहचान करता है |
startTime |
long : जांच शुरू होने का समय, जिसे System.currentTimeMillis() से मेज़र किया जाता है |