Are you talking Thinkpads specifically? If so, then there was a program called PC Doctor for DOS which checks most of the major components of the laptop, without requiring any operating system or hard drive installed in the system. For the newer systems, you would use a bootable CD so that means an Ultrabay optical drive or an external USB drive is needed. Much older systems would use one to several floppies. PC Doctor contains tests to check the system board, CPU, memory, video, serial and parallel ports, hard drive, optical drive, modem, ethernet, wireless, keyboard, Trackpoint, speaker. What it lacks is any thorough testing of the USB port(s), PCMCIA, Bluetooth and also Firewire. I say there "was" a program, since recently, Lenovo has removed the diagnostic from their Support pages. I still have the installation programs for a couple of them so I'm planning to set up a web site so people can download them. Each version is specific to a group of Thinkpads.
When receiving a used system, I run most of the tests contained in PC Doctor. The only major tests that I don't use are the memory and hard drive ones. For those, I use memtest86+ for the memory modules and if available, the hard drive manufacturer's own disk utility program. If none is available, then I'll use the hard drive tests in PC Doctor. There is a way to specify the number of times to repeat the selected tests so I generally use 10 for the systemboard and CPU tests and 3 for most everything else. Some of the tests are "interactive" in that they require assistance from you. For example, the keyboard test is performed by you pressing every key and a keyboard map on the screen indicates if the press was detected. Same goes for the trackpoint/mouse/touchpad test; you move the cursor around the screen and besides seeing it move, the X and Y coordinate numbers are shown changing. Other tests require additional resources for complete testing. The serial and parallel port tests normally do not need anything special. However, they can optionally use what's known as a "loopback" plug or adapter. This is a special connector that plugs into the serial or parallel port and contains wiring that connects the input pins of the port to output pins. You can then enable the loopback test sections and PC Doctor will execute them. For the battery condition, I rely upon the Windows Battery Maximizer program that's available from the Lenovo Support site. It reads the information stored in the battery such as, date first used, remaining charge capacity, design capacity, serial number, etc.
X22 X24 X31 X41 X41T X60 X60s X61 X61s X200 X200s X300 X301 Z60m Z61t Z61p 560 560Z 600 600E 600X T21 T22 T23 T41 T60p T410 T420 T520 W500 W520 R50 A21p A22p A31 A31p
NOTE: All links to PC-Doctor software hosted by me are dead. Files removed 8/28/12 by manufacturer's demand.