![]() You don't specify an option, then all steps run. Use the -b, -i, and -t options to specify which steps to run. The following example shows how to run an integration test using a file pathįrom Android repo-root: atest tools/tradefederation/contrib/res/config/example/reboot.xml Package nameĪtest supports searching for tests by package name.Įxamples: atest atest Specify steps: Build, install, or run The following example shows how to run a specific class within theĬtsVideoTestCases module using a file path.įrom Android repo-root: atest cts/tests/video/src/android/video/cts/VideoEncoderDecoderTest.java Run an integration test Run from Android repo-root/cts/tests/video: atest. Run from Android repo-root: atest cts/tests/video The following examples show two ways to run the CtsVideoTestCases module using Supports running a single class by specifying the path to the class's Java file.īoth relative and absolute paths are supported. Inputting the path to their test file or directory as appropriate. Native-benchmark.xml test: atest native-benchmark File pathĪtest supports running both module-based tests and integration-based tests by Name as it appears in the output of the tradefed.sh list configs command. To run tests that are integrated directly into TradeFed (non-modules), input the Using Module:Class instead of only the class name whenever possible. To run a single class without explicitly stating a module name, use the classĮxamples: atest ScreenDecorWindowTests atest VideoEncoderDecoderTest Note: To reduce the time Atest takes to locate the correct test, we recommend Using the full class path as shown in the last example. java file, and can be the fully qualified class name or theĮxamples: atest CtsVideoTestCases:VideoEncoderDecoderTest atest FrameworksServicesTests:ScreenDecorWindowTests atest FrameworksServicesTests.ScreenDecorWindowTests Note: To reduce the time Atest takes to locate the correct test, we recommend To run a single class within a module, use Module:Class. In the LOCAL_MODULE or LOCAL_PACKAGE_NAME variables in that test'sĮxamples: atest FrameworksServicesTests atest CtsVideoTestCases Note: To run non-module tests integrated into TradeFed (TF), use TF Integration To run an entire test module, use its module name. Separate references to multiple tests with spaces, like this: atest test-identifier-1 test-identifier-2 Module name To run tests, specify one or more tests using one of the following Specify steps: build, install, or run section. Shows test results in chronological order.įor more information on -b, -i and -t, see the Note: Running a host test that requires a device with -host Runs the test completely on the host without a device. Runs the tests for all available device architectures. Specifies custom arguments for the test runners. (10Īutomatically creates an AVD and runs tests on the virtual device. Reruns failed tests until passed or the max iteration is reached. Reruns all tests until a failure occurs or the max iteration is Loop-runs tests until the max iteration is reached. Waits for debugger to finish before executing. Shows the relevant info about the specified targets, then exits.ĭry-runs Atest without actually building, installing, or running tests.įorces a rebuild of the module-info.json file. ![]() Installs test artifacts (APKs) on device. The following table lists the most commonly used arguments. Basic usageĪtest commands take the following form: atest test-to-run Optional arguments To set up your Atest environment, follow the instructions in Setting up theĮnvironment, Choosing a target, and Building the code. This page explains how to use Atest to run Androidįor general information on writing tests for Android, seeįor information on the overall structure of Atest, refer to theįor information on running tests in TEST_MAPPING files through Atest, seeĪtest Developer Workflow. Knowledge of Trade Federation test harnessĬommand line options. Atest is a command line tool that allows users to build, install, and runĪndroid tests locally, greatly speeding up test re-runs without requiring
0 Comments
Leave a Reply. |