My rough understanding is that the script behind the UI is probably using commands that won’t work on nvme type devices, which might need a special consideration like found here. Try doing it via command line.
The short/long tests are S.M.A.R.T-tests. I can’t say whats wrong with the middleware (I’m pretty sure I have some cron job for running smart test on everything, and didn’t get any error mail yet), but you can always run the tests manually via the CLI with smartctl.
I use that CLI tool quite a bit because TrueNAS doesn’t show much results and numbers even if that test was done.