اعتبارًا من 27 آذار (مارس) 2025، ننصحك باستخدام android-latest-release
بدلاً من aosp-main
لإنشاء AOSP والمساهمة فيه. لمزيد من المعلومات، يُرجى الاطّلاع على التغييرات في AOSP.
أداة جدولة طلبات الاختبار
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
في Tradefed، يتمّ تشغيل كلّ طلب اختبار من خلال
جدولة الأوامر. وبالتالي، فإنّ "جدولة الأوامر" هو عنصر أساسي في الحِزمة اللازمة ل
إجراء الاختبارات.
مراحل النشاط
عند تقديم طلب اختبار إلى Tradefed (على سبيل المثال، إدخال منconsole)، سيخضع للأحداث التالية قبل تنفيذه:
- يتم تحليل طلب الاختبار: يتألّف طلب الاختبار عادةً من مرجع إعدادات XML
Tradefed متبوعًا بالخيارات.
على سبيل المثال:
> run host --class com.android.tradefed.build.BuildInfoTest
- طلب "مدير الأجهزة" للأجهزة التي تتطابق مع طلب الاختبار:
يُخصّص "مدير الأجهزة" جهازًا
يتطابق مع طلبات الاختبار. على سبيل المثال، إذا تم طلب جهاز Pixel،
سيبحث "مدير الأجهزة" عن جهاز Pixel متاح.
- يبدأ طلب الاختبار والأجهزة كطلب استدعاء - يبدأ الاختبار.
- إلغاء تخصيص الجهاز: بعد انتهاء عملية الاستدعاء، سيتم
إلغاء تخصيص الجهاز ويمكن تخصيصه لاختبارات أخرى.
استدعاء Tradefed
يشير الطلب في Tradefed إلى وقت تنفيذ أمر اختبار حاليًا.
يتم وضع علامة allocated
على الأجهزة المضمّنة في الطلب، ولا يمكن استخدامها
من خلال الاختبارات الأخرى لإجراءها.
سينفِّذ TF الخطوات التالية بالترتيب التالي:
- تنزيل العناصر التي تم إنشاؤها واختبارها
- تحضير الاستهداف
- تنفيذ الاختبار
- إخلاء مساحة مستهدَفة
- إعداد تقارير النتائج
يتم وصف كل خطوة بمزيد من التفصيل ضمن
قسم "البنية".
يخضع كل من المحتوى وعيّنات التعليمات البرمجية في هذه الصفحة للتراخيص الموضحّة في ترخيص استخدام المحتوى. إنّ Java وOpenJDK هما علامتان تجاريتان مسجَّلتان لشركة Oracle و/أو الشركات التابعة لها.
تاريخ التعديل الأخير: 2025-07-27 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-27 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],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)."]]