از 27 مارس 2025، توصیه می کنیم از android-latest-release
به جای aosp-main
برای ساختن و کمک به AOSP استفاده کنید. برای اطلاعات بیشتر، به تغییرات AOSP مراجعه کنید.
آزمایشهای ابزار دقیق را از APKهای موجود اجرا کنید
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
این دستورالعمل ها فرض می کنند که شما بسته فدراسیون تجارت را به صورت محلی در دسترس دارید. اگر نه، دستورالعمل های دانلود را دنبال کنید تا آن را دریافت کنید.
سپس از دستور زیر برای نصب APK تست های ابزار دقیق، اجرای تست ها و نمایش تست های در حال اجرا استفاده کنید:
./tradefed.sh run instrumentations --apk-path <path of your apk>
با خروجی مشابه:
07-17 10:55:32 D/InvocationToJUnitResultForwarder: Starting test: android.animation.cts.ValueAnimatorTest#testOfArgb
07-17 10:55:33 D/InvocationToJUnitResultForwarder: Starting test: android.animation.cts.ValueAnimatorTest#testIsRunning
07-17 10:55:34 D/InvocationToJUnitResultForwarder: Starting test: android.animation.cts.ValueAnimatorTest#testGetCurrentPlayTime
07-17 10:55:35 D/InvocationToJUnitResultForwarder: Starting test: android.animation.cts.ValueAnimatorTest#testStartDelay
07-17 10:55:35 I/InvocationToJUnitResultForwarder: Run ended in 2m 20s
میتوانید بهصورت اختیاری --serial <device serial number>
برای اجرا در برابر یک دستگاه معین مشخص کنید. شماره سریال دستگاه شما را می توان با استفاده از adb devices
به دست آورد.
برای جزئیات بیشتر در مورد اعدام های Tradefed به بخش Testing through Tradefed مراجعه کنید.
محتوا و نمونه کدها در این صفحه مشمول پروانههای توصیفشده در پروانه محتوا هستند. جاوا و OpenJDK علامتهای تجاری یا علامتهای تجاری ثبتشده Oracle و/یا وابستههای آن هستند.
تاریخ آخرین بهروزرسانی 2025-07-29 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","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 بهوقت ساعت هماهنگ جهانی."],[],[],null,["# Run instrumentation tests from existing APKs\n\nThese instructions assume you have the Trade Federation package available\nlocally; if not,\n[follow the download instructions](/docs/core/tests/tradefed/fundamentals/machine_setup#download-tradefed)\nto obtain it.\n\nThen use the following command to install the APK of instrumentation tests,\nexecute the tests, and display the tests that are running: \n\n ./tradefed.sh run instrumentations --apk-path \u003cpath of your apk\u003e\n\nWith output resembling: \n\n 07-17 10:55:32 D/InvocationToJUnitResultForwarder: Starting test: android.animation.cts.ValueAnimatorTest#testOfArgb\n 07-17 10:55:33 D/InvocationToJUnitResultForwarder: Starting test: android.animation.cts.ValueAnimatorTest#testIsRunning\n 07-17 10:55:34 D/InvocationToJUnitResultForwarder: Starting test: android.animation.cts.ValueAnimatorTest#testGetCurrentPlayTime\n 07-17 10:55:35 D/InvocationToJUnitResultForwarder: Starting test: android.animation.cts.ValueAnimatorTest#testStartDelay\n 07-17 10:55:35 I/InvocationToJUnitResultForwarder: Run ended in 2m 20s\n\nYou can optionally specify `--serial \u003cdevice serial number\u003e` to run\nagainst a given device. The serial number of your device can be obtained\nusing `adb devices`.\n\nSee the\n[Testing through Tradefed section](/docs/core/tests/tradefed/testing/through-tf)\nfor more details about Tradefed executions."]]