I'm looking into options for unit testing, or more specific, I'm looking for a well-lit path that works end-to-end.
There are a bunch of (old) topics in this forum, but I'm not sure what is supposed to work today.
My priorities are firstly) unit testing code (possibly with basic wiring API mocked), and secondly) integration testsing code. I'm targeting a P2.
I see that there is Aunit, ArduinoUnit, but I have not seen any working example. I did look into device-os-test-runner, but given that it only works on nodejs 12, I wonder whether a) this is still maintained, and b) can suscessfully be used to thest user firmware - at least I did not get it to run within a few hours.
Then there is GitHub - rickkas7/UnitTestLib: Library to easily unit test parts of some Particle device code off device (native gcc compile), which I believe would work, but that is going to lock me into off-device unit testing.
This is compilicated by my development being split across private libraries, which I import as git submodules.
My project involves NFC, displays and a bunch of hardware accessories, and of course a bunch of cloud integrations. For example, I would really like to unit test the UART communication with the NFC chip, either by using mock serial streams, or by faking communication in a hardware test fixture that includes multiple P2. I'm especially interested in testing error scenarios / corner cases, which are not reliably testable manually.
What is the state of the art in Particle firmware to develop code test driven? Are there example repositories out there? What are the development platforms? I ended up on WSL (after hickups with plain windows or chromeos). Do you run tests from the particle workspace, or from the console? and if its the latter, how do I get access to the correct toolchain?
I'm sorry for the many questions in this post, but I'm trying to understand how to best end-to-end develop the software (my background is in software engineering)
Thanks,
MikeS