ITestLifeCycleReceiver
  public
  
  
  
  interface
  ITestLifeCycleReceiver
  
  
  
| com.android.tradefed.result.ITestLifeCycleReceiver | 
इंस्ट्रूमेंटेशन टेस्ट के दौरान, इवेंट की सूचनाएं मिलती हैं.
org.junit.runner.notification.RunListener के पैटर्न के हिसाब से
कॉल का क्रम इस तरह होगा:
- testRunStarted
- testStarted
- [testFailed]
- [testAssumptionFailure]
- [testIgnored]
- testEnded
- ....
- [testRunFailed]
- testRunEnded
खास जानकारी
| सार्वजनिक तरीके | |
|---|---|
| 
        
        default
        
        
        
        void | 
      testAssumptionFailure(TestDescription test, String trace)
      जब कोई परमाणु टेस्ट फ़्लैग करता है कि वह किसी ऐसी शर्त को मानता है जो गलत है, तब इसे कॉल किया जाता है | 
| 
        
        default
        
        
        
        void | 
      testAssumptionFailure(TestDescription test, FailureDescription failure)
      जब कोई परमाणु टेस्ट फ़्लैग करता है कि वह किसी ऐसी शर्त को मानता है जो गलत है, तब इसे कॉल किया जाता है | 
| 
        
        default
        
        
        
        void | 
      testEnded(TestDescription test, long endTime, 
 | 
| 
        
        default
        
        
        
        void | 
      testEnded(TestDescription test, किसी टेस्ट केस के पूरा होने की जानकारी देता है. | 
| 
        
        default
        
        
        
        void | 
      testFailed(TestDescription test, FailureDescription failure)
      किसी टेस्ट केस के फ़ेल होने की रिपोर्ट करता है. | 
| 
        
        default
        
        
        
        void | 
      testFailed(TestDescription test, String trace)
      किसी टेस्ट केस के फ़ेल होने की रिपोर्ट करता है. | 
| 
        
        default
        
        
        
        void | 
      testIgnored(TestDescription test)
      जब कोई टेस्ट नहीं चलेगा, तब इसे कॉल किया जाएगा. आम तौर पर, ऐसा तब होता है, जब किसी टेस्ट मेथड को org.junit.Ignore के साथ एनोटेट किया गया हो. | 
| 
        
        default
        
        
        
        void | 
      testRunEnded(long elapsedTimeMillis, टेस्ट रन खत्म होने की रिपोर्ट दिखाता है. | 
| 
        
        default
        
        
        
        void | 
      testRunFailed(FailureDescription failure)
      
 | 
| 
        
        default
        
        
        
        void | 
      testRunFailed(String errorMessage)
      रिपोर्ट की जांच पूरी नहीं हो सकी, क्योंकि कोई गंभीर गड़बड़ी हुई. | 
| 
        
        default
        
        
        
        void | 
      testRunStarted(String runName, int testCount, int attemptNumber)
      टेस्ट रन शुरू होने की जानकारी देता है. | 
| 
        
        default
        
        
        
        void | 
      testRunStarted(String runName, int testCount)
      टेस्ट रन शुरू होने की जानकारी देता है. | 
| 
        
        default
        
        
        
        void | 
      testRunStarted(String runName, int testCount, int attemptNumber, long startTime)
      टेस्ट रन शुरू होने की जानकारी देता है. | 
| 
        
        default
        
        
        
        void | 
      testRunStopped(long elapsedTime)
      उपयोगकर्ता के अनुरोध की वजह से, रिपोर्ट की जांच पूरी होने से पहले ही रोक दी गई. | 
| 
        
        default
        
        
        
        void | 
      testSkipped(TestDescription test, SkipReason reason)
      जब किसी टेस्ट को स्किप किया जाता है और वह किसी ऐसी वजह से नहीं चलता है जिसकी आम तौर पर उम्मीद नहीं की जाती, तब इसे ट्रिगर किया जाता है. | 
| 
        
        default
        
        
        
        void | 
      testStarted(TestDescription test, long startTime)
      
 | 
| 
        
        default
        
        
        
        void | 
      testStarted(TestDescription test)
      किसी टेस्ट केस के शुरू होने की जानकारी देता है. | 
सार्वजनिक तरीके
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) | 
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: गड़बड़ी का स्टैक ट्रेस | 
testIgnored
public void testIgnored (TestDescription test)
जब कोई टेस्ट नहीं चलेगा, तब इसे कॉल किया जाएगा. आम तौर पर, ऐसा तब होता है, जब किसी टेस्ट मेथड को org.junit.Ignore के साथ एनोटेट किया गया हो.
| पैरामीटर | |
|---|---|
| test | TestDescription: टेस्ट की पहचान करता है | 
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()से मेज़र किया जाता है | 
testRunStopped
public void testRunStopped (long elapsedTime)
उपयोगकर्ता के अनुरोध की वजह से, रिपोर्ट की जांच पूरी होने से पहले ही रोक दी गई.
TODO: फ़िलहाल इस्तेमाल नहीं किया जा रहा है, इसे हटाने पर विचार करें
| पैरामीटर | |
|---|---|
| elapsedTime | long: डिवाइस से मिलीसेकंड में, बीत चुका समय | 
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()से मेज़र किया जाता है | 
testStarted
public void testStarted (TestDescription test)
किसी टेस्ट केस के शुरू होने की जानकारी देता है. पुराने इंटरफ़ेस में, जब भी हो सके testStarted(com.android.tradefed.result.TestDescription) का इस्तेमाल करना चाहिए.
| पैरामीटर | |
|---|---|
| test | TestDescription: टेस्ट की पहचान करता है | 
