Skip to content
Back to skills

Testing Debugging

ASecurity

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.

  • 63 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 1, 2026
testingtestingdebuggingbackendci/cdperformance

Security analysis

A100/100

Pro scans all 7 files and shows the line behind each finding

Scanned September 1, 2026

npx -y skills add beriberikix/zephyr-agent-skills --skill testing-debugging --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Testing Debugging?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Testing Debugging
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/beriberikix-testing-debugging/badge)](https://www.skillsdirectory.com/skills/beriberikix-testing-debugging)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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.
---

# Zephyr Testing & Debugging

Ensure code quality and system reliability using Zephyr's comprehensive testing framework and observability tools.

## Core Workflows

### 1. Ztest Framework
Write robust unit and integration tests for native simulation and real hardware.
- **Reference**: **[ztest_framework.md](references/ztest_framework.md)**
- **Key Tools**: `ZTEST_SUITE`, `ZTEST`, `zassert_equal`.

### 2. Twister Test Runner
Automate test execution across multiple platforms and generate professional reports.
- **Reference**: **[twister_testing.md](references/twister_testing.md)**
- **Key Tools**: `twister` script, `testcase.yaml`, hardware mapping.

### 3. Tracing & Debugging
Analyze system behavior, timing, and memory usage with advanced tracing tools.
- **Reference**: **[tracing_debugging.md](references/tracing_debugging.md)**
- **Key Tools**: `CONFIG_TRACING`, Segger SystemView, Thread Analyzer.

## Quick Start (Ztest)
```c
#include <zephyr/ztest.h>

ZTEST_SUITE(basic_test, NULL, NULL, NULL, NULL, NULL);

ZTEST(basic_test, test_pass) {
    zassert_true(true, "Boolean evaluation failed");
}
```

## Professional Patterns (Reliability)
- **Continuous Integration**: Integrate Twister reports (`twister.json`) into CI/CD pipelines for automated regression testing.
- **HIL Validation**: Use hardware maps to consistently run critical hardware tests on real devices during every release cycle.
- **Stack Safety**: Always enable `CONFIG_STACK_SENTINEL` and the Thread Analyzer during development to catch memory issues early.

## Automation Tools
- **[twister_smoke.py](scripts/twister_smoke.py)**: Run a small Twister suite and print result summary.

## Examples & Templates
- **[testcase.yaml.template](assets/testcase.yaml.template)**: Starter testcase metadata for Twister.

## Validation Checklist
- [ ] `twister` executes selected test suites with no unexpected failures.
- [ ] At least one `ZTEST` suite runs in simulation and reports pass/fail correctly.
- [ ] Tracing or thread-analyzer output is captured and reviewed for hotspots.
- [ ] CI artifacts include machine-readable reports (for example `twister.json`).

## Resources

- **[References](references/)**:
  - `ztest_framework.md`: Writing tests with expectations and suites.
  - `twister_testing.md`: Using the test runner and metadata.
  - `tracing_debugging.md`: Tracing, stack analysis, and debugging backends.
- **[Scripts](scripts/)**:
  - `twister_smoke.py`: Lightweight Twister runner with summary output.
- **[Assets](assets/)**:
  - `testcase.yaml.template`: Reusable testcase metadata template.

Files in this skill

  • SKILL.md2.9 KB
  • assets/testcase.yaml.template328 B
  • references/tracing_debugging.md2.2 KB
  • references/twister_testing.md2.7 KB
  • references/ztest_framework.md1.7 KB
  • scripts/twister_smoke.py2.2 KB
  • skill-meta.yaml651 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in testing →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.