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(
यह कुकी, उन फ़िल्टर का |
void
|
addAllIncludeFilters(
इसमें उन फ़िल्टर की |
void
|
addExcludeFilter(String filter)
यह फ़िल्टर जोड़ता है, ताकि यह तय किया जा सके कि किन टेस्ट को शामिल नहीं करना है. |
void
|
addIncludeFilter(String filter)
यह फ़िल्टर जोड़ता है, ताकि यह तय किया जा सके कि कौनसे टेस्ट शामिल करने हैं. |
void
|
clearExcludeFilters()
फ़िलहाल ट्रैक किए जा रहे सभी एक्सक्लूड फ़िल्टर मिटाता है. |
void
|
clearIncludeFilters()
फ़िलहाल ट्रैक किए जा रहे सभी 'शामिल करें' फ़िल्टर मिटाएं. |
abstract
String
|
findBinary(String binary)
इसे चलाने के लिए, बाइनरी खोजें. |
IAbi
|
getAbi()
|
boolean
|
getCollectTestsOnly()
|
|
getExcludeFilters()
'बाहर रखें' फ़िल्टर के मौजूदा |
|
getIncludeFilters()
शामिल किए गए फ़िल्टर के मौजूदा |
final
long
|
getRuntimeHint()
जांच के अनुमानित रनटाइम को मिलीसेकंड में दिखाता है. |
|
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
|
split(int shardHint)
|
सुरक्षित तरीके | |
|---|---|
boolean
|
doesRunBinaryGenerateTestResults()
|
boolean
|
doesRunBinaryGenerateTestRuns()
|
|
getAllTestCommands()
एक जैसा फ़ॉर्मैट बनाए रखने के लिए, mBinaryPaths को mTestCommands में बदलें. |
IConfiguration
|
getConfiguration()
यह फ़ंक्शन, टेस्ट कॉन्फ़िगरेशन दिखाता है. |
TestDescription[]
|
getFilterDescriptions(
|
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 (filters)
यह कुकी, उन फ़िल्टर का ERROR(/Set) जोड़ती है जिनसे यह तय किया जाता है कि किन टेस्ट को बाहर रखना है.
| पैरामीटर | |
|---|---|
filters |
|
addAllIncludeFilters
public void addAllIncludeFilters (filters)
इसमें उन फ़िल्टर की ERROR(/Set) जोड़ी जाती है जिनके टेस्ट शामिल करने हैं.
| पैरामीटर | |
|---|---|
filters |
|
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
publicgetExcludeFilters ()
'बाहर रखें' फ़िल्टर के मौजूदा ERROR(/Set) की जानकारी देता है.
| रिटर्न | |
|---|---|
|
|
getIncludeFilters
publicgetIncludeFilters ()
शामिल किए गए फ़िल्टर के मौजूदा ERROR(/Set) की जानकारी देता है.
| रिटर्न | |
|---|---|
|
|
getRuntimeHint
public final long getRuntimeHint ()
जांच के अनुमानित रनटाइम को मिलीसेकंड में दिखाता है. इस कुकी का इस्तेमाल, शार्ड किए गए एक्ज़ीक्यूशन के लोड को बैलेंस करने के लिए किया जाता है
| रिटर्न | |
|---|---|
long |
|
reportDependencies
publicreportDependencies ()
| रिटर्न | |
|---|---|
|
|
रन
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 |
|
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 finalsplit (int shardHint)
split() का वैकल्पिक वर्शन. यह shardCount भी दिखाता है जिसे चलाने की कोशिश की गई है. यह उन टेस्ट रनर के लिए काम का है जो कभी-कभी मनमुताबिक फ़ैसले नहीं ले पाते.
| पैरामीटर | |
|---|---|
shardHint |
int: शार्ड की संख्या. |
| रिटर्न | |
|---|---|
|
सबटेस्ट का कलेक्शन, जिसे अलग-अलग तरीके से एक्ज़ीक्यूट किया जाना है या null अगर टेस्ट को फ़िलहाल शेयर नहीं किया जा सकता है |
सुरक्षित तरीके
doesRunBinaryGenerateTestResults
protected boolean doesRunBinaryGenerateTestResults ()
| रिटर्न | |
|---|---|
boolean |
|
doesRunBinaryGenerateTestRuns
protected boolean doesRunBinaryGenerateTestRuns ()
| रिटर्न | |
|---|---|
boolean |
|
getAllTestCommands
protectedgetAllTestCommands ()
एक जैसा फ़ॉर्मैट बनाए रखने के लिए, mBinaryPaths को mTestCommands में बदलें.
| रिटर्न | |
|---|---|
|
a MapERROR(/LinkedHashMap)<string, string=""> of testCommands.</string,> |
getConfiguration
protected IConfiguration getConfiguration ()
यह फ़ंक्शन, टेस्ट कॉन्फ़िगरेशन दिखाता है.
| रिटर्न | |
|---|---|
IConfiguration |
an IConfiguration |
getFilterDescriptions
protected TestDescription[] getFilterDescriptions (testCommands)
| पैरामीटर | |
|---|---|
testCommands |
|
| रिटर्न | |
|---|---|
TestDescription[] |
|
getModuleId
protected String getModuleId (IInvocationContext context)
| पैरामीटर | |
|---|---|
context |
IInvocationContext |
| रिटर्न | |
|---|---|
String |
|
getTimeoutPerBinaryMs
protected long getTimeoutPerBinaryMs ()
| रिटर्न | |
|---|---|
long |
हर बाइनरी के एक्ज़ीक्यूशन के लिए लागू किया गया टाइम आउट. |
isTestFailed
protected boolean isTestFailed (String testName)
| पैरामीटर | |
|---|---|
testName |
String |
| रिटर्न | |
|---|---|
boolean |
|