{"id":"1d1faa1b-92c4-446b-bf19-92b821df0c9c","shortId":"Rny4Nz","kind":"skill","title":"testing-debugging","tagline":"Testing and debugging for Zephyr RTOS. Covers the Ztest framework for unit and integration tests, the Twister test runner for automated HIL/SIM validation, and advanced tracing/debugging techniques (SystemView, Thread Analyzer, Stack analysis). Trigger when writing unit tests, se","description":"# Zephyr Testing & Debugging\n\nEnsure code quality and system reliability using Zephyr's comprehensive testing framework and observability tools.\n\n## Core Workflows\n\n### 1. Ztest Framework\nWrite robust unit and integration tests for native simulation and real hardware.\n- **Reference**: **[ztest_framework.md](references/ztest_framework.md)**\n- **Key Tools**: `ZTEST_SUITE`, `ZTEST`, `zassert_equal`.\n\n### 2. Twister Test Runner\nAutomate test execution across multiple platforms and generate professional reports.\n- **Reference**: **[twister_testing.md](references/twister_testing.md)**\n- **Key Tools**: `twister` script, `testcase.yaml`, hardware mapping.\n\n### 3. Tracing & Debugging\nAnalyze system behavior, timing, and memory usage with advanced tracing tools.\n- **Reference**: **[tracing_debugging.md](references/tracing_debugging.md)**\n- **Key Tools**: `CONFIG_TRACING`, Segger SystemView, Thread Analyzer.\n\n## Quick Start (Ztest)\n```c\n#include <zephyr/ztest.h>\n\nZTEST_SUITE(basic_test, NULL, NULL, NULL, NULL, NULL);\n\nZTEST(basic_test, test_pass) {\n    zassert_true(true, \"Boolean evaluation failed\");\n}\n```\n\n## Professional Patterns (Reliability)\n- **Continuous Integration**: Integrate Twister reports (`twister.json`) into CI/CD pipelines for automated regression testing.\n- **HIL Validation**: Use hardware maps to consistently run critical hardware tests on real devices during every release cycle.\n- **Stack Safety**: Always enable `CONFIG_STACK_SENTINEL` and the Thread Analyzer during development to catch memory issues early.\n\n## Automation Tools\n- **[twister_smoke.py](scripts/twister_smoke.py)**: Run a small Twister suite and print result summary.\n\n## Examples & Templates\n- **[testcase.yaml.template](assets/testcase.yaml.template)**: Starter testcase metadata for Twister.\n\n## Validation Checklist\n- [ ] `twister` executes selected test suites with no unexpected failures.\n- [ ] At least one `ZTEST` suite runs in simulation and reports pass/fail correctly.\n- [ ] Tracing or thread-analyzer output is captured and reviewed for hotspots.\n- [ ] CI artifacts include machine-readable reports (for example `twister.json`).\n\n## Resources\n\n- **[References](references/)**:\n  - `ztest_framework.md`: Writing tests with expectations and suites.\n  - `twister_testing.md`: Using the test runner and metadata.\n  - `tracing_debugging.md`: Tracing, stack analysis, and debugging backends.\n- **[Scripts](scripts/)**:\n  - `twister_smoke.py`: Lightweight Twister runner with summary output.\n- **[Assets](assets/)**:\n  - `testcase.yaml.template`: Reusable testcase metadata template.","tags":["testing","debugging","zephyr","agent","skills","beriberikix","agent-skills","agentic-coding","zephyr-rtos"],"capabilities":["skill","source-beriberikix","skill-testing-debugging","topic-agent-skills","topic-agentic-coding","topic-zephyr-rtos"],"categories":["zephyr-agent-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/beriberikix/zephyr-agent-skills/testing-debugging","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add beriberikix/zephyr-agent-skills","source_repo":"https://github.com/beriberikix/zephyr-agent-skills","install_from":"skills.sh"}},"qualityScore":"0.462","qualityRationale":"deterministic score 0.46 from registry signals: · indexed on github topic:agent-skills · 25 github stars · SKILL.md body (2,585 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-24T07:01:43.002Z","embedding":null,"createdAt":"2026-04-18T23:05:03.718Z","updatedAt":"2026-04-24T07:01:43.002Z","lastSeenAt":"2026-04-24T07:01:43.002Z","tsv":"'1':62 '2':87 '3':111 'across':94 'advanc':28,122 'alway':198 'analysi':35,301 'analyz':33,114,135,206,263 'artifact':272 'asset':314,315 'assets/testcase.yaml.template':230 'autom':24,91,175,214 'backend':304 'basic':144,152 'behavior':116 'boolean':159 'c':139 'captur':266 'catch':210 'checklist':237 'ci':271 'ci/cd':172 'code':46 'comprehens':54 'config':130,200 'consist':184 'continu':165 'core':60 'correct':258 'cover':10 'critic':186 'cycl':195 'debug':3,6,44,113,303 'develop':208 'devic':191 'earli':213 'enabl':199 'ensur':45 'equal':86 'evalu':160 'everi':193 'exampl':227,279 'execut':93,239 'expect':288 'fail':161 'failur':246 'framework':13,56,64 'generat':98 'hardwar':76,109,181,187 'hil':178 'hil/sim':25 'hotspot':270 'includ':140,273 'integr':17,69,166,167 'issu':212 'key':80,104,128 'least':248 'lightweight':308 'machin':275 'machine-read':274 'map':110,182 'memori':119,211 'metadata':233,297,319 'multipl':95 'nativ':72 'null':146,147,148,149,150 'observ':58 'one':249 'output':264,313 'pass':155 'pass/fail':257 'pattern':163 'pipelin':173 'platform':96 'print':224 'profession':99,162 'qualiti':47 'quick':136 'readabl':276 'real':75,190 'refer':77,101,125,282,283 'references/tracing_debugging.md':127 'references/twister_testing.md':103 'references/ztest_framework.md':79 'regress':176 'releas':194 'reliabl':50,164 'report':100,169,256,277 'resourc':281 'result':225 'reusabl':317 'review':268 'robust':66 'rtos':9 'run':185,218,252 'runner':22,90,295,310 'safeti':197 'script':107,305,306 'scripts/twister_smoke.py':217 'se':41 'segger':132 'select':240 'sentinel':202 'simul':73,254 'skill' 'skill-testing-debugging' 'small':220 'source-beriberikix' 'stack':34,196,201,300 'start':137 'starter':231 'suit':83,143,222,242,251,290 'summari':226,312 'system':49,115 'systemview':31,133 'techniqu':30 'templat':228,320 'test':2,4,18,21,40,43,55,70,89,92,145,153,154,177,188,241,286,294 'testcas':232,318 'testcase.yaml':108 'testcase.yaml.template':229,316 'testing-debug':1 'thread':32,134,205,262 'thread-analyz':261 'time':117 'tool':59,81,105,124,129,215 'topic-agent-skills' 'topic-agentic-coding' 'topic-zephyr-rtos' 'trace':112,123,131,259,299 'tracing/debugging':29 'tracing_debugging.md':126,298 'trigger':36 'true':157,158 'twister':20,88,106,168,221,235,238,309 'twister.json':170,280 'twister_smoke.py':216,307 'twister_testing.md':102,291 'unexpect':245 'unit':15,39,67 'usag':120 'use':51,180,292 'valid':26,179,236 'workflow':61 'write':38,65,285 'zassert':85,156 'zephyr':8,42,52 'zephyr/ztest.h':141 'ztest':12,63,82,84,138,142,151,250 'ztest_framework.md':78,284","prices":[{"id":"244b45ff-04be-4be2-aba6-e6728f3de79c","listingId":"1d1faa1b-92c4-446b-bf19-92b821df0c9c","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"beriberikix","category":"zephyr-agent-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T23:05:03.718Z"}],"sources":[{"listingId":"1d1faa1b-92c4-446b-bf19-92b821df0c9c","source":"github","sourceId":"beriberikix/zephyr-agent-skills/testing-debugging","sourceUrl":"https://github.com/beriberikix/zephyr-agent-skills/tree/main/skills/testing-debugging","isPrimary":false,"firstSeenAt":"2026-04-18T23:05:03.718Z","lastSeenAt":"2026-04-24T07:01:43.002Z"}],"details":{"listingId":"1d1faa1b-92c4-446b-bf19-92b821df0c9c","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"beriberikix","slug":"testing-debugging","github":{"repo":"beriberikix/zephyr-agent-skills","stars":25,"topics":["agent-skills","agentic-coding","zephyr-rtos"],"license":"apache-2.0","html_url":"https://github.com/beriberikix/zephyr-agent-skills","pushed_at":"2026-04-20T21:40:18Z","description":"A complete catalog of Agent Skills (agentskills.io) for Zephyr RTOS development.","skill_md_sha":"3762be5cd041c1385bbefba88050bf8a06ca407f","skill_md_path":"skills/testing-debugging/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/beriberikix/zephyr-agent-skills/tree/main/skills/testing-debugging"},"layout":"multi","source":"github","category":"zephyr-agent-skills","frontmatter":{"name":"testing-debugging","description":"Testing and debugging for Zephyr RTOS. Covers the Ztest framework for unit and integration tests, the Twister test runner for automated HIL/SIM validation, and advanced tracing/debugging techniques (SystemView, Thread Analyzer, Stack analysis). Trigger when writing unit tests, setting up CI/CD pipelines, or analyzing system performance and latency."},"skills_sh_url":"https://skills.sh/beriberikix/zephyr-agent-skills/testing-debugging"},"updatedAt":"2026-04-24T07:01:43.002Z"}}