Spam testing tools typically work by scanning your email for specific criteria that spam filters look for. This can include checking for spammy words, excessive use of punctuation, poor HTML formatting, and even the reputation of the IP address from which the email is sent. The tool then provides a score or feedback on how likely it is that your email will be marked as spam.