BugreportCollector
public
class
BugreportCollector
extends Object
implements
ITestInvocationListener
java.lang.Object | |
↳ | com.android.tradefed.result.BugreportCollector |
एक पास-थ्रू ITestInvocationListener
, जो कॉन्फ़िगर किए जा सकने वाले इवेंट होने पर गड़बड़ी की रिपोर्ट इकट्ठा करता है. इसके बाद, हर गड़बड़ी की रिपोर्ट इकट्ठा होने के बाद, अपने चाइल्ड पर ITestInvocationListener#testLog
को कॉल करता है.
व्यवहार: (FIXME: इसे पूरा करें)
- अगर कोई टेस्टकेस फ़ेल होता है, तो हर बार कैप्चर करें
- हर टेस्टकेस के बाद कैप्चर करें
- हर बार टेस्टकेस पास न होने पर कैप्चर करें
- कैप्चर करें
खास जानकारी
नेस्ट की गई क्लास | |
---|---|
enum |
BugreportCollector.Filter
|
enum |
BugreportCollector.Freq
|
enum |
BugreportCollector.Noun
|
class |
BugreportCollector.Predicate
गड़बड़ी की रिपोर्ट कब कैप्चर करनी है, इस बारे में बताने वाला पूरा प्रीडिकेट. |
enum |
BugreportCollector.Relation
|
interface |
BugreportCollector.SubPredicate
|
फ़ील्ड्स की फ़िल्में | |
---|---|
public
static
final
BugreportCollector.Predicate |
AFTER_FAILED_TESTCASES
पहले से तय किया गया प्रीडिकेट, जो हर बार टेस्ट केस पूरा न होने पर ट्रिगर होता है |
public
static
final
BugreportCollector.Predicate |
AT_START
पहले से तय किया गया प्रीडिकेट, जो पहले कॉल शुरू होने पर ट्रिगर होता है |
पब्लिक कंस्ट्रक्टर | |
---|---|
BugreportCollector(ITestInvocationListener listener, ITestDevice testDevice)
|
सार्वजनिक तरीके | |
---|---|
void
|
addPredicate(BugreportCollector.Predicate p)
|
void
|
blockUntilIdle()
जब तक कलेक्टर कोई गड़बड़ी की रिपोर्ट इकट्ठा नहीं कर रहा है, तब तक ब्लॉक करें. |
TestSummary
|
getSummary()
|
void
|
invocationEnded(long elapsedTime)
|
void
|
invocationFailed(Throwable cause)
|
void
|
invocationStarted(IInvocationContext context)
|
void
|
setAsynchronous(boolean asynchronous)
सेट करें कि गड़बड़ी की रिपोर्ट इकट्ठा करने की सुविधा, गड़बड़ी की रिपोर्ट को किसी दूसरी थ्रेड में इकट्ठा करे ( |
void
|
setDescriptiveName(String name)
गड़बड़ी की रिपोर्ट रिकॉर्ड करते समय इस्तेमाल करने के लिए, जानकारी देने वाला नाम सेट करें. |
void
|
setDeviceWaitTime(int waitTime)
बग रिपोर्ट कैप्चर करने से पहले, डिवाइस के ऑनलाइन होने का इंतज़ार करने के लिए समय (सेकंड में) सेट करें. |
void
|
testAssumptionFailure(TestDescription test, String trace)
|
void
|
testEnded(TestDescription test,
|
void
|
testFailed(TestDescription test, String trace)
|
void
|
testIgnored(TestDescription test)
|
void
|
testLog(String dataName, LogDataType dataType, InputStreamSource dataStream)
|
void
|
testRunEnded(long elapsedTime,
|
void
|
testRunFailed(String errorMessage)
|
void
|
testRunStarted(String runName, int testCount)
|
void
|
testRunStopped(long elapsedTime)
|
void
|
testStarted(TestDescription test)
|
फ़ील्ड्स की फ़िल्में
AFTER_FAILED_TESTCASES
public static final BugreportCollector.Predicate AFTER_FAILED_TESTCASES
पहले से तय किया गया प्रीडिकेट, जो हर बार टेस्ट केस पूरा न होने पर ट्रिगर होता है
AT_START
public static final BugreportCollector.Predicate AT_START
पहले से तय किया गया प्रीडिकेट, जो पहले कॉल शुरू होने पर ट्रिगर होता है
पब्लिक कंस्ट्रक्टर
BugreportCollector
public BugreportCollector (ITestInvocationListener listener, ITestDevice testDevice)
पैरामीटर | |
---|---|
listener |
ITestInvocationListener |
testDevice |
ITestDevice |
सार्वजनिक तरीके
addPredicate
public void addPredicate (BugreportCollector.Predicate p)
पैरामीटर | |
---|---|
p |
BugreportCollector.Predicate |
blockUntilIdle
public void blockUntilIdle ()
जब तक कलेक्टर कोई गड़बड़ी की रिपोर्ट इकट्ठा नहीं कर रहा है, तब तक ब्लॉक करें. अगर कलेक्टर, गड़बड़ी की रिपोर्ट इकट्ठा नहीं कर रहा है, तो तुरंत वापस आएं
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 |
setAsynchronous
public void setAsynchronous (boolean asynchronous)
सेट करें कि गड़बड़ी की रिपोर्ट इकट्ठा करने की सुविधा, गड़बड़ी की रिपोर्ट को किसी दूसरी थ्रेड में इकट्ठा करे (asynchronous = true
) या गड़बड़ी की रिपोर्ट कैप्चर होने तक कॉलर को ब्लॉक करे (asynchronous = false
).
पैरामीटर | |
---|---|
asynchronous |
boolean |
setDescriptiveName
public void setDescriptiveName (String name)
गड़बड़ी की रिपोर्ट रिकॉर्ड करते समय इस्तेमाल करने के लिए, जानकारी देने वाला नाम सेट करें. अगर null
,
BugreportCollector
उस इवेंट के नाम को सीरियलाइज़ करने के डिफ़ॉल्ट व्यवहार पर वापस आ जाएगा जिसकी वजह से गड़बड़ी की रिपोर्ट इकट्ठा की गई थी.
पैरामीटर | |
---|---|
name |
String |
setDeviceWaitTime
public void setDeviceWaitTime (int waitTime)
बग रिपोर्ट कैप्चर करने से पहले, डिवाइस के ऑनलाइन होने का इंतज़ार करने के लिए समय (सेकंड में) सेट करें. अगर यह वैल्यू 'नहीं' है, तो कोई जांच नहीं की जाएगी. इस जांच के दौरान मिलने वाले किसी भी DeviceNotAvailableException
को लॉग कर दिया जाएगा और उसे अनदेखा कर दिया जाएगा.
पैरामीटर | |
---|---|
waitTime |
int |
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 |