Then it likely fails in something during the program startup or Unity initialization code (the testing framework). Without a debugger it’ll be hard to know what’s going on when it doesn’t even reach the first line of setup()
where you could execute a Serial.println()
etc. You did check that, right? If you open a CLI and execute pio test --without-testing -v
it will do a (verbose) build and upload of the test firmware, you can inspect its direct serial output via a new serial monitor (Monitor task) then to see if it prints anything at all. The regular output when using the “Test” project task might not show the direct serial output but swallow stuff.
Otherwise you can also use a debugger to debug inside executing unit-tests. The Teensy 4 is however so extremely debugger unfriendly that it’s hard to do that, due to the non-exposed debugger pins for SWD. Unless you learn microsoldering with surgical precision (Teensy 4.1 Uploading with JLink - #18 by sp33).