I’m trying to find a TDD workflow that works for me with PlatformIO. I’ll try to explain what I’m trying to achieve:
When I run my test suite (on my an Arduino Nano), if one of the tests fails, I want to isolate that test (this works fine) and run it again, this time with tracing enabled.
I put sensible tracing commands in the source code to quickly determine - at a glance - why a specific test and/or function is failing. I’m explicitly not looking for a step-debugging solutions, as I think tracing suits my needs best in the case.
In other words: I’m trying to log information from inside of a unit test back to my laptop where I issued
Right now I’m getting an exception when some tracing happens, as that tracing tries to write to the serial line (i’m using from Adruino.h - Serial.println(…)) :
... serial.serialutil.SerialException: GetOverlappedResult failed (PermissionError(13, 'Toegang geweigerd.', None, 5))
Is the above workflow possible with PlatformIO’s built in unit testing support?
Is there an interface to use the
pio test transport and log back to the laptop?
If not, is there a way to achieve this through a third-party library, that plays nicely with PlatformIO?