Either side can. Sellers sometimes test before listing and hand the report to buyers with the disclosures. Buyers test during their due-diligence period, often after a musty smell or a stain turns up on a showing.
A seller's test before listing also shows whether there is anything to deal with while there is still time, before a buyer's inspection deadline is running.
When both sides want numbers, one test with the report shared saves a second visit. Contract deadlines, contingencies and who pays are for your agent; we don't advise on them.