zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.76k stars 6.57k forks source link

Establish a way to trace existing testcases back to design specification #58882

Open tobiaskaestner opened 1 year ago

tobiaskaestner commented 1 year ago

Even where design specifications and API documentation and Test Cases exist, the former are not related to the latter in an easily extractable way.

Some test cases already contain doxygen comments, e.g. test_priority_scheduling.c but this is not extracted in any way into a meaningful documentation.

So as a first step we might add doxygen to more test cases and then add test case references to the doxygen comments for API calls. Backward traces from the test cases to the API calls can then be added, too.

As an PoC we might focus on the mutex API https://docs.zephyrproject.org/latest/kernel/services/synchronization/mutexes.html#id10 and related test cases https://github.com/zephyrproject-rtos/zephyr/tree/main/tests/kernel/mutex

github-actions[bot] commented 1 year ago

Hi @tobiaskaestner! We appreciate you submitting your first issue for our open-source project. 🌟

Even though I'm a bot, I can assure you that the whole community is genuinely grateful for your time and effort. 🤖💙

simhein commented 1 year ago

@tobiaskaestner sorry for the late response this was on my agenda to add the information about the PoC of a traceability mechanism with doxygen here. The PoC can be found here: https://github.com/simhein/traceability

simhein commented 9 months ago

Just an idea: You may want to have a look at this project: OpenFastTrace It is used in automotive for requirements tracing along all artifacts from requirement to desing and tests.

Thanks for sharing. I will definitely look into it.