Automated detection of what tests to run