Starting March 27, 2025, we recommend using android-latest-release
instead of aosp-main
to build and contribute to AOSP. For more information, see Changes to AOSP.
Stay organized with collections
Save and categorize content based on your preferences.
NativeStressTest
public
class
NativeStressTest
extends Object
implements
IDeviceTest,
IRemoteTest
java.lang.Object
|
↳ |
com.android.tradefed.testtype.NativeStressTest
|
A Test that runs a native stress test executable on given device.
It uses
NativeStressTestParser
to parse out number of iterations completed and report
those results to the
ITestInvocationListener
s.
Summary
Public constructors
NativeStressTest
public NativeStressTest ()
Public methods
getDevice
public ITestDevice getDevice ()
Get the device under test.
getModuleName
public String getModuleName ()
Get the Android native test module to run.
Returns |
String |
the name of the native test module to run, or null if not set |
setDevice
public void setDevice (ITestDevice device)
Inject the device under test.
setModuleName
public void setModuleName (String moduleName)
Set the Android native stress test module to run.
Parameters |
moduleName |
String : The name of the native test module to run |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2023-03-08 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-03-08 UTC."],[],[],null,["# NativeStressTest\n================\n\n\n`\npublic\n\n\nclass\nNativeStressTest\n`\n\n\n`\n\nextends Object\n\n\n`\n\n`\n\n\nimplements\n\n`[IDeviceTest](../../../../../../reference/tradefed/com/android/tradefed/testtype/IDeviceTest.html)`,\n\n`[IRemoteTest](../../../../../../reference/tradefed/com/android/tradefed/testtype/IRemoteTest.html)`\n\n\n`\n\n|---|------------------------------------------------|\n| java.lang.Object ||\n| ↳ | com.android.tradefed.testtype.NativeStressTest |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nA Test that runs a native stress test executable on given device.\n\n\u003cbr /\u003e\n\nIt uses [NativeStressTestParser](../../../../../../reference/tradefed/com/android/tradefed/testtype/NativeStressTestParser.html) to parse out number of iterations completed and report those results to the [ITestInvocationListener](../../../../../../reference/tradefed/com/android/tradefed/result/ITestInvocationListener.html)s.\n\n\u003cbr /\u003e\n\nSummary\n-------\n\n| ### Public constructors ||\n|-----------------------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[NativeStressTest](../../../../../../reference/tradefed/com/android/tradefed/testtype/NativeStressTest.html#NativeStressTest())`() ` |\n\n| ### Public methods ||\n|-----------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` `[ITestDevice](../../../../../../reference/tradefed/com/android/tradefed/device/ITestDevice.html) | ` `[getDevice](../../../../../../reference/tradefed/com/android/tradefed/testtype/NativeStressTest.html#getDevice())`() ` Get the device under test. |\n| ` String` | ` `[getModuleName](../../../../../../reference/tradefed/com/android/tradefed/testtype/NativeStressTest.html#getModuleName())`() ` Get the Android native test module to run. |\n| ` void` | ` `[run](../../../../../../reference/tradefed/com/android/tradefed/testtype/NativeStressTest.html#run(com.android.tradefed.invoker.TestInformation,%20com.android.tradefed.result.ITestInvocationListener))`(`[TestInformation](../../../../../../reference/tradefed/com/android/tradefed/invoker/TestInformation.html)` testInfo, `[ITestInvocationListener](../../../../../../reference/tradefed/com/android/tradefed/result/ITestInvocationListener.html)` listener) ` Runs the tests, and reports result to the listener. |\n| ` void` | ` `[setDevice](../../../../../../reference/tradefed/com/android/tradefed/testtype/NativeStressTest.html#setDevice(com.android.tradefed.device.ITestDevice))`(`[ITestDevice](../../../../../../reference/tradefed/com/android/tradefed/device/ITestDevice.html)` device) ` Inject the device under test. |\n| ` void` | ` `[setModuleName](../../../../../../reference/tradefed/com/android/tradefed/testtype/NativeStressTest.html#setModuleName(java.lang.String))`(String moduleName) ` Set the Android native stress test module to run. |\n\nPublic constructors\n-------------------\n\n### NativeStressTest\n\n```\npublic NativeStressTest ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nPublic methods\n--------------\n\n### getDevice\n\n```\npublic ITestDevice getDevice ()\n```\n\nGet the device under test.\n\n\u003cbr /\u003e\n\n| Returns ||\n|--------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------|\n| [ITestDevice](../../../../../../reference/tradefed/com/android/tradefed/device/ITestDevice.html) | the [ITestDevice](../../../../../../reference/tradefed/com/android/tradefed/device/ITestDevice.html) \u003cbr /\u003e |\n\n### getModuleName\n\n```\npublic String getModuleName ()\n```\n\nGet the Android native test module to run.\n\n\u003cbr /\u003e\n\n| Returns ||\n|----------|----------------------------------------------------------------------|\n| `String` | the name of the native test module to run, or null if not set \u003cbr /\u003e |\n\n### run\n\n```\npublic void run (TestInformation testInfo, \n ITestInvocationListener listener)\n```\n\nRuns the tests, and reports result to the listener.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `testInfo` | `TestInformation`: The [TestInformation](../../../../../../reference/tradefed/com/android/tradefed/invoker/TestInformation.html) object containing useful information to run tests. \u003cbr /\u003e |\n| `listener` | `ITestInvocationListener`: the [ITestInvocationListener](../../../../../../reference/tradefed/com/android/tradefed/result/ITestInvocationListener.html) of test results \u003cbr /\u003e |\n\n| Throws ||\n|----------------------------------------------------------------------------------------------------------------------------------|---|\n| [DeviceNotAvailableException](../../../../../../reference/tradefed/com/android/tradefed/device/DeviceNotAvailableException.html) | |\n\n### setDevice\n\n```\npublic void setDevice (ITestDevice device)\n```\n\nInject the device under test.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------|-----------------------------------------------------------------------------------------------------------------------------------|\n| `device` | `ITestDevice`: the [ITestDevice](../../../../../../reference/tradefed/com/android/tradefed/device/ITestDevice.html) to use \u003cbr /\u003e |\n\n### setModuleName\n\n```\npublic void setModuleName (String moduleName)\n```\n\nSet the Android native stress test module to run.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|--------------|------------------------------------------------------------|\n| `moduleName` | `String`: The name of the native test module to run \u003cbr /\u003e |"]]