In this paper we have suggested a new method for test data generation using dynamic forward slicing algorithm. Separating the suspicious parts of code from the original program will make the process of test data generation easier. In forward dynamic slicing, the slices produced are much smaller than the original program and the search space for testing is considerably reduced. In this paper, we discuss the forward algorithm and the advantages of using forward dynamic algorithm for test data generation. The test cases are generated by analyzing the constraints present in the slices constructed from forward dynamic slicing algorithm. In the proposed method, the program for which the test data to be generated is analyzed. Forward slicing of the program is done with respect to all the variables whose value is changed during program execution. Slices obtained are then verified for statements which define certain constraints for test data generation. This helps to clearly define the limits of test data and remove the ambiguities about the value of the test data which is to be generated. The test data is then generated based on the constraints. In the proposed method, since forward algorithm is used, the execution traces need not be recorded and analyzing the constraints present in the slices will help in fault localization and debugging. This is one of the most important advantages of our method.