A customized equipment software test data automatic generation method
By constructing interface templates and instantiating models, a customized set of test data frames is generated, which solves the problem of incomplete test data coverage in existing technologies and achieves highly reliable and flexible equipment software testing.
Patent Information
- Application Number
- CN202411778579.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2044-12-05
AI Technical Summary
Existing test data generation methods cannot comprehensively and effectively cover the interfaces and application scenarios of equipment software, and the configuration mechanism for software requirements and test requirements is not flexible enough, making it difficult to adapt to the complexity and diversity of high-reliability software testing.
By constructing application layer interface templates and instantiating them into interface instance models, configuring field attributes, setting data coverage strategies and relationships, and generating customized test data frame sets, flexible test strategy configuration is supported. The Cartesian product algorithm and orthogonal decomposition table method are used for data combination.
It enables comprehensive and in-depth testing of equipment software, enhances the depth and breadth of testing, strengthens the flexibility and adaptability of testing, and ensures stability and reliability under extreme conditions.
Smart Images

Figure CN119938513B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of software testing, in particular to a customized equipment software test data automatic generation method. It is suitable for software test data generation of equipment software with general interface (such as RS422 serial port, CAN bus interface, etc.). The present application constructs an application layer general template based on the interface, generates a model after using the project communication protocol to interface instantiate the template, and the model provides data use requirement configuration function, data limit constraint configuration function and test coverage requirement configuration function. The instantiated model automatically extracts basic test data points according to the configuration, and then generates a customized test data frame set in combination with the coverage requirements and limit constraints, so as to perform comprehensive, complete and highly reliable equipment software testing. BACKGROUND
[0002] Due to the strict requirements of equipment software on high reliability and high safety, the testing work mainly focuses on two core points: one is to ensure the correctness and reliability of software interface implementation, and the other is to verify the reliability and robustness of software function implementation in different application scenarios. These tests are all driven by carefully designed test data, so the comprehensiveness and applicability of test data design become the key factors to determine the test quality.
[0003] However, the existing test data automatic generation methods have significant limitations. Some methods only focus on covering software interface protocols to design test data, while others mainly start from the perspective of analyzing functional scenarios. Both methods fail to effectively achieve comprehensive and effective coverage of software interfaces and application scenarios, thereby weakening the depth and breadth of testing to some extent.
[0004] In addition, the existing software requirement and test requirement configuration mechanism is not flexible enough, and it is difficult to adapt to the complexity and diversity requirements of high reliability software testing. This rigidity in configuration not only limits the innovation of test strategies, but also hinders the further improvement of test efficiency and quality. SUMMARY
[0005] In view of the problems in the prior art, the application provides a customized equipment software test data automatic generation method, a test data automatic generation model of the method formalizes a communication protocol into a field format which can be displayed and operated, supports configuration of field attributes, can configure test requirements according to fields, and each interface template defined by the test data automatic generation model has the characteristics of universality, reusability and flexible configuration. The test data automatic generation model is configured in units of fields, after data coverage requirements and constraint conditions are configured according to software test requirements during test design, the model automatically generates test data of each field, and concatenates the field test data into complete data frames according to a set mode, finally forms a test data set which is designed reasonably and meets test coverage requirements, and can realize sufficient testing of software correctness, completeness and reliability.
[0006] The technical scheme of the application is as follows: a customized equipment software test data automatic generation method, and specific steps are as follows:
[0007] Step one, constructing an application layer interface template and instantiating into an interface instance model;
[0008] The application analyzes common interface types of embedded software of equipment and communication characteristics of each interface type, extracts general characteristics, constructs a general format template of an application layer of each interface type, and the general format template of the application layer of the interface type is referred to as an interface template; the interface template exhibits a general format of the interface through an interactive editing mode, realizes a function of being displayable and editable for a user, instantiates the interface template into an interface instance model according to a communication protocol, and the interface instance model is configured in units of fields and configures basic attributes of each field according to the communication protocol;
[0009] Step two, setting a field association relationship and a change rule;
[0010] According to software test requirements, a change rule and a limitation condition of a single field and an association relationship between fields are set;
[0011] Step three, configuring a test coverage strategy of data of each field and a data extraction method;
[0012] Step four, generating test data;
[0013] The interface instance model generates multiple test data for each field and a field group according to the configured test coverage strategy and data extraction method, in combination with data association and change requirements;
[0014] Step five, generating a test data framing set;
[0015] The interface instance model is configured with a field test data string concatenation mode, and the interface instance model concatenates the data of each field or field group into a data frame according to the set data combination mode, and finally forms an interface test data set in units of data frames.
[0016] Further, the interface type in step one is supported to be extended, so as to support the generality, reusability and expansibility of the interface template.
[0017] Further, the basic attributes of each field in step one include a field name, a field length, a data type, a data domain, a data resolution and a data calculation mode.
[0018] Further, the test coverage strategy of each field data in step three is specifically as follows: a general normal and abnormal data value coverage strategy is set in the interface instance model, and specific coverage rate strategies of each field data and priority coverage strategies of associated fields are supported.
[0019] Further, the data extraction method in step three includes an equivalent class value, a boundary 5-point value method, a boundary 7-point value method, an upper point, an inner point and a point analysis method, a special value point coverage and a value full coverage.
[0020] Further, the data combination mode in step five includes a Cartesian product algorithm and an orthogonal decomposition table method.
[0021] The present application has the following advantages:
[0022] 1. The present application provides an innovative test data automatic generation method, which aims to comprehensively and effectively cover the interface and application scenarios of equipment software. By comprehensively using the interface protocol, application function scenario requirements and test requirements, the present application can generate more comprehensive, applicable and targeted test data, thereby significantly improving the depth and breadth of the test.
[0023] 2. The present application also introduces a flexible and configurable software requirement and test requirement mechanism, so that the test personnel can flexibly adjust the test strategy and configuration according to the actual test requirements, to adapt to the complexity and diversity of high-reliability software testing. The introduction of this mechanism not only enhances the flexibility and adaptability of the test, but also lays a solid foundation for the improvement of test efficiency and quality.
[0024] 3. The interface general template designed in the present application has excellent generality, high reusability and flexible configuration characteristics. By filling the specific application layer interface communication protocol into the template, the instantiation of the interface can be easily realized. More advanced is that we formalize the interface protocol into a field format that is intuitive, displayable and easy to operate, which greatly improves the convenience and efficiency of user operation and meets the operation needs of users in various application scenarios.
[0025] 4. After interface instantiation, its smallest constituent unit is refined to the field level. This design allows us to flexibly configure the required fields based on different software needs, and to finely set the test coverage requirements for fields according to specific testing requirements (including but not limited to normal, abnormal, boundary values, extreme values, special value points, etc.). Furthermore, we support setting complex relationships and constraints between fields, thereby generating customized test data that meets specific relationship and change requirements to address diverse performance needs and application scenarios. By adopting advanced data combination strategies, we can automatically concatenate field data into complete interface test data frames, thereby achieving comprehensive and in-depth testing of the correctness, completeness, and reliability of the software interface.
[0026] In summary, this invention effectively addresses the shortcomings of existing automatic test data generation methods and configuration mechanisms, providing strong support for high-reliability testing of equipment software. It is widely applicable to generating test data for various bus and interface types, including but not limited to RS422, RS232, 1553B bus, CAN bus, and other interfaces with universal protocol structures. Particularly noteworthy is the method's superior performance and applicability in areas requiring coverage of specific complex scenarios, outlier testing, special value point testing, and high security standards. Through this method, testers can efficiently generate test data that meets various stringent testing conditions, thereby ensuring the stability and reliability of the system or interface under test under various extreme conditions. Attached Figure Description
[0027] Figure 1 Flowchart for the implementation of a method for automatically generating test data for customized equipment software;
[0028] Figure 2 The model for generating interface test data is constructed and instantiated;
[0029] Figure 3 This is a schematic diagram of the process in steps 3 to 5. Detailed Implementation
[0030] The present invention will now be further described with reference to the accompanying drawings.
[0031] like Figure 1 As shown, the five steps of the customized equipment software test data automatic generation method are applied in the following specific ways:
[0032] 1. Constructing application layer interface template and instantiating as model: analyzing the interface types commonly used in embedded software of equipment and the communication characteristics of each interface, extracting common characteristics, constructing the general format template of application layer of each type of interface, and supporting interface type extension to support the generality, reusability and extensibility of the interface template. The interface template presents the general format of the interface through interactive editing, realizing the function of user display and editing. The interface template supports the modification, addition and deletion of each field. According to the communication protocol, the interface template is instantiated, and the instantiated model is configured as a unit of field, and the basic attributes of each field are configured according to the communication protocol, including field name, field length, data type, data domain, data resolution, data calculation method and other information (see Figure 2 ).
[0033] 2. Setting field association relationship and change requirements and other special rules: according to the software test requirements and the specific requirements of the software application interface data, the change law of the individual field can be set, and the association relationship between the fields and the limitation conditions of the data can be set, such as the reset change requirement after the data of a field reaches a specified value, the three coordinates of a triangular search area are not in a straight line, etc.
[0034]
[0035] 3. Configuring field test coverage strategy and method: the interface instance model is provided with general normal and abnormal data value coverage strategy, and the specific coverage rate strategy of each field data and the priority coverage strategy of associated fields are supported, and the data extraction methods such as equivalence class value, boundary 5-point value method, boundary 7-point value method, upper point, inner point and point analysis method, special value point coverage, and value full coverage are configured.
[0036] 4. Generating test data: the interface instance model generates multiple test data points for each field and field group according to the configured coverage rate and method, combined with the data association and change requirements.
[0037] 5. Generating test data frame set: the interface instance model is configured with field test data string combination mode, and the interface instance model stringers the data of each field or field group into a data frame according to the set data combination mode (such as Cartesian product algorithm, orthogonal decomposition table method), and after all the test data points of all the fields are framed, the interface test data set is formed in units of data frame, and the process principle diagram is shown in Figure 3 .
[0038] The patent application effectively makes up for the deficiencies of the existing test data automatic generation method and configuration mechanism, and provides strong support for high reliability testing of equipment software. It is widely applicable to generating test data of various bus and interface types, including but not limited to RS422, RS232, 1553B bus, CAN bus, and other interfaces with universal protocol structure. In particular, the method exhibits excellent performance and applicability in testing needs to cover specific complex scenarios, contain abnormal value testing, special value point testing coverage requirements, and meet high safety standards. Through the method, testers can efficiently generate test data that meets various stringent testing conditions, thereby ensuring the stability and reliability of the tested system or interface under various extreme conditions.
[0039] The above only describes the preferred embodiments of the present application, and it should be noted that those skilled in the art can make several improvements and refinements without departing from the principles of the present application, and these improvements and refinements should also be considered within the scope of protection of the present application.
Claims
1. A method for automatically generating customized equipment software test data, characterized by, The specific steps are as follows: Step one, constructing an application layer interface template and instantiating into an interface instance model; Analyze the interface types commonly used in embedded software of equipment and the communication characteristics of each interface type, extract the general characteristics, construct the general format template of the application layer of each interface type, which is referred to as the interface template; the interface template presents the general format of the interface through interactive editing, realizing the function of user display and editing; according to the communication protocol, the interface template is instantiated to form an interface instance model, and the interface instance model is configured with fields as the configuration unit, and the basic attributes of each field are configured according to the communication protocol; In step one, the interface type extension is supported to support the generality, reusability and extensibility of the interface template; The basic attributes of each field in step one include field name, field length, data type, data domain, data resolution and data calculation method; Step two, set the field association relationship and change rule; According to the software test requirements, the field change rule and the limitation condition are set according to the single field and the association relationship between the fields; Step three, configure the test coverage strategy of each field data and the configuration data extraction method; The test coverage strategy of each field data in step three is as follows: the interface instance model is provided with a general normal and abnormal data value coverage strategy, and specific coverage rate strategy of each field data and priority coverage strategy of associated fields are also supported; The configuration data extraction method in step three includes equivalent class value, boundary 5-point value method, boundary 7-point value method, upper point, inner point and point analysis method, special value point coverage and value full coverage; Step four, generate test data; According to the configured test coverage strategy and data extraction method, the interface instance model generates multiple test data for each field and field group in combination with the data association and change requirements; Step five, generate test data frame set; The field test data string combination method is configured to the interface instance model, the interface instance model string combines the data of each field or field group into a data frame according to the set data combination method, and finally forms an interface test data set in the unit of data frame; The data combination method in step five includes Cartesian product algorithm and orthogonal decomposition table method.
Citation Information
Patent Citations
Multi-bus protocol testing and simulation method based on ICD database and platform
CN106980560A
Interface test case generation method and device
CN111444096A