Hello,
I am using ESP32 with esp-idf. I found out, that there is possible to add unit tests for components. Is it possible to add unit tests for the main app?
Unit tests for main app
-
- Posts: 71
- Joined: Sat Mar 02, 2019 8:06 pm
Re: Unit tests for main app
It's needed for me as well
-
- Posts: 71
- Joined: Sat Mar 02, 2019 8:06 pm
Re: Unit tests for main app
As I understood, the approach putting you logic into one monolite file is NOK, as it becomes hard-to-read.
I propose to divide your code into components, compose Kconfig files for each of components, then your code becomes unit-testable.
P.S. By the way, when I refactored my code and injected unit-tests, I managed to see and solve some unobvious bugs
I propose to divide your code into components, compose Kconfig files for each of components, then your code becomes unit-testable.
P.S. By the way, when I refactored my code and injected unit-tests, I managed to see and solve some unobvious bugs
-
- Posts: 9
- Joined: Fri May 13, 2022 6:08 am
Re: Unit tests for main app
That example doesn't show how to test code in "main" - it doesn't seem possible.
Is it?
Is it?
Who is online
Users browsing this forum: Majestic-12 [Bot] and 261 guests