Начиная с 27 марта 2025 г. мы рекомендуем использовать android-latest-release
вместо aosp-main
для создания и участия в AOSP. Дополнительные сведения см. в разделе Изменения в AOSP .
Планировщик тестовых команд
Оптимизируйте свои подборки
Сохраняйте и классифицируйте контент в соответствии со своими настройками.
В Tradefed каждый тестовый запрос проходит через Command Scheduler для запуска. Таким образом, Command Scheduler является ключевым компонентом оборудования, необходимого для запуска тестов.
Жизненный цикл
Когда тестовый запрос поступает в Tradefed (например, ввод с консоли), перед запуском он проходит через следующие события:
- Тестовый запрос анализируется - Тестовый запрос обычно состоит из XML Tradefed configuration reference, за которым следуют параметры. Например:
> run host --class com.android.tradefed.build.BuildInfoTest
- Device Manager запрашивается для устройств, соответствующих тестовому запросу - Device Manager выделяет устройство , соответствующее тестовым запросам. Например, если запрашивается устройство Pixel, то Device Manager будет искать доступное устройство Pixel.
- Тестовый запрос + устройство(а) запускаются как вызов - Тестирование начинается.
- Освобождение устройства . После завершения вызова выделенное устройство будет освобождено и может быть выделено для других тестов.
Трейдфед вызов
Вызов в Tradefed относится к моменту выполнения тестовой команды. Устройства, включенные в вызов, помечаются как allocated
и не могут использоваться другими тестами для запуска.
TF выполнит следующие шаги в указанном порядке:
- Сборка и тестирование артефактов скачать
- Подготовка мишени
- Выполнение теста
- Целевая очистка
- Отчет о результатах
Каждый шаг более подробно описан в разделе «Архитектура» .
Контент и образцы кода на этой странице предоставлены по лицензиям. Java и OpenJDK – это зарегистрированные товарные знаки корпорации Oracle и ее аффилированных лиц.
Последнее обновление: 2025-07-29 UTC.
[[["Прост для понимания","easyToUnderstand","thumb-up"],["Помог мне решить мою проблему","solvedMyProblem","thumb-up"],["Другое","otherUp","thumb-up"]],[["Отсутствует нужная мне информация","missingTheInformationINeed","thumb-down"],["Слишком сложен/слишком много шагов","tooComplicatedTooManySteps","thumb-down"],["Устарел","outOfDate","thumb-down"],["Проблема с переводом текста","translationIssue","thumb-down"],["Проблемы образцов/кода","samplesCodeIssue","thumb-down"],["Другое","otherDown","thumb-down"]],["Последнее обновление: 2025-07-29 UTC."],[],[],null,["# Test Command Scheduler\n\nIn Tradefed, every single test request goes through the\n[Command Scheduler](https://android.googlesource.com/platform/tools/tradefederation/+/refs/heads/android16-release/src/com/android/tradefed/command/CommandScheduler.java)\nto be run. So the Command Scheduler is a key component of the harness needed to\nrun tests.\n\nLifecycle\n---------\n\nWhen a test request is presented to Tradefed (for example, input from the\nconsole), it will go through the following events before being run:\n\n1. *Test request is parsed* - A test request is usually composed of an XML Tradefed configuration reference followed by options. For example: `\u003e run host --class com.android.tradefed.build.BuildInfoTest`\n2. *Device Manager is requested for device(s) matching the test request* - Device Manager [allocates a device](/docs/core/tests/tradefed/architecture/device-manager/device-allocation) that matches the test requests. For example, if a Pixel device is requested then Device Manager will look for an available Pixel device.\n3. *Test request + device(s) starts as an invocation* - Testing is starting.\n4. *Device release* - Once the invocation is finished, the device allocated will be released and can be allocated for other tests.\n\nTradefed invocation\n-------------------\n\nAn invocation in Tradefed refers to when a test command is currently executing.\nDevices included in the invocation are marked as `allocated` and cannot be used\nby other tests to run.\n\nTF will execute the following steps in this order:\n\n1. [Build and test artifacts download](/docs/core/tests/tradefed/architecture/build-provider)\n2. [Target preparation](/docs/core/tests/tradefed/architecture/target-preparer)\n3. [Test execution](/docs/core/tests/tradefed/architecture/advanced/test-runner)\n4. [Target clean up](/docs/core/tests/tradefed/architecture/target-preparer)\n5. [Result reporting](/docs/core/tests/tradefed/architecture/result-reporter)\n\nEach step is described in more detail within the\n[Architecture section](/docs/core/tests/tradefed/architecture)."]]