Remote testing method for trusted management platform and related device
Through the remote communication connection between the mobile terminal and the trusted management platform, and the automatic execution of test scripts is solved by using the resident service program, the problem of manual duty in the existing technology is solved, and the testing efficiency and quality are improved.
Patent Information
- Application Number
- CN202510145506.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-10
- Publication Date
- 2025-05-16
AI Technical Summary
The existing semi-automated testing or automated testing process requires manual on-site continuous monitoring, resulting in reduced testing efficiency and quality.
A remote communication connection is established with a trusted management platform through the test APP on the mobile terminal, and a preset automated test script is called and executed using the resident service program to generate and return the test report.
Without manual on-site duty, testers can operate remotely at any time to improve test speed and quality, save manual testing time and reduce test costs.
Smart Images

Figure CN120010346A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of functional testing, and in particular relates to a remote testing method and related devices for a trusted management platform. Background Art
[0002] Distributed Control System (DCS) is a new type of control equipment that uses computer technology to centrally monitor, operate, manage and decentralized control industrial production processes; trusted DCS is based on the traditional DCS and introduces a trusted computing system to improve the security of the system. Domestic trusted DCS realizes dynamic collection and secure transmission of trusted data based on national secret algorithms, which can fully realize trusted enhancement in software and hardware.
[0003] The existing domestic trusted DCS generally integrates functions such as trusted startup, static trusted verification, dynamic trusted verification, trusted whitelist, process protection and application access control; the trusted management platform is a platform for unified visual management of devices in the domestic trusted DCS. It provides a GUI interface with a C / S architecture to facilitate users to set and delete policies for functions such as trusted startup, static trusted verification, dynamic trusted verification, trusted whitelist, process protection and application access control of devices in the domestic trusted DCS; obtain and display the trusted status of the device, trusted function audit and other operations; the trusted management platform can simply and conveniently configure and set relevant trusted policies for the device, thereby protecting the security of the system.
[0004] At present, the functional testing of the trusted management platform has gradually changed from pure manual testing to semi-automatic testing or automated testing. However, in the existing semi-automatic testing or automated testing process, the test execution script needs to be determined at the beginning of the test, and the test errors need to be handled during the test. Therefore, manual on-site continuous duty is often required, which greatly reduces the test efficiency and test quality. Summary of the invention
[0005] In view of the technical problems existing in the prior art, the present invention provides a remote testing method and related devices for a trusted management platform to solve the technical problem that the existing semi-automatic testing or automated testing process requires continuous manual on-site supervision, which greatly reduces the testing efficiency and testing quality.
[0006] In order to achieve the above object, the technical solution adopted by the present invention is: The present invention provides a remote testing method for a trusted management platform, comprising: Establishing a remote communication connection between a mobile terminal and a trusted management platform to be tested; wherein a test APP is pre-installed on the mobile terminal, and a resident service program and a preset automated test script are stored on the trusted management platform to be tested; Sending a test start instruction to the trusted management platform to be tested through the test APP; wherein the test start instruction is used to trigger the resident service program to call and execute the preset automated test script, and generate a test report; The test report is received through the test APP.
[0007] Furthermore, the process of establishing a remote communication connection between the mobile terminal and the trusted management platform to be tested is as follows: Establish a connection between the trusted management platform to be tested and the local area network of the test site, and remotely connect the mobile terminal to the local area network of the test site through VPN; wherein the local area network of the test site is the local local area network where the trusted management platform to be tested is located; Alternatively, a connection is established between the mobile terminal and a local area network in a remote area, and a communication connection is established between the local area network in the remote area and the local area network at the test site; a remote communication connection is established between the mobile terminal and the trusted management platform to be tested through the local area network in the remote area and the local area network at the test site that are communicatively connected; wherein the local area network in the remote area is the local local area network where the mobile terminal is located.
[0008] Furthermore, the preset automated test script includes a number of test cases; the test case information includes a number of test step information and a test environment.
[0009] Further, the process of triggering the resident service program to call and execute the preset automated test script is as follows: The resident service program listens for the test start instruction; if the resident service program listens for the test start instruction, it starts to call and execute the preset automated test script; wherein, the resident service program monitors the preset monitoring objects in the test environment in real time, and executes some of the test step information according to the preset status information.
[0010] Furthermore, in the process of triggering the resident service program to call and execute the preset automated test script, if a test error occurs, the resident service program executes an error processing step; The process of the resident service program executing the error processing step is as follows: Compare the test error of the current test case with the preset error information; If the test error of the current test case meets the preset error information, the current test case is re-executed after running the preset error processing script; wherein the preset error processing script is used to correct the test error of the current test case; If the test error of the current test case does not conform to the preset error information, the error information of the current test case is recorded, and the current test case is skipped and then the next test case is executed.
[0011] Furthermore, the test report includes test error information and test results.
[0012] The present invention also provides a remote testing system for a trusted management platform, comprising: A communication connection module, used to establish a remote communication connection between a mobile terminal and a trusted management platform to be tested; wherein the mobile terminal is pre-installed with a test APP, and the trusted management platform to be tested is equipped with a resident service program and stores a preset automated test script; An instruction sending module, used to send a test start instruction to the trusted management platform to be tested through the test APP; wherein the test start instruction is used to trigger the resident service program to call and execute the preset automated test script, and generate a test report; The report feedback module is used to receive the test report through the test APP.
[0013] The present invention also provides a remote testing device for a trusted management platform, comprising: a processor suitable for executing a computer program; A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by the processor, the remote testing method for a trusted management platform is executed.
[0014] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the remote testing method for a trusted management platform is implemented.
[0015] The present invention also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the remote testing method for a trusted management platform is implemented.
[0016] Compared with the prior art, the present invention has the following beneficial effects: The remote testing method for a trusted management platform provided by the present invention sends a test start instruction to the trusted management platform to be tested through a test APP pre-installed on a mobile terminal, and uses a resident service program carried on the trusted management platform to be tested to call and execute the preset automated test script, and returns the test report to the test APP of the mobile terminal. The tester does not need to be on duty at the test site, and can remotely operate the trusted management platform to be tested at the test site through a mobile phone at any time; specifically, a test start instruction is input through the test APP, and the resident service program carried on the trusted management platform to be tested recognizes the test start instruction, and automatically runs the preset automated script, executes the automated test, and records the test results and error information; after the test is completed, the test report is returned to the test APP; the present invention can effectively improve the test speed and test quality, save manual testing time, facilitate developers to find errors in the test in the first time, and effectively handle the error problems, which can significantly reduce the test cost and effectively improve the test efficiency.
[0017] The remote testing system for a trusted management platform, the remote testing device for a trusted management platform, the computer-readable storage medium and the computer program product provided by the present invention have all the advantages of the remote testing method for a trusted management platform. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 A flowchart of a remote testing method for a trusted management platform provided in Example 1; Figure 2 A structural block diagram of a remote testing system for a trusted management platform provided in Example 2; Figure 3 This is a structural block diagram of a remote testing device for a trusted management platform provided in Example 3. DETAILED DESCRIPTION
[0020] In order to make the technical problems, technical solutions and beneficial effects solved by this application clearer, the technical solutions in the embodiments of this application will be described clearly and completely in combination with the drawings in the embodiments of this application; obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0021] Example 1 As attached Figure 1 As shown, this embodiment 1 provides a remote testing method for a trusted management platform, comprising the following steps: Step 1: Write an automated test script according to the test requirements of the trusted management platform to be tested, and obtain a preset automated test script; store the preset automated test script in the trusted management platform to be tested. The preset automated test script includes several test cases, preset error information, and preset error handling scripts; the test case includes several test step information and a test environment; preferably, the automated test script is a shell script, a python script, or a C language program script.
[0022] Step 2: Install a resident service program on the trusted management platform to be tested. The resident service program is used to respond to the test start instruction call and execute the preset automated test script, and generate and send a test report to the mobile terminal; the resident service program is also used to respond to test errors and execute error processing steps.
[0023] Step 3: Establish a remote communication connection between the mobile terminal and the trusted management platform to be tested. The mobile terminal is pre-installed with a test APP; preferably, the mobile terminal is a mobile phone or a tablet computer; the test APP is used to send a test start instruction to the trusted management platform to be tested, and is also used to receive a test report; Specifically, the process of establishing a remote communication connection between the mobile terminal and the trusted management platform to be tested includes the following steps: Establish a connection between the trusted management platform to be tested and the local area network of the test site; remotely connect the mobile terminal to the local area network of the test site through VPN, so that the trusted management platform to be tested and the mobile terminal are connected to the same local area network of the test site.
[0024] It should be noted that this embodiment 1 also provides another implementation method for establishing a remote communication connection between the mobile terminal and the trusted management platform to be tested, which is as follows: Establish a connection between the mobile terminal and the local area network of the remote area, and establish a communication connection between the local area network of the remote area and the local area network of the test site; establish a remote communication connection between the mobile terminal and the trusted management platform to be tested through the local area network of the remote area and the local area network of the test site that are communicatively connected; wherein the local area network of the remote area is the local local area network where the mobile terminal is located; preferably, the local area network of the remote area is a WIFI network.
[0025] Step 4: Send a test start instruction to the trusted management platform to be tested through the test APP; wherein the test start instruction is used to trigger the resident service program to call and execute the preset automated test script and generate a test report.
[0026] Specifically, the process of triggering the resident service program to call and execute the preset automated test script is as follows: The resident service program listens for the test start instruction; if the resident service program listens for the test start instruction, it starts to call and execute the preset automated test script; after the test is completed, based on the test error information and test result records, a test report is generated and sent to the test APP; wherein, the resident service program monitors the preset monitoring objects in the test environment in real time, and executes some of the test step information according to preset status information; wherein, the preset status information includes status information at the start, end and error of the test.
[0027] It should be noted that, in the process of triggering the resident service program to call and execute the preset automated test script, if a test error occurs, the resident service program executes an error processing step; The process of the resident service program executing the error processing step is as follows: Compare the test error of the current test case with the preset error information.
[0028] If the test error of the current test case meets the preset error information, the current test case is re-executed after running the preset error handling script; wherein the preset error handling script is used to correct the test error of the current test case.
[0029] If the test error of the current test case does not conform to the preset error information, the error information of the current test case is recorded, and the current test case is skipped and then the next test case is executed.
[0030] It should be noted that the preset error handling script is applicable to scenarios such as: In the current test case, the test object is specified as device S1, but device S1 may not exist in the test environment. When the test case does not exist, an error message "device S1 cannot be found" will be reported when the test case is run; when the resident service program recognizes the instruction "device S1 cannot be found", the processing script for adding device S1 to the trusted management platform to be tested will be run; in the process of adding device S1, if the IP of device S1 has been registered to the trusted management platform to be tested, resulting in the inability to add the device with the same IP to the trusted management platform to be tested again, an error message "IP duplication" will be reported; when the resident service program recognizes the instruction "IP duplication", the processing script for finding the device name associated with the IP corresponding to device S1 and deleting the device with the same IP will be run.
[0031] Step 5: After the trusted management platform to be tested finishes running the preset automated test script, the test report is sent to the test APP of the mobile terminal.
[0032] The remote testing method for a trusted management platform described in the first embodiment of the present invention is to install a test APP that can interact with the trusted management platform to be tested on the mobile terminal, and remotely connect the mobile terminal to the local area network of the test site through a VPN; a resident service program is installed on the trusted management platform to be tested, and the resident service program is used to identify the test start instruction sent by the test APP, and respond to the test start instruction to call the preset automatic test script in the trusted management platform to be tested, and perform the automatic test according to the test case in the preset automatic test script; wherein, when an error occurs during the execution of the automatic test script, if the test error of the current test case meets the preset error information, the current test case is re-executed after running the preset error processing script; if the test error of the current test case does not meet the preset error information, the error information of the current test case is recorded, and the current test case is skipped and the next test case is started; during the test, the test results and error information are all recorded in the test report, and after the test, the test report is returned to the test APP of the mobile terminal, so as to effectively improve the test speed and test quality, save manual testing time, effectively handle problems, and significantly reduce the test cost.
[0033] Example 2 As attached Figure 2 As shown, this embodiment 2 provides a remote testing system for a trusted management platform, including a script writing module, a resident service loading module, a communication connection module, an instruction sending module and a report feedback module.
[0034] A script writing module, used to write an automated test script according to the test requirements of the trusted management platform to be tested, and obtain a preset automated test script; store the preset automated test script in the trusted management platform to be tested; a resident service loading module, used to load a resident service program on the trusted management platform to be tested; a communication connection module, used to establish a remote communication connection between a mobile terminal and the trusted management platform to be tested; an instruction sending module, used to send a test start instruction to the trusted management platform to be tested through the test APP; wherein the test start instruction is used to trigger the resident service program to call and execute the preset automated test script, and generate a test report; a report feedback module, used to send the test report to the test APP of the mobile terminal after the trusted management platform to be tested finishes running the preset automated test script.
[0035] Example 3 As attached Figure 3 As shown, this embodiment 3 provides a remote testing device for a trusted management platform, including: a memory for storing a computer program; a processor for implementing the steps of a remote testing method for a trusted management platform when executing the computer program.
[0036] When the processor executes the computer program, the steps of the remote testing method for the trusted management platform are implemented, for example: According to the test requirements of the trusted management platform to be tested, an automated test script is written to obtain a preset automated test script; the preset automated test script is stored in the trusted management platform to be tested; a resident service program is installed on the trusted management platform to be tested; a remote communication connection is established between the mobile terminal and the trusted management platform to be tested; a test start instruction is sent to the trusted management platform to be tested through the test APP; wherein the test start instruction is used to trigger the resident service program to call and execute the preset automated test script, and generate a test report; after the trusted management platform to be tested finishes running the preset automated test script, the test report is sent to the test APP of the mobile terminal.
[0037] Alternatively, when the processor executes the computer program, the functions of each module in the remote testing system for the trusted management platform are realized, for example: A script writing module, used to write an automated test script according to the test requirements of the trusted management platform to be tested, and obtain a preset automated test script; store the preset automated test script in the trusted management platform to be tested; a resident service loading module, used to load a resident service program on the trusted management platform to be tested; a communication connection module, used to establish a remote communication connection between a mobile terminal and the trusted management platform to be tested; an instruction sending module, used to send a test start instruction to the trusted management platform to be tested through the test APP; wherein the test start instruction is used to trigger the resident service program to call and execute the preset automated test script, and generate a test report; a report feedback module, used to send the test report to the test APP of the mobile terminal after the trusted management platform to be tested finishes running the preset automated test script.
[0038] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of completing preset functions, and the instruction segments are used to describe the execution process of the computer program in the remote test device for the trusted management platform.
[0039] For example, the computer program can be divided into a script writing module, a resident service loading module, a communication connection module, an instruction sending module and a report return module, and the specific functions of each module are as follows: a script writing module, which is used to write an automated test script according to the test requirements of the trusted management platform to be tested, and obtain a preset automated test script; and store the preset automated test script in the trusted management platform to be tested; a resident service loading module, which is used to load a resident service program on the trusted management platform to be tested; a communication connection module, which is used to establish a remote communication connection between a mobile terminal and the trusted management platform to be tested; an instruction sending module, which is used to send a test start instruction to the trusted management platform to be tested through the test APP; wherein the test start instruction is used to trigger the resident service program to call and execute the preset automated test script, and generate a test report; a report return module, which is used to send the test report to the test APP of the mobile terminal after the trusted management platform to be tested finishes running the preset automated test script.
[0040] The remote test device for the trusted management platform can be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The remote test device for the trusted management platform may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that the above are examples of remote test devices for a trusted management platform and do not constitute a limitation on remote test devices for a trusted management platform. More components than the above may be included, or some components may be combined, or different components may be included. For example, the remote test device for the trusted management platform may also include input and output devices, network access devices, buses, etc.
[0041] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc. The processor is the control center of the remote test device for the trusted management platform, and uses various interfaces and lines to connect various parts of the remote test device for the trusted management platform.
[0042] The memory may be used to store the computer program and / or module, and the processor implements various functions of the remote testing device for a trusted management platform by running or executing the computer program and / or module stored in the memory and calling the data stored in the memory.
[0043] The memory may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (SmartMediaCard, SMC), a secure digital (SecureDigital, SD) card, a flash card (FlashCard), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0044] Example 4 This embodiment 4 also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the remote testing method for a trusted management platform are implemented.
[0045] If the integrated module / unit of the remote test system for the trusted management platform is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
[0046] Based on such understanding, the present invention implements all or part of the processes in the above-mentioned remote testing method for a trusted management platform, and can also be completed by instructing related hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above-mentioned remote testing method for a trusted management platform can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or preset intermediate form, etc.
[0047] The computer-readable storage medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, etc.
[0048] It should be noted that the content contained in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable storage media do not include electrical carrier signals and telecommunication signals.
[0049] Example 5 This embodiment 5 provides a computer product, which computer program product includes a computer program, which is stored in a computer-readable storage medium; the processor of the remote testing device for the trusted management platform reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the remote testing device for the trusted management platform can execute the remote testing method for the trusted management platform described in embodiment 1, which will not be repeated here.
[0050] It should be noted that a person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods.
[0051] According to the remote testing method described in the present invention, the tester does not need to be on duty at the test site, and can remotely operate the trusted management platform to be tested at the test site at any time. Based on the resident service program carried by the trusted management platform to be tested, the tester can identify instructions, automatically run scripts, perform automated testing, and record test results and error information, thereby effectively improving the test speed and test quality and saving manual testing time.
[0052] The above embodiment is only one of the implementation methods that can realize the technical solution of the present invention. The scope of protection claimed by the present invention is not limited only to this embodiment, but also includes changes, replacements and other implementation methods that can be easily thought of by any technician familiar with the technical field within the technical scope disclosed by the present invention.
Claims
1. A remote testing method for a trusted management platform, characterized in that: include: Establishing a remote communication connection between a mobile terminal and a trusted management platform to be tested; wherein a test APP is pre-installed on the mobile terminal, and a resident service program and a preset automated test script are stored on the trusted management platform to be tested; Sending a test start instruction to the trusted management platform to be tested through the test APP; wherein the test start instruction is used to trigger the resident service program to call and execute the preset automated test script, and generate a test report; The test report is received through the test APP.
2. A remote testing method for a trusted management platform according to claim 1, characterized in that: The process of establishing a remote communication connection between the mobile terminal and the trusted management platform to be tested is as follows: Establish a connection between the trusted management platform to be tested and the local area network of the test site, and remotely connect the mobile terminal to the local area network of the test site through VPN; wherein the local area network of the test site is the local local area network where the trusted management platform to be tested is located; Alternatively, a connection is established between the mobile terminal and a local area network in a remote area, and a communication connection is established between the local area network in the remote area and the local area network at the test site; a remote communication connection is established between the mobile terminal and the trusted management platform to be tested through the local area network in the remote area and the local area network at the test site that are communicatively connected; wherein the local area network in the remote area is the local local area network where the mobile terminal is located.
3. A remote testing method for a trusted management platform according to claim 1, characterized in that: The preset automated test script includes several test cases; the test case information includes several test step information and a test environment.
4. A remote testing method for a trusted management platform according to claim 3, characterized in that: The process of triggering the resident service program to call and execute the preset automated test script is as follows: The resident service program listens for the test start instruction; if the resident service program listens for the test start instruction, it starts to call and execute the preset automated test script; wherein, the resident service program monitors the preset monitoring objects in the test environment in real time, and executes some of the test step information according to the preset status information.
5. A remote testing method for a trusted management platform according to claim 4, characterized in that: In the process of triggering the resident service program to call and execute the preset automated test script, if a test error occurs, the resident service program executes an error processing step; The process of the resident service program executing the error processing step is as follows: Compare the test error of the current test case with the preset error information; If the test error of the current test case meets the preset error information, the current test case is re-executed after running the preset error processing script; wherein the preset error processing script is used to correct the test error of the current test case; If the test error of the current test case does not conform to the preset error information, the error information of the current test case is recorded, and the current test case is skipped and then the next test case is executed.
6. A remote testing method for a trusted management platform according to claim 1, characterized in that: The test report includes test error information and test results.
7. A remote testing system for a trusted management platform, characterized in that: include: A communication connection module, used to establish a remote communication connection between a mobile terminal and a trusted management platform to be tested; wherein the mobile terminal is pre-installed with a test APP, and the trusted management platform to be tested is equipped with a resident service program and stores a preset automated test script; An instruction sending module, used to send a test start instruction to the trusted management platform to be tested through the test APP; wherein the test start instruction is used to trigger the resident service program to call and execute the preset automated test script, and generate a test report; The report feedback module is used to receive the test report through the test APP.
8. A remote testing device for a trusted management platform, characterized in that: include: a processor suitable for executing a computer program; A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by the processor, the remote testing method for a trusted management platform according to any one of claims 1 to 6 is executed.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the remote testing method for a trusted management platform according to any one of claims 1 to 6 is implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the remote testing method for a trusted management platform according to any one of claims 1 to 6 is implemented.