If they're the manufacturer, they could upload and boot via fastboot a signed image that allows all tests to be done, all automatically
When I broke the screen of my Xiaomi mix 3, it was completely black, I sent it back to repair and they had no problem at all repairing it even if I didn't unlock it before sending it. (Maybe it's because Xiaomi has hw tests shortcuts in the bootloader?)
They should provide it, easier to do compared to a mode that can't be activated if the screen is broken or simply the user has no idea how to do it.
For example Epson gives watermarked service programs to authorized service centers (splash screen says "licensed to Mr xxx of yyy inc." so they know exactly who leaked it)
Apple also has such secret software
This will also give a competitive advantage to official service centers (why pay $$$ for certification and training if can get the same tools of a generic store that opened yesterday?)