Details here vary by specific model. The MacBook 13" Late 2009 model looks to be the oldest that'll boot 10.13 High Sierra. The model number is listed in small print on the bottom, if you can't otherwise display that data and don't know specifically which MacBook model you're working with. For example, the MacBook 13" Late 2009 model uses the model number "A1342".
Usual path for recovery is Recovery, though the very old MacBook systems — the specific model of MacBook definitely does matter here — can require the installation DVD and which mean you'll need to acquire the Snow Leopard DVD set from Apple. The MacBook 13" Late 2009 can boot the Snow Leopard DVD set. Newer MacBook systems can boot directly from Apple, or can boot from another local bootable disk such as a bootable USB device containing macOS that was created on another local Mac. Older MacBook models cannot boot directly from Apple over the internet.
You should be able to acquire a set of Snow Leopard DVDs directly from the folks at Apple Support or can purchase a set from the Apple Store, if you don't have a set of those available. But whether you need a DVD or another approach depends on the specific model of MacBook.
The hardware tests won't show disk and partition corruptions, and won't reliably report various transient errors. The hardware tests don't reliably show failing disks or flaky system hardware.