اعتبارًا من 27 آذار (مارس) 2025، ننصحك باستخدام android-latest-release
بدلاً من aosp-main
لإنشاء AOSP والمساهمة فيه. لمزيد من المعلومات، يُرجى الاطّلاع على التغييرات في AOSP.
سير عمل تطوير الاختبارات
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
لدمج الاختبارات في خدمة اختبار مستمر على المنصة، يجب أن تستوفي
الإرشادات الواردة في هذه الصفحة وأن تتّبع هذه العملية المقترَحة.
- استخدِم نظام إنشاء Soong
لإعداد اختبار بسيط.
- استخدِم ميزة ربط الاختبار ل
إنشاء قواعد اختبار قبل إرسال التطبيق وبعده مباشرةً في شجرة مصدر Android.
- يمكنك إجراء الاختبارات محليًا باستخدام Atest.
أنواع الاختبارات
في ما يلي أنواع الاختبارات المتوافقة:
تُجري الاختبارات الوظيفية عمليات تأكيد على النجاح أو الفشل في حالات الاختبار، في حين تُجري اختبارات المقاييس
بشكل عام إجراءً بشكل متكرر لجمع مقاييس التوقيت.
باستخدام تنسيق الإدخال/الإخراج الموحّد، يمكن التخلص من الحاجة إلى تحليل النتائج المخصّصة
وعمليات ما بعد المعالجة لكل اختبار، ويمكن استخدام مجموعات الاختبار العامة
لجميع الاختبارات التي تتوافق مع الاصطلاح. اطّلِع على نظرة عامة على Trade Federation لإطار الاختبار المستمر
المضمّن في Android.
إرشادات حول حالات الاختبار
من المتوقّع أن تكون حالات الاختبار التي يتم تنفيذها من خلال خدمة الاختبار المستمر
محكمة، ما يعني أنّه يتمّ الإعلان عن جميع التبعيات وتقديمها مع
الاختبارات. اطّلِع على الخوادم المُحكمة في مدوّنة اختبار Google
لفهم هذا المبدأ. باختصار، لا تتطلّب الاختبارات المحكمة أيًّا مما يلي:
- تسجيل الدخول إلى حساب Google
- تم ضبط إمكانية الاتصال (الاتصال الهاتفي/Wi-Fi/البلوتوث/NFC)
- مَعلمات الاختبار التي تم تمريرها
- عملية الإعداد أو الإيقاف التي يجريها برنامج اختبار لحالة اختبار معيّنة
يخضع كل من المحتوى وعيّنات التعليمات البرمجية في هذه الصفحة للتراخيص الموضحّة في ترخيص استخدام المحتوى. إنّ 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,["# Test development workflow\n\nTo integrate tests into a platform continuous testing service, they should meet\nthe guidelines on this page and follow this recommended flow.\n\n1. Use the [Soong build system](https://android.googlesource.com/platform/build/soong/) for [Simple Test Configuration](/docs/core/tests/development/blueprints).\n2. Employ [Test Mapping](/docs/core/tests/development/test-mapping) to create pre- and post-submit test rules directly in the Android source tree.\n3. Run tests locally using [Atest](/docs/core/tests/development/atest).\n\nTest types\n----------\n\nSupported test types are:\n\n- [Instrumentation tests](/docs/core/tests/development/instrumentation) support both functional and metrics tests. See [Test your app](https://developer.android.com/studio/test/) for general app testing guidance.\n- [GoogleTest](/docs/core/tests/development/gtest) (GTest) supports the following test types:\n - [Functional GTests](/docs/core/tests/development/gtest-func-e2e) using the [GTest](https://github.com/google/googletest) framework\n - [Metric tests](/docs/core/tests/development/metrics) using [`google-benchmark`](https://github.com/google/benchmark)\n- [JAR host tests](/docs/core/tests/development/jar) using JUnit\n\nFunctional tests make assertions of pass or fail on test cases, while metrics\ntests generally perform an action repeatedly to collect timing metrics.\n\nWith standardized input/output format, the need for customized result parsing\nand post-processing per test is eliminated, and generic test harnesses can be\nused for all tests that fit into the convention. See the [Trade Federation\nOverview](/docs/core/tests/tradefed) for the continuous test framework\nincluded with Android.\n\nTest case guidelines\n--------------------\n\nTest cases executed through the continuous testing service are expected to be\n**hermetic** , meaning that all dependencies are declared and provided with the\ntests. See [Hermetic Servers on the Google Testing\nBlog](https://testing.googleblog.com/2012/10/hermetic-servers.html)\nfor an understanding of this principle. In short, hermetic tests require **no**:\n\n- Google Account sign-in\n- Connectivity configured (telephony/Wi-Fi/Bluetooth/NFC)\n- Test parameters passed in\n- Setup or tear down performed by test harness for a specific test case"]]