ตั้งแต่วันที่ 27 มีนาคม 2025 เป็นต้นไป เราขอแนะนำให้ใช้ android-latest-release
แทน aosp-main
เพื่อสร้างและมีส่วนร่วมใน AOSP โปรดดูข้อมูลเพิ่มเติมที่หัวข้อการเปลี่ยนแปลงใน AOSP
พัฒนา Tradefed
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ส่วนนี้มีไว้สำหรับนักพัฒนาซอฟต์แวร์ Tradefed หากคุณสนใจขยายเวลาใช้ TF หรือเพิ่มการสนับสนุนการทดสอบใหม่ โปรดดูที่ส่วนนี้
โอเพนซอร์ส
หากวางแผนที่จะใช้ตัวแปรโอเพนซอร์สของ Trade Federation ให้ใช้คำสั่งต่อไปนี้เพื่อตรวจสอบและสร้างสาขา AOSP android-latest-release
ของ Trade Federation
cd <sourceroot>
mkdir android-latest-release
cd android-latest-release
repo init -u https://android.googlesource.com/platform/manifest -b android-latest-release
repo sync -c -j8
source build/envsetup.sh
lunch aosp_cf_arm64_only_phone-userdebug # or any other device target
m -j tradefed-all
ดูรายละเอียดเพิ่มเติมได้ที่สภาพแวดล้อมการพัฒนา
โค้ด Trade Federation แบบโอเพนซอร์สทั้งหมดจะจัดเก็บอยู่ในโปรเจ็กต์ tools/tradefederation/git ของ AOSP โปรดคำนึงถึงหลักเกณฑ์สำหรับซอฟต์แวร์โอเพนซอร์สเมื่อเขียนโค้ดและส่งการเปลี่ยนแปลง
หรือหากกำลังสร้างการทดสอบ/ยูทิลิตีที่ใช้ Trade Federation แต่ไม่ได้ทํางานกับเฟรมเวิร์กเอง ให้ลองวางงานของคุณไว้ในโปรเจ็กต์การมีส่วนร่วมของ Trade Federation รายการใดรายการหนึ่งเพื่อเร่งการอนุมัติ
รูปแบบการเขียนโค้ด
Trade Federation เป็นไปตามหลักเกณฑ์สไตล์การเขียนโค้ด Android โดยมีคำอธิบายเพิ่มเติมดังนี้ ชื่ออินเทอร์เฟซจะมี "I" นำหน้า เช่น ITestDevice
พัฒนาโดยใช้ Eclipse
หากสนใจใช้ Eclipse ในการพัฒนา Tradefed โปรดดูเคล็ดลับในการตั้งค่า Eclipse IDE เพื่อตั้งค่าสภาพแวดล้อม
เรียกใช้การทดสอบของ Tradefed
หากคุณทำการเปลี่ยนแปลงใน Trade Federation และกำลังค้นหาวิธีทดสอบ โปรดดูการเรียกใช้การทดสอบของ Trade Federation
สถาปัตยกรรม
หากต้องการทําความเข้าใจการทำงานภายในของ Tradefed มากขึ้น โปรดดูส่วนสถาปัตยกรรม
ตัวอย่างเนื้อหาและโค้ดในหน้าเว็บนี้ขึ้นอยู่กับใบอนุญาตที่อธิบายไว้ในใบอนุญาตการใช้เนื้อหา 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,["# Develop Tradefed\n\nThis section is aimed at Tradefed developers. If you are interested in extending\nTF or adding new test support, this is the section for you.\n\nOpen source\n-----------\n\nIf you plan to use the open source variant of Trade Federation, use these\ncommands to check out and build the AOSP `android-latest-release` branch of\nTrade Federation: \n\n cd \u003csourceroot\u003e\n mkdir android-latest-release\n cd android-latest-release\n repo init -u https://android.googlesource.com/platform/manifest -b android-latest-release\n repo sync -c -j8\n source build/envsetup.sh\n lunch aosp_cf_arm64_only_phone-userdebug # or any other device target\n m -j tradefed-all\n\nSee [Development Environment](/docs/core/tests/tradefed/fundamentals/machine_setup)\nfor more details.\n\nAll open-sourceable Trade Federation code is stored in the\n[tools/tradefederation/](https://android.googlesource.com/platform/tools/tradefederation/)\ngit project of AOSP. Please keep the\n[open source guidelines](/docs/setup/contribute/code-style)\nin mind when writing code and submitting changes.\n\nAlternatively, if you are creating tests/utilities that use Trade Federation but\naren't working on the framework itself, consider placing your work inside one of\nthe [Trade Federation contrib projects](/docs/core/tests/tradefed/development/contribute-noncore) to speed approvals.\n\nCoding style\n------------\n\nTrade Federation follows the\n[Android coding style guidelines](/source/code-style),\nwith the following clarifications: interface names are prefixed with 'I' e.g.\nITestDevice.\n\nDevelop using Eclipse\n---------------------\n\nIf you are interested in using Eclipse in developing Tradefed, refer to\n[Set up Eclipse IDE](/docs/core/tests/tradefed/development/eclipse) for tips on\nsetting up your environment.\n\nRun Tradefed's tests\n--------------------\n\nYou made a change to Trade Federation and you are searching how to test it? see\n[Running Trade Federation's tests](/docs/core/tests/tradefed/development/tf-tests).\n\nArchitecture\n------------\n\nIf you seek a deeper understanding of the innerworkings of Tradefed, see the\n[Architecture](/docs/core/tests/tradefed/architecture) section."]]