DCS controller application program access control automatic test method and system

Automating application access control testing of DCS controllers through Python scripts and configuration files, solving the problems of slow speed and high cost of traditional testing methods, achieving fast and accurate test results, ensuring the security and stability of DCS controllers .

CN119271558APending Publication Date: 2025-01-07XIAN THERMAL POWER RES INST CO LTD +1
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411374680.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

The application access control testing method of traditional DCS controllers cannot be automated, resulting in slow testing speed, high cost and inability to fully verify functional stability.

Method used

Using Python scripts and configuration files, connect to DCS controllers through telnet, configure and verify application access control policies, and generate test reports to achieve automated testing processes.

Benefits of technology

It significantly improves the test speed and quality, reduces the testing cost, and ensures the stability and security of the access control function.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119271558A_ABST
    Figure CN119271558A_ABST
Patent Text Reader

Abstract

The invention discloses a DCS controller application program access control automatic test method and system, and belongs to the technical field of DCS controller testing, and the method comprises the steps: receiving a test program and a configuration file; editing a configuration file, and formulating controller equipment connection information, a test file directory, connection retry times and module state change parameters based on the configuration file; an application program access control strategy is configured, an application program access control strategy function service is verified, and the state of an application program access control function module is set; and generating and outputting a test report based on an execution result of the test program. According to the method, the test speed and quality are improved, and the test cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of DCS controller testing, and relates to a DCS controller application program access control automatic testing method and system. Background Art

[0002] DCS (Distributed Control System) is a control system with centralized monitoring, operation, management and decentralized control. It combines computer technology, signal processing technology, measurement technology, control technology, communication technology, graphic display technology and human-machine interface.

[0003] In DCS controllers, data security is of vital importance. The application access control function can ensure that only authorized subject test programs can read, write, and execute operations on object files by specifying subject files and object files and configuring corresponding access control policies. This greatly improves data security and the ability to prevent data from being maliciously tampered with. For industrial control systems, data security and integrity are directly related to the stability and security of the entire production process. Therefore, this access control function has very important application value in modern DCS controllers.

[0004] With the continuous development and increasing intelligence of industrial control systems, the requirements for the functions and performance of DCS controllers are becoming higher and higher. Therefore, the testing technology of DCS controllers will continue to develop and improve in the future. On the one hand, the research and application of automated testing technology can be strengthened to improve testing efficiency and accuracy; on the other hand, the research and application of security testing technology can be strengthened to ensure the security and stability of DCS controllers. The application access control function of domestic trusted DCS controllers is of great significance to improving data security.

[0005] The domestically produced trusted DCS controller integrates the application access control function, which specifies the subject file and the object file to configure the application access control policy, and limits the object file to be read, written, and executed only by the corresponding subject test program. Other test programs are not allowed to read, write, and execute the object file, which improves the security of the data and prevents the data from being maliciously tampered with. After the control function module is deployed on the DCS controller, it needs to be tested. The operating system used on the controller is SylixOS. The system cannot execute shell and other script test programs locally for automated testing. The speed of traditional manual testing will be relatively slow, and the stability of the function cannot be tested. If comprehensive verification is required, a lot of testing time is required, which affects the test progress and quality. Summary of the invention

[0006] In order to solve the problems of the prior art, the present invention proposes a DCS controller application access control automated testing method and system. The method can immediately display and report through indicator lights and host computer tool software, thereby improving the efficiency of fault handling. The method improves the speed and quality of testing and reduces testing costs.

[0007] To achieve the above purpose, the present invention adopts the following technical means: The first aspect of the present invention is to provide a DCS controller application program access control automated testing method, comprising: Receive test programs and configuration files; Edit the configuration file and set the controller device connection information, test file directory, connection retry times, and module status change parameters based on the configuration file; Connect to the controller to be tested and execute the test program: configure the application access control policy, verify the application access control policy function business, and set the application access control function module status; Generate and output test reports based on the execution results of the test program.

[0008] As a further improvement of the present invention, the client receiving the test program and the configuration file and the controller device to be tested are in the same network test environment.

[0009] As a further improvement of the present invention, the configuration file includes the following information: a) IP address, user name and password of the controller device to be connected; b) The object file directory on the controller to be tested; c) The main file directory on the controller to be tested; d) The number of times the client attempts to reconnect to the controller; e) The interval for changing the status of the application access control module; f) The number of times the application access control module status was changed.

[0010] As a further improvement of the present invention, the connecting to the controller to be tested is connecting to the controller to be tested via telnet; If the connection fails, the test program prompts the connection failure and prints the failure reason information and tries to reconnect. The number of connections is the number of retries set in the configuration file. When the upper limit of the number of retries is reached and the connection cannot be made, the script test program will exit and no longer execute the subsequent steps.

[0011] As a further improvement of the present invention, the application access control policy is configured: according to the directory specified by the configuration file, the files under the subject and object directories are traversed, the files under the subject directory are selected as subject files, and the files under the object directory are selected as object files, and the subject and object are combined one by one to configure the application access control policy; when a certain file is executed as a common file, the test program will return a configuration failure and give the specific reason for the failure; Verify the application access control policy function business: After configuring the application access control policy, execute the command of deleting, renaming, and modifying the file content of the object files in the directory one by one. The test program will return the result of the operation on each object file. If the operation fails, the function is normal. If the operation succeeds, you need to locate and troubleshoot the cause. Set the application access control function module status: The application access control function module has a total of 3 states: open, close, and monitor. According to the timed interval set in the configuration file, the test program will randomly set a control function module state at regular intervals and check the actual module state on the controller. It will determine whether the module state setting is effective based on the returned state value and the set state value.

[0012] As a further improvement of the present invention, the generating and outputting of the test report includes: After the test program is executed, a test report is generated and output. The test report includes the following information: The start time and end time of the script execution, the total number of files in the main file and object file directories, the total number of times the application access control policy is configured, the total number of times the object file is operated, the total number of times the application access control function module status is actually executed, and the number of passes and failures corresponding to each module, where failure information will be provided.

[0013] As a further improvement of the present invention, after executing the test program, an automated evaluation step is also included, and the automated evaluation step includes: Obtain operating parameters for concurrent access by multiple users, network latency, and controller load changes; Testing multiple access control policies or functions simultaneously based on operational parameters to detect potential conflicts or interactions between multiple access control policies or functions; Iterate and optimize test scenarios and combined test cases based on test results and feedback.

[0014] A second aspect of the present invention is to provide a DCS controller application program access control automated testing system, comprising: A receiving module, used for receiving a test program and a configuration file; The editing module is used to edit the configuration file and formulate the controller device connection information, test file directory, connection retry times, and module status change parameters based on the configuration file; The connection and execution module is used to connect to the controller to be tested and execute the test program: configure the application access control policy, verify the application access control policy function business, and set the application access control function module status; The report generation module is used to generate and output a test report based on the execution results of the test program.

[0015] As a further improvement of the present invention, the client through which the receiving module receives the test program and the configuration file and the controller device to be tested are in the same network test environment.

[0016] As a further improvement of the present invention, the configuration file includes the following information: a) IP address, user name and password of the controller device to be connected; b) The object file directory on the controller to be tested; c) The main file directory on the controller to be tested; d) The number of times the client attempts to reconnect to the controller; e) The interval for changing the status of the application access control module; f) The number of times the application access control module status was changed.

[0017] As a further improvement of the present invention, the connection and execution module is connected to the controller to be tested by way of telnet; If the connection fails, the test program prompts the connection failure and prints the failure reason information and tries to reconnect. The number of connections is the number of retries set in the configuration file. When the upper limit of the number of retries is reached and the connection cannot be made, the script test program will exit and no longer execute the subsequent steps.

[0018] As a further improvement of the present invention, the configuration application access control policy of the connection and execution module includes: according to the directory specified by the configuration file, traversing the files under the subject and object directories, selecting the files under the subject directory as the subject files, and the files under the object directory as the object files, and combining the subject and the object one by one to configure the application access control policy; when a certain file is executed as an ordinary file, the test program will return a configuration failure and give the specific reason for the failure; The function of connecting and executing the module to verify the application access control policy includes: after configuring the application access control policy, execute the command of deleting, renaming, and modifying the file content of the object files in the directory one by one. The test program will return the result of the operation on each object file. If the operation fails, the function is normal. If the operation succeeds, you need to locate and troubleshoot the cause; Connect and execute the module to set the application access control function module status, including: The application access control function module has a total of 3 states: on, off, and monitor. According to the timing interval set in the configuration file, the test program will randomly set a control function module state at regular intervals and check the actual module status on the controller. It will determine whether the module status setting is effective based on the returned status value and the set status value.

[0019] As a further improvement of the present invention, after the report generation module test program is executed, the report generation module generates and outputs a test report, and the test report includes the following information: The start time and end time of the script execution, the total number of files in the main file and object file directories, the total number of times the application access control policy is configured, the total number of times the object file is operated, the total number of times the application access control function module status is actually executed, and the number of passes and failures corresponding to each module, where failure information will be provided.

[0020] As a further improvement of the present invention, an automated evaluation module is included, and the automated evaluation module includes: Obtain operating parameters for concurrent access by multiple users, network latency, and controller load changes; Testing multiple access control policies or functions simultaneously based on operational parameters to detect potential conflicts or interactions between multiple access control policies or functions; Iterate and optimize test scenarios and combined test cases based on test results and feedback.

[0021] A third aspect of the present invention is to provide an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the DCS controller application program access control automation testing method when executing the computer program.

[0022] A fourth aspect of the present invention is to provide 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 DCS controller application program access control automation testing method is implemented.

[0023] Compared with the prior art, the present invention has the following beneficial effects: The present invention proposes a method for automated testing of application access control of a DCS controller based on Python. The method uploads Python scripts and configuration files to a client, edits the configuration files to specify test parameters, connects to the controller to be tested via telnet and executes a series of test modules, including configuring application access control policies, verifying application access control policy functional services, setting application access control functional module status, and generating a test report. The method improves the speed and quality of testing and reduces testing costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 A flow chart of an automated testing method for access control of a DCS controller application provided by the present invention; Figure 2 A flow chart of a method for automated testing of access control of a DCS controller application according to an embodiment of the present invention; Figure 3 A DCS controller application program access control automatic test system provided by the present invention; Figure 4 A schematic diagram of an electronic device provided by the present invention. DETAILED DESCRIPTION

[0025] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein.

[0027] In addition, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus that includes a series of steps or elements is not necessarily limited to those steps or elements explicitly listed, but may include other steps or elements not explicitly listed or inherent to such process, method, product, or apparatus.

[0028] like Figure 1As shown, the first object of the present invention is to provide a DCS controller application access control automated testing method, comprising the following steps: S1, receiving the test program and configuration file; S2, edit the configuration file, and formulate the controller device connection information, test file directory, connection retry times, and module status change parameters based on the configuration file; S3, connect to the controller to be tested and execute the test program: configure the application access control policy, verify the application access control policy function business, and set the application access control function module status; S4, based on the execution results of the test program, generate and output a test report.

[0029] Compared with traditional manual testing or semi-automated testing methods, this method achieves a high degree of automation. It receives test programs and configuration files, and then automatically performs controller connection, test execution, and report generation based on these files, with no or little human intervention.

[0030] Configuration flexibility: By editing the configuration file, users can formulate controller device connection information, test file directory, connection retry times, module status change parameters, etc. as needed, which provides great flexibility for testing.

[0031] Comprehensiveness of policy verification: This approach not only configures the access control policy of the application, but also verifies its functional business and sets the module status, thereby comprehensively verifying the effectiveness of the access control function.

[0032] Due to the realization of automation, this method can significantly improve test efficiency, reduce test cycles and labor costs. And through the standardization of configuration files and test procedures, the test can be repeated in different environments or on different controllers to ensure the consistency and reliability of the test.

[0033] In particular, the test report generated based on the execution results of the test program provides detailed test results and possible problem analysis, which facilitates problem tracking and resolution. By verifying the application's access control policy functional business, this method can ensure the security of the controller in actual operation and reduce security risks caused by improper access control.

[0034] The present invention is described in detail below with reference to specific embodiments: The embodiment of the present invention proposes an automated testing method for application access control of a DCS controller, specifically an automated testing method for application access control functions of a domestically produced trusted DCS controller based on Python. The steps of the entire method are as follows: Figure 2 As shown, the invention comprises the following steps: 1. Upload the Python script and the configuration files required to run the script to the client, where the client and the controller device to be tested are in the same network test environment; 2. Edit the configuration file: The configuration file includes the following information: a) IP address, user name and password of the controller device to be connected; b) The object file directory on the controller to be tested; c) The main file directory on the controller to be tested; d) The number of times the client attempts to reconnect to the controller; e) The interval for changing the status of the application access control module; f) The number of times the application access control module status was changed.

[0035] 3. Run the Python test program on the client, where the script test program connects to the controller to be tested via telnet; If the connection fails, the test program will prompt the connection failure and print the failure reason information and try to reconnect. The number of connections is the number of retries set in the configuration file. When the upper limit of the number of retries is reached and the connection cannot be made, the script test program will exit and no longer execute the subsequent steps.

[0036] When the client connects to the controller under test, it starts to test the specific business functions of the application access control. It includes the following test modules: a) Configure application access control policy: According to the directory specified by the configuration file, traverse the files under the subject and object directories, select the files under the subject directory as the subject files, and the files under the object directory as the object files, and combine the subject and object one by one to configure the application access control policy. Since the subject file can only be a binary executable file, when a certain file is executed as an ordinary file, the test program will return a configuration failure and give the specific reason for the failure.

[0037] b) Verify the application access control policy function business: After configuring the application access control policy based on a), execute the commands of deleting, renaming, and modifying the file contents of the object files in the directory one by one. The test program will return the result of the operation on each object file. If the operation fails, it means that the function is normal. If the operation succeeds, it means that the application access control policy of the file is not actually effective, and you need to locate and troubleshoot the cause.

[0038] c) Set the application access control function module status: The application access control function module has a total of 3 states: on, off, and monitor. According to the timed interval set in the configuration file, the test program will randomly set the control function module state to one of the 3 states and check the actual module state on the controller. It will determine whether the module state setting is effective based on the returned state value and the set state value.

[0039] d) Generate test report: After the business test procedures of the above three modules are executed, a test report in Excel format is generated and output. The test report includes the following information: The start time and end time of the script execution, the total number of files in the main file and object file directories, the total number of times the application access control policy is configured, the total number of times the object file is operated, the total number of times the application access control function module status is actually executed, and the number of passes and failures corresponding to each module, where failure information will be provided.

[0040] In order to make the test results of the method of the present invention more accurate, this embodiment also designs more complex test scenarios, which may include concurrent access by multiple users, network delay, controller load changes, etc., to comprehensively evaluate the stability and performance of the system. Combined testing is also performed, that is, multiple access control policies or functions are tested simultaneously to detect potential conflicts or interactions between them.

[0041] 1. Concurrent access by multiple users: Determine the number of concurrent users and simulate the possible concurrent users in the actual use environment. Design scenarios where multiple users access the system at the same time, such as multiple users trying to access the same resource or perform the same operation at the same time. Monitor and record indicators such as the system's response time, throughput, and error rate to evaluate the system's performance under concurrent access by multiple users. The controller we used during the test can only access one user at a time through the serial port line and does not support multi-user connections. 2. Network delay: Artificially introduce different degrees of network delay through network simulation tools or equipment. Design test scenarios to simulate the impact of network delay on system stability and performance, such as user operation delay, data transmission delay, etc. Monitor and record indicators such as system response time and data transmission speed under different network delays to evaluate the system's tolerance to network delay.

[0042] 3. Controller load changes: Simulate the working state of the controller under different loads by adjusting the system load. Design test scenarios, including sudden increase or decrease of system load, to evaluate the stability and performance of the controller when the load changes. Monitor and record the CPU usage, memory usage, response time and other indicators of the controller when the load changes to evaluate the load handling capacity of the controller.

[0043] Identify the access control policy or feature: List all the access control policies or functions that need to be tested in the system. Analyze the potential relationships between these policies or functions, such as whether they may take effect at the same time, whether there are priority differences, etc.

[0044] Design combination test cases: Based on the identified access control policies or functions, design combination test cases.

[0045] Each test case should cover the combination of multiple strategies or functions to detect potential conflicts or interactions between them. Use techniques such as scenario method and cause-effect diagram to design test cases to ensure that all possible combinations are covered.

[0046] Perform combination testing: Perform the tests in sequence according to the designed combination test cases. During the execution, monitor and record the system's behavior, status, and any exceptions or errors. Pay special attention to the interactions and potential conflicts between different strategies or functions.

[0047] Organize and analyze the data collected during the test. Check if there are any potential conflicts or interactions, and evaluate their impact on system stability and performance. Based on the test results, make corresponding improvement suggestions or repair measures.

[0048] Iterate and optimize test scenarios and combined test cases based on test results and feedback. For example, if you find that some test cases are not effective or have omissions, you can add new test cases or adjust the parameters of existing test cases. By continuously optimizing test scenarios and combined test cases, you can improve the effectiveness and accuracy of the test.

[0049] Through the above steps, more complex test scenarios can be designed and combined tests can be performed to comprehensively evaluate the stability and performance of the system, while detecting potential conflicts or interactions between multiple access control policies or functions.

[0050] Through this method, the application access control policy function on the DCS controller can be tested more comprehensively, and the module status stress test can be performed, which effectively improves the test speed and quality and can significantly reduce the test cost.

[0051] like Figure 3 As shown, the present invention also provides a DCS controller application access control automatic test system, comprising: A receiving module, used for receiving a test program and a configuration file; The editing module is used to edit the configuration file and formulate the controller device connection information, test file directory, connection retry times, and module status change parameters based on the configuration file; The connection and execution module is used to connect to the controller to be tested and execute the test program: configure the application access control policy, verify the application access control policy function business, and set the application access control function module status; The report generation module is used to generate and output a test report based on the execution results of the test program.

[0052] like Figure 4 As shown, the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the DCS controller application program access control automation testing method when executing the computer program.

[0053] 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 DCS controller application program access control automation test method is implemented.

[0054] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable test program codes.

[0055] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0056] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0057] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0058] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all components may be implemented as software executed by a processor, such as a digital signal processor or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium).

[0059] As is well known to those of ordinary skill in the art, the term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storing information (such as computer readable instructions, data structures, test program modules or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those of ordinary skill in the art that communication media typically contain computer readable instructions, data structures, test program modules or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and may include any information delivery medium.

Claims

1. A DCS controller application access control automated testing method, characterized in that: include: Receive test programs and configuration files; Edit the configuration file and set the controller device connection information, test file directory, connection retry times, and module status change parameters based on the configuration file; Connect to the controller to be tested and execute the test program: configure the application access control policy, verify the application access control policy function business, and set the application access control function module status; Generate and output test reports based on the execution results of the test program.

2. The method according to claim 1, characterized in that The client receiving the test program and configuration file and the controller device to be tested are in the same network test environment.

3. The method according to claim 1, characterized in that The configuration file includes the following information: a) IP address, user name and password of the controller device to be connected; b) The object file directory on the controller to be tested; c) The main file directory on the controller to be tested; d) The number of times the client attempts to reconnect to the controller; e) The interval for changing the status of the application access control module; f) The number of times the application access control module status was changed.

4. The method according to claim 1, characterized in that: The connecting to the controller to be tested is to connect to the controller to be tested via telnet; If the connection fails, the test program prompts the connection failure and prints the failure reason information and tries to reconnect. The number of connections is the number of retries set in the configuration file. When the upper limit of the number of retries is reached and the connection cannot be made, the script test program will exit and no longer execute the subsequent steps.

5. The method according to claim 1, characterized in that The configuration of the application access control policy includes: according to the directory specified by the configuration file, traversing the files under the subject and object directories, selecting the files under the subject directory as the subject files, and the files under the object directory as the object files, and combining the subject and the object one by one to configure the application access control policy; when a certain file is executed as a common file, the test program will return a configuration failure and give the specific reason for the failure; Verifying the application access control policy function includes: after configuring the application access control policy, execute the command of deleting, renaming, and modifying the file content of the object files in the directory one by one. The test program will return the result of the operation on each object file. If the operation fails, the function is normal. If the operation succeeds, you need to locate and troubleshoot the cause. Setting the application access control function module status includes: The application access control function module has a total of 3 states: open, close, and monitor. According to the timing interval set in the configuration file, the test program will randomly set a control function module state at regular intervals and check the actual module status on the controller. It will determine whether the module status setting is effective based on the returned status value and the set status value.

6. The method according to claim 1, characterized in that The generating and outputting of the test report includes: After the test program is executed, a test report is generated and output. The test report includes the following information: The start time and end time of the script execution, the total number of files in the main file and object file directories, the total number of times the application access control policy is configured, the total number of times the object file is operated, the total number of times the application access control function module status is actually executed, and the number of passes and failures corresponding to each module, where failure information will be provided.

7. The method according to claim 1, characterized in that After executing the test program, an automated evaluation step is also included, and the automated evaluation step includes: Obtain operating parameters for concurrent access by multiple users, network latency, and controller load changes; Testing multiple access control policies or functions simultaneously based on operational parameters to detect potential conflicts or interactions between multiple access control policies or functions; Iterate and optimize test scenarios and combined test cases based on test results and feedback.

8. A DCS controller application access control automated testing system, characterized in that: include: A receiving module, used for receiving a test program and a configuration file; The editing module is used to edit the configuration file and formulate the controller device connection information, test file directory, connection retry times, and module status change parameters based on the configuration file; The connection and execution module is used to connect to the controller to be tested and execute the test program: configure the application access control policy, verify the application access control policy function business, and set the application access control function module status; The report generation module is used to generate and output a test report based on the execution results of the test program.

9. An electronic device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the DCS controller application program access control automation test method as claimed in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the DCS controller application program access control automation testing method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Method and system for automatically testing static credible verification function of DCS (Distributed Control System) controller

    CN119690055A

  • A DCS controller static trusted verification function automated testing method and system

    CN119690055B

  • Static trusted verification function test method for trusted controller and related device

    CN120196092A