
Unfortunately, because of SIP, restoring a local copy of AHT isn’t easy.

Those can easily leave your Mac relying on remote AHT unless the contents of that folder are replaced. Macs that were made between about 2007 and May 2013 normally run AHT from code which is hidden away in /System/Library/CoreServices/.diagnostics, which often seems to get wiped and not restored when you replace the internal storage, or perform a clean re-install.
#Apple systems must pass apple diagnostics install
Indeed, the oldest Intel Macs can’t even run AHT from their boot disk, and you’ll need to insert the original install (optical) disk supplied with that Mac. Mac models introduced before June 2013 don’t of course run Diagnostics as such, but an older version named Apple Hardware Test, or AHT, and it’s those which are most prone to being unable to run locally, because of the way in which AHT is installed. You should use both Internet connections if possible, to give this maximum flexibility you should normally run Diagnostics with a Wi-Fi network available in any case, or its Wi-Fi tests won’t be possible. This should, provided your Mac can gain an Internet connection, run remote Diagnostics from Apple’s support site instead.

The fallback if those fail is to ensure that your Mac has both a Wi-Fi and wired Ethernet connection if possible, and repeat the startup with ⌥D (Option-D) instead. You’ll first need to disable that in Recovery mode, then shut down, wait a minute or two, and start up with the D key held. Your Mac also can’t enter Diagnostics while it has a firmware password enabled. Apple recommends that, rather than restarting into Diagnostics, you should enter it after shutting down, preparing your Mac, then starting up. It’s worth checking that you are following the instructions in detail. When you follow those instructions – disconnect all non-essential peripherals, connect keyboard and mouse/trackpad via USB, hold the D key and start up – eventually you should see the diagnostic test on offer. If you want to check your Mac’s hardware out, the first step is to run Diagnostics or Apple Hardware Test, which are detailed here.
