Tackling Flaky Tests: Understanding the Problem and Providing Practical Solutions