27 Mart 2025'ten itibaren AOSP'yi derlemek ve AOSP'ye katkıda bulunmak için aosp-main
yerine android-latest-release
kullanmanızı öneririz. Daha fazla bilgi için AOSP'de yapılan değişiklikler başlıklı makaleyi inceleyin.
Test geliştirme iş akışı
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Testlerin bir platform sürekli test hizmetine entegre edilebilmesi için bu sayfadaki yönergelere uymaları ve önerilen akışa uymaları gerekir.
- Basit Test Yapılandırması için Soong derleme sistemini kullanın.
- Doğrudan Android kaynak ağacında gönderme öncesi ve sonrası test kuralları oluşturmak için Test eşleme özelliğini kullanın.
- Atest'i kullanarak testleri yerel olarak çalıştırın.
Test türleri
Desteklenen test türleri şunlardır:
İşlevsel testler, test durumlarında başarılı veya başarısız olduğunu iddia ederken metrik testleri genellikle zamanlama metriklerini toplamak için bir işlemi tekrar tekrar gerçekleştirir.
Standartlaştırılmış giriş/çıkış biçimi sayesinde, test başına özelleştirilmiş sonuç ayrıştırma ve son işleme ihtiyacı ortadan kalkar ve genel test donanım kitleri, sözleşmeye uyan tüm testler için kullanılabilir. Android'e dahil olan sürekli test çerçevesi için Trade Federation'a Genel Bakış başlıklı makaleyi inceleyin.
Test kaydı yönergeleri
Sürekli test hizmeti aracılığıyla yürütülen test durumlarının hermetik olması beklenir. Yani tüm bağımlılıkların testlerle birlikte beyan edilmesi ve sağlanması gerekir. Bu ilkeyi anlamak için Google Testing Blog'undaki Hermetic Servers başlıklı makaleyi inceleyin. Özetlemek gerekirse, hermetik testler için şunlar gerekli değildir:
- Google Hesabı'nda oturum açma
- Bağlantı yapılandırıldı (telefon/kablosuz/Bluetooth/NFC)
- İletilen test parametreleri
- Belirli bir test durumu için test donanımı tarafından gerçekleştirilen kurulum veya kaldırma işlemi
Bu sayfadaki içerik ve kod örnekleri, İçerik Lisansı sayfasında açıklanan lisanslara tabidir. Java ve OpenJDK, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-07-27 UTC.
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 2025-07-27 UTC."],[],[],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"]]