ExecutableBaseTest
public
abstract
class
ExecutableBaseTest
extends Object
implements
IAbiReceiver,
IConfigurationReceiver,
IDiscoverDependencies,
IRemoteTest,
IRuntimeHintProvider,
IShardableTest,
ITestCollector,
ITestFilterReceiver
| java.lang.Object | |
| ↳ | com.android.tradefed.testtype.binary.ExecutableBaseTest |
यह टेस्ट के एक्ज़ीक्यूटेबल स्टाइल के लिए बेस क्लास है. उदाहरण के लिए: बाइनरी, शेल स्क्रिप्ट.
खास जानकारी
कॉन्स्टेंट | |
|---|---|
String |
NO_BINARY_ERROR
|
सार्वजनिक कंस्ट्रक्टर | |
|---|---|
ExecutableBaseTest()
|
|
पब्लिक मेथड | |
|---|---|
void
|
addAllExcludeFilters(Set<String> filters)
|
void
|
addAllIncludeFilters(Set<String> filters)
इसमें उन फ़िल्टर की |
void
|
addExcludeFilter(String filter)
इस फ़िल्टर से यह तय किया जाता है कि किन टेस्ट को शामिल नहीं करना है. |
void
|
addIncludeFilter(String filter)
इस फ़िल्टर से यह तय किया जाता है कि कौनसे टेस्ट शामिल किए जाएं. |
void
|
clearExcludeFilters()
बाहर रखने वाले उन सभी फ़िल्टर को मिटाता है जिन्हें फ़िलहाल ट्रैक किया जा रहा है. |
void
|
clearIncludeFilters()
फ़िलहाल ट्रैक किए जा रहे सभी 'शामिल करें' फ़िल्टर मिटाएं. |
abstract
String
|
findBinary(String binary)
इसे चलाने के लिए, बाइनरी खोजें. |
IAbi
|
getAbi()
|
boolean
|
getCollectTestsOnly()
|
Set<String>
|
getExcludeFilters()
यह फ़ंक्शन, बाहर रखे गए फ़िल्टर की मौजूदा |
Set<String>
|
getIncludeFilters()
यह शामिल करने वाले फ़िल्टर का मौजूदा |
final
long
|
getRuntimeHint()
जांच के अनुमानित रनटाइम को मिलीसेकंड में दिखाता है. |
Set<String>
|
reportDependencies()
|
void
|
run(TestInformation testInfo, ITestInvocationListener listener)
जांच करता है और नतीजे को लिसनर को रिपोर्ट करता है. |
abstract
void
|
runBinary(String binaryPath, ITestInvocationListener listener, TestDescription description)
दिए गए पाथ पर बाइनरी को असल में चलाता है. |
final
void
|
setAbi(IAbi abi)
|
final
void
|
setCollectTestsOnly(boolean shouldCollectTest)
इस कुकी से, टेस्ट कलेक्शन मोड को चालू या बंद किया जा सकता है |
void
|
setConfiguration(IConfiguration configuration)
इस कुकी का इस्तेमाल, |
FailureDescription
|
shouldAbortRun(TestDescription description)
देखें कि क्या testRun को समय से पहले खत्म किया जाना चाहिए. |
final
Collection<IRemoteTest>
|
split(int shardHint)
|
प्रोटेक्टेड मेथड | |
|---|---|
boolean
|
doesRunBinaryGenerateTestResults()
|
boolean
|
doesRunBinaryGenerateTestRuns()
|
Map<String, String>
|
getAllTestCommands()
कंसिस्टेंसी बनाए रखने के लिए, mBinaryPaths को mTestCommands में बदलें. |
IConfiguration
|
getConfiguration()
टेस्ट कॉन्फ़िगरेशन दिखाता है. |
TestDescription[]
|
getFilterDescriptions(Map<String, String> testCommands)
|
String
|
getModuleId(IInvocationContext context)
|
long
|
getTimeoutPerBinaryMs()
|
boolean
|
isTestFailed(String testName)
|
कॉन्स्टेंट
NO_BINARY_ERROR
public static final String NO_BINARY_ERROR
कॉन्स्टेंट वैल्यू: "Binary %s does not exist."
सार्वजनिक कंस्ट्रक्टर
ExecutableBaseTest
public ExecutableBaseTest ()
पब्लिक मेथड
addAllExcludeFilters
public void addAllExcludeFilters (Set<String> filters)
Set जोड़ता है, जिससे यह पता चलता है कि किन टेस्ट को शामिल नहीं करना है.
| पैरामीटर | |
|---|---|
filters |
Set |
addAllIncludeFilters
public void addAllIncludeFilters (Set<String> filters)
इसमें उन फ़िल्टर की Set जोड़ी जाती है जिनके टेस्ट शामिल करने हैं.
| पैरामीटर | |
|---|---|
filters |
Set |
addExcludeFilter
public void addExcludeFilter (String filter)
इस फ़िल्टर से यह तय किया जाता है कि किन टेस्ट को शामिल नहीं करना है.
| पैरामीटर | |
|---|---|
filter |
String |
addIncludeFilter
public void addIncludeFilter (String filter)
इस फ़िल्टर से यह तय किया जाता है कि कौनसे टेस्ट शामिल किए जाएं.
| पैरामीटर | |
|---|---|
filter |
String |
clearExcludeFilters
public void clearExcludeFilters ()
बाहर रखने वाले उन सभी फ़िल्टर को मिटाता है जिन्हें फ़िलहाल ट्रैक किया जा रहा है.
clearIncludeFilters
public void clearIncludeFilters ()
फ़िलहाल ट्रैक किए जा रहे सभी 'शामिल करें' फ़िल्टर मिटाएं.
findBinary
public abstract String findBinary (String binary)
इसे चलाने के लिए, बाइनरी खोजें.
| पैरामीटर | |
|---|---|
binary |
String: बाइनरी का पाथ या सिर्फ़ बाइनरी का नाम. |
| रिटर्न | |
|---|---|
String |
बाइनरी का पाथ या अगर नहीं मिला, तो शून्य. |
| थ्रो | |
|---|---|
DeviceNotAvailableException |
|
getCollectTestsOnly
public boolean getCollectTestsOnly ()
| रिटर्न | |
|---|---|
boolean |
|
getExcludeFilters
public Set<String> getExcludeFilters ()
यह फ़ंक्शन, बाहर रखे गए फ़िल्टर की मौजूदा Set वैल्यू दिखाता है.
| रिटर्न | |
|---|---|
Set<String> |
|
getIncludeFilters
public Set<String> getIncludeFilters ()
यह शामिल करने वाले फ़िल्टर का मौजूदा Set दिखाता है.
| रिटर्न | |
|---|---|
Set<String> |
|
getRuntimeHint
public final long getRuntimeHint ()
जांच के अनुमानित रनटाइम को मिलीसेकंड में दिखाता है. इस समय का इस्तेमाल, शार्ड किए गए एक्ज़ीक्यूशन को लोड बैलेंस करने के लिए किया जाता है
| रिटर्न | |
|---|---|
long |
|
reportDependencies
public Set<String> reportDependencies ()
| रिटर्न | |
|---|---|
Set<String> |
|
रन
public void run (TestInformation testInfo, ITestInvocationListener listener)
जांच करता है और नतीजे को लिसनर को रिपोर्ट करता है.
| पैरामीटर | |
|---|---|
testInfo |
TestInformation: यह TestInformation ऑब्जेक्ट है. इसमें टेस्ट चलाने के लिए काम की जानकारी होती है. |
listener |
ITestInvocationListener: जांच के नतीजों का ITestInvocationListener |
| थ्रो | |
|---|---|
DeviceNotAvailableException |
|
runBinary
public abstract void runBinary (String binaryPath,
ITestInvocationListener listener,
TestDescription description)दिए गए पाथ पर बाइनरी को असल में चलाता है.
| पैरामीटर | |
|---|---|
binaryPath |
String: बाइनरी का पाथ. |
listener |
ITestInvocationListener: वह लिसनर जहां नतीजों की रिपोर्ट की जानी है. |
description |
TestDescription: जांच जारी है. |
| थ्रो | |
|---|---|
DeviceNotAvailableException |
|
IOException |
|
setCollectTestsOnly
public final void setCollectTestsOnly (boolean shouldCollectTest)
इस कुकी से, टेस्ट कलेक्शन मोड को चालू या बंद किया जा सकता है
setConfiguration
public void setConfiguration (IConfiguration configuration)
इस कुकी का इस्तेमाल, IConfiguration को इंजेक्ट करने के लिए किया जाता है.
| पैरामीटर | |
|---|---|
configuration |
IConfiguration |
shouldAbortRun
public FailureDescription shouldAbortRun (TestDescription description)
देखें कि क्या testRun को समय से पहले खत्म किया जाना चाहिए.
| पैरामीटर | |
|---|---|
description |
TestDescription: जांच जारी है. |
| रिटर्न | |
|---|---|
FailureDescription |
अगर रन लूप को बंद करना है, तो FailureDescription. |
बांटें
public final Collection<IRemoteTest> split (int shardHint)
split() का वैकल्पिक वर्शन. यह shardCount भी दिखाता है जिसे चलाने की कोशिश की गई है. यह उन टेस्ट रनर के लिए काम का है जो कभी-कभी मनमुताबिक फ़ैसले नहीं ले पाते.
| पैरामीटर | |
|---|---|
shardHint |
int: शार्ड की संख्या. |
| रिटर्न | |
|---|---|
Collection<IRemoteTest> |
सबटेस्ट का कलेक्शन, जिसे अलग-अलग तरीके से लागू किया जाना है या null अगर टेस्ट को फ़िलहाल शेयर नहीं किया जा सकता |
प्रोटेक्टेड मेथड
doesRunBinaryGenerateTestResults
protected boolean doesRunBinaryGenerateTestResults ()
| रिटर्न | |
|---|---|
boolean |
|
doesRunBinaryGenerateTestRuns
protected boolean doesRunBinaryGenerateTestRuns ()
| रिटर्न | |
|---|---|
boolean |
|
getAllTestCommands
protected Map<String, String> getAllTestCommands ()
कंसिस्टेंसी बनाए रखने के लिए, mBinaryPaths को mTestCommands में बदलें.
| रिटर्न | |
|---|---|
Map<String, String> |
a MapLinkedHashMap<string, string=""> of testCommands.</string,> |
getConfiguration
protected IConfiguration getConfiguration ()
टेस्ट कॉन्फ़िगरेशन दिखाता है.
| रिटर्न | |
|---|---|
IConfiguration |
an IConfiguration |
getFilterDescriptions
protected TestDescription[] getFilterDescriptions (Map<String, String> testCommands)
| पैरामीटर | |
|---|---|
testCommands |
Map |
| रिटर्न | |
|---|---|
TestDescription[] |
|
getModuleId
protected String getModuleId (IInvocationContext context)
| पैरामीटर | |
|---|---|
context |
IInvocationContext |
| रिटर्न | |
|---|---|
String |
|
getTimeoutPerBinaryMs
protected long getTimeoutPerBinaryMs ()
| रिटर्न | |
|---|---|
long |
हर बाइनरी के लिए, उसके एक्ज़ीक्यूशन पर लागू होने वाला टाइम आउट. |
isTestFailed
protected boolean isTestFailed (String testName)
| पैरामीटर | |
|---|---|
testName |
String |
| रिटर्न | |
|---|---|
boolean |
|