Debuggable automatic test method and device based on test process and storage medium
By adopting automatic testing methods based on the test process debuggable in the automated testing system, dynamically generate and debug test cases, the problem of inefficiency in the test system in multiple batches and small quantities of products is solved, and higher versatility and flexibility are achieved, and testing efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202411761970.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-03-25
AI Technical Summary
Existing automated testing systems require frequent changes and debugging when facing multiple batches and small quantities of products, resulting in inefficiency, insufficient versatility and flexibility.
The automatic testing method based on the test process is adopted, and the test case steps are decomposed, refined into process nodes, and dynamically adjusting the execution order and parameters of the nodes through dynamic generation and debugging technology to form callable test cases.
It improves the versatility and flexibility of the automated testing system, reduces the time-consuming test work, reduces manual testing errors, and improves the efficiency and effectiveness of product testing.
Smart Images

Figure CN119690831A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of automated testing, and in particular relates to an automated testing method, device and storage medium that can be debugged based on a testing process. Background Art
[0002] At present, human participation is inevitably required in testing work. Due to the number of tested products and the cumbersome testing process, time consumption is inevitably serious, resulting in tight project time nodes.
[0003] In current testing work, due to the heavy workload, the manpower and material resources consumed are quite serious. Since manual testing is relatively slow, mistakes are inevitable, resulting in inaccurate test results.
[0004] In current testing work, due to the reason of multiple batches and small quantities, the test system has to be modified and debugged for different products, resulting in reduced efficiency. Summary of the invention
[0005] In view of this, one of the objectives of the present invention is to provide an automatic testing method based on dynamic generation and debugging.
[0006] One of the purposes of the present invention is achieved through the following technical solutions:
[0007] The automatic testing method based on the debuggable testing process includes the following steps:
[0008] Decompose the existing test case steps, refine each process into process nodes, load the test process step file corresponding to the system according to the indicator to be tested, obtain the node sequence of all test process nodes of the indicator and the execution parameters of each node, and form a first node set;
[0009] Set the first interactive interface as the system test indicator test process debugging interface, and read the first node set and view all test process nodes of the indicator to be tested through the first interface;
[0010] According to actual needs and debugging data, the node execution order and execution parameters are changed in the first interface, and the debugging effect of the test process is monitored at any time and the accuracy of the test is verified until the adaptation requirements of the test process are fully met;
[0011] The process nodes obtained after the test are taken as the second node set. The second node set covers the node sequence of the debugged test process nodes and the execution parameters of each node. They are formed into correct test cases, packaged into execution files and marked for direct calling the next time the same test is performed.
[0012] Furthermore, in the first interactive interface, by marking a process breakpoint at the front end of the process node, after starting debugging, the program execution will be paused when it reaches the process breakpoint, and the process data and result data of the process execution to the node can be viewed at this time.
[0013] Furthermore, the test case is an execution file, and by loading the execution file, the execution process node sequence of the test case and the execution parameters of each node are obtained.
[0014] Furthermore, in the first interface, by reading the first node set and generating process execution information, the user can intuitively view the process execution steps and execution parameter information through the interface.
[0015] Furthermore, when the execution file formed by the correct test case is directly called during the same type of test, the node execution order and execution parameters can still be changed in the first interface according to actual needs and debugging data.
[0016] A second object of the present invention is to provide a computer device, comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor implements the method described in the preceding item when executing the computer program.
[0017] A third object of the present invention is to provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the method described above when executed by a processor.
[0018] The beneficial effects of the present invention are:
[0019] The present invention solves the problem of the universality of the automated testing system for multiple batches of small quantities of products and the problem that test cases of the automated testing system are difficult to modify, so as to improve the universality and flexibility of the automated testing system.
[0020] This system method uses low-code technology, dynamic code generation technology, dynamic compilation and debugging technology, instrument automatic control technology, and test index automatic calibration and compensation technology to analyze and judge the test results according to preset rules and obtain the results, and display the test results in a friendly graphical manner;
[0021] The present invention solves the compatibility of the automated testing system for multiple batches and small quantities through low-code and dynamic generation, compilation, and debugging, thereby improving the versatility and flexibility of the automated testing system.
[0022] It reduces the time consumption of testing work, frees up manpower, and reduces the errors caused by manual testing, while improving the efficiency and effectiveness of product testing.
[0023] Other advantages, objectives and features of the present invention will be described in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the following examination and study, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following description and the preceding claims. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be further described in detail below with reference to the accompanying drawings, in which:
[0025] Figure 1 It is a schematic diagram of the process of loading a test case for testing under normal circumstances of the present invention;
[0026] Figure 2 It is a schematic diagram of a test flow for dynamic adjustment of the present invention;
[0027] Figure 3 It is a schematic diagram of the first interface of the operation test of the present invention;
[0028] Figure 4 This is a screenshot of the toolbox display of the low-code interface;
[0029] Figure 5 This is a screenshot of the running process of the self-designed test process in the low-code interface. DETAILED DESCRIPTION
[0030] The preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the preferred embodiments are only for illustrating the present invention, rather than for limiting the protection scope of the present invention.
[0031] It should be noted that the "first", "second", "third", etc. in the specification and claims of the present application and in the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the term "comprising" and any variation thereof are intended to cover non-exclusive inclusions, for example, a process, method, system or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, systems or devices. The term "module" refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic, or a combination of hardware or / and software code that can perform functions associated with the element.
[0032] In product testing, more and more companies are using automated testing to test and inspect product performance in all aspects. However, in the current testing work, due to the reason of multiple batches and small quantities, the test system needs to be modified and debugged for different products, resulting in reduced efficiency. The present invention provides an automatic testing method based on debuggable test process, which aims to solve the problem of universality of automated testing system for multiple batches of small quantities of products and the problem that test cases of automated testing system are not easy to modify, so as to improve the universality and flexibility of automated testing system.
[0033] Embodiment 1
[0034] like Figure 1 and Figure 2 As shown, Figure 1 This is a flowchart of downloading test cases for testing under normal circumstances. Figure 2 Schematic diagram of the test flow for dynamic adjustment of the present invention. In this embodiment, the specific steps of the method are as follows:
[0035] Step S1: Decompose the existing test case steps, refine each process into process nodes, load the test process step file corresponding to the system according to the indicator to be tested, obtain the node sequence of all test process nodes of the indicator and the execution parameters of each node, and form a first node set;
[0036] Step S2: setting the first interactive interface as the system test index test process debugging interface, and reading the first node set and viewing all test process nodes of the index to be tested through the first interface;
[0037] Step S3: According to actual needs and debugging data, the node execution order and execution parameters are changed in the first interface, and the debugging effect of the test process is monitored at any time and the accuracy of the test is verified until the adaptation requirements of the test process are fully met;
[0038] Step S4: The process nodes obtained after the test are taken as the second node set, which covers the node sequence of the debugged test process nodes and the execution parameters of each node, and forms a correct test case, encapsulated into an execution file and marked for direct call the next time the same test is performed.
[0039] "Break down each process into process nodes" means that in this system, the test case defines each step of the test process as a process node, corresponding to a node of program execution. The content of each process node can be viewed and modified according to the definition, and the execution order of these nodes can also be changed.
[0040] "View all test process nodes of the indicators to be tested" in step S2 means that the test case is an execution file. The system loads these files to obtain the execution process node sequence of the test case and the execution parameters of each node, and generates process execution information in the first interface. Users can intuitively view the process execution steps and execution parameter information through this interface. In the first interface, the order of node execution can also be changed by dragging and dropping, and the execution parameters can also be modified.
[0041] In step S3, "according to actual requirements and debugging data, the node execution order and execution parameters are changed in the first interface" means that the user can modify the execution order and execution parameters of the process nodes according to the actual test requirements of the product to be tested and the debugging results, so that the test process is more in line with the test requirements of the product to be tested.
[0042] "Verify the accuracy of the test" in step S3 means that in the process of adapting common test cases to one test product and another test product for multiple batches of small quantities of products, there may be slight differences, such as different program execution parameters, or different execution order of a certain test node, etc. The user can modify and verify it according to actual needs through system debugging to ensure the rigor of the test process execution and avoid irreparable losses caused by erroneous test process execution.
[0043] In step S4, "encapsulate it into an executable file and mark it after forming a correct test case", means that after the user has debugged and modified it repeatedly and confirmed that it is correct, the test process will be saved as a test case for the product and saved in the system. The next time the product information is tested, the test case file can be directly loaded to avoid the need to debug and modify the test case every time.
[0044] Embodiment 2
[0045] In this embodiment, Figure 3 As shown, an optional operation mode is added in step S3, that is, in the first interactive interface, by marking the process breakpoint at the front end of the process node, after starting debugging, the program execution will be paused when it reaches the process breakpoint, and the process data and result data of the process execution to this node can be viewed at this time.
[0046] In this method, "by marking a process breakpoint at the front end of a process node" means that the user can mark a special mark at the front end of a process node line in the debugging interface, and the mark indicates that the program will be paused when it is executed to this node.
[0047] "You can view the process data and result data of the process execution to this node" means that the system debugging function will pause when executing the program to the process node marked with a breakpoint. At this time, you can view the execution status of all nodes before this node, including the execution parameters, execution results and other data of each process node.
[0048] like Figure 4 and Figure 5 As shown, the present invention utilizes low-code technology to allow users to quickly form test cases through graphical interfaces, drag-and-drop components, and model-driven logic, and can also load test cases into debuggable graphical interfaces; for example, the modification and setting of the transmission frequency can be directly implemented, and then an XML process file is generated without modifying the code every time; in traditional testing methods, if the test process needs to be changed, it needs to be recoded and regenerated, but the low-code used in the present invention does not need to modify the code again, and can be combined and generated very quickly by modifying the existing process or directly creating a new one, thereby saving a lot of time and manpower;
[0049] The present invention uses dynamic compilation technology to check whether the test cases formed by users in the low-code graphical interface are reasonable, and gives modification suggestions;
[0050] The present invention utilizes dynamic code generation technology to dynamically generate program codes executable by a computer from test cases formed and dynamically compiled by users through low-code graphical interface operations;
[0051] The present invention utilizes debugging technology and an adjustable graphical interface loaded with low code. Users can debug the test process step by step by setting breakpoints on the test process step nodes, obtain the execution data in the execution steps, and modify the execution parameters in this interface to achieve the effect of debugging the process steps.
[0052] The present invention utilizes instrument automatic control technology to encapsulate the instrument control instructions into model-driven logic, and users can operate and modify parameters in a low-code graphical interface;
[0053] The present invention utilizes the test index automatic compensation technology to compensate for the test results. For example, the entire test process inevitably uses connecting cables, and these connecting cables will cause line losses. The system collects the line loss data of these cables and saves them in the cables. During the test, the system takes out the corresponding cable line loss data to automatically compensate for the test results.
[0054] The present invention solves the compatibility of the automated testing system with multiple batches and small quantities through low-code and dynamic generation, compilation, and debugging, thereby improving the versatility and flexibility of the automated testing system; the automated testing system reduces the time consumption of testing work, releases manpower, and reduces the errors caused by manual testing, while improving the efficiency and effectiveness of product testing.
[0055] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0056] A person skilled in the art may understand that all or part of the steps of the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0057] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0058] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.
[0059] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0060] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution, which should be included in the scope of the claims of the present invention.
Claims
1. An automatic testing method based on a debuggable testing process, characterized in that: The method comprises the following steps: Decompose the existing test case steps, refine each process into process nodes, load the test process step file corresponding to the system according to the indicator to be tested, obtain the node sequence of all test process nodes of the indicator and the execution parameters of each node, and form a first node set; Set the first interactive interface as the system test indicator test process debugging interface, and read the first node set through the first interface and view all test process nodes of the indicator to be tested; According to actual needs and debugging data, the node execution order and execution parameters are changed in the first interface, and the debugging effect of the test process is monitored at any time and the accuracy of the test is verified until the adaptation requirements of the test process are fully met; The process nodes obtained after the test are taken as the second node set. The second node set covers the node sequence of the debugged test process nodes and the execution parameters of each node. They are formed into correct test cases, packaged into execution files and marked for direct calling the next time the same test is performed.
2. The automatic testing method based on debuggable testing process according to claim 1 is characterized in that: In the first interactive interface, by marking a process breakpoint at the front end of the process node, after starting debugging, the program execution will pause when it reaches the process breakpoint, and the process data and result data of the process execution to this node can be viewed at this time.
3. The automatic testing method based on debuggable testing process according to claim 1 is characterized in that: The test case is an execution file. By loading the execution file, the execution process node sequence of the test case and the execution parameters of each node are obtained.
4. The automatic testing method based on debuggable testing process according to claim 1 is characterized in that: In the first interface, the first node set is read and process execution information is generated, and the user can intuitively view the process execution steps and execution parameter information through the interface.
5. The automatic testing method based on debuggable testing process according to claim 1 is characterized in that: When the execution file formed by the correct test case is directly called during the same type of test, the node execution order and execution parameters can still be changed in the first interface according to actual needs and debugging data.
6. A computer device comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.