If the alt text would invalidate the purpose of the test, then the text alternative should describe the purpose.
Sensory
If you have content that creates a specific sensory experience then alt text needs to provide a descriptive identification of the content.
CAPTCHA
alt text must say that its a CAPTCHA and alternative CAPTCHAs for different senses must be provided
Decoration, Formatting, Invisible
If the content is purely decorative, used for visual formatting, or not presented to users, it must be ignored by assistive technology. (i.e. It should not have a text alternative)
Examples
Spelling test - Test
Sensory test (hearing, sight, etc.)
Symphony performance - Sensory
Flute solo - Sensory
Visual art - Sensory
Image of an exclamation point next to an error - Decoration
Putting a box around a group of links - Formatting