Unless you have specific tools of the trade, which some of the PC repair shops have, to test individual components, you still need a working system where to test them all out.
Testing case fans is easiest since you only need to hook them up to a MoBo or when using 3-pin to molex adapter, hook them to the PSU to see if they spin.
3-pin to molex, amazon:
https://www.amazon.com/HDE-4-Pin-Molex-Replacement-Computer/dp/B0081K3ZS0
ODDs are also quite easy to test out, just hook it up to your system with SATA power and data cable and look if it reads and also writes the disks properly. Some older ODDs may have lost the writing (burn) capability while they still can read the disks just fine.
HDDs can be a bit iffy but most sound drives are still detected by Win and you can either: access the data on it or need to create a partition it to get access to it. Though, be careful with those since they can contain malware. CrystalDiskInfo is a great piece of software that gives a lot of into about the installed drives, including work hours and it's health status,
link: https://crystalmark.info/en/software/crystaldiskinfo/
You can also go with CrystalDiskMark if you want to benchmark your HDD's read and write performance,
link: https://crystalmark.info/en/software/crystaldiskmark/
Testing GPUs is a bit harder. While all GPUs can display default resolution (e.g 800x600), you need to install GPU specific drivers to get e.g 1080p out of the GPU and you also need to run benchmarks to see if they hold up to the specified performance level they are rated to. For that, you can use Unigine Heaven,
link:
https://benchmark.unigine.com/heaven
Though, with GPUs, do uninstall the old GPU drivers before installing new ones. And i mean clean install. This is especially crucial if you had AMD GPU in and next is Nvidia GPU since those drivers can be in a conflict, messing up your system.
Testing CPUs is the hardest thing since you'll need donor build where to test them. What makes things worse is that there are a lot of different CPU sockets around, both on Intel and AMD side. Also, having a correct MoBo is only half the trouble. You also need to use thermal paste between the CPU and it's heatsink and mounting/unmounting heatsinks is tedious thing to do. Not to mention that you can easily bend either the CPU or MoBo CPU socket pins, effectively bricking either the CPU or MoBo all together if you're not careful enough.
With hardware part of the thing done, there comes the software side which is headache on it's own. Some MoBos doesn't support some CPUs unless the latest BIOS is used. And if BIOS update is unsuccessful (e.g power loss), the MoBo WILL be bricked.
Once you get the system booted up with test CPU, there are several benchmark programs to use to see if CPU holds up it's performance. E.g 2 hours of Prime95 is common for CPU stability,
link: https://www.mersenne.org/download/
Though, there are other CPU bench programs as well, e.g AIDA64 and CinebenchR15 that you can use.
As far as partial setups go to test components, you can test fans and ODDs. Testing fans in a partial setup is easy, just connect fans to the PSU's molex connectors and jumpstart the PSU to give power to the fans.
Method on how to jumpstart PSU, youtube:
https://www.youtube.com/watch?v=ixcWCrYpw3Y
As far as ODD goes, back in the day (some 15 years ago), i jerry-rigged myself a CD player that consisted of: PSU, 5.25" ODD (CD ROM) and 2.0 speakers with 3.5mm jack. I hooked the ODD to the PSU, turned PSU on, hooked the speakers to the ODD and inserted common audio CD (16 or so tracks on CD). Since my ODD had Play button next to the Eject button, once i pressed that Play button, my ODD stated to play inserted audio CD while outputting all sounds through the speakers i had connected directly to my ODD. While it wasn't portable, it worked like a charm.
😀
This above ODD testing works only IF the ODD has Play button next to the Eject button and 3.5mm speakers jack. Though, if ODD also has burn (write) capability, you need to hook it to the PC since you need to burn a disk to see if it actually can burn a disk.