Search

CN-122019206-A - Processing method and device based on test flow in test description document

CN122019206ACN 122019206 ACN122019206 ACN 122019206ACN-122019206-A

Abstract

The method is applied to the test description document based on the standardized markup language, an intelligent test development system capable of automatically guaranteeing the integrity, semantic consistency and hardware compatibility of the test flow is constructed, the duplicate test fragments are guaranteed to be independent units with complete functions through multistage dependency collection algorithm and DAG modeling, the integrity and reliability of the test flow are improved, a semantic perception arbitration strategy is adopted to distinguish a standard library from user-defined elements, the consistency of test semantics is guaranteed, the full-automatic dependency analysis, conflict arbitration and reference rewriting processes are adopted, the test development and transplanting efficiency is improved, the duplicate test flow fragments are guaranteed to be used in a new context in an 'instant-on-paste' mode, and logic errors caused by dependency deletion or conflict are avoided. The technical effects of deeply understanding the ATML semantic model and improving the efficiency and reliability of the test flow are achieved.

Inventors

  • REN CHAOXU
  • LU LINHAI
  • HAN HUIJIE
  • WEN QIANG
  • Lv zhongyu
  • LI LIJIA
  • LU YAO

Assignees

  • 北京航天测控技术有限公司

Dates

Publication Date
20260512
Application Date
20251229

Claims (10)

  1. 1. A method for processing a test flow in a test description document, the method comprising: Responding to a replication instruction aiming at a source document, acquiring the source document, analyzing a document object model tree of the source document, and determining a target test flow node; Invoking a multi-level dependency collection algorithm to obtain a direct dependency element and an indirect dependency element of the target test flow node, and constructing a dependency relationship topological graph for representing a reference relationship between elements according to the direct dependency element and the indirect dependency element, wherein the dependency relationship topological graph is a directed acyclic graph; Carrying out serialization processing on the target test flow node and the dependency topological graph to obtain a test flow fragment data block, wherein the test flow fragment data block is packaged by adopting a structured data format; responding to a paste instruction in a target document, and analyzing the test flow fragment data block; Checking the types of elements in the test flow fragment data block and the target document, adopting a semantic-aware conflict arbitration strategy according to the checking, updating the target document by using the elements in the test flow fragment data block, and serializing the updated target document to obtain a standard document; And converting the standard document into a device driving instruction, and executing a test flow.
  2. 2. The method of claim 1, wherein the multi-level dependency collection algorithm comprises a direct dependency collection mode and an indirect dependency collection mode; The obtaining the direct dependency element and the indirect dependency element of the target test flow node includes: traversing the attribute and the subelement of the target test flow node by adopting a direct dependency collection mode, and extracting all explicitly stated reference identifiers to obtain the direct dependency element of the target test flow node; And adopting an indirect dependency collection mode, and carrying out recursion tracking by taking the collected elements as new starting points to obtain the indirect dependency elements of the target test flow nodes.
  3. 3. The method according to claim 2, wherein said constructing a dependency topology map for characterizing inter-element reference relationships from said direct dependency elements and said indirect dependency elements comprises: determining a reference relationship between the directly dependent element and the indirectly dependent element; And constructing a directed acyclic graph as a dependency topology according to the direct dependency elements, the indirect dependency elements and the reference relationship, wherein nodes in the dependency topology represent elements in a source document.
  4. 4. The method of claim 1, wherein the serializing the target test flow node with the dependency topology graph to obtain the test flow segment data block comprises: packaging the target test flow node and the dependency relationship topological graph, and carrying out serialization processing on the packaged target test flow node and the dependency relationship topological graph to obtain a test flow fragment data block packaged by adopting a structured data format; The test flow fragment data block adopts a JSON data format and at least comprises rootProcedure fields, DEPENDENCYGRAPH fields and FRAGMENTMETADATA fields.
  5. 5. The method of claim 4, wherein parsing the test flow fragment data block in response to a paste instruction in a target document comprises: And receiving and analyzing the test flow fragment data block in response to a paste instruction in the target document, and reconstructing the contents of the rootProcedure field and the DEPENDENCYGRAPH field in the test flow fragment data block in a memory.
  6. 6. The method of claim 1, wherein the semantically aware conflict arbitration policy comprises a standard library element arbitration policy and a user-defined element arbitration policy; the checking processing is performed on the types of the elements in the test flow fragment data block and the target document, a collision arbitration strategy of semantic perception is adopted according to the checking processing, and the updating of the target document by using the elements in the test flow fragment data block comprises the following steps: traversing each element in the test flow fragment data block, and checking element types in a document object model tree of the target document; when the element type is a predefined ATML standard library naming space, adopting the standard library element arbitration strategy to preferentially refer to the existing definition in the target document, and discarding the copy carried in the test flow fragment data block; when the element type is a custom element, controlled renaming operation is executed, and each renaming relation is recorded in a global remapping table in real time; scanning all fragments in a document object model tree of the target document according to the remapping table, and updating the target document by using a text processing technology; and serializing the target document subjected to the updating processing to obtain a standard document.
  7. 7. The method of claim 1, wherein converting the standard document into device driver instructions, performing a test procedure, comprises: And the calling code generator converts the standard document into a device driving instruction, and sends the device driving instruction to external test equipment through an interface so that the external test equipment executes the device driving instruction to complete a test flow.
  8. 8. A processing apparatus for testing a flow in a descriptive document based on a test, the apparatus comprising: The determining module is used for responding to a copying instruction aiming at a source document, acquiring the source document, analyzing a document object model tree of the source document and determining a target testing flow node; the acquisition module is used for calling a multi-level dependency collection algorithm, acquiring a direct dependency element and an indirect dependency element of the target test flow node, and constructing a dependency relationship topological graph for representing a reference relationship between the elements according to the direct dependency element and the indirect dependency element, wherein the dependency relationship topological graph is a directed acyclic graph; The first serialization module is used for carrying out serialization processing on the target test flow node and the dependency topological graph to obtain a test flow fragment data block, wherein the test flow fragment data block is packaged by adopting a structured data format; The analysis module is used for responding to the pasting instruction in the target document and analyzing the test flow fragment data block; The second serialization module is used for checking the types of the elements in the test flow fragment data block and the target document, adopting a semantic-aware conflict arbitration strategy according to the checking, updating the target document by using the elements in the test flow fragment data block, and serializing the updated target document to obtain a standard document; And the conversion module is used for converting the standard document into a device driving instruction and executing a test flow.
  9. 9. The apparatus of claim 8, wherein the multi-level dependency collection algorithm comprises a direct dependency collection mode and an indirect dependency collection mode; The acquisition module is specifically configured to traverse the attribute and the subelement of the target test flow node by adopting a direct dependency collection manner, extract all explicitly declared reference identifiers to obtain a direct dependency element of the target test flow node, and recursively track the collected element serving as a new starting point by adopting an indirect dependency collection manner to obtain an indirect dependency element of the target test flow node.
  10. 10. The apparatus of claim 9, wherein the obtaining module is configured to determine a reference relationship between the direct dependency element and the indirect dependency element, and construct a directed acyclic graph as a dependency topology using the direct dependency element, the indirect dependency element, and the reference relationship, wherein nodes in the dependency topology represent elements in a source document.

Description

Processing method and device based on test flow in test description document Technical Field The application relates to the technical field of automatic test systems, in particular to a processing method and device based on a test flow in a test description document. Background The automatic test is a key link for ensuring the quality and the reliability of products in the modern industry, in particular in the fields of aerospace, national defense electronics, automobile electronics and the like. To address the increasingly complex configuration and management challenges of test systems, the IEEE organization has established the ATML (automatic test markup language) family of standards (e.g., IEEE 1671). ATML adopts standardized schema based on XML for machine-readable description of test description, test configuration, instrument resources and tested object interfaces, and has the core design objective of realizing interoperability, portability and reusability of test assets between different test platforms and tool chains. . In an ATML-based test engineering development environment, test engineers often need to multiplex existing test flow fragments (such as a specific signal stimulus sequence, a functional test set, or a complete diagnostic routine) by copying and pasting in order to improve development efficiency. The prior art copy and paste multiplexing process mainly includes clipboard operations based on plain text or simple XML nodes, limited context copying in Integrated Development Environments (IDEs). The conflict resolution strategy mainly comprises the steps of forcedly overlaying the existing definition by replacing the new copy, automatically renaming to generate a new unique ID (such as adding a random suffix) for the newly pasted element. The prior art has the defects that the process dependence integrity is lost in the copying and pasting multiplexing process, the complete dependence graph of the test flow fragment cannot be constructed, so that a broken chain is caused, when the copied test fragment needs to be used across documents or across test stations, the system support is lost, the systematic support for dependence analysis, conflict intelligent solution and compatibility verification required by cross-environment transplantation is lacking, and the portability is extremely poor. Semantic arbitration is lost in the conflict resolution process, standard library elements (which should be globally unified) and user-defined elements (which can be controllably isolated) cannot be distinguished, and the conflict processing destroys semantics. Disclosure of Invention The application provides a processing method and a processing device based on a test flow in a test description document, which are used for solving the problems of broken chain of test logic caused by incomplete extraction of a dependency relationship, simple and rough conflict arbitration mechanism, test semantic consistency damage, lack of systematic support for cross-document and cross-test station transplantation and extremely low automation degree in the prior art. In a first aspect, the present application provides a method for processing a test procedure in a test description document, including: Responding to a replication instruction aiming at a source document, acquiring the source document, analyzing a document object model tree of the source document, and determining a target test flow node; Invoking a multi-level dependency collection algorithm to obtain a direct dependency element and an indirect dependency element of the target test flow node, and constructing a dependency relationship topological graph for representing a reference relationship between elements according to the direct dependency element and the indirect dependency element, wherein the dependency relationship topological graph is a directed acyclic graph; Carrying out serialization processing on the target test flow node and the dependency topological graph to obtain a test flow fragment data block, wherein the test flow fragment data block is packaged by adopting a structured data format; responding to a paste instruction in a target document, and analyzing the test flow fragment data block; Checking the types of elements in the test flow fragment data block and the target document, adopting a semantic-aware conflict arbitration strategy according to the checking, updating the target document by using the elements in the test flow fragment data block, and serializing the updated target document to obtain a standard document; And converting the standard document into a device driving instruction, and executing a test flow. In one possible embodiment, the multi-level dependent collection algorithm includes a direct dependent collection mode and an indirect dependent collection mode; The obtaining the direct dependency element and the indirect dependency element of the target test flow node includes: traversing the attribute and the subelement