Test is singular: any test fails.
The construction is awkward. "Tests" do not fail. Tests are failed by whatever is tested.
STUDENTS fail the test (when they don't read the instruction). A STUDENT fails the test (when he is absent a lot).
"Any test fails" is the correct sentence. Test is the subject of the sentence and "to fail" is the verb. "Test" is a singular noun, ergo the correct form of the verb "to fail" will be "fails."
Test fails. One test (singular) fails (singular form of the verb). Isolate the subject/noun, which makes it easier to figure out if you should use the singular or plural verb.