27 মার্চ, 2025 থেকে, আমরা AOSP তৈরি করতে এবং অবদান রাখতে aosp-main
এর পরিবর্তে android-latest-release
ব্যবহার করার পরামর্শ দিচ্ছি। আরও তথ্যের জন্য, AOSP-তে পরিবর্তনগুলি দেখুন।
একটি ফলাফল রিপোর্টার তৈরি করুন
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
এই পৃষ্ঠাটি কীভাবে একটি নতুন ফলাফল রিপোর্টারকে বাস্তবায়ন করতে হয় এবং একটি পরীক্ষার জন্য এটি কনফিগার করতে হয় তার মূল বিষয়গুলি বর্ণনা করে৷
মূল ইন্টারফেস
Tradefed-এ একটি নতুন ফলাফল প্রতিবেদককে সংজ্ঞায়িত করার জন্য, একটি ক্লাসকে ITestInvocationListener
ইন্টারফেস প্রয়োগ করতে হবে যা আহ্বানের বিভিন্ন ধাপ গ্রহণ এবং পরিচালনা করতে দেয়:
-
invocationStarted
-
invocationEnded
-
invocationFailed
ফলাফল রিপোর্টাররা প্রতিটি পরীক্ষার রানের বিভিন্ন ধাপও পরিচালনা করে:
-
testRunStarted
-
testStarted
-
testFailed
বা testIgnored
-
testEnded
-
testRunFailed
-
testRunEnded
এই সমস্ত ইভেন্টের পরিপ্রেক্ষিতে, দুটি প্রধান ধরণের ফলাফল রিপোর্টার রয়েছে, যেগুলি:
- শুধুমাত্র চূড়ান্ত সম্পূর্ণ ফলাফল রিপোর্ট সম্পর্কে যত্ন.
- আংশিক ফলাফলের বিষয়ে ব্যবস্থা নিন।
ফলাফল রিপোর্টার যে চূড়ান্ত সম্পূর্ণ ফলাফল রিপোর্ট
ফলাফল প্রাপ্ত একটি বহিরাগত পরিষেবার সাথে ইন্টারঅ্যাক্ট করার ক্ষেত্রে এই প্রকারটি সবচেয়ে সাধারণ ঘটনা। প্রতিবেদক কেবল ফলাফলগুলি গ্রহণ করে এবং জমা করে এবং তারপরে সেগুলিকে শেষ বিন্দুতে invocationEnded
পাঠায়।
আমরা সুপারিশ করি যে সেই রিপোর্টাররা বেস ইন্টারফেসের পরিবর্তে CollectingTestListener
প্রসারিত করুন যাতে invocationEnded
হওয়া পর্যন্ত ফলাফলগুলি সংরক্ষণ এবং সংরক্ষণ করা পুনরায় প্রয়োগ করা এড়ানো যায়।
ফলাফল রিপোর্টার যে আংশিক ফলাফল রিপোর্ট
এই প্রকারটি সাধারণত ফলাফলের স্ট্রিমিং পদ্ধতির জন্য ব্যবহৃত হয়, যখন ফলাফলগুলি প্রাপ্ত হয় এবং সাথে সাথে অন্য কিছু জায়গায় ঠেলে দেওয়া হয়। উদাহরণস্বরূপ, কনসোলে ফলাফল লগ করা একজন রিপোর্টার এই ধরনের হবে।
ইভেন্টগুলিতে কোন ধরনের হ্যান্ডলিং প্রয়োজন তা এই প্রকারটি নির্দিষ্ট, তাই বেস ইন্টারফেস প্রয়োগ করা সাধারণত প্রস্তাবিত উপায়।
XML কনফিগারেশন
অবজেক্ট ট্যাগ হল result_reporter
। যেমন:
<result_reporter class="com.android.tradefed.result.ConsoleResultReporter">
<option name="suppress-passed-tests" value="true"/>
</result_reporter>
এই পৃষ্ঠার কন্টেন্ট ও কোডের নমুনাগুলি Content License-এ বর্ণিত লাইসেন্সের অধীনস্থ। Java এবং OpenJDK হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-29 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-29 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["# Create a result reporter\n\nThis page describes the basics of how to implement a new result reporter and\nconfigure it for a test.\n\nCore interface\n--------------\n\nIn order to define a new result reporter in Tradefed, a class must implement\nthe\n[`ITestInvocationListener`](https://android.googlesource.com/platform/tools/tradefederation/+/refs/heads/android16-release/invocation_interfaces/com/android/tradefed/result/ITestInvocationListener.java)\ninterface that allows receiving and handling different stages of the\ninvocation:\n\n- `invocationStarted`\n- `invocationEnded`\n- `invocationFailed`\n\nResult reporters also handle the different stages of each test run:\n\n- `testRunStarted`\n- `testStarted`\n- `testFailed` or `testIgnored`\n- `testEnded`\n- `testRunFailed`\n- `testRunEnded`\n\nGiven all these events, there are two main types of result reporters, those that:\n\n- Care only about reporting the final complete results.\n- Take action on partial results.\n\n### Result reporter that reports final complete results\n\nThis type is the most common case when it comes to interacting with an external\nservice that receives the results. The reporter simply receives and accumulates\nthe results and then sends them all on `invocationEnded` to the result end-point.\n\nWe recommend that those reporters extend `CollectingTestListener` instead\nof the base interface in order to avoid reimplementing saving and storing the\nresults until `invocationEnded`.\n\n### Result reporter that reports partial results\n\nThis type is usually used for a streaming approach of the results, when results\nare received and pushed to some other places right away. For example, a reporter\nthat logs the results to the console would be of this type.\n\nThis type is specific to which type of handling is required on the events,\nso implementing the base interface is usually the recommended way.\n\n### XML configuration\n\nThe object tag is `result_reporter`. For example: \n\n \u003cresult_reporter class=\"com.android.tradefed.result.ConsoleResultReporter\"\u003e\n \u003coption name=\"suppress-passed-tests\" value=\"true\"/\u003e\n \u003c/result_reporter\u003e"]]