How to re run failed test cases automatically