In this research work, a swarm intelligence-based approach, namely an improved artificial bee colony (IABC), has been proposed to design and optimize the test cases during the software testing process. The novelty of the proposed IABC algorithm is that it has three major improvement heuristics over the general ABC algorithm: (1) it replaces random population generation during the initial phase into a systematic initial solution generation by means of a novel heuristic, namely ‘Chaotic Map'; (2) to eliminate the redundant test cases, another novel heuristic, namely ‘Euclidean Distance', is applied to maintain the diversity of population; (3) to increase the convergence speed, the fitness value of the previous solution is used in the new solution generation. Further, the proposed algorithm has been evaluated with several case studies and compared with the existing works using path coverage-based test adequacy criterion. Hence, the proposed work is improved, and it outperforms the existing works and provides optimal or near optimal test case generation for efficient software testing.