A product testing method, system and electronic device and readable storage medium thereof
By automating the construction and execution of test scripts, the problem of time-consuming and labor-intensive manual matching in airborne radar product testing has been solved, achieving efficient and accurate automated testing.
Patent Information
- Application Number
- CN202211324894.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-27
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2042-10-27
AI Technical Summary
In testing airborne radar products, existing technologies require manual matching of product configurations with different serial numbers and batch numbers, which is time-consuming, labor-intensive, and prone to errors.
By defining product test points, instructions, and faults, a product model is built and serialized and saved to the database. The test script management module is used to automatically configure and run test scripts. Combined with the UUT engine loading module for real-time data listening and configuration generation, automated testing is achieved.
It enables efficient and accurate product testing, reduces human intervention, and improves testing efficiency and accuracy.
Smart Images

Figure CN115598608B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of product testing, and particularly relates to a product testing method and system, and an electronic device and a readable storage medium thereof. BACKGROUND
[0002] Currently, in the product testing of airborne radar, only one product model is defined, while in practice, products to be tested are displayed as multiple products according to different serial numbers and batch numbers, and it is necessary to manually match one product model with products of different serial numbers and batch numbers for product configuration testing, which is time-consuming, laborious and prone to errors.
[0003] The present application is proposed in view of the above technical defects.
[0004] It should be noted that the disclosure of the above background art is only used to assist in understanding the inventive concept and technical solutions of the present application, and it does not necessarily belong to the prior art of the present patent application. In the absence of explicit evidence that the above content has been disclosed on the filing date of the present application, the above background art should not be used to evaluate the novelty and inventiveness of the present application. SUMMARY
[0005] The purpose of the present application is to provide a product testing method, system, and electronic device and readable storage medium thereof, to overcome or alleviate at least one aspect of the known technical defects.
[0006] The technical solutions of the present application are:
[0007] In one aspect, a product testing method is provided, comprising:
[0008] Model design step: defining product test points, product instructions, and product faults, constructing a product model, serializing the product model, and saving it to a database;
[0009] Test script management step: specifying a product model, deserializing the product model, extracting product test points, product instructions, and product faults, configuring a test script, running a single-step test script, requesting a return result, and then continuing to run the single-step test script until the test script is run to completion;
[0010] UUT engine loading step: deserializing the corresponding product model when the test script management module requests a return result, loading the product model in the cache, and listening to real-time data when the product configuration is requested, CLR loading and compiling the running logic, and returning the result of running the single-step test script to the test script management module;
[0011] Configuration generation step: loading the product model into a specified product, deserializing it, calculating when the product configuration is requested by the UUT engine loading module, and returning the product configuration to the UUT engine loading module.
[0012] According to at least one of the embodiments of the present application, the product testing method further comprises:
[0013] A test result recording step of recording the test result of the product after the test script is run.
[0014] In another aspect, a product testing system is provided, comprising:
[0015] A model design module configured to define product test points, product instructions, product faults, build a product model, serialize the product model, and save the product model into a database;
[0016] A test script management module configured to specify the product model, deserialize the product model, extract the product test points, product instructions, and product faults, configure a test script, run a single-step test script, continue to run the single-step test script after a result is returned, and run the test script until the test script is run.
[0017] A UUT engine loading module configured to deserialize the corresponding product model when the test script management module requests a result, load the product model in a cache, listen to real-time data when a product configuration is requested, load and compile a running logic, and return a result of running the single-step test script to the test script management module.
[0018] A configuration generation module configured to load the product model into a specified product, deserialize the product model, calculate a product configuration when the UUT engine loading module requests the product configuration, and return the product configuration to the UUT engine loading module.
[0019] According to at least one of the embodiments of the present application, the product testing system further comprises:
[0020] A test result recording module configured to record the test result of the product after the test script is run.
[0021] In still another aspect, an electronic device is provided, comprising:
[0022] A processor;
[0023] A memory storing a computer program configured to be executed by the processor to implement any of the product testing methods described above.
[0024] In yet another aspect, a computer readable storage medium storing a computer program configured to be executed by a processor to implement any of the product testing methods described above is provided. BRIEF DESCRIPTION OF DRAWINGS
[0025] Fig. 1is a schematic diagram of a product testing system method provided by an embodiment of the present application.
[0026] Fig. 2 is a schematic diagram of a product testing system method provided by an embodiment of the present application.
[0027] In order to better illustrate the embodiments, some components in the drawings can be omitted, enlarged or reduced, and do not represent the actual size of the product. In addition, the drawings are only used for illustrative description and cannot be understood as a limitation of the patent. DETAILED DESCRIPTION
[0028] In order to make the technical solutions of the present application and its advantages clearer, the technical solutions of the present application will be further clearly, completely and specifically described below with reference to the drawings. It should be understood that the specific embodiments described herein are only part of the embodiments of the present application, and are only used to explain the present application, but not to limit the present application. It should be noted that, for the purpose of description, only parts related to the present application are shown in the drawings, and other related parts can be referred to the general design. In the case of no conflict, the embodiments in the present application and the technical features in the embodiments can be combined to obtain new embodiments.
[0029] In addition, unless otherwise defined, the technical terms or scientific terms used in the description of the present application should be the general meaning understood by the general technical personnel in the field to which the present application belongs. The words indicating the relative direction or position relationship, such as "up", "down", "left", "right", "center", "vertical", "horizontal", "inner", "outer" and the like used in the description of the present application, are only used to indicate the relative direction or position relationship, and not to imply that the device or element must have a specific orientation, be constructed and operated in a specific orientation, and the relative position relationship may also change accordingly when the absolute position of the described object changes, therefore, it cannot be understood as a limitation of the present application. The "first", "second", "third" and similar terms used in the description of the present application are only for the purpose of description, and are used to distinguish different components, and cannot be understood as indicating or implying relative importance. The "one", "an" or "the" and similar terms used in the description of the present application should not be understood as an absolute limitation on the quantity, but should be understood as the existence of at least one. The "include" or "contain" and similar terms used in the description of the present application mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, and do not exclude other elements or objects.
[0030] In addition, it needs to be explained that, unless otherwise explicitly specified and limited, the "installation", "connection", "connection" and similar words used in the description of the application should be understood broadly, for example, the connection can be fixed connection, or detachable connection, or integral connection; can be mechanical connection, or electrical connection; can be directly connected, or indirectly connected through an intermediate medium, or the internal communication of two elements, and those skilled in the art can understand its specific meaning in the application according to the specific circumstances.
[0031] The following will be combined with the attached Figs. 1-2 The application is further described in detail.
[0032] In one aspect, a product testing method is provided, comprising:
[0033] Model design step: defining product test points, product instructions, product faults, constructing product models, serializing product models, and saving them to a database;
[0034] Test script management step: specifying product models, deserializing product models, extracting product test points, product instructions, and product faults, configuring test scripts, running single-step test scripts, requesting return results, and continuing to run single-step test scripts until the test script runs end;
[0035] UUT engine loading step: deserializing the corresponding product model when the test script management module requests a return result, loading the product model in the cache, listening to real-time data when the product configuration is requested, CLR loading and compiling running logic, and returning the result of running single-step test scripts to the test script management module;
[0036] Configuration generation step: loading product models into specified products, deserializing, calculating when the product configuration is requested by the UUT engine loading module, and returning the product configuration to the UUT engine loading module.
[0037] In the product testing method described above:
[0038] The product model is a definition of the object being tested, and is a concept in object-oriented programming;
[0039] The product configuration is an instance of the product model, which indicates which serial number of the product the object being tested is composed of, rather than the composition of the test program;
[0040] The product test point refers to the test data continuously generated by the object being tested, such as current, voltage, etc.
[0041] The product instruction refers to the instruction definition that the external can send to the object being tested, including instruction name, instruction parameter, and instruction return value.
[0042] Product fault refers to the definition of the fault that the measured object can produce, including fault code and fault information.
[0043] For the product testing method disclosed in the above embodiments, those skilled in the art can understand that the method is designed on the basis of defining a product model, and in the process of running a test script, a test configuration is generated by real-time dynamic loading and instant compilation according to the serial number and batch number of the actual product. Only the component version that needs to be run is loaded based on the dependency relationship, and the test program runs with appropriate resource consumption, and can be an automated process that does not need to be managed by a person to manage the composition of the test program, and has high efficiency and accuracy.
[0044] In some optional embodiments, the product testing method described above further includes:
[0045] A test result recording step: after the test script is run, the test result of the product is recorded.
[0046] In another aspect, a product testing system is provided, comprising:
[0047] A model design module is used to define product test points, product instructions, and product faults, build a product model, serialize the product model, and save it to a database;
[0048] A test script management module is used to specify a product model, deserialize the product model, extract product test points, product instructions, and product faults, configure a test script, run a single-step test script, continue to run the single-step test script after the result is returned, and run the test script until it ends;
[0049] A UUT engine loading module deserializes the corresponding product model when the test script management module requests a result, loads the product model in the cache, and listens to real-time data after the product configuration is obtained, and the CLR loads and compiles the running logic to return the result of running the single-step test script to the test script management module;
[0050] A configuration generation module is used to load the product model into a specified product, deserialize it, calculate the product configuration when the UUT engine loading module requests it, and return the product configuration to the UUT engine loading module.
[0051] In some optional embodiments, the product testing system described above further includes:
[0052] A test result recording module records the test result of the product after the test script is run.
[0053] For the product testing system disclosed in the above embodiments, since it corresponds to the product testing method disclosed in the above embodiments, the description is relatively simple, and the specific related matters can be referred to the related description in the product testing method part. The technical effects can also be referred to the technical effects in the product testing method part, and will not be described here in detail.
[0054] In addition, those skilled in the art should also realize that the various modules and units of the device disclosed in the embodiments of the present application can be realized by electronic hardware, computer software or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the embodiments of the present application are generally described in terms of functions. Whether the functions are performed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can choose different methods to implement the described functions for each specific application and its actual constraints, but such implementation should not be considered beyond the scope of the present application.
[0055] In another aspect, an electronic device is provided, comprising:
[0056] a processor;
[0057] a memory storing a computer program configured to be executed by the processor to implement any of the above product testing methods.
[0058] In some optional embodiments, the processor can be a central processing unit (CPU) or other forms of processing units with data processing and / or instruction execution capabilities, which can be general purpose processors or special purpose processors, and can control other components in the electronic device to perform desired functions.
[0059] In some optional embodiments, the memory can include various forms of computer readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory can be random access memory (RAM) and / or cache memory. The non-volatile memory can be read only memory (ROM), hard disk, flash memory, etc. The memory can store a computer program, which, when executed by the processor, can implement the functions in the embodiments of the present application and / or other desired functions. In addition, various application programs and various data can also be stored.
[0060] In some optional embodiments, the processor and the memory can be connected through a bus system, which can be a serial, parallel communication bus, etc.
[0061] It should be noted that, for the sake of clarity and simplicity, not all constituent units of the electronic device are shown in the above embodiments. In order to realize the necessary functions of the electronic device, those skilled in the art can provide and set other constituent units not shown according to specific needs.
[0062] For the electronic device disclosed in the above embodiments, since the processor can implement any of the above product testing methods when executing the computer program stored on the memory, the technical effects can be correspondingly referred to the technical effects of the product testing methods, which will not be repeated here.
[0063] In another aspect, a computer readable storage medium is provided, which stores a computer program. The computer program is executed by a processor to implement any of the above product testing methods.
[0064] In some optional embodiments, the computer readable storage medium can include a memory card of a smart phone, a storage component of a tablet computer, a hard disk of a personal computer, a random access memory (RAM), a read only memory (ROM), an erasable programmable read only memory (EPROM), a portable compact disc read only memory (CD-ROM), a flash memory, or any combination of the above storage media, or other applicable storage media.
[0065] The embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts of each embodiment can be referred to each other.
[0066] So far, the technical solution of the present application has been described in combination with the preferred embodiments shown in the drawings. Those skilled in the art should understand that the protection scope of the present application is obviously not limited to these specific embodiments. Those skilled in the art can make equivalent changes or replacements to the related technical features without departing from the principles of the present application. The technical solutions after the changes or replacements will fall within the protection scope of the present application.
Claims
1. A product testing method, characterized in that, include: Model design steps: Define product measurement points, product instructions, and product faults; build the product model; serialize the product model; and save it to the database. Test script management steps: Specify the product model, deserialize the product model, extract the product test points, product instructions, and product faults to configure the test script, run the single-step test script, request the return result, continue running the single-step test script until the test script finishes running; UUT engine loading steps: When the test script management module requests the return result, the corresponding product model is deserialized, the product model is loaded into the cache, and after the product configuration is obtained, real-time data is listened to, the CLR loads the compilation and execution logic, and the result of running the single-step test script is returned to the test script management module. Configuration generation steps: Load the product model into the specified product, perform deserialization, perform calculations when the UUT engine loading module requests the product configuration, and return the product configuration to the UUT engine loading module; The product configuration description specifies which serial numbers comprise the tested product.
2. The product testing method according to claim 1, characterized in that, Also includes: Test result recording steps: After the test script has finished running, record the test results for the product.
3. A product testing system, characterized in that, include: The model design module is used to define product measurement points, product instructions, and product faults, build product models, serialize product models, and save them to the database. The test script management module is used to specify the product model, deserialize the product model, extract the product test points, product instructions, and product faults, configure the test script, run the single-step test script, request the return result, continue to run the single-step test script, and continue to run the test script until the test script finishes running. When the test script management module requests a result, the UUT engine loading module deserializes the corresponding product model, loads the product model in the cache, and after obtaining the product configuration, listens for real-time data, loads the CLR to compile and run the logic, and returns the result of running the single-step test script to the test script management module. The configuration generation module is used to load the product model into the specified product, perform deserialization, perform calculations when the UUT engine loading module requests the product configuration, and return the product configuration to the UUT engine loading module. The product configuration description specifies which serial numbers comprise the tested product.
4. The product testing system according to claim 3, characterized in that, Also includes: The test result recording module records the test results for the product after the test script has finished running.
5. An electronic device, characterized in that, include: processor; A memory storing a computer program configured to, when executed by the processor, implement the product testing method according to any one of claims 1-2.
6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, enables the implementation of the product testing method according to any one of claims 1-2.
Citation Information
Patent Citations
Signal-oriented automatic test implementation method
CN111176984A
Unit testing method and device and storage medium
CN113342696A