קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
חבילה של בדיקות של ספקי Android (VTS) מספקת בדיקות מקיפות בנושאים הבאים:
בועה
שכבת הפשטת חומרה (HAL)
VTS פועל במחשב שולחני ומריץ מקרי בדיקה ישירות במכשירים מחוברים או במהדמנים. בדומה ל-CTS, VTS הוא חבילת בדיקות אוטומטית שמשתמשת ברכיבי התוכנה העיקריים הבאים:
ערכת הבדיקות Trade Federation של VTS פועלת במכונה המארחת ומנהלת את ביצוע הבדיקות. הוא מאפשר להגדיר חלוקה לפלחים במספר מכשירים שנבדקים (DUT). אפשר גם להשתמש בתכונה Suite Retry כדי לנסות שוב רק את הבדיקות שנכשלו, במקום את כל חבילות הבדיקות. כך אפשר לקצר משמעותית את זמן ההרצה מחדש.
מקרי בדיקה ספציפיים מבוצעים ב-DUT. מקרי הבדיקה יכולים להיות בדיקות בסגנון GTest, בדיקות ליבה או בדיקות בסגנון JUnit שנכתבו ב-Java.
סוגי הבדיקות
הסוגים השונים של בדיקות VTS מתוארים בקטעים הבאים.
בדיקות בסגנון GTest
רוב הבדיקות ב-VTS הן בדיקות בסגנון GTest שבודקות את ההטמעה של HAL. הבדיקה נכתבת ב-C++ ופועלת במכשיר. בדיקת GTest רגילה של VTS עוברת על כל מופע של ממשק נתון ומריצה את כל תרחישי הבדיקה נגדו. לדוגמה, אפשר לעיין ב-VtsHalHealthStorageV1_0TargetTest.
בדיקות של ליבה של Linux
Kselftest (external/linux-kselftest) הוא אוסף של בדיקות שכלולות במאגר הליבה של Linux (tools/testing/selftests), מתוכן 23 נכללות ב-VTS להרצה ב-ARM.
בדיקות של Linux Test Project (external/ltp) מאמתות את האמינות, העמידות והיציבות של ליבה של Linux.
בדיקות בסגנון JUnit
קבוצה קטנה של בדיקות מבוססות-מארח ב-VTS הן בדיקות בסגנון JUnit, למשל KernelApiSysfsTest.
בדיקות Java מוטמעות בתור BaseHostJUnit4Test, שמשויך למכשיר בדיקה ויכול להריץ פקודות מעטפת כדי לבצע אימות.
בדיקות Python3 עצמאיות
חלק מבדיקות ה-VTS, כמו vts_treble_sys_prop_test, נכתבות ב-Python3. הבדיקות שמבוססות על Python מוטמעות כ-unittest.TestCase, וכל תרחיש בדיקה יכול לקיים אינטראקציה עם המכשיר באמצעות פקודות מעטפת.
דוגמאות התוכן והקוד שבדף הזה כפופות לרישיונות המפורטים בקטע רישיון לתוכן. Java ו-OpenJDK הם סימנים מסחריים או סימנים מסחריים רשומים של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-27 (שעון 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-27 (שעון UTC)."],[],[],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."]]