শব্দার্থবিদ্যা
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
রচনায় UI পরীক্ষাগুলি UI অনুক্রমের সাথে ইন্টারঅ্যাক্ট করতে শব্দার্থবিদ্যা ব্যবহার করে। শব্দার্থবিদ্যা, নাম থেকে বোঝা যায়, UI এর একটি অংশকে অর্থ দেয়। এই প্রসঙ্গে, একটি "টুকরো ইউআই" (বা উপাদান) বলতে একটি একক কম্পোজেবল থেকে একটি পূর্ণ স্ক্রীন পর্যন্ত যেকোন কিছু বোঝাতে পারে৷ শব্দার্থবিদ্যা ট্রি UI অনুক্রমের পাশাপাশি উত্পন্ন হয় এবং শ্রেণিবিন্যাস বর্ণনা করে।
আপনি কম্পোজের শব্দার্থবিদ্যায় সাধারণত শব্দার্থবিদ্যা সম্পর্কে আরও শিখতে পারেন।

চিত্র 1. একটি সাধারণ UI অনুক্রম এবং এর শব্দার্থবিদ্যা গাছ।
শব্দার্থবিদ্যা ফ্রেমওয়ার্ক প্রাথমিকভাবে অ্যাক্সেসযোগ্যতার জন্য ব্যবহৃত হয়, তাই পরীক্ষাগুলি UI শ্রেণিবিন্যাসের বিষয়ে শব্দার্থবিদ্যা দ্বারা প্রকাশিত তথ্যের সুবিধা নেয়। বিকাশকারীরা সিদ্ধান্ত নেয় কী এবং কতটা প্রকাশ করতে হবে।

চিত্র 2. একটি আইকন এবং পাঠ্য ধারণকারী একটি সাধারণ বোতাম।
উদাহরণস্বরূপ, একটি আইকন এবং একটি পাঠ্য উপাদান নিয়ে গঠিত এই ধরনের একটি বোতাম দেওয়া হলে, ডিফল্ট শব্দার্থবিদ্যা ট্রিতে শুধুমাত্র "লাইক" টেক্সট লেবেল থাকে। এর কারণ হল কিছু কম্পোজেবল, যেমন Text
, ইতিমধ্যেই শব্দার্থবিদ্যা গাছের কিছু বৈশিষ্ট্য প্রকাশ করে। আপনি একটি Modifier
ব্যবহার করে শব্দার্থবিদ্যা গাছে বৈশিষ্ট্য যোগ করতে পারেন।
MyButton(
modifier = Modifier.semantics { contentDescription = "Add to favorites" }
)
অতিরিক্ত সম্পদ
- অ্যান্ড্রয়েডে অ্যাপ পরীক্ষা করুন : প্রধান অ্যান্ড্রয়েড টেস্টিং ল্যান্ডিং পৃষ্ঠাটি পরীক্ষার মৌলিক বিষয় এবং কৌশলগুলির একটি বিস্তৃত দৃশ্য প্রদান করে।
- পরীক্ষার মৌলিক বিষয়গুলি : একটি Android অ্যাপ পরীক্ষা করার পিছনে মূল ধারণাগুলি সম্পর্কে আরও জানুন।
- স্থানীয় পরীক্ষা : আপনি আপনার নিজস্ব ওয়ার্কস্টেশনে স্থানীয়ভাবে কিছু পরীক্ষা চালাতে পারেন।
- ইন্সট্রুমেন্টেড পরীক্ষা : যন্ত্রযুক্ত পরীক্ষা চালানোও ভালো অভ্যাস। অর্থাৎ, যে পরীক্ষাগুলি সরাসরি ডিভাইসে চলে।
- ক্রমাগত ইন্টিগ্রেশন : ক্রমাগত ইন্টিগ্রেশন আপনাকে আপনার পরীক্ষাগুলিকে আপনার স্থাপনার পাইপলাইনে একত্রিত করতে দেয়।
- বিভিন্ন স্ক্রীনের মাপ পরীক্ষা করুন : ব্যবহারকারীদের জন্য উপলব্ধ কিছু অনেক ডিভাইসের সাথে, আপনার বিভিন্ন স্ক্রীন মাপের জন্য পরীক্ষা করা উচিত।
- এসপ্রেসো : ভিউ-ভিত্তিক UI-এর উদ্দেশ্যে, Espresso জ্ঞান এখনও রচনা পরীক্ষার কিছু দিকগুলির জন্য সহায়ক হতে পারে।
এই পৃষ্ঠার কন্টেন্ট ও কোডের নমুনাগুলি Content License-এ বর্ণিত লাইসেন্সের অধীনস্থ। Java এবং OpenJDK হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-08-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-08-27 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["# Semantics\n\nUI tests in Compose use *semantics* to interact with the UI hierarchy.\nSemantics, as the name implies, give meaning to a piece of UI. In this context,\na \"piece of UI\" (or element) can mean anything from a single composable to a\nfull screen. The *semantics tree* is generated alongside the UI hierarchy and\ndescribes the hierarchy.\n\nYou can learn more about semantics generally in [Semantics in Compose](/develop/ui/compose/accessibility/semantics).\n\n**Figure 1.** A typical UI hierarchy and its semantics tree.\n\nThe semantics framework is primarily used for accessibility, so tests take\nadvantage of the information exposed by semantics about the UI hierarchy.\nDevelopers decide what and how much to expose.\n\n**Figure 2.** A typical button containing an icon and text.\n\nFor example, given a button like this that consists of an icon and a text\nelement, the default semantics tree only contains the text label \"Like\". This is\nbecause some composables, such as `Text`, already expose some properties to the\nsemantics tree. You can add properties to the semantics tree by using a\n`Modifier`. \n\n MyButton(\n modifier = Modifier.semantics { contentDescription = \"Add to favorites\" }\n )\n\nAdditional Resources\n--------------------\n\n- **[Test apps on Android](/training/testing)**: The main Android testing landing page provides a broader view of testing fundamentals and techniques.\n- **[Fundamentals of testing](/training/testing/fundamentals):** Learn more about the core concepts behind testing an Android app.\n- **[Local tests](/training/testing/local-tests):** You can run some tests locally, on your own workstation.\n- **[Instrumented tests](/training/testing/instrumented-tests):** It is good practice to also run instrumented tests. That is, tests that run directly on-device.\n- **[Continuous integration](/training/testing/continuous-integration):** Continuous integration lets you integrate your tests into your deployment pipeline.\n- **[Test different screen sizes](/training/testing/different-screens):** With some many devices available to users, you should test for different screen sizes.\n- **[Espresso](/training/testing/espresso)**: While intended for View-based UIs, Espresso knowledge can still be helpful for some aspects of Compose testing."]]