Currently, I am working with an ESP-IDF and try to get unit testing to work.
I already found https://esp-idf.readthedocs.io/en/latest/api-guides/unit-tests.html, but there is a point which I don't understand.
But first, let me explain my setup:
IDF_PATH
points to ~/esp-idf, where my esp-idf suite sits.If I follow the instructions in the unit test guides, I can build the test cases which are built into the system. But it does not find the unit tests of my application. This is clear, as they sit somewhere completely else.
What am I supposed to do now? Perferrably without tampering with the default unit test app too much?
I can see several approaches, but I don't know what is the intended way to add own components resp. their test cases into the said app:
To test an application it is not enough to use unit tests. You must also perform functional testing and regression testing. Database access falls outside the scope of unit testing, so you would not write unit tests that include database access.
Unit testing frameworks control the execution of test scenarios and generate test reports. SASUnit is a unit testing framework for SAS programs and SAS macros and is itself implemented as a SAS macro package.
ESP-IDF is Espressif's official IoT Development Framework for the ESP32, ESP32-S, ESP32-C and ESP32-H series of SoCs. It provides a self-sufficient SDK for any generic application development on these platforms, using programming languages such as C and C++.
Angular Unit testing is the process of testing small and isolated pieces of code in your Angular application. This provides an added advantage to the users in the sense that they can add any new features without breaking any other part of their application.
The ESP-IDF unit test setup is actually designed for testing its own internal components, and to help anyone adding to those.
To unit test your own project separately, take a look at this example project that shows how to create a Unity unit test application alongside a proper project. Note that the project itself is called unit_test
, so the test application is unit_test_test
. The component is called testable
. (I'm flagging that because it confused me; interpret unit_test
like you might read example_app
or myproject
.)
Failing that, this ESP forum post also gives a way to include your components in their unit test app:
make -C ${IDF_PATH}/tools/unit-test-app EXTRA_COMPONENT_DIRS=/path/to/my_proj/components TEST_COMPONENTS=mycomponent
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With