General automatic test equipment, system and method for electronic products
Through the development method with low code volume, a general automatic testing equipment and system for electronic products is provided, which solves the problem that commercial automatic testing systems cannot meet the rapid construction of automatic testing capabilities for complex electronic products, and realizes automatic testing sharing of different models of electronic products, reducing development difficulty and improving testing efficiency.
Patent Information
- Application Number
- CN202510756741.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-09
- Publication Date
- 2025-07-04
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing commercial automatic testing system cannot meet the needs of iterative updates of complex electronic products to quickly build automatic testing capabilities, resulting in high development costs, long cycles and large workloads, and it is impossible to directly use commercial software for automatic testing system development.
Adopting a low-code development method, it provides a general automatic testing equipment and system for electronic products, including user management module, device under test development module, use case development module, use case configuration module, device resource management module and test execution module. It provides services to the test equipment in the form of plug-ins through the OSGI framework to achieve flexible expansion and configuration of the tested equipment and test cases.
It realizes the shared automatic testing system during automatic testing of different models of complex electronic products, which reduces the difficulty of development, significantly shortens the time for automatic testing capacity building, improves testing efficiency, and improves the universality of automatic testing systems and the logic of test tasks.
Smart Images

Figure CN120256231A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of digital workshop management, and in particular to a general-purpose automatic test device, system and method for electronic products. Background Art
[0002] In the process of testing complex electronic products, in order to ensure the reliability and accuracy of testing, while shortening the testing cycle and reducing manual operations, the application of automatic test systems has become the most effective and economical means. There are two key problems in traditional automatic test systems: repeated development of software function modules and test process codes, and a long development cycle.
[0003] At present, there are already many mature and reliable commercial automatic test systems, and there are also many research results in the architecture and standards of automatic test systems. Although the existing commercial automatic test software on the market can be centered around a test execution engine, with configurable test sequences, fully customizable functions, support for multi-language development, and can quickly develop, execute and deploy test software, ensuring that the common automatic test system has a standard and unified structure system and a standard test program set, these automatic test systems are not open-sourced in terms of code, only some interfaces are open for secondary development, and their scalability and flexibility are limited. They cannot meet the complex and diverse automatic test requirements of multi-model complex electronic products. Their complex automatic test development architecture requires a large amount of code development work, resulting in the inability to meet the need for quickly building automatic test capabilities for the morphological iteration and update of complex electronic products. Therefore, commercial software cannot be directly used for the development of automatic test systems. Summary of the Invention
[0004] The object of the present invention is to provide a general-purpose automatic test device, system and method for electronic products to share an automatic test system in the automatic test process of different models of complex electronic products in a low-code development manner, so as to reduce the difficulty of developing the automatic test system, shorten the time for building automatic test capabilities, and improve test efficiency for all or part of the above problems.
[0005] The technical solution adopted by the present invention is as follows: A general-purpose automatic test device for electronic products, comprising: A first user management module for authenticating the identities of test users and development users and managing permissions; A device under test development module for allowing development users to develop device under test plugins and configure protocol parsing configuration files; A test case development module for allowing development users to develop test case plugins; A test case configuration module for allowing development users to configure test case configuration files, register device under test plugins and test case plugins; The device resource management module is used to provide a device under test resource model associated with the device under test and an instrument device resource model associated with the instrument device for the test user; The test execution module is used to allow the test user to load a test task, and load the corresponding instrument device resource model, the device under test resource model, and the test case configuration file according to the test task to execute the test task and obtain a test result; The first data management module is used to store the test result.
[0006] On the other hand, the present application also provides a general-purpose automatic test system for electronic products, which includes an application management terminal, the above-mentioned general-purpose automatic test equipment for electronic products, and a data management application terminal; The application management terminal is used to manage the registration, identity authentication, and permission management of test users and development users, and manage the device under test plug-in, the protocol parsing configuration file, the test case plug-in, and the test case configuration file; The data management application terminal is used to obtain the test result and generate a test report.
[0007] On the other hand, the present application also provides a general-purpose automatic test method for electronic products. This method is based on the above-mentioned general-purpose automatic test equipment for electronic products, and this method includes: The development user logs in through the first user management module, develops the device under test plug-in using the device under test development module, configures the protocol parsing configuration file, develops the test case plug-in using the test case development module, and configures the test case configuration file using the test case configuration module; The test user logs in through the first user management module, obtains the device under test plug-in, the protocol parsing configuration file, the test case plug-in, and the test case configuration file using the test case configuration module, registers the device under test plug-in and the test case plug-in, and adjusts the test case configuration file; selects the device under test resource model and the instrument device resource model using the device resource management module; obtains the test task, the device under test resource model, the instrument device resource model, the test case configuration file, and the protocol parsing configuration file using the test execution module, executes the test task, and obtains a test result; stores the test result using the first data management module.
[0008] In summary, due to the adoption of the above technical solutions, the beneficial effects of the present invention are: The general automatic test system solution for electronic products proposed in this application provides a general test framework. The development user is responsible for developing the set of devices under test and the set of test cases. The test user is responsible for directly invoking the corresponding set of devices under test and the set of test cases according to specific test tasks, and automatically carrying out test tasks on the resource models of the devices under test and the instrument devices. The set of devices under test and the set of test cases are in a dynamically updated state, which can be flexibly expanded and enriched. Moreover, the test user can adjust the test case configuration file locally, making the test system more universal. When users face new electronic devices, they only need to enrich the set of devices under test and the set of test cases, without having to repeatedly develop a new test system, thus shortening the time for building automatic test capabilities. The test system automatically disassembles the test tasks into hierarchical test processes and test steps, enhancing the logic of carrying out test tasks, avoiding conflicts and duplicate work in the test process, and improving test efficiency. Description of the Drawings
[0009] The present invention will be described by way of examples and with reference to the accompanying drawings, where: Figure 1 is the structural diagram of the general automatic test device for electronic products provided by an embodiment of this application.
[0010] Figure 2 is the storage structure diagram of the test case configuration file in an embodiment of this application.
[0011] Figure 3 is the test task execution flow chart in an embodiment of this application.
[0012] Figure 4 is the structural diagram of the general automatic test system for electronic products provided by an embodiment of this application.
[0013] Figure 5 is the flow chart of the general automatic test method for electronic products provided by an embodiment of this application. Detailed Embodiments
[0014] All features disclosed in this specification, or all steps in the disclosed methods or processes, except for mutually exclusive features and / or steps, can be combined in any manner.
[0015] Any feature disclosed in this specification (including any additional claims, abstract) can be replaced by other equivalent or similar-purpose alternative features, unless specifically stated otherwise. That is, unless specifically stated, each feature is only an example in a series of equivalent or similar features.
[0016] In view of the problem that commercial automatic test systems cannot meet the requirement of quickly building automatic test capabilities for the morphological iteration and update of complex electronic products, resulting in high development costs, long cycles, and large workloads due to the need to separately develop automatic test systems for the complex and diverse automatic test requirements of electronic products, the embodiments of the present application provide a general-purpose automatic test device for electronic products, aiming to realize the sharing of automatic test systems during the automatic test process of complex electronic products of different models in a low-code development manner for the complex and diverse automatic test requirements of electronic products, reduce the difficulty of developing automatic test systems, significantly shorten the time for building automatic test capabilities, and improve work efficiency.
[0017] See Figure 1 , the general-purpose automatic test device for electronic products provided by the embodiments of the present application includes a first user management module, a device resource management module, a use case configuration module, a test execution module, a first data management module, a device under test development module, and a use case development module. Each module provides services for the test device in the form of plugins based on the OSGI (Open Service Gateway Initiative) framework. According to this design idea, users only need to develop a small amount of code in the device under test development module and the use case development module applications.
[0018] 1) The first user management module.
[0019] The first user management module is used for the identity authentication and permission management of test users and development users.
[0020] Specifically, in some alternative embodiments, the first user management module includes a login information sending unit and a permission management unit.
[0021] A) The login information sending unit is used to select a login mode and send user login verification information to the application management terminal.
[0022] B) The permission management unit is used to receive the verification result and authorize the permissions of the logged-in users. To ensure the standardization of the test process and the accuracy of the test results, the first user management module divides users into test users and development users in terms of the test case management function. The usage permissions of test users are: (1) Download the test case plugin; (2) Write, modify, and delete the test case configuration file. On the basis of the usage permissions of test users, development users have additional permissions to develop and upload test case plugins and device under test plugins, as well as configure and upload protocol parsing configuration files and test case configuration files.
[0023] 2) The device under test development module.
[0024] The device under test development module is used for development users to develop device under test plugins and configure protocol parsing configuration files.
[0025] The device under test development module is used to develop the communication function of the device under test. This module exposes the interface of the device under test, which includes a port data sending method, a data receiving event, a communication protocol parsing interface, and an interface for loading the interface. The development user can, through the interface of the device under test exposed by this module, implement the port data sending method provided by this interface, subscribe to the data receiving event, and communicate with the device under test. The protocol parsing configuration file is loaded through the communication protocol parsing interface to parse the required information from the messages reported by the device under test. Draw the communication interface of the device under test as needed and connect it to the loading interface for loading the communication control interface of the device under test when the device starts. Through the above design, the resource models of various models of the device under test are finally generated and used by the device in the form of plugins during the testing and debugging process.
[0026] 3) Test case development module.
[0027] The test case development module is used for the development user to develop test case plugins.
[0028] The test case development module is used for the development user to develop test case plugins. The test case plugin has a one-to-one mapping relationship with the test process layer during the test execution. The development user can, through the test case input parameter interface, attribute parameter interface, and output parameter interface exposed by this module, develop and define the variable types and display names of the parameters and output data required in the test by themselves. The development user can, through the test execution unit interface, develop the minimum test execution unit, which can be a programmable instrument, record the measured values of the instrument, or call the communication function of the resource model of the device under test to interact with the device under test, or process the test data of other test units, or use a combination of the three. The test cases developed by the development user are finally used in the test device in the form of plugins.
[0029] 4) Test case configuration module.
[0030] The test case configuration module is used for the development user to configure the test case configuration file; register the device under test plugin and the test case plugin.
[0031] In some feasible embodiments, the test case configuration module includes a test case configuration unit and a test case management unit.
[0032] The test case configuration unit is configured to: in response to the configuration parameters configured by the development user for the test case plugin, generate a corresponding test case configuration file.
[0033] The test case configuration unit provides a test case configuration interaction interface. According to the test case plug-in written by the development user, it displays the parameter names and data types of the test cases, and saves the configuration results on the interface as a test case configuration file in the Extensible Makeup Language (XML) format. A single test case configuration file is mapped one-to-one with the test process layer in the test execution unit, and each test process layer includes at least one test step layer.
[0034] In some specific embodiments, the test case configuration file includes test resource parameters, test step layer parameters, and test step layer organization parameters.
[0035] The test resource parameters indicate the devices under test and instrument devices required for the test task, and are used to obtain the corresponding device resource models from the device resource management module when the test task is executed.
[0036] The test step layer parameters refer to the test parameters of each test step layer. The test step layer parameters include three parts: input parameters, attribute parameters, and output parameters. The input parameters are the test parameters with different values in different loop steps when the same test step layer is executed in a loop; the attribute parameters are the parameters with the same values in different loop steps. For example, when testing whether the power of an electronic product at different voltages exceeds the power upper limit that the product can withstand, the entire test process corresponds to a test process layer. During the test execution, the electronic product is powered on in a loop, the current value is measured to calculate the product power, and it is judged whether the power of the electronic product exceeds the power upper limit. This loop corresponds to the loop of the test step layer. In different loops, the voltage value (input parameter) is different, while the power upper limit (attribute parameter) is the same. However, for different models of electronic products, when performing the above test, although the corresponding test cases are the same and the execution method of the test process layer is the same, the power upper limit value is different. For this type (the same model) of electronic product, during the loop process, the value of the power upper limit remains unchanged. The output parameters are the test result parameters. When configuring, the input parameters can also be marked whether to output, so that the input parameters can also be output as part of the test results. The values of the input parameters and attribute parameters can come from the test case configuration file, or according to the test step layer organization parameters of the test process layer, come from other test step layers in the same test process layer.
[0037] The test step layer organization parameters indicate the execution order, execution method, and input-output relationship of each test step layer (in the same test process layer). The so-called execution method is divided into loop execution or single execution. According to the indication of the execution method, the loop execution of a single type of test step layer or the combined execution between multiple types of test step layers is realized. In addition, the test step layer organization parameters also indicate the output data source and output format of the test results. The test results are output with the test process layer as the smallest unit, and the test results are output in the form of a table, etc.
[0038] In addition, in some embodiments, the test case configuration unit writes the test case configuration files of each test process layer belonging to the same test process into the same first folder; for the test process layer of a test process that performs batch testing for a single station, a test case configuration file is generated separately for the test process; and the first folders of each test process of the same model of electronic product are written into the same second folder. For example, the test case configuration unit manages the test case configuration files in a manner combining folders and configuration files. Different models of electronic products each have a folder named after their model (i.e., the second folder), and the model folder contains folders named after the processes (i.e., the first folders), and the process folders contain test case configuration files named after each test process layer. In addition, for batch testing of a single station, there is a separate test case configuration file, and this test case configuration file is in the process folder, as Figure 2 shown. The configuration folders and test process configuration files are all automatically generated and saved by software through the test case configuration interaction interface information provided by the test case configuration unit for the user.
[0039] The test case management unit is configured to: register the device under test plug-in and the test case plug-in, associate the device under test plug-in with the protocol parsing configuration file, and associate the test case plug-in with the test case configuration file.
[0040] The test case management unit associates the device under test plug-in and the protocol parsing configuration file as a set of devices under test, and associates the test case plug-in and the test case configuration file as a set of test cases. The test case management unit can upload the set of devices under test and the set of test cases to the application management end, or download the set of devices under test and the set of test cases from the application management end in the reverse direction, and provides an interaction interface for modifying the test parameters / configuration parameters in the test case configuration file.
[0041] 5) Device resource management module.
[0042] The device resource management module is used to provide a device resource model associated with the device under test and an instrument device resource model associated with the instrument device for the test user.
[0043] As an alternative embodiment, the device resource management module includes a device management unit, a driver management unit, and a protocol parsing unit.
[0044] The device management unit is configured to: obtain the device under test / instrument device and its bus and port information (i.e., the device under test and its bus and port information, and the instrument device and its bus and port information) based on the test case configuration file, so as to establish a resource model of the device under test / instrument device. Establish a bus port model according to the locally scanned communication bus ports and allocate it to the resource model of the device under test / instrument device. Associate the resource model of the device under test / instrument device with the corresponding device under test / instrument device one by one.
[0045] Specifically, the device management unit parses the saved devices (devices under test or instrument devices) and all bus type information and port parameter information (i.e., bus and port information) contained therein from the test case configuration file; alternatively, add, delete, or change a device or its bus type information and port parameter information locally and save it to the local configuration file; establish a device resource model (resource model of the device under test or resource model of the instrument device) according to the devices and bus and port information loaded from the test case configuration file or newly added locally from the software interface. The device resource model carries the model number of the device and the bus and port information. Scan all communication bus ports of the local computer, establish a bus port model, allocate the communication bus ports to the device resource model to establish a connection, and display the connection status of each bus and port of the device in the software interface and then summarize it as the device connection status display. Provide a software interface for adding, deleting, modifying, and querying the device resource model, and display the device resource list and its connection status. In the embodiment of the present application, there is a one-to-one mapping relationship between the device resource model and the physical device. For example, when testing multiple sets of devices under test of the same model in a single station, two device resource models are loaded, and there is a one-to-many mapping relationship between the device resource model and the bus port model. One device resource model can have multiple ports of multiple bus types.
[0046] The driver management unit is configured to: provide a program control driver for the instrument device resource model to drive the instrument device to run when it is loaded by the instrument device. The driver management unit only serves the instrument devices in the device resources and provides the corresponding program control driver according to the model number information of the device resource model. The instrument devices are abstracted by type into interfaces such as signal sources and spectrum analyzers to define their execution functions, and different models of the same type of instrument device provide different program control drivers through the interfaces.
[0047] The protocol parsing unit is configured to: provide a protocol parsing configuration file for the device under test resource model, so as to provide the protocol parsing ability for the device under test when the device under test is loaded. The protocol parsing unit only serves the device under test in the device resources. When the device under test resource model is established, the protocol parsing configuration file is loaded and loaded by the corresponding device under test to provide the protocol parsing function for the device under test. During the sending and receiving process of the device under test, the device communication content is parsed according to the protocol parsing configuration file. The embodiments of the present application support the configuration parsing of text protocols and byte protocols. The text protocol extracts text content by using regular expressions, and the byte protocol presets the frame header and frame tail content in the protocol parsing configuration file, and the information granularity is disassembled to the bit level at least for parsing.
[0048] 6) Test execution module.
[0049] The test execution module is used for a test user to load a test task, and load the corresponding instrument device resource model, the device under test resource model and the test case configuration file according to the test task to execute the test task and obtain a test result.
[0050] As an optional implementation manner, the test execution module includes a test information management unit, a test execution unit and a data storage unit.
[0051] The test information management unit is configured to: allow a test user to load a test task; load the corresponding test case configuration file according to the test task; and start, pause or stop the test execution unit in response to a test instruction.
[0052] Specifically, the test information management unit provides a test operation interaction interface. The test user can write a test task on the test operation interaction interface, or can also obtain a test task from the application management end. The test task includes information related to the test such as the model of the device under test, the test process, the test personnel, the test location and the test time. The test information management unit loads the corresponding test case configuration file according to the test task information and transfers the loaded content to the test execution unit. The test information management unit is also responsible for starting, pausing and stopping the test execution unit.
[0053] The test execution unit is configured to: in the start state, obtain the device under test resource model and the instrument device resource model, obtain the test case configuration file, and execute the test task according to the test case configuration file to obtain a test result.
[0054] The test execution unit belongs to the most important link for executing the test task. After the test process is started, the test execution unit carries out the test task and outputs the test result. The embodiments of the present application divide the test execution unit into three layers, which are, from the outside to the inside: the test plan layer, the test process layer and the test step layer.
[0055] The test plan layer is used to receive the device resource model, load the test case configuration file as the test process layer context, transfer the test process layer context and the test resource model to the test process layer, and call the test process layer.
[0056] The test process layer is used to receive and transfer the test process layer context and the test resource model to each test step layer, loop through the test step layer, or combine different test step layers as needed to complete a complex test process, store the test data, and finally summarize it into a test result.
[0057] The test step layer is the smallest test unit, which can perform functions such as single-point testing, DUT control, and complex calculations, and can be called for loop execution or combined execution.
[0058] In some feasible embodiments, see Figure 3 , the test execution unit executes the test task according to the following configuration: 1) Establish a test thread and wait for the test fragment to be loaded.
[0059] 2) Load and parse the test case configuration file to instantiate all test process layers, transfer the test process layer context to the test process layer, and sequentially add all test process layers to the test process layer set. Among them, when each test process layer is established, according to the test process layer context, each test step layer included in the test process layer is instantiated, and each instantiated test step layer is added to the test step layer set owned by the test process layer to complete the instantiation of the test process layer.
[0060] 3) Traverse and execute the test process layer set. Among them, it is judged whether to execute a certain test process layer according to the result checked by the user in the software interface. In addition, for each test process layer, first obtain the device resource model from the device resource management module according to its test process layer context, organize the parameters according to the test step layer, and transfer the obtained DUT resource model, instrument device resource model, and test step layer parameters to each test step layer, so that each test step layer generates a test fragment to be loaded into the test thread for minimum unit testing each time it is executed, returns the test data, and summarizes the test data to obtain the test result. The test result can include the test data and the test conclusion.
[0061] The data storage unit is configured to: store the test result. For example, receive the test result from the test execution unit and save it to the local SQL database.
[0062] 7) The first data management module.
[0063] The first data management module is used to store the test results. In addition, in some optional implementations, the first data management module is also used to generate a test report according to the test results, and transmit the test results and / or the test report to the data management application end.
[0064] Specifically, in some optional implementations, the first data management module includes a first data management unit, a report generation unit and a data transmission unit.
[0065] The first data management unit is configured to obtain the test results from the test execution module (data storage unit). For example, the first data management unit is connected to a local SQL database, retrieves the test results, and provides a software interface to display the test results. In addition, the first data management unit can also delete the locally stored test results.
[0066] The report generation unit is configured to generate a test report according to the test results. For example, the report generation unit uses a word template as an operation object, determines the filling area for data in a table through table, row, and column indexes, and locates the filling position for data outside the table through bookmarks. The corresponding relationship between the test results and the filling of the word template is configured and saved using XML.
[0067] The data transmission unit is configured to upload the test results and / or test reports to the data management application end. For example, when the test device is online, the data transmission unit transmits the local SQL database update content to the data management application end according to the user operation.
[0068] According to the idea of the present application, the present application embodiment also provides a universal automatic testing system for electronic products, such as Figure 4 As shown, the test system includes an application management end, general automatic test equipment for electronic products and a data management application end.
[0069] The application management end is used to manage the registration, identity authentication and permission management of test users and development users, and manage the device plug-ins under test, protocol parsing configuration files, test case plug-ins and test case configuration files.
[0070] As an optional implementation, the application management end includes a second user management module, a test resource management module, an update management module and a test task information loading module.
[0071] The second user management module is used for account registration (i.e. registration of test users and development users), identity authentication (i.e. login verification) and permission management (such as permission deletion and modification).
[0072] The test resource management module is used to receive, issue and delete test case sets (i.e., device plug-ins under test and protocol parsing configuration files) and device sets under test (i.e., test case plug-ins and test case configuration files).
[0073] The update management module is used to send the update function module plug-in to the test device to update the corresponding module configuration.
[0074] The test task information loading module is used to obtain test tasks and send them to the test device.
[0075] The data management application end is used to obtain test results and generate test reports.
[0076] In some alternative embodiments, the data management application end includes a second data management module and a data application module.
[0077] The second data management module is configured to: receive and manage the test results from the test device. Additionally, it can also send relevant data to the test devices at each work station.
[0078] As an alternative embodiment, the second data management module includes a data transceiver unit and a second data management unit. Among them, the data transceiver unit summarizes the test results of the test devices at each work station through network topology and saves them to the database on the server. It can also provide data, analysis, and application result viewing services from the database of the server to each data processing work station. The second data management unit is used for the call display and deletion of the server database.
[0079] The data application module is configured to: generate test reports based on the test results. Specifically, the data application module can analyze the test results such as raw values, maximum and minimum values, and consistency, and generate test reports according to the set word template.
[0080] The application of the automatic test solution of this application has penetrated through the production lines at all levels of the system, sub-system, and module, covering multiple models. The automatic test process of a total of 33 projects has been carried out. More than 400 test cases have been developed and configured for testing, realizing the universality of the same automatic test system in the automatic test processes of different models of complex electronic products. In addition, the traditional development cycle of the automatic test system is on average 14 to 35 working days. However, when developing based on the solution of this application, due to the realization of the low-code effect, the development cycle can be shortened to an average of 7 working days, and the development efficiency can be increased by up to 80%. The low-code development process has been realized, significantly reducing the code development volume and improving the construction efficiency of the automatic test ability.
[0081] Based on the foregoing test device embodiments, this application also provides a general automatic test method for electronic products, as Figure 5 shown, this test method includes the following processes: S1. The developer user logs in through the first user management module, uses the device under test development module to develop the device under test plugin, configures the protocol parsing configuration file, uses the test case development module to develop the test case plugin, and uses the test case configuration module to configure the test case configuration file.
[0082] S2. The tester user logs in through the first user management module, uses the test case configuration module to obtain the device under test plugin, the protocol parsing configuration file, the test case plugin, and the test case configuration file, registers the device under test plugin and the test case plugin, and adjusts the test case configuration file; uses the device resource management module to select the device under test resource model and the instrument device resource model; uses the test execution module to obtain the test task, the device under test resource model, the instrument device resource model, the test case configuration file, and the protocol parsing configuration file, executes the test task, and obtains the test result; uses the first data management module to store the test result.
[0083] In some alternative embodiments, the process of executing the test task in step S2 to obtain the test result includes: S21. Establish a test thread and wait for the test fragments to be loaded.
[0084] S22. Load and parse the test case configuration file to instantiate all test process layers, and add all test process layers to the test process layer set; wherein, the instantiation of the test process layer is completed by instantiating each test step layer included in each test process layer.
[0085] S23. Traverse and execute the test process layer set; wherein, for each test process layer, organize the parameters according to the test step layer, and pass the obtained device under test resource model, instrument device resource model, and test step layer parameters to each test step layer, so that each test step layer generates test fragments and loads them into the test thread for unit testing at the smallest unit, and summarize the test data to obtain the test result.
[0086] Taking the automatic test task of a certain electronic device as an example, the requirements of this automatic test task are: execute a process, which includes test process layer A and test process layer B under this process. Test process layer A includes a test step layer a, and this test step layer a loops to execute to complete test process layer A. Test process layer B includes test step layer b and test step layer c, and combines and executes these two test step layers to complete test process layer B. Then the general automatic test method for electronic products for this automatic test task includes: 1) Test case set development stage.
[0087] (1) The developer user uses the device under test development module in the test device to develop the device under test plugin and configures the protocol parsing configuration file.
[0088] (2)Develop a user usage case development module and develop three test case plugins, namely test case plugin a, test case plugin b, and test case plugin c. Use the use case configuration module to configure the test step layer parameters of test step layer a, namely input parameters, attribute parameters, and output parameters, and the test step layer organization parameters of test process layer A. The test step layer organization parameter describes that test step layer a is executed in a loop, and the output result format is to use the output result of each loop of test step layer a as a data row, and all rows form a test table for output. The columns of the table are the output parameters of test step layer a. Use the use case configuration module to configure the test step layer parameters of test step layer b and test step layer c, as well as the test step layer organization parameters and output results of test process B. The test step layer organization parameter describes that test step layer b is executed in a loop, and the source marker of some input parameters of test step layer c is the output parameter of test step layer b. The output result comes from some output parameters of test step layer b and test step layer c, and this output parameter is used as the table column of the output result.
[0089] 2) Use case management upload stage.
[0090] The development user logs in to the test device. After the identity verification of the first user management module and the second user management module at both ends of the test device and the application management end, the login of the test device is completed. After authorizing the logged-in user, the development user uses the use case configuration module to upload the set of devices under test and the set of test cases to the application management end.
[0091] 3) Use case management download and device resource addition stage.
[0092] (1)After the test user completes the login verification and authorization login at the test device end, through the test case management unit of the use case configuration module, download the test case set and the set of devices under test from the test resource management module of the application management end, register the test case plugin and the device under test plugin, use the software interface provided by the test case configuration unit to edit all test case test parameters, and finally update the test case configuration file by the test case configuration unit and save it locally.
[0093] (2)At the test device end, the test user selects the model of the device under test and the required instrument and equipment through the software interface provided by the device resource management module, fills in the bus and port parameters to add a bus port model to the device resource model under test, and saves the bus and port parameters of the device under test to the local configuration file for calling when the software is started next time.
[0094] 4) Test execution stage.
[0095] (1)The test user selects to log in to the automatic test system online through the login information sending and receiving unit of the first user management module at the local test workbench, sends a login verification to the second user management module of the application management end, and receives the verification result from the second user management module through the permission management unit of the first user management module, and authorizes the permissions of the logged-in user.
[0096] (2)The test user clicks the test interface loading button on the test device. The test information management unit of the test execution module of the test device loads the test operation interaction interface. During the loading process, the device management unit of the device resource management module of the test device reads and parses the saved devices and all bus type information and port parameter information contained therein from the local configuration file. According to the parsing result, it loads the device resource model, then scans all communication bus ports of the local computer, establishes a bus port model, and assigns it to establish a connection with the device resource model.
[0097] (3)The test user clicks a button on the interface to receive the test task information and checks Test Process Layer A and Test Process Layer B.
[0098] (4)After the test user clicks the start test button on the software interface, the test information management unit of the test execution module of the test device, as the test plan layer, loads the test case configuration file in the corresponding folder according to the test process through the test task on the test interface, and passes the loaded test case configuration file to the test execution unit and starts the test execution unit.
[0099] (5)The test execution unit starts a test thread and waits to receive the test segments generated by the test step layer.
[0100] (6)The test execution unit parses the loaded content of the test case configuration file passed from the test information management unit, instantiates Test Process Layer A and Test Process Layer B according to the parsing result. When instantiating Test Process Layer A, it instantiates Test Step Layer a and adds it to the test step layer set of Test Process Layer A. When instantiating Test Process Layer B, it instantiates Test Step Layer b and Test Step Layer c respectively and adds them to the test step layer set of Test Process Layer B. After Test Process Layer A and Test Process Layer B are instantiated, they are added to the test process layer set.
[0101] (7) Traverse and execute the test process layer set. When executing test process layer A, test process layer A obtains the required device resource model from the test resource management module, executes test step layer a through a traversal loop according to the test step layer organization parameters, and instantiates test step layer a into a test fragment loaded into the test thread each time test step layer a is executed, and the test fragment in the test thread calls the device resource model from test process layer A. After each test fragment is executed, the test data of test step layer a is returned to test process layer A. After the test step layer a loop is executed, test process layer A summarizes the test data obtained from all loops to obtain the test result, and transmits the test result to the first data management module through the data storage unit. Test process layer B obtains the required device resource model from the test resource management module, and first executes test step layer b through a traversal loop according to the test step layer organization parameters. Each time test step layer b is executed, test step layer b is instantiated into a test fragment loaded into the test thread, and the test fragment in the test thread calls the device resource model from test process layer B. After each test fragment is executed, the test data of test step layer b is returned to test step layer b. After the test step layer b is executed in a loop, some parameter values are obtained from test process layer B for test step layer c according to the test step layer organization parameters, and the test fragment is instantiated and loaded into the test thread. After execution, the test data is returned to test process layer B. Test process layer B summarizes the test data of test step layer b and test step layer c to obtain the test results, and saves the test results to the local SQL database through the data storage unit.
[0102] 5) The user sets the test task information through the first data management unit of the first data management module, retrieves the test results from the local database through the first data management unit, and displays them on the software interface provided by the first data management module. The user can delete the local test data through the first data management unit of the first data management module.
[0103] 6) The user places the word report template in the specified path, writes an XML configuration file, configures the table index of the template corresponding to the test process layer A, and saves the report generation information of the row and column coordinates of each output parameter of the test process layer A. The user parses the word report and fills in the XML configuration file through the report generation unit of the first data management module to generate a test report.
[0104] 7) The user sends the test data and test information to the data management application end through the data transmission unit of the first data management module according to the network topology.
[0105] 8) At the data management application end, the user uses the data sending and receiving unit of the second data management module to aggregate the test results of each station's test equipment to the server through the network topology and save them to the database. Conversely, the server's database can provide data viewing, analysis, and application results to each data processing station. The second data management unit is used to call and display and delete the data in the server database.
[0106] 9) The user can perform raw value, maximum / minimum value, and consistency analysis on the test results through the data application module, and can also generate test reports.
[0107] 10) The user can also update the modules / plugins of the test equipment through the update management module at the application management end.
[0108] In summary, the construction scheme of the automatic test system proposed in this application abstracts and models the test resources, takes the three-layer architecture of the test plan layer, test process layer, and test step layer as the core, and combines parameter configuration to handle the generation of complex format reports, realizing the general design of the automatic test system. By providing a unified standard development and extension interface, low-code development can be achieved, reducing the development threshold for personnel and improving the efficiency of automatic test capability construction.
[0109] The present invention is not limited to the foregoing specific embodiments. The present invention extends to any new feature or any new combination disclosed in this specification, as well as any new method or process step or any new combination disclosed.
Claims
1. A general-purpose automatic test device for electronic products, characterized in that, It includes: The first user management module is used for identity authentication and permission management of test users and development users; The device under test development module is used for development users to develop device under test plugins and configure protocol parsing configuration files; The test case development module is used for development users to develop test case plugins; The test case configuration module is used for development users to configure test case configuration files, register device under test plugins and test case plugins; The device resource management module is used to provide a device under test resource model associated with the device under test and an instrument device resource model associated with the instrument device for test users; The test execution module is used for test users to load test tasks, and load the corresponding instrument device resource model, device under test resource model and test case configuration file according to the test tasks to execute the test tasks and obtain test results; The first data management module is used to store the test results.
2. The general automatic test equipment for electronic products according to claim 1, wherein, The device resource management module includes: The device management unit is configured to: obtain the device under test / instrument device and its bus and port information based on the test case configuration file to establish a device under test / instrument device resource model; establish a bus port model according to the locally scanned communication bus ports and assign it to the device under test / instrument device resource model; associate the device under test / instrument device resource model with the corresponding device under test / instrument device one by one; The driver management unit is configured to: provide a program control driver for the instrument device resource model to drive the instrument device to run when it is loaded by the instrument device; The protocol parsing unit is configured to: provide a protocol parsing configuration file for the device under test resource model to provide protocol parsing capabilities for the device under test when it is loaded by the device under test.
3. The general automatic test equipment for electronic products according to claim 1, characterized in that, The test case configuration module includes: The test case configuration unit is configured to: generate a corresponding test case configuration file in response to the configuration parameters configured by the development user for the test case plugin; The test case management unit is configured to: register the device under test plugin and the test case plugin, associate the device under test plugin with the protocol parsing configuration file, and associate the test case plugin with the test case configuration file.
4. The general automatic test equipment for electronic products according to claim 3, characterized in that, The test case configuration file corresponds to each test process layer for executing the test task, and each test process layer includes at least one test step layer; the test case configuration file includes: Test resource parameters, indicating the device under test and instrument device required for the test task; Test step layer parameters, indicating the test parameters of each test step layer; Test step layer organization parameters, indicating the execution order, execution method and input-output relationship of each test step layer, and the output format for outputting test results with the test process layer as the minimum unit.
5. The general automatic test equipment for electronic products according to claim 3, characterized in that, The test case configuration unit writes the test case configuration files of each test process layer belonging to the same test process into the same first folder; for the test process layer of the test process that is a single station for batch testing, a test case configuration file is generated separately for the test process; the first folders of each test process of the same model of electronic product are written into the same second folder.
6. The general automatic test equipment for electronic products according to claim 3, characterized in that, The test execution module includes: A test information management unit, configured to: allow a test user to load a test task; load a corresponding test case configuration file according to the test task; and in response to a test instruction, start, pause, or stop a test execution unit; A test execution unit, configured to: in a start state, obtain a device under test resource model and an instrument device resource model, obtain a test case configuration file, and execute a test task according to the test case configuration file to obtain a test result; A data storage unit, configured to store the test result.
7. The general automatic test equipment for electronic products according to claim 6, characterized in that, The test execution unit executes the test task according to the following configuration: Establish a test thread and wait for a test segment to be loaded; Load and parse the test case configuration file to instantiate all test process layers, and add all test process layers to a test process layer set; wherein, the instantiation of the test process layers is completed by instantiating each test step layer included in each test process layer; Traverse and execute the test process layer set; wherein, for each test process layer, organize parameters according to the test step layer, and pass the obtained device under test resource model, instrument device resource model, and test step layer parameters to each test step layer, so that each test step layer generates a test segment and loads it into the test thread for minimum unit testing, and summarize test data to obtain a test result.
8. A general automatic test system for electronic products, characterized in that, Including an application management terminal, a general automatic test device for electronic products as described in any one of claims 1-7, and a data management application terminal; The application management terminal is used to manage the registration, identity authentication, and permission management of test users and development users, and manage the device under test plug-in, protocol parsing configuration file, test case plug-in, and test case configuration file; The data management application terminal is used to obtain the test result and generate a test report.
9. A general automatic testing method for electronic products, which is based on the general automatic testing equipment for electronic products described in any one of claims 1-7, and is characterized in that, The method includes: A development user logs in through a first user management module, develops a device under test plug-in using a device under test development module, configures a protocol parsing configuration file, develops a test case plug-in using a test case development module, and configures a test case configuration file using a test case configuration module; A test user logs in through the first user management module, obtains the device under test plug-in, protocol parsing configuration file, test case plug-in, and test case configuration file using the test case configuration module, registers the device under test plug-in and test case plug-in, and adjusts the test case configuration file; Select a device under test resource model and an instrument device resource model using a device resource management module; obtain a test task, a device under test resource model, an instrument device resource model, a test case configuration file, and a protocol parsing configuration file using a test execution module, execute the test task to obtain a test result; and store the test result using a first data management module.
10. The general automatic testing method for electronic products according to claim 9, characterized in that, The executing the test task to obtain a test result includes: Establish a test thread and wait for a test segment to be loaded; Load and parse the test case configuration file to instantiate all test process layers, and add all test process layers to a test process layer set; wherein, the instantiation of the test process layers is completed by instantiating each test step layer included in each test process layer; Traverse and execute the set of the execution test process layers; wherein, for each test process layer, according to the organization parameters of the test step layer, the obtained device under test resource model, instrument device resource model and test step layer parameters are passed to each test step layer, so that each test step layer generates test segments and loads them into the test thread for minimum unit testing, and the test data is summarized to obtain the test result.
Citation Information
Patent Citations
Automatic performance testing system for batch-produced satellites
CN114518584A