Describe a scenario where an automated test failed intermittently, and explain how you debugged and resolved the issue.