ModuleResultsAndMetricsForwarder
public
class
ModuleResultsAndMetricsForwarder
extends ResultAndLogForwarder
java.lang.Object | |||
↳ | com.android.tradefed.result.ResultForwarder | ||
↳ | com.android.tradefed.result.ResultAndLogForwarder | ||
↳ | com.android.tradefed.result.ModuleResultsAndMetricsForwarder |
ResultAndLogForwarder
का एक्सटेंशन, जो टेस्ट के नतीजों में मॉड्यूल से जुड़ी अतिरिक्त मेट्रिक जोड़ता है.
खास जानकारी
पब्लिक कंस्ट्रक्टर | |
---|---|
ModuleResultsAndMetricsForwarder(ITestInvocationListener... listeners)
|
सार्वजनिक तरीके | |
---|---|
void
|
setAttemptIsolation(CurrentInvocation.IsolationGrade isolation)
इससे यह तय होता है कि हैकिंग की कोशिश को अलग-अलग हैकिंग के तौर पर रिपोर्ट किया जाना चाहिए या नहीं. |
void
|
setModuleId(String moduleId)
|
void
|
setTestMappingSources(
टेस्ट-मैपिंग सोर्स सेट करता है, जिन्हें मेट्रिक में डाला जाएगा. |
void
|
testEnded(TestDescription test, long endTime,
|
void
|
testEnded(TestDescription test,
किसी टेस्ट केस के पूरा होने की जानकारी देता है. |
void
|
testFailed(TestDescription test, FailureDescription failure)
किसी टेस्ट केस के फ़ेल होने की रिपोर्ट करता है. |
void
|
testFailed(TestDescription test, String trace)
किसी टेस्ट केस के फ़ेल होने की रिपोर्ट करता है. |
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
|
testStarted(TestDescription test, long startTime)
|
void
|
testStarted(TestDescription test)
किसी टेस्ट केस के शुरू होने की जानकारी देता है. |
पब्लिक कंस्ट्रक्टर
ModuleResultsAndMetricsForwarder
public ModuleResultsAndMetricsForwarder (ITestInvocationListener... listeners)
पैरामीटर | |
---|---|
listeners |
ITestInvocationListener |
सार्वजनिक तरीके
setAttemptIsolation
public void setAttemptIsolation (CurrentInvocation.IsolationGrade isolation)
इससे यह तय होता है कि हैकिंग की कोशिश को अलग-अलग हैकिंग के तौर पर रिपोर्ट किया जाना चाहिए या नहीं.
पैरामीटर | |
---|---|
isolation |
CurrentInvocation.IsolationGrade |
setModuleId
public void setModuleId (String moduleId)
पैरामीटर | |
---|---|
moduleId |
String |
setTestMappingSources
public void setTestMappingSources (testMappingSources)
टेस्ट-मैपिंग सोर्स सेट करता है, जिन्हें मेट्रिक में डाला जाएगा.
पैरामीटर | |
---|---|
testMappingSources |
|
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) |
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 |
: टेस्ट रन के आखिर में रिपोर्ट किए गए की-वैल्यू पेयर |
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() से मेज़र किया जाता है |
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() से मेज़र किया जाता है |
testStarted
public void testStarted (TestDescription test)
किसी टेस्ट केस के शुरू होने की जानकारी देता है. पुराने इंटरफ़ेस में, जब भी हो सके testStarted(com.android.tradefed.result.TestDescription)
का इस्तेमाल करना चाहिए.
पैरामीटर | |
---|---|
test |
TestDescription : टेस्ट की पहचान करता है |