Example test routines (described, not code):
A test program for the ZX Spectrum is a specialized piece of software designed to check the integrity of the computer's hardware components. Unlike a video game, these utilities perform systematic checks on the system's Random Access Memory (RAM), Read-Only Memory (ROM), Central Processing Unit (CPU), Video Chip (ULA), keyboard, sound, and peripheral ports.
This is arguably the most famous and active open-source diagnostic tool. It supports a wide range of machines (16K to +3) and can be used with various ROM replacement devices.
23 Jun 2014 — Test Program (1985)(Sinclair Research) : Free Download, Borrow, and Streaming : Internet Archive. Internet Archive Test Program - World of Spectrum
This public link is valid for 7 days and shares a thread, including any personal information you added. This link or copies made by others cannot be deleted. If you share with third parties, their policies apply. Can’t copy the link right now. Try again later. Test Program (1985)(Sinclair Research) - Internet Archive
Use a mobile app like PlayZX or TAPir to convert the file into audio.