Ok sorry ive never read anywhere that says to take it before you apply for the spouse visa i was unaware
The test can be taken by anyone at any time, there is no specific residence requirement - though I hear they have been asking for proof of UK address recently.
However the 'KOL Req' endorsement is only available to those who have been married & living together outside the UK as a married couple for 4+ years. It must be requested specifically in the sponsor letter and should have been mentioned in a cover letter from the applicant that they are requesting the 'KOL Req' endorsement. They don't just give it out even if you do qualify for it, you have to ask for it. It allows the applicant, upon entering the UK on the spouse visa to take the test and if they pass, apply for ILR immediately.
Or, they can take the test in the UK as a visitor, then apply for the spouse visa, supply the test certificate & all the other required documents for the visa and specifically request ILE (Indeifinte Leave to Enter) thereby never having to apply for any other visa in the future.
Since it doesn't apply to you and your situation then it's understandable that you wouldn't know about it. Which is why it is good to limit your advice to things that you have specific knowledge of or can cite your source and information properly.