Keyboard test: Open and use the Keyboard Viewer
https://support.apple.com/kb/PH25242?locale=en_US
1. Click the Input menu in the menu bar, then choose Show Keyboard Viewer.
If the command isn’t shown, choose Apple menu > System Preferences, click Keyboard, click Keyboard, then select “Show keyboard and emoji viewers in menu bar.”
2. Press the key on your keyboard that corresponds to the character shown in the Keyboard Viewer, or click keys in the Keyboard Viewer.
Press a modifier key, or a combination of modifier keys, to see special characters or symbols you can type. For example, hold down the Option key or the Option and Shift keys. This includes dead keys (a modifier key pressed with another key to enter a letter with a diacritical mark), which are highlighted in orange on a keyboard layout. See Enter characters with accent marks for more information.
Sound Test:
https://www.onlinemictest.com/microphone-settings/mac-os-x/
1. Click the Apple icon present in the top left corner of the screen. A menu will appear.
2. Click "System Preferences".
3. Under system preferences select "Sound" either by clicking it or by searching for it in the search text box
4. Within "Sound Effect", select glass, because it is more clear. For testing, click "Output" & "Input" and check the the screen.
It can also check the audio-jack .
Screen Test:
1. Open "System Preferences" then click "Desktop & Screen Saver", under "Desktop" tab, select Solid Color and chose different colors to see if there any screen bleeding.
Solid Color for test: White, Black, Blue, Red, Green <= select Custom Color.
HDD Test:
Under "Go" from top menu bar, click "Utilities", then click "Disk Utility", check "S.M.A.R.T. status". If the "S.M.A.R.T. status" is "Verified", the it is good.
Or click "First Aid" to run the disk test. It will show the complete diagnosticed info.
Trackpad Test:
While performing the test form the above, move the crusor around on the screen and click the trackpad, from left to middile and to the right.
Battery Test:
https://support.apple.com/en-us/HT201585
1. Click the "Apple" icon from top left corner of the menu bar, click "About This Mac".
2. Under "Overview", click "System Report" to bring up the info.
3. Under "Hardware", click "Power" and check "Battery Information" => Health Information => Condition: Health or not.
Eject device(USB) properly:
Click "Finder", at the bottom left-hand side corner, then click the "eject" icon next to the device.