The resolution of optimization problems is of great interest nowadays and has encouraged the development of various information technology methods to attempt solving them. There are several problems related to Software Engineering that can be solved by using this approach. In this paper, a new alternative based on the combination of population metaheuristics with a Tabu List to solve the problem of test cases generation when testing software is presented. This problem is of great importance for the development of software with a high computational cost and which is generally hard to solve. The performance of the solution proposed has been tested on a set of varying complexity programs. The results obtained show that the method proposed allows obtaining a reduced test data set in a suitable timeframe and with a greater coverage than conventional methods such as Random Method or Tabu Search.