हमारा सुझाव है कि 27 मार्च, 2025 से AOSP को बनाने और उसमें योगदान देने के लिए, aosp-main
के बजाय android-latest-release
का इस्तेमाल करें. ज़्यादा जानकारी के लिए, AOSP में हुए बदलाव लेख पढ़ें.
गड़बड़ी के डेटा को अपने-आप इकट्ठा करने की सुविधा
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
टेस्ट को डीबग करते समय, गड़बड़ी और टेस्ट किए जा रहे डिवाइस की बुनियादी जानकारी पाने के लिए, लॉग का एक सेट हमेशा ज़रूरी होता है.
सोर्स में ये शामिल हैं: Logcat, Tradefed होस्ट लॉग, स्क्रीनशॉट वगैरह.
टेस्ट लिखने वाले किसी भी व्यक्ति के लिए, उन लॉग को आसानी से और बिना किसी परेशानी के पाने के लिए,
Tradefed में एक सुविधा पहले से मौजूद है.
कॉन्फ़िगरेशन
अगर कोई लॉग इकट्ठा नहीं हो पाता है, तो उसे अपने-आप इकट्ठा करने के लिए, अपनी Tradefed कमांड लाइन में यह विकल्प जोड़ा जा सकता है:
--auto-collect LOGCAT_ON_FAILURE
or
--auto-collect SCREENSHOT_ON_FAILURE
संभावित वैल्यू की पूरी सूची देखने के लिए, AutoLogCollector देखें
सुविधा के लिए, logcat और स्क्रीनशॉट, दोनों के लिए सीधे तौर पर फ़्लैग करने की सुविधा है:
--logcat-on-failure
and
--screenshot-on-failure
सुइट मॉड्यूल (AndroidTest.xml) के बारे में जानकारी
मॉड्यूल, AndroidTest.xml
में इस विकल्प को सीधे तौर पर नहीं बता सकते. हालांकि, वे इसके बजाय मॉड्यूल कंट्रोलर का इस्तेमाल कर सकते हैं.
इस पेज पर मौजूद कॉन्टेंट और कोड सैंपल कॉन्टेंट के लाइसेंस में बताए गए लाइसेंस के हिसाब से हैं. 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,["# Automated log on failure collection\n\nWhen debugging tests, a set of logs is always needed to get a basic picture of\nthe failure and the device under test.\nSources include: Logcat, Tradefed host log, screenshot, etc.\n\nIn order to make it generic and painless for any test writer to get those logs,\nTradefed has a built-in mechanism to help collecting them.\n\nConfiguration\n-------------\n\nTo automatically collect some logs on failure, you can add the following option\nto your Tradefed command line: \n\n --auto-collect LOGCAT_ON_FAILURE\n or\n --auto-collect SCREENSHOT_ON_FAILURE\n\nTo see the full list of possible values, checkout\n[AutoLogCollector](https://android.googlesource.com/platform/tools/tradefederation/+/android16-release/src/com/android/tradefed/device/metric/AutoLogCollector.java)\n\nFor convenience, logcat and screenshot each have a direct flag: \n\n --logcat-on-failure\n and\n --screenshot-on-failure\n\nNote on suite modules (AndroidTest.xml)\n---------------------------------------\n\nModules cannot direcly specify this option in the `AndroidTest.xml`, but they\ncan use a [module controller](/docs/core/tests/tradefed/testing/through-suite/module-controller)\ninstead."]]