Automatic test system and device
By designing an automated test system, using modular management and automated test case script execution, the problems of low efficiency and difficulty of testing existing smart devices are solved, and efficient automated testing is achieved.
Patent Information
- Application Number
- CN202411272298.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2024-12-27
AI Technical Summary
Existing smart device testing relies on manual operation, is inefficient and difficult, and the tester's operating level and cognitive level are high.
An automated test system was designed, including a backend management unit, a front-end portal unit, a public service unit and a data management unit. Through user management, test project management, test case management, test case management, test execution module and other modules, automated test case scripts are generated and executed. , realize automated testing of the equipment to be tested.
It improves the efficiency of equipment testing, reduces the difficulty of testing, reduces the requirements for the operational level and cognitive level of the tester, and realizes automated testing.
Smart Images

Figure CN119201571A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of intelligent device testing, and in particular to an automated testing system and device. Background Art
[0002] With the continuous upgrading of smart devices (e.g., concentrators and smart meters), the functional points of existing smart devices are increasing, which also makes the testing workload of smart devices increasingly heavy.
[0003] In the related art, when testing smart devices, manual testing is mostly used. That is, the tester manually sends instruction codes using the host computer software to test the smart device. This testing method requires high operating and cognitive levels of the tester, and the testing process is completely dependent on the tester's operation, resulting in low testing efficiency. Summary of the invention
[0004] The present invention aims to solve one of the technical problems in the related art at least to a certain extent. To this end, one object of the present invention is to provide an automated testing system that can realize automated testing of a device to be tested, improve the testing efficiency of the device, and reduce the testing difficulty of the device to be tested.
[0005] In the first aspect, an embodiment of the present invention proposes an automated testing system, comprising: a background management unit, a foreground portal unit, a public service unit and a data management unit; the background management unit comprises a user management module, a role management module, a permission management module, a dictionary data module, an event management module, a device management module and a networking management module; the foreground portal unit comprises a test project management module, a test plan management module, a test case management module, a test execution module, a test result statistics module, a test device management module and a networking environment management module; the public service unit comprises a log service module, a file service module and a message queue service module; the data management unit comprises a test data management module, a file data management module, a custom script data management module, a keyword data management module and a device data management module.
[0006] According to the automated testing system of the embodiment of the present invention, a background management unit, a front-end portal unit, a public service unit and a data management unit are set; wherein the background management unit includes a user management module, a role management module, a permission management module, a dictionary data module, an event management module, a device management module and a networking management module; the front-end portal unit includes a test project management module, a test plan management module, a test case management module, a test execution module, a test result statistics module, a test device management module and a networking environment management module; the public service unit includes a log service module, a file service module and a message queue service module; the data management unit includes a test data management module, a file data management module, a custom script data management module, a keyword data management module and a device data management module; thereby realizing automated testing of the device to be tested, improving the testing efficiency of the device and reducing the testing difficulty of the device to be tested.
[0007] In some embodiments, the user management module is used to manage user accounts. Through the user management module, user accounts can be created, user information corresponding to the user accounts can be edited, user accounts can be deleted, and user accounts can be frozen; the role management module is used to manage role information corresponding to the user accounts, wherein the role information has corresponding permissions; the permission management module is used to manage permissions of modules in the system; the dictionary data module is used to manage professional terminology data and unit data; the event management module is used to record event logs; the device management module is used to manage information of devices to be tested, and the information of devices to be tested includes status information of devices to be tested and communication protocol configuration information between different devices to be tested; the networking management module is used to perform networking association management of different devices to be tested.
[0008] In some embodiments, the test project management module is used to create, modify and delete test projects, and manage user accounts associated with test projects; the test plan management module is used to manage test plans, and the management of test plans includes test cycle limitations, associated test cases, test execution result statistics and test report presentation; the test case management module is used to write and maintain automated test cases and set case status; the test execution module is used to combine keywords and test data to generate automated test case scripts, and execute the automated test case scripts; the test result statistics module is used to count the execution results of the automated test case scripts, and generate reports based on the statistical results; the test equipment management module is used to manage user accounts associated with test equipment to determine the testers corresponding to the test equipment; the networking environment management module is used to maintain the networking relationship between test equipment.
[0009] In some embodiments, the log service module is used to record the user's operation log; the file service module is used to manage the service files that the system operation depends on; and the message queue service module is used to process concurrent requests from multiple users.
[0010] In some embodiments, the test data management module is used to manage the test data involved in the testing process; the file data management module is used to manage the file data involved in the testing process; the custom script data management module is used to manage the custom script data involved in the testing process; the keyword data management module is used to manage the keyword data involved in the testing process; and the device data management module is used to manage the device data involved in the testing process.
[0011] In some embodiments, keywords and test data are combined to generate an automated test case script, including: obtaining a user's selection instruction for a keyword to determine a target keyword; obtaining a user's selection instruction for an operation object to determine a target operation object corresponding to the target keyword; obtaining a target test instruction based on the target keyword; obtaining test data, and combining the target test instruction, the target operation object and the test data to generate an automated test case script.
[0012] In some embodiments, the system uses the unitest framework of python to develop the driving framework of the keyword.
[0013] In the second aspect, an embodiment of the present invention proposes an automated testing device, comprising: the automated testing system, host computer, AMI system and test rack as described above; the automated testing system is connected to the host computer, AMI system and test rack respectively, the automated testing system is used to obtain the automated testing case script sent by the user, and perform corresponding automated testing based on the automated testing case script; the test rack is used to monitor the status information of the equipment to be tested, and send the monitored status information to the automated testing system, so that the automated testing system can visualize the status information.
[0014] According to the automated testing device of the embodiment of the present invention, the automated testing system, host computer, AMI system and test rack as described above are set; the automated testing system is connected to the host computer, AMI system and test rack respectively, the automated testing system is used to obtain the automated testing case script sent by the user, and perform corresponding automated testing based on the automated testing case script; the test rack is used to monitor the status information of the device to be tested, and send the monitored status information to the automated testing system, so that the automated testing system can visualize the status information. Thereby, automated testing of the device to be tested is realized, the testing efficiency of the device is improved, and the testing difficulty of the device to be tested is reduced.
[0015] In some embodiments, the device to be tested includes an electric meter and a concentrator.
[0016] In some embodiments, the status information includes a uniquely identifiable device ID, a firmware version, and an operating status.
[0017] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 is a block diagram of an automated testing system according to an embodiment of the present invention;
[0019] Figure 2 is a schematic diagram of a logical framework of an automated testing system according to another embodiment of the present invention;
[0020] Figure 3 is a block diagram of an automated testing device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0021] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.
[0022] The automated testing system according to an embodiment of the present invention will be described below with reference to the accompanying drawings.
[0023] See also Figure 1 , Figure 1 Schematic diagram of an automated testing system according to an embodiment of the present invention; Figure 1As shown, the automated testing system includes: a background management unit 100 , a front-end portal unit 200 , a public service unit 300 and a data management unit 400 .
[0024] The backend management unit 100 includes a user management module 101, a role management module 102, a permission management module 103, a dictionary data module 104, an event management module 105, a device management module 106 and a network management module 107;
[0025] The front-end portal unit 200 includes a test project management module 201, a test plan management module 202, a test case management module 203, a test execution module 204, a test result statistics module 205, a test equipment management module 206 and a networking environment management module 207;
[0026] The public service unit 300 includes a log service module 301, a file service module 302 and a message queue service module 303;
[0027] The data management unit 400 includes a test data management module 401 , a file data management module 402 , a custom script data management module 403 , a keyword data management module 404 and a device data management module 405 .
[0028] In some embodiments, the user management module 101 is used to manage user accounts. Through the user management module, user accounts can be created, user information corresponding to user accounts can be edited, user accounts can be deleted, and user accounts can be frozen; the role management module 102 is used to manage role information corresponding to user accounts, wherein the role information has corresponding permissions (role information can define the identity corresponding to the user account; for example, role information can include decision makers, managers, dispatchers, testers, etc.; in this way, according to the preset operation permissions corresponding to each role information, the permissions corresponding to the role information can be well managed); the permission management module 103 is used to manage the permissions of modules in the system; the dictionary data module 104 is used to manage professional terminology data and unit data; the event management module 105 is used to record event logs (events can include server update events, error events, and restart events, etc.); the device management module 106 is used to manage the information of the device to be tested, and the information of the device to be tested includes the status information of the device to be tested and the communication protocol configuration information between different devices to be tested; the networking management module 107 is used to perform networking association management for different devices to be tested.
[0029] In some embodiments, the test project management module 201 is used to create, modify and delete test projects, and manage user accounts associated with test projects; the test plan management module 202 is used to manage test plans, and the management of test plans includes test cycle limitations, associated test cases, test execution result statistics and test report presentation; the test case management module 203 is used to write and maintain automated test cases and set case status; the test execution module 204 is used to combine keywords and test data to generate automated test case scripts, and execute the automated test case scripts; the test result statistics module 205 is used to count the execution results of automated test case scripts, and generate reports based on the statistical results; the test equipment management module 206 is used to manage user accounts associated with test equipment to determine the testers corresponding to the test equipment; the networking environment management module 207 is used to maintain the networking relationship between test equipment.
[0030] In some embodiments, the log service module 301 is used to record the user's operation log; the file service module 302 is used to manage the service files that the system operation depends on; and the message queue service module 303 is used to process concurrent requests from multiple users.
[0031] As an example, combining keywords and test data to generate an automated test case script includes: obtaining a user's selection instruction for a keyword to determine a target keyword; obtaining a user's selection instruction for an operation object to determine a target operation object corresponding to the target keyword; obtaining a target test instruction based on the target keyword; obtaining test data, and combining the target test instruction, the target operation object, and the test data to generate an automated test case script.
[0032] That is to say, the automated test case script is driven by keywords. First, professional test developers encapsulate the keywords in the underlying operations; in this way, during the test of the concentrator and the meter, the hardware tester only needs to select the corresponding keyword to call the corresponding underlying operation; and by combining these operations, an automated test case script can be formed.
[0033] Specifically, take the example of writing the current time use case of reading the concentrator; first, the tester calls the test case management module to create a new test case, enter the use case title, priority, project, and module; then, add a new test step, assuming that the tester adds the following steps: 1. Select the keyword "ReqExec", and at the same time, add the text description corresponding to the step "Send instruction 08000002, read the concentrator time"; select the operation object "host computer execution interface" corresponding to the keyword; 2. Select the keyword "AssertExecResult", and at the same time, add the text description corresponding to the step "Judge whether the verification read time is correct", and select the operation object "host computer execution result" corresponding to the keyword; in addition, enter the expected result of the response "2024-04-01 12:20:00". In this way, the writing of the automated test case script is completed.
[0034] In some embodiments, the system uses the unitest framework of python to develop the driving framework of the keyword.
[0035] In some embodiments, the test data management module 401 is used to manage the test data involved in the testing process; the file data management module 402 is used to manage the file data involved in the testing process; the custom script data management module 403 is used to manage the custom script data involved in the testing process; the keyword data management module 404 is used to manage the keyword data involved in the testing process; and the device data management module 405 is used to manage the device data involved in the testing process.
[0036] As a specific embodiment of the present invention, the test process of the automated testing system includes: first, calling the test project management module to create a test project; for example, creating a "concentrator IHM-400 project"; and associating a corresponding user account for the test project (for example, adding a project to the project to become "Zhang San"), and assigning corresponding project permissions to the user account; then, calling the test plan management module to create a test plan, for example, creating a "concentrator 0410 version test", and selecting the test case related to the concentrator in the test case library; then, selecting the device to be tested "041011011" required for the test plan, selecting the corresponding communication environment "automated testing environment 1", and networking the equipment; then, you can start executing the test case for testing; then, after the automated test is executed, collect the corresponding test results and log records, put them into the result statistics, and output the test report.
[0037] In order to better illustrate the automated testing system proposed by the present invention, Figure 2 For example, Figure 2As shown, the automated testing system includes a backend management system. Further, the backend management system includes user management, role management, permission management, dictionary data, event management, device management and network management; the front-end test portal includes project management, device management, communication environment management, test case management, test plan management, test execution and result display; public services include log services, file services OSS and message queue services; data management includes test data, file data, device data, custom script data and keyword data; in addition, the system also includes test tracking, which includes test plans, test execution, test progress, test reports and test large-screen display; the system also includes external docking, which includes docking with demand management platforms (for example, ZenTao), defect management platforms (for example, ZenTao or JIRA), test table platform docking, and code building platform docking (for example, Jeckins, Git). It should be noted that ZenTao and Jenkins both have interfaces for external communication. Through these interfaces, the test platform synchronizes test requirements and test case information with ZenTao and builds scheduled execution tasks through Jenkins.
[0038] In summary, according to the automated testing system of the embodiment of the present invention, a background management unit, a front-end portal unit, a public service unit and a data management unit are set; wherein the background management unit includes a user management module, a role management module, a permission management module, a dictionary data module, an event management module, a device management module and a networking management module; the front-end portal unit includes a test project management module, a test plan management module, a test case management module, a test execution module, a test result statistics module, a test device management module and a networking environment management module; the public service unit includes a log service module, a file service module and a message queue service module; the data management unit includes a test data management module, a file data management module, a custom script data management module, a keyword data management module and a device data management module; thereby realizing automated testing of the device to be tested, improving the testing efficiency of the device and reducing the testing difficulty of the device to be tested.
[0039] In a second aspect, an embodiment of the present invention provides an automated testing device; Figure 3 As shown, the automated testing device includes: an automated testing system 10 , a host computer 20 , an AMI system 30 and a test stand 40 .
[0040] The automated test system 10 is connected to the host computer 20, the AMI system 30 and the test table rack 40 respectively. The automated test system 10 is used to obtain the automated test case script sent by the user and perform corresponding automated tests based on the automated test case script;
[0041] The test stand 40 is used to monitor the status information of the equipment to be tested, and send the monitored status information to the automated test system 10 so that the automated test system 10 can visualize the status information.
[0042] In some embodiments, the equipment to be tested includes an electric meter and a concentrator.
[0043] In some embodiments, the status information includes a uniquely identifiable device ID, a firmware version, and an operating status.
[0044] It should be noted that the above description on the automated testing system is also applicable to the automated testing system device, and will not be repeated here.
[0045] In summary, according to the automated testing device of the embodiment of the present invention, the automated testing system, host computer, AMI system and test rack as described above are set; the automated testing system is connected to the host computer, AMI system and test rack respectively, the automated testing system is used to obtain the automated testing case script sent by the user, and perform corresponding automated testing based on the automated testing case script; the test rack is used to monitor the status information of the device to be tested, and send the monitored status information to the automated testing system, so that the automated testing system can visualize the status information. Thereby, automated testing of the device to be tested is realized, the testing efficiency of the device is improved, and the testing difficulty of the device to be tested is reduced.
[0046] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection portion with one or more wirings (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.
[0047] 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.
[0048] 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.
[0049] In the description of the present invention, it is to be understood that the terms “center”, “longitudinal”, “lateral”, “length”, “width”, “thickness”, “up”, “down”, “front”, “back”, “left”, “right”, “vertical”, “horizontal”, “top”, “bottom”, “inside”, “outside”, “clockwise”, “counterclockwise”, “axial”, “radial”, “circumferential”, etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as limiting the present invention.
[0050] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0051] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements, unless otherwise clearly defined. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0052] In the present invention, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may mean that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. Moreover, a first feature being "above", "above" or "above" a second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is higher in level than the second feature. A first feature being "below", "below" or "below" a second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is lower in level than the second feature.
[0053] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. An automated testing system, characterized in that: include: Backstage management unit, frontstage portal unit, public service unit and data management unit; The backend management unit includes a user management module, a role management module, a permission management module, a dictionary data module, an event management module, a device management module and a networking management module; The front-end portal unit includes a test project management module, a test plan management module, a test case management module, a test execution module, a test result statistics module, a test equipment management module and a networking environment management module; The public service unit includes a log service module, a file service module and a message queue service module; The data management unit includes a test data management module, a file data management module, a custom script data management module, a keyword data management module and a device data management module.
2. The automated testing system according to claim 1, wherein: The user management module is used to manage user accounts. Through the user management module, user accounts can be created, user information corresponding to the user accounts can be edited, user accounts can be deleted, and user accounts can be frozen; The role management module is used to manage the role information corresponding to the user account, wherein the role information has corresponding permissions; The authority management module is used to manage the authority of modules in the system; The dictionary data module is used to manage professional terminology data and unit data; The event management module is used to record event logs; The device management module is used to manage the information of the devices to be tested, wherein the information of the devices to be tested includes the status information of the devices to be tested and the communication protocol configuration information between different devices to be tested; The networking management module is used to perform networking association management on different devices to be tested.
3. The automated testing system according to claim 1, wherein: The test project management module is used to create, modify and delete test projects, and manage user accounts associated with test projects; The test plan management module is used to manage the test plan, and the test plan management includes test cycle definition, associated test cases, test execution result statistics and test report display; The test case management module is used to write and maintain automated test cases and set the test case status; The test execution module is used to combine keywords and test data to generate an automated test case script and execute the automated test case script; The test result statistics module is used to collect statistics on the execution results of the automated test case scripts and generate reports based on the statistical results; The test device management module is used to manage user accounts associated with the test device to determine the tester corresponding to the test device; The networking environment management module is used to maintain the networking relationship between test devices.
4. The automated testing system according to claim 1, wherein: The log service module is used to record the user's operation log; The file service module is used to manage the service files that the operation of the system depends on; The message queue service module is used to process concurrent requests from multiple users.
5. The automated testing system according to claim 1, wherein: The test data management module is used to manage the test data involved in the test process; The file data management module is used to manage the file data involved in the test process; The custom script data management module is used to manage the custom script data involved in the test process; The keyword data management module is used to manage the keyword data involved in the test process; The device data management module is used to manage the device data involved in the test process.
6. The automated testing system according to claim 3, wherein: Combine keywords and test data to generate automated test case scripts, including: Obtaining the user's selection instruction for keywords to determine the target keywords; Obtaining a user's selection instruction for an operation object to determine a target operation object corresponding to the target keyword; Acquire a target test instruction according to the target keyword; Acquire test data, and combine the target test instruction, the target operation object and the test data to generate an automated test case script.
7. The automated testing system according to claim 3, wherein: The system uses the unitest framework of python to develop the driving framework of the keywords.
8. An automated testing device, characterized in that: include: The automated test system, host computer, AMI system and test stand as claimed in any one of claims 1 to 7; The automated test system is connected to the host computer, the AMI system and the test table rack respectively, and the automated test system is used to obtain the automated test case script sent by the user, and perform corresponding automated tests based on the automated test case script; The test stand is used to monitor the status information of the device to be tested, and send the monitored status information to the automated test system so that the automated test system can visualize the status information.
9. The automated testing device according to claim 8, characterized in that: The equipment to be tested includes an electric meter and a concentrator.
10. The automated testing device according to claim 8, characterized in that: The status information includes the device's unique identifiable ID, firmware version, and operating status.