Unit Testing

Tools¶
Assuming you have Visual Studio Code and PlatformIO installed
Windows Prerequisite¶
- Install mingw-w64 from sourceforge.net
- In the windows search bar type
envand select Edit the system environment variables - Click the
Environment Variables...button and in theSystem variablessection double-clickPathand clickNewthen pasteC:\Program Files (x86)\mingw-w64\i686-8.1.0-posix-dwarf-rt_v6-rev0\mingw32\bin. This path may be different on your system, but it is the path that mingw-w64 was installed previously and whereg++.exeis located.
Running the tests¶
- In VSCode with the ExpressLRS project open, click on the
New Terminalbutton in the status bar - Ensure the native platform is installed by entering
pio platform install nativein the terminal window. - Now you can enter
pio test -e nativeto run the tests. - It is also possible to use the PlatformIO module and select Native/Advanced/Test in the target selection list.