Are you sure you have the correct environment selected in the the project enviornment selector? When you press test or build, it should only do that for the currently selected environment.
Unless you’re using the project task “Default->Build All” / “Default → Advanced → Test all”.
It fails to build for Native because it can’t find Arduino.h
I don’t actually know why testing fails on the uno for my other project, it works fine in the empty project, but either way the testing sidebar still fails
And, same as the reference project, use test_ignore to not make uni environment execute the native tests, using the platformio.ini
[env:Native]
platform = native
test_ignore = test_embedded ; if there were some in the future
[env:uno]
platform = atmelavr
board = uno
framework = arduino
test_ignore = test_native
and reload the VSCode window (Ctrl+Shift-P → Reload Window), I get a nice
I.e…, no tests executed for Uno, and tests for native passed.