اعتبارًا من 27 آذار (مارس) 2025، ننصحك باستخدام android-latest-release بدلاً من aosp-main لإنشاء AOSP والمساهمة فيه. لمزيد من المعلومات، يُرجى الاطّلاع على التغييرات في AOSP.
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
توفّر مجموعة اختبارات المورّدين لنظام التشغيل Android (VTS)
اختبارًا شاملاً لما يلي:
فرقعة
طبقة تجريد الأجهزة (HAL)
يتم تشغيل VTS على
جهاز كمبيوتر مكتبي وتنفيذ حالات الاختبار مباشرةً على الأجهزة المُرفَقة أو
على المحاكيات. على غرار مجموعة أدوات اختبار التوافق (CTS)، فإنّ مجموعة أدوات اختبار الأداء (VTS) هي
مجموعة اختبارات مبرمَجة تستخدِم مكوّنات البرامج الرئيسية التالية:
يتم تشغيل حِزمة اختبار Trade Federation
VTS على جهاز المضيف وإدارة تنفيذ الاختبار. وتوفّر إمكانية
ضبط التجزئة
على مستوى أجهزة متعددة قيد الاختبار (DUT). يمكنك أيضًا استخدام ميزة إعادة محاولة إجراء الاختبار لإعادة محاولة إجراء الاختبارات التي تعذّر إكمالها فقط بدلاً من إعادة إجراء حِزم الاختبار بأكملها، ما يقلل بشكل كبير من وقت إعادة التشغيل.
يتم تنفيذ حالات الاختبار الفردية على جهاز DUT. يمكن أن تكون حالات الاختبار
اختبارات على غرار GTest أو اختبارات نواة أو اختبارات على غرار JUnit مكتوبة بلغة
Java.
أنواع الاختبارات
يتم وصف الأنواع المختلفة من اختبارات VTS في الأقسام التالية.
الاختبارات على غرار GTest
معظم الاختبارات في VTS هي اختبارات على غرار GTest تتحقّق من تنفيذ HAL. الاختبار مكتوب بلغة C++ ويتم تشغيله على الجهاز. يكرّر اختبار GTest لفحص الأداء النموذجي
كل مثيل لواجهة معيّنة، ويُجري جميع اختبارات الأداء
عليه. راجِع VtsHalHealthStorageV1_0TargetTest
للاطّلاع على مثال.
اختبارات نواة Linux
Kselftest (external/linux-kselftest)
هي مجموعة من الاختبارات المضمّنة في مستودع نواة Linux
في tools/testing/selftests، تم تضمين 23 منها في VTS لتشغيلها على ARM.
مجموعة صغيرة من الاختبارات المستندة إلى المضيف في VTS هي اختبارات على غرار JUnit، على سبيل المثال،
KernelApiSysfsTest.
يتم تنفيذ اختبارات Java على هيئة
BaseHostJUnit4Test،
والتي تكون مرتبطة بجهاز اختبار ويمكنها تنفيذ أوامر ملف التمهيد
لإجراء التحقّق.
اختبارات Python3 المستقلة
بعض اختبارات VTS، مثل
vts_treble_sys_prop_test
مكتوبة بلغة Python3. يتم تنفيذ الاختبار
ات المستندة إلى Python كـ unittest.TestCase ويمكن لكل حالة اختبار
ة التفاعل مع الجهاز من خلال أوامر shell.
يخضع كل من المحتوى وعيّنات التعليمات البرمجية في هذه الصفحة للتراخيص الموضحّة في ترخيص استخدام المحتوى. إنّ Java وOpenJDK هما علامتان تجاريتان مسجَّلتان لشركة Oracle و/أو الشركات التابعة لها.
تاريخ التعديل الأخير: 2025-07-27 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","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-27 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# Vendor Test Suite (VTS) and infrastructure\n\nThe Android Vendor Test Suite (VTS) provides\nextensive testing on the following:\n\n- Kernel\n- Hardware abstraction layer (HAL)\n\nVTS runs on a\ndesktop machine and executes test cases directly on attached devices or\non the emulators. Similar to [CTS](/docs/compatibility/cts), VTS is\nan automated test suite that uses the following major software components:\n\n- The VTS [Trade Federation](/docs/core/tests/tradefed) test harness runs on your host machine and manages test execution. It offers the ability to [Configure sharding](/docs/core/tests/tradefed/testing/through-suite/android-test-tuning) across multiple devices under test (DUTs). You can also use the [Suite Retry](/devices/tech/test_infra/tradefed/testing/through-suite/suite-retry) feature to retry only the failures rather than the entire test suites, which greatly reduces the re-run time.\n- Individual test cases are executed on the DUT. The test cases can be GTest-style tests, kernel tests, or JUnit-style tests written in Java.\n\nTypes of tests\n--------------\n\nThe various types of VTS tests are described in the following sections.\n\n### GTest-style tests\n\nMost tests in VTS are GTest-style tests that check the HAL\nimplementation. The test is\nwritten in C++ and runs on the device. A typical VTS GTest iterates through\neach instance of a given interface, and runs all the test cases\nagainst it. Refer to [`VtsHalHealthStorageV1_0TargetTest`](https://cs.android.com/android/platform/superproject/+/android-latest-release:hardware/interfaces/health/storage/1.0/vts/functional/)\nfor an example.\n\n### Linux kernel tests\n\n- Kselftest ([external/linux-kselftest](https://github.com/torvalds/linux/tree/master/tools/testing/selftests/kselftest))\n is a collection of tests included within the Linux kernel repository\n at `tools/testing/selftests`, of which 23 are included in VTS to run on ARM.\n\n- Linux Test Project ([external/ltp](https://cs.android.com/android/platform/superproject/+/android-latest-release:external/ltp/))\n tests validate the reliability, robustness, and stability of the Linux kernel.\n\n### JUnit-style tests\n\nA small set of host-driven tests in VTS are JUnit-style tests, for example,\n[`KernelApiSysfsTest`](https://cs.android.com/android/platform/superproject/+/android-latest-release:test/vts-testcase/kernel/api/sysfs/src/com/android/tests/sysfs/KernelApiSysfsTest.java).\nThe Java tests are implemented as\n[`BaseHostJUnit4Test`](https://cs.android.com/android/platform/superproject/+/android-latest-release:tools/tradefederation/core/test_framework/com/android/tradefed/testtype/junit4/BaseHostJUnit4Test.java),\nwhich is associated with a test device and can run shell\ncommands to perform validation.\n\n### Standalone Python3 tests\n\nSome VTS tests, such as\n[`vts_treble_sys_prop_test`](https://cs.android.com/android/platform/superproject/+/android-latest-release:test/vts-testcase/security/system_property/vts_treble_sys_prop_test.py)\nare written in Python3. The\nPython-based tests are implemented as `unittest.TestCase` and each test\ncase can interact with the device through shell commands.\n| **Caution:** The Python tests aren't recommended due to limited support in the Android tree. We highly recommend writing the VTS tests as GTest, or at least as JUnit-style tests."]]