In this work, we survey the genetic algorithms based test-data generation techniques to find the limitations of these techniques. To address the limitations of the surveyed techniques, we present a new technique for automatic test-data generation. Our technique applies genetic algorithms to search for test data to satisfy a wide range of control-flow and data-flow coverage criteria. Our technique guides the search using a new multi-objectives fitness function that evaluates the fitness of the generated test data. We use this technique for automatic test-data generation for covering all-nodes and all-uses coverage criteria for structural and object-oriented programs. We employ this technique for automatically generating test data for covering the spanning sets. We apply the dominance concepts to decrease the number of the test requirements of all-nodes coverage criterion. Then, we use our technique for automatically generating test suite to satisfy the reduced test requirements ofthe all-nodes coverage criterion and consequently reducing the size of the test suite. We introduce a set of empirical studies to evaluate the proposed technique and the new evaluation functions.