Re: Testing with Zephyr

Paul Sokolovsky

Hello Johannes,

On Wed, 18 Oct 2017 17:31:28 +0200
Johannes Hutter <> wrote:

Hello everyone,

I'd be interested in the way you all are testing your applications on
top of Zephyr. It seems like the Zephyr testing framework based on
the sanityscript is intended to test kernel components, but isn't a
good fit for application testing.
Depends on requirements for the testing. Zephyr's ztest framework is
of course first of all a unit testing framework, and "sanitycheck" is a
runner for it, optimized to run across wide array of boards with
different features. Otherwise, "kernel components" are pretty much just
"components" accessed by APIs, and tests exercise these APIs - as they
would for any other software system.

If "type: unit" is set in the
testcase.yaml, the test seems to be even completely ignored by the

Does anyone have experiences in the combination of other test
frameworks like CUnit, CppUnit etc. and Zephyr?
I can just give few examples. MicroPython Zephyr port runs
tests in a way any other MicroPython ports - by establishing a REPL
communication channel, and sending Python-level testcases and
receiving replies over it. Zephyr.js
also runs tests in its own way, which is IIRC, building testcases one by
one into firmware binary, flashing, running, repeating.

So, I'd say the answer to your original question would be: "You can use
any testing framework with Zephyr (which fits into codesize
requirements). Also, there's the ztest test framework provided by


Best Regards,
Paul | Open source software for ARM SoCs
Follow Linaro:!/linaroorg -

Join to automatically receive all group messages.