The invention relates to the technical field of
electromagnetic compatibility testing, in particular to a
test document automatic generation method based on intelligent plan making. The method comprises the following steps: firstly, locking an effective standard based on environment-standard capability mapping, and triggering
cascade constraints to determine a to-be-tested sample and a working mode; then analyzing a script to construct a parameter vector, and executing multi-dimensional
Cartesian product operation; in the
test data generation process, frequency parameters are extracted to serve as dynamic index keys, real-time retrieval is conducted, standard
limit value constraints are injected, and a structured object
list with embedded criteria is generated; and finally, positioning to a project
XML document tree, serializing and injecting the data, driving a
document object model to perform row-level style
cloning and
data filling by utilizing structured data, and associating resources to generate a persistent file. According to the method, full-coverage generation of the
test data and automatic closed-loop of the criterion are realized, the problem of self-adaptive rendering of the variable-length data in a strict-format template is solved, and the completeness and normalization of document generation are improved.