InstalledInstrumentationsTest

public class InstalledInstrumentationsTest
extends Object implements IAutoRetriableTest, IConfigurationReceiver, IDeviceTest, IMetricCollectorReceiver, IShardableTest

java.lang.Object
   ↳ com.android.tradefed.testtype.InstalledInstrumentationsTest


मौजूदा डिवाइस पर मौजूद सभी इंस्ट्रुमेंटेशन चलाता है.

खास जानकारी

सार्वजनिक कंस्ट्रक्टर

InstalledInstrumentationsTest()

पब्लिक मेथड

ITestDevice getDevice()

जांच के लिए डिवाइस को तैयार करें.

void run(TestInformation testInfo, ITestInvocationListener listener)

जांच करता है और नतीजे को लिसनर को रिपोर्ट करता है.

void setConfiguration(IConfiguration configuration)

इस कुकी का इस्तेमाल, IConfiguration को इंजेक्ट करने के लिए किया जाता है.

void setDevice(ITestDevice device)

जांच किए जाने वाले डिवाइस को इंजेक्ट करें.

void setMetricCollectors(List<IMetricCollector> collectors)

इससे टेस्ट रन के लिए तय किए गए IMetricCollector की सूची सेट की जाती है.

boolean shouldRetry(int attemptJustExecuted, List<TestRunResult> previousResults, Set<String> skipList)

IRetryDecision.shouldRetry(IRemoteTest,int,List) ने ऐक्सेस दिया.

Collection<IRemoteTest> split(int shardCountHint)

split() का वैकल्पिक वर्शन. यह shardCount भी दिखाता है जिसे चलाने की कोशिश की गई है.

सार्वजनिक कंस्ट्रक्टर

InstalledInstrumentationsTest

public InstalledInstrumentationsTest ()

पब्लिक मेथड

getDevice

public ITestDevice getDevice ()

जांच के लिए डिवाइस को तैयार करें.

रिटर्न
ITestDevice ITestDevice

रन

public void run (TestInformation testInfo, 
                ITestInvocationListener listener)

जांच करता है और नतीजे को लिसनर को रिपोर्ट करता है.

पैरामीटर
testInfo TestInformation: यह TestInformation ऑब्जेक्ट है. इसमें टेस्ट चलाने के लिए काम की जानकारी होती है.

listener ITestInvocationListener: जांच के नतीजों का ITestInvocationListener

थ्रो
DeviceNotAvailableException

setConfiguration

public void setConfiguration (IConfiguration configuration)

इस कुकी का इस्तेमाल, IConfiguration को इंजेक्ट करने के लिए किया जाता है.

पैरामीटर
configuration IConfiguration

setDevice

public void setDevice (ITestDevice device)

जांच किए जाने वाले डिवाइस को इंजेक्ट करें.

पैरामीटर
device ITestDevice: इस्तेमाल करने के लिए ITestDevice

setMetricCollectors

public void setMetricCollectors (List<IMetricCollector> collectors)

इससे टेस्ट रन के लिए तय किए गए IMetricCollector की सूची सेट की जाती है.

पैरामीटर
collectors List

shouldRetry

public boolean shouldRetry (int attemptJustExecuted, 
                List<TestRunResult> previousResults, 
                Set<String> skipList)

IRetryDecision.shouldRetry(IRemoteTest,int,List) ने ऐक्सेस दिया. तय करें कि फिर से कोशिश करनी है या नहीं. इसके अलावा, IRemoteTest में ज़रूरी बदलाव करें, ताकि इसे फिर से आज़माया जा सके. जैसे, फ़िल्टर लागू करना, अगला रन तैयार करना वगैरह.

पैरामीटर
attemptJustExecuted int: यह उस कोशिश की संख्या है जिसे हमने अभी-अभी पूरा किया है.

previousResults List: अभी-अभी किए गए टेस्ट के TestRunResult की सूची.

skipList Set: उन आइटम का सेट जिनके लिए फिर से कोशिश नहीं करनी चाहिए.

रिटर्न
boolean अगर हमें फिर से कोशिश करनी चाहिए, तो True दिखाता है. ऐसा न होने पर, False दिखाता है.

थ्रो
DeviceNotAvailableException

बांटें

public Collection<IRemoteTest> split (int shardCountHint)

split() का वैकल्पिक वर्शन. यह shardCount भी दिखाता है जिसे चलाने की कोशिश की गई है. यह उन टेस्ट रनर के लिए काम का है जो कभी-कभी मनमुताबिक फ़ैसले नहीं ले पाते.

पैरामीटर
shardCountHint int: शार्ड की संख्या.

रिटर्न
Collection<IRemoteTest> सबटेस्ट का कलेक्शन, जिसे अलग-अलग तरीके से लागू किया जाना है या null अगर टेस्ट को फ़िलहाल शेयर नहीं किया जा सकता