How to automatically validate and fix test results