PlatformIO Community

Getting output of failed test?

I’ve been enjoying coming up to speed on PIO unit testing, especially the ability to test natively. A recent test running natively uncovered a memory bug, which is great, but it took me a while to figure out what was going on. When I run pio test -e native, instead of getting any kind of dump or output related to the error, I just saw the red text saying that the test had FAILED.

I get that you’d want to trap exceptions so testing could proceed, but is there any way to dump whatever output was generated during the failure to see what happened?

Thanks!

Does the device execute the unit tests on start? Have you looked the pure UART output with just miniterm.py for example?

Hi, and thanks for your response! In this situation I’m running the tests with “native” target, so they’re compiled and run on my Mac and not on the device.