Test framework
The nRF Connect SDK provides support for writing tests using the following methods:
Zephyr’s native Test Framework (Ztest). This framework has features specific to the Zephyr RTOS, such as test scaffolding and setup or teardown functions. Ztest in the nRF Connect SDK by Cryptography tests, which you can check as reference.
The nRF Connect SDK’s framework based on Unity and CMock. Read Writing tests with Unity and CMock for more information.
You can run these tests using either west or Twister, as described in Running unit tests.