What needs to be done for the devices before running diagnostics?
Apple devices
Must be activated
The trust pop-up on device screen must also be accepted (it means that you trust the computer where the device is connected to). It can take a while for the device to appear as 'Connected' after granting trust. Please see this article for more information.
Starting from iOS 9, it is also required to establish trust to the application developer in device settings before launching diagnostics on the device. See device documentation for more info: https://support.apple.com/en-us/HT204460
Android devices
Must have USB debugging enabled before running diagnostics (just like for erasure).