Software engineering aims at increasing quality and reliability while decreasing the cost; of the software. Testing is one of the most time-consuming phases of the software development lifecycle. Improvement in software testing results in decrease in cost and increase in quality of the software. Automation in software testing is one of the most popular ways of software cost reduction and reliability improvement. In our work we propose a system called XML-based automatic test data generation that, generates the test data automatically according to the given data definition. We also proposed a test data, definition language to describe the test data to be generated. This system reduces the testing dine compared to manual test data generation and increases the testing reliability compared to the random test data generation by eliminating meaningless test data.