โปรแกรมรวบรวมข้อมูลแอป
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ

ใช้เครื่องมือ Crawler ซึ่งเป็นส่วนหนึ่งของ Jetpack เพื่อทดสอบโดยอัตโนมัติ
แอปของคุณโดยไม่ต้องเขียนหรือดูแลรักษาโค้ดใดๆ
Crawler จะทำงานควบคู่ไปกับแอปของคุณ ซึ่งจะออกการดำเนินการโดยอัตโนมัติ
(แตะ ปัด ฯลฯ) เพื่อสำรวจพื้นที่สถานะของแอป
การรวบรวมข้อมูลจะสิ้นสุดโดยอัตโนมัติเมื่อไม่มีการดำเนินการที่ไม่ซ้ำกับ
ดำเนินการ แอปขัดข้อง หรือถึงระยะหมดเวลาที่คุณกำหนดแล้ว
การทดสอบกับ Crawler นั้นทำได้ง่าย เนื่องจากไม่มีโค้ดที่ต้องเขียนหรือบำรุงรักษา
นอกจากนี้ คุณยังสามารถเรียกใช้โปรแกรมดังกล่าวบนอุปกรณ์ต่างๆ เพื่อตรวจหาข้อขัดข้อง การแสดงภาพ
หรือปัญหาด้านประสิทธิภาพ โดยทั่วไปแล้ว เป็นความคิดที่ดีที่จะใช้
บริการในระบบคลาวด์ เช่น Firebase Test
Lab เพื่อทดสอบชุดค่าผสมหลายๆ ชุด
ขนาดหน้าจอและการกำหนดค่าฮาร์ดแวร์ได้ง่ายและรวดเร็วขึ้น
กลุ่มเป้าหมาย
โปรแกรมรวบรวมข้อมูลแอปกำหนดเป้าหมายไปยังนักพัฒนาซอฟต์แวร์ที่ต้องการดูแลให้แอปของตนเป็นไปขั้นพื้นฐาน
ฟังก์ชันการกำหนดค่าขั้นต่ำ นอกเหนือจากกล่องที่ทึบแสงเท่านั้น
ก็สามารถกำหนดค่าโปรแกรมรวบรวมข้อมูลให้ระบุอินพุตเฉพาะ
เช่น ข้อมูลเข้าสู่ระบบหรือลิงก์ในรายละเอียด
เริ่มต้นใช้งาน
ก่อนเริ่ม โปรดตรวจสอบว่าคุณมี Android SDK เวอร์ชันล่าสุด
ซึ่งมาพร้อมกับ Android Studio
หากคุณติดตั้ง Android SDK แบบสแตนด์อโลน โปรดตรวจสอบว่า SDK มี SDK
เครื่องมือรุ่นล่าสุดและเครื่องมือของแพลตฟอร์ม
จากนั้น ให้ดาวน์โหลดไบนารีของโปรแกรมรวบรวมข้อมูล
ที่เก็บถาวร
ถัดไป ให้เริ่มโปรแกรมจำลองหรือเชื่อมต่ออุปกรณ์จริงโดยใช้สาย USB
ยืนยันว่าอุปกรณ์เชื่อมต่อแล้วโดยเรียกใช้คำสั่งต่อไปนี้
adb devices
หากต้องการเรียกใช้ Crawler ให้แตกไฟล์ที่เก็บถาวรไปยังไดเรกทอรีของ
จากไดเรกทอรีดังกล่าว ให้เรียกใช้ Crawler โดยใช้คำสั่งต่อไปนี้
java -jar crawl_launcher.jar --apk-file path/to/my/app.apk --android-sdk path/to/my/android/sdk
ตัวเลือกของ Crawler
คุณใช้ตัวเลือกต่อไปนี้เพื่อเรียกใช้ Crawler ได้
ตัวเลือก | คำอธิบาย |
--android-sdk path
|
ระบุเส้นทางไปยัง Android SDK ของคุณ
ซึ่งเป็นการแจ้งที่จำเป็น
|
--apk-file file
|
ระบุเส้นทางไปยัง APK ของแอป ซึ่งจะจากนั้น App Crawler จะติดตั้งและทำการ Crawl
นี่เป็นแฟล็กที่จำเป็นหากไม่ได้ระบุ --app-package-name
|
--app-package-name name
|
ระบุชื่อแพ็กเกจของแอป ใช้ตัวเลือกนี้เมื่อติดตั้งแอปของคุณแล้ว
ที่อุปกรณ์ และไม่จำเป็นต้องติดตั้งใหม่
นี่เป็นแฟล็กที่จำเป็นหากไม่ได้ระบุ --apk-file
|
--key-store path
|
ระบุเส้นทางไปยังคีย์สโตร์ที่รับรอง APK ของแอปและ Crawler ใช้ตัวเลือกนี้
เมื่อแอปของคุณต้องใช้ลายเซ็นเฉพาะเพื่อให้ทำงานได้อย่างถูกต้อง
|
--key-store-password password
|
ระบุรหัสผ่านสำหรับคีย์สโตร์ที่คุณระบุสำหรับตัวเลือก --key-store
นี่เป็นแฟล็กที่จำเป็นหากระบุ --key-store ไว้
|
--timeout-sec timeout
|
ระบุระยะหมดเวลาสำหรับการรวบรวมข้อมูลเป็นวินาที หากไม่ได้ระบุ การ Crawl จะหยุดลงหลังจาก 60 วัน
วินาที
|
ปัญหาที่ทราบ
ลบไฟล์ลายเซ็นต้นฉบับไม่สำเร็จ
ก่อนเริ่มการ Crawl ผู้ใช้ JDK 9 อาจเห็นข้อความแสดงข้อผิดพลาดนี้
androidx.test.tools.crawler.launcher.exceptions.ApkSigningException: Failed to delete original signature files
หากคุณพบพฤติกรรมนี้ เราขอแนะนำให้ใช้ JDK 8 หรือ 10+ สำหรับข้อมูลเพิ่มเติม
เกี่ยวกับปัญหานี้ โปรดดู
ข้อบกพร่องของ JDK 9
ผู้ใช้บางรายแก้ไขปัญหาด้วยการสร้าง APK ใหม่โดยใช้เวอร์ชันที่อัปเดตแล้ว
ของ Android Studio
แหล่งข้อมูลเพิ่มเติม
สำหรับข้อมูลเพิ่มเติมเกี่ยวกับการใช้งานโปรแกรมรวบรวมข้อมูลแอป โปรดดูที่
แหล่งข้อมูลต่อไปนี้
ตัวอย่างเนื้อหาและโค้ดในหน้าเว็บนี้ขึ้นอยู่กับใบอนุญาตที่อธิบายไว้ในใบอนุญาตการใช้เนื้อหา 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,["# App Crawler\n\nUse the App Crawler tool, part of [Jetpack](/jetpack), to automatically test\nyour app without the need to write or maintain any code.\n\nThe crawler runs alongside your app, automatically issuing actions\n(tap, swipe, etc.) to explore the state-space of your app.\nThe crawl terminates automatically when there are no more unique actions to\nperform, the app crashes, or a timeout you designate is reached.\n\nTesting with the crawler is easy because there's no code to write or maintain.\nMoreover, you can run it on a variety of devices to look for crashes, visual\nissues, or performance problems. Typically, it's a good idea to use a\ncloud-based service like [Firebase Test\nLab](https://firebase.google.com/docs/test-lab/) to test multiple combinations\nof screen sizes and hardware configurations more easily and quickly.\n\nTarget audience\n---------------\n\nApp Crawler is targeted at developers who want to ensure their app's basic\nfunctionality with minimal configuration. In addition to purely opaque-box\ntesting, the crawler can also be configured to provide specific inputs,\nsuch as login credentials or deep links.\n\nGetting started\n---------------\n\nBefore starting, make sure you have a recent version of the Android SDK.\nThis comes with [Android Studio](/studio).\nIf you install a standalone Android SDK, make sure it includes the latest\nlatest build tools and platform tools.\n\nThen, [download the crawler binary\narchive](https://dl.google.com/appcrawler/beta1/app-crawler.zip).\n\nNext, either start an emulator or connect a physical device using a USB cable.\nConfirm the device is connected by running the following command: \n\n```\nadb devices\n```\n\nTo invoke the crawler, first extract the archive to the directory of your\nchoice. From that directory, invoke the crawler using the following command: \n\n```\njava -jar crawl_launcher.jar --apk-file path/to/my/app.apk --android-sdk path/to/my/android/sdk\n```\n\nCrawler options\n---------------\n\nYou can use the following options to invoke the crawler:\n\n| Option | Description |\n|-----------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `--android-sdk `\u003cvar translate=\"no\"\u003epath\u003c/var\u003e | Specifies the path to your Android SDK. This is a **required** flag. |\n| `--apk-file `\u003cvar translate=\"no\"\u003efile\u003c/var\u003e | Specifies the path to your app APK, which App Crawler then installs and crawls. This is a **required** flag if `--app-package-name` isn't specified. |\n| `--app-package-name `\u003cvar translate=\"no\"\u003ename\u003c/var\u003e | Specifies the package name of your app. Use this option when your app is already installed on the device and no re-installation is required. This is a **required** flag if `--apk-file` isn't specified. |\n| `--key-store `\u003cvar translate=\"no\"\u003epath\u003c/var\u003e | Specifies the path to the keystore that signs your app and crawler APKs. Use this option when your app requires a specific signature to function properly. |\n| `--key-store-password `\u003cvar translate=\"no\"\u003epassword\u003c/var\u003e | Specifies the password for the keystore you provided for `--key-store` option. This is a **required** flag if `--key-store` is specified. |\n| `--timeout-sec `\u003cvar translate=\"no\"\u003etimeout\u003c/var\u003e | Specifies the timeout for your crawl in seconds. If not specified, the crawl stops after 60 seconds. |\n\nKnown issues\n------------\n\n**Failed to delete original signature files**\n\nPrior to the start of the crawl, JDK 9 users may see this error message: \n\n```\nandroidx.test.tools.crawler.launcher.exceptions.ApkSigningException: Failed to delete original signature files\n```\n\nIf you experience this behavior, we recommend using JDK 8 or 10+. For more\ninformation on this issue, see this\n[JDK 9 bug](https://bugs.openjdk.java.net/browse/JDK-8184940).\nSome users have fixed the issue by rebuilding their APK using an updated version\nof Android Studio.\n\nAdditional resources\n--------------------\n\nFor more information about using App Crawler, consult the\nfollowing resources.\n\n- [Firebase Test Lab Robo Test](https://firebase.google.com/docs/test-lab/android/robo-ux-test) contains detailed documentation as well as instructions for how to run crawler tests in the cloud."]]