Generating test cases automatically for thread-safe classes is an effective approach to validating their correctness. However, the existing concurrent test generation techniques usually consume a large amount of time and efforts before finding concurrency bugs. To alleviate this problem, we present an automatic and efficient approach which combines the advantages of both the bug-driven and coverage-guided techniques to generate test cases for thread-safe classes. First, method pairs that cannot be executed concurrently are removed by the static analysis. Then, a strategy of the bug-driven grouping of method pairs is designed to divide the remaining method pairs into two groups. One group contains the method pairs with a high priority, and another group contains the method pairs with a low priority. Finally, iterative generation of concurrent test cases, which consists of the coverage-guided generation of concurrent tests and concurrency bug detection, is conducted to find concurrency bugs. Our evaluation is on 20 thread-safe classes. Compared with four state-of-the-art approaches, the results show that our approach can obtain a significant improvement in efficiency without impairing bug finding capacities.INDEX TERMS Software testing, thread-safe class, test case generation, concurrency bug, static analysis.