The invention relates to a method for automatically generating test cases aiming at document
converters. The method includes step 1, acquiring formalized test needs according to product needs of test objects, and dividing test function points based on the formalized test needs; step 2, performing dynamic instantiation
processing on class objects in the formalized test needs, writing
test data in the class objects, acquiring class object sets containing the
test data, serializing the class object sets, and generating
XML (extensive makeup language) segments based on corresponding test function points; step 3, writing the
XML segments based on the test function points in corresponding bottom-layer
XML instance document sets, and generating
test case documents. The method is independent of an office
software interface, the problem of test blind points caused by the fact that office
software is insufficiently supportive of standards is avoided, and
test case generation is short in time and high in efficiency.