Lines Matching full:test
7 …it test application that is based on the Unity - unit test framework. Unit tests are integrated in…
9 Normal Test Cases
12 Unit tests are located in the ``test`` subdirectory of a component.
13 Tests are added in C files, a single C file can include multiple test cases.
14 Test files start with the word "test".
16 Each test file should include the ``unity.h`` header and the header for the C module to be tested.
22 TEST_CASE("test name", "[module name]"
24 // Add test here
27 The first argument is a descriptive name for the test, the second argument is an identifier in squa…
28 Identifiers are used to group related test, or tests with specific properties.
31 …`` and ``UNITY_END()`` in each test case. ``unity_platform.c`` will run ``UNITY_BEGIN()`` autonom…
33 Each ``test`` subdirectory needs to include a ``component.mk`` file with the following line of code…
40 Multi-device Test Cases
43 …test cases will be executed on one DUT (Device Under Test). However, components that require some …
44 Multi-device test cases involve writing multiple test functions, and running them on multiple DUTs.
46 The following is an example of a Multi-device test case:
72 …TEST_CASE_MULTIPLE_DEVICES("gpio multiple devices test example", "[driver]", gpio_master_test, gpi…
75 The macro ``TEST_CASE_MULTIPLE_DEVICES`` is used to declare a multi-device test case.
76 The first argument is test case name, the second argument is test case description.
77 From the third argument, up to 5 test functions can be defined, each function will be the entry poi…
79 Running test cases from different DUTs could require synchronizing between DUTs. We provide ``unity…
108 Multi-stage Test Cases
111 The normal test cases are expected to finish without reset (or only need to check if reset happens)…
112 For example, we expect to test if reset reason is correct after a wakeup from deep sleep. We need t…
113 To support this, we can define multi-stage test cases, to group a set of test functions::
129 Multi-stage test cases present a group of test functions to users. It need user interactions (selec…
132 Building Unit Test App
138 Change into ``tools/unit-test-app`` directory to configure and build it:
140 * ``make menuconfig`` - configure unit test app.
142 * ``make TESTS_ALL=1`` - build unit test app with tests for each component having tests in the ``te…
143 * ``make TEST_COMPONENTS='xxx'`` - build unit test app with tests for specific components.
144 * ``make TESTS_ALL=1 TEST_EXCLUDE_COMPONENTS='xxx'`` - build unit test app with all unit tests, exc…
155 After flashing reset the ESP32 and it will boot the unit test app.
157 When unit test app is idle, press "Enter" will make it print test menu with all available tests::
159 Here's the test menu, pick your combo:
163 (4) "Verify unit test app image" [bootloader_support]
172 (13) "gpio master/slave test example" [ignore][misc][test_env=UT_T2_1][multi_device]
176 (15) "SPI Master test" [spi][ignore]
177 (16) "SPI Master test, interaction of multiple devs" [spi][ignore]
179 (18) "SPI Master DMA test, TX and RX in different regions" [spi]
180 (19) "SPI Master DMA test: length, start, not aligned" [spi]
185 … description. Master-slave cases will also print the sub-menu (the registered test function names).
187 Test cases can be run by inputting one of the following:
189 - Test case name in quotation marks (for example, ``"esp_ota_begin() verifies arguments"``) to run …
191 - Test case index (for example, ``1``) to run a single test case.
193 - Module name in square brackets (for example, ``[cxx]``) to run all test cases for a specific modu…
195 - An asterisk (``*``) to run all test cases
197 …ce]`` and ``[multi_stage]`` tags tell the test runner whether a test case is a multi-device or mul…
200 After you select a multi-device test case, it will print sub menu::
202 Running gpio master/slave test example...
203 gpio master/slave test example
207 You need to input a number to select the test running on the DUT.
209 Similar to multi-device test cases, multi-stage test cases will also print sub-menu::
217 After DUT is rebooted and test cases are available to run, select this case again and input ``2`` t…