Method and system for automatically testing automatic power generation control function

Through the hierarchical deconstruction of the automatic power generation control system and the combination of multiple testing methods, the problem of incomplete coverage in the existing testing methods is solved, and the system is comprehensive and reliable testing is achieved, ensuring the stable operation of the automatic power generation control function.

CN120295279APending Publication Date: 2025-07-11NARI NANJING CONTROL SYSTEM CO LTD +4
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510450294.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-11
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

The existing automatic power generation control function testing methods fail to fully cover the mutual influence between input, output characteristics and functional modules, resulting in low testing efficiency and insufficient reliability.

Method used

The automatic power generation control system is divided into a data interface layer, a control algorithm layer and a data display layer by using a hierarchical deconstruction method. It combines white box testing and black box testing methods to conduct unit testing, integration testing and joint testing, simulate abnormal scenarios for system-level testing, and ensure the integrity and coordinated work of service functions at each level.

Benefits of technology

A comprehensive testing of the automatic power generation control system is realized, the test coverage and efficiency are improved, the reliability and stability of the system are ensured, and functional instability is avoided due to defects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120295279A_ABST
    Figure CN120295279A_ABST
Patent Text Reader

Abstract

The invention discloses an automatic power generation control function automatic test method and system, and belongs to the field of power system active power automatic control. The method comprises the steps that the automatic power generation control system is deconstructed in a layered mode according to technical specifications and is divided into a data interface layer, a control algorithm layer and a data display layer, and service functions of all the layers are defined; a service special test is carried out, a unit test adopts a white box method, and judgment, condition and path coverage is realized according to a service function design document; integrating a black box technology for testing, verifying a service function interface and input and output; a joint test scheme is designed based on each level of service association, and different service combinations are tested; and finally, carrying out system-level integration test, abnormity anti-error strategy independent test, external system abnormity test and system destructive test in sequence, and if the test is not passed, carrying out regression test by taking the failure step as a starting point until all items pass. All modules of the automatic power generation control function are tested in all directions, and reliable operation of the automatic power generation function is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of active power control of power systems, and particularly relates to an automatic test method and system applicable to the test and verification of automatic generation control functions. Background Art

[0002] The automatic generation control function (AGC) of the dispatching agency is mainly used for power grid frequency and tie-line power control, and is an essential core control function of the dispatching center. To ensure the stable operation of the automatic generation control function of the dispatching agency, especially the safety and reliability of the new functions of the automatic generation control system, and to ensure comprehensive and accurate function verification, it is crucial to conduct comprehensive testing on its software.

[0003] The automatic generation control function has the characteristics of high requirements for safe operation and relatively frequent function upgrades and updates. Currently, the general software testing methods mainly consider the functions and performance testing of the general software functions themselves, without considering the input and output characteristics of the automatic generation control application functions themselves, the mutual influence between function modules, and the requirements of the abnormal prevention and error-proof system, resulting in low test process efficiency, incomplete test coverage, and easy impact on the reliability of the automatic generation control function. Summary of the Invention

[0004] In order to improve the safety and reliability of the development test and function verification of the new functions of the automatic generation control system, the present invention proposes a test method and system for independent testing, joint testing, and special testing for abnormal prevention and error-proof of the automatic generation control function module. By comprehensively testing each service function of the automatic generation control system, it is possible to avoid the situation where the function goes online with defects due to incomplete function testing, and ensure the reliable operation of the automatic generation function.

[0005] To achieve the above invention purpose, the present invention adopts the following technical solutions:

[0006] In the first aspect, an automatic test method for an automatic generation control function includes:

[0007] Referring to the technical specifications of the automatic generation control function, the automatic generation control system is hierarchically deconstructed and divided into a data interface layer, a control algorithm layer, and a data display layer. The data interface layer encapsulates the data interfaces of the basic platform of the dispatching control system and provides real-time data processing and transmission services; the control algorithm layer provides area generation control services, section power control services, and power generation equipment control services; the data display layer displays the operation results of the control algorithm layer from multiple aspects through a graphical interface;

[0008] For each level of the system, the white-box testing method is adopted to conduct unit tests on the services provided at each level. Test cases are designed based on the design documents of each service function to achieve decision coverage, condition coverage, and path coverage. The black-box testing technique is used to conduct integration tests on each service to verify the correctness of the service function interfaces and input / output.

[0009] After completing the service special tests, based on the correlation relationships between the service functions at each level, a combined test plan is designed to test different combinations of the real-time data processing and transmission service, as well as the services in the control algorithm layer and data display layer added on this basis. If the service is modified during the process of defect elimination or upgrade, the test plan involving this service is retested.

[0010] After completing the service special tests and combined tests, system-level integration tests are carried out. Simulate the input of real-time measurement data to verify the control strategy and results. Subsequently, independent tests of the abnormal error prevention strategy are carried out in sequence, simulating external measurement data, control object, and interface operation abnormalities; external system abnormality tests are carried out, simulating the support platform and operating system abnormalities; system destructive tests are carried out, simulating file deletion and process exit operations. If the test fails, regression testing is carried out starting from the failed step until all test items pass.

[0011] Furthermore, the white-box testing method is adopted to conduct unit tests on the services provided at each level. Test cases are designed based on the design documents of each service function to achieve decision coverage, condition coverage, and path coverage, including:

[0012] Based on the design document of each service function, clarify the internal structure, functional logic, and input / output requirements of the corresponding software code block.

[0013] For decision coverage, find all the decision conditions in the code block and design test cases so that all possible results of each decision condition are tested at least once.

[0014] For condition coverage, analyze each sub-condition in the decision condition in the code block and design test cases so that all possible result combinations of each sub-condition are tested.

[0015] For path coverage, according to the program flow chart of the code block, find all possible execution paths and design test cases to cover each execution path.

[0016] Furthermore, the black-box testing technique is used to conduct integration tests on each service to verify the correctness of the service function interfaces and input / output, including:

[0017] Check whether the interface definitions between each service function are consistent, including the parameter types, parameter numbers, and parameter orders of the interfaces.

[0018] Input various legal and illegal test data to the service function and check whether its output meets the expectations.

[0019] Furthermore, based on the association relationships between service functions at each level, design a combined test plan to test different combinations of real-time data processing and transmission services, as well as services in the control algorithm layer and data display layer added on top of it, including:

[0020] Deeply analyze the association relationships between service functions, including data flow relationships and control dependency relationships;

[0021] According to these association relationships, determine different combinations of service functions to be tested and form multiple test plans;

[0022] According to the designed test plans, conduct detailed tests on each combination of service functions. During the testing process, record the input data, expected output, and actual output results of each test case, and compare whether the actual output control strategy is consistent with the expectation;

[0023] Among them, multiple test plans sequentially include real-time data processing and transmission services, real-time data processing and transmission services plus one or more services in the control algorithm layer, real-time data processing and transmission services plus one or more services in the control algorithm layer, and one or more services in the control algorithm layer.

[0024] Furthermore, conduct system-level integration testing, simulate the input of real-time measurement data, and verify the control strategy and results, including:

[0025] Use specialized test tools or software to simulate the input of real-time measurement data, input the simulated real-time measurement data into the entire automatic generation control system, and the system performs operations and control operations according to the pre-set control strategy to verify whether the control strategy output by the system is reasonable.

[0026] Furthermore, conduct independent testing of the abnormal prevention and error-proof strategy, simulate abnormalities in external measurement data, control objects, and interface operations, including:

[0027] By modifying the simulated external measurement data to make it in an abnormal situation, observe whether the system's abnormal prevention and error-proof strategy can correctly identify these abnormal data and take corresponding measures;

[0028] Simulate that the control object has a fault or abnormal state, and check whether the system's abnormal prevention and error-proof strategy can detect the abnormality of the control object in a timely manner and adjust the control strategy;

[0029] Simulate the abnormal operations of the operator on the system graphical interface, verify whether the system's abnormal prevention and error-proofing strategy can prevent the execution of these illegal operations, or can promptly restore the system to a safe state after the operation is executed, and send corresponding warning messages to the operator.

[0030] Furthermore, conduct external system anomaly tests, simulate the anomalies of the support platform and the operating system, including:

[0031] Simulate a failure of the basic platform of the dispatching control system, and check whether the automatic generation control system can maintain basic operating functions in this case;

[0032] Simulate a failure of the operating system, and observe the performance of the automatic generation control system when the operating system is abnormal.

[0033] Furthermore, conduct system destructive tests, simulate file deletion and process exit operations, including:

[0034] In the test environment, attempt to delete important files on which the automatic generation control system depends, including the real-time library file of the automatic generation control function, the hierarchical library file of the automatic generation control function, and the dynamic library on which the automatic generation control function depends, and check the reaction of the system after the files are deleted;

[0035] Forcibly terminate the key processes in the automatic generation control system, including the core control process of the automatic generation control function, and observe how the system handles the unexpected exit of the process.

[0036] In the second aspect, an automatic test system for automatic generation control function includes:

[0037] A system hierarchical decomposition module, which is used to hierarchically decompose the automatic generation control system with reference to the technical specifications of the automatic generation control function, and is divided into a data interface layer, a control algorithm layer, and a data display layer. The data interface layer encapsulates the data interface of the basic platform of the dispatching control system and provides real-time data processing and transmission services; the control algorithm layer provides area generation control services, section power control services, and power generation equipment control services; the data display layer displays the operation results of the control algorithm layer from multiple aspects through a graphical interface;

[0038] A service special test module, which is used to conduct unit tests on the services provided by each layer of the system using the white box testing method, design test cases according to the design documents of each service function, and achieve decision coverage, condition coverage, and path coverage; use black box testing technology for integrated testing of each service to verify the correctness of the service function interfaces and input and output;

[0039] A joint test module is used to design a joint test plan based on the association relationships between service functions at all levels after completing the special service tests, and test different combinations of real-time data processing and transmission services, as well as services in the control algorithm layer and data display layer added on this basis. If the service is modified during the process of defect elimination or upgrade, the test plan involving this service is retested.

[0040] A multi-scenario comprehensive test module is used to conduct system-level integration tests after completing the special service tests and joint tests, simulate the input of real-time measurement data, verify the control strategies and results, and then conduct independent tests on the abnormal error prevention strategies in sequence, simulating external measurement data, control objects, and interface operation abnormalities; conduct external system abnormality tests, simulating the abnormalities of the support platform and operating system; conduct system destructive tests, simulating file deletion and process exit operations.

[0041] In the various tests of the special service test module, joint test module, and multi-scenario comprehensive test module, if the test fails, regression testing is carried out starting from the failed step until all test items pass.

[0042] Furthermore, the special service test module includes a unit test sub-module. The unit test sub-module uses the white box testing method to conduct unit tests on the services provided at all levels, designs test cases according to the service function design documents, and achieves decision coverage, condition coverage, and path coverage, including:

[0043] A code block analysis unit is used to clarify the internal structure, functional logic, input and output requirements of the corresponding software code block according to the design document of each service function.

[0044] A decision coverage test unit is used to find all decision conditions in the code block and design test cases so that all possible results of each decision condition are tested at least once.

[0045] A condition coverage test unit is used to analyze each sub-condition in the decision condition of the code block and design test cases so that all possible result combinations of each sub-condition are tested.

[0046] A path coverage test unit is used to find all possible execution paths according to the program flow chart of the code block and design test cases to cover each execution path.

[0047] Furthermore, the special service test module includes a service integration test sub-module. The service integration test sub-module uses black box testing technology to conduct integration tests on each service and verify the correctness of each service function interface and input and output, including:

[0048] Interface test unit, used to check whether the interface definitions between various service functions are consistent, including parameter types, the number of parameters, and parameter order of the interfaces;

[0049] Input / output test unit, used to input various legal and illegal test data to the service function and check whether its output meets the expectations.

[0050] Furthermore, the joint test module includes:

[0051] Association analysis unit, used to deeply analyze the association relationships between various service functions, including data flow relationships and control dependency relationships;

[0052] Test scenario design unit, used to determine different combinations of service functions to be tested according to these association relationships and form multiple test scenarios; the multiple test scenarios successively include real-time data processing and transmission services, one or more services of real-time data processing and transmission services plus the control algorithm layer, one or more services of real-time data processing and transmission services plus one or more services of the control algorithm layer, and one or more services of the control algorithm layer;

[0053] Test scenario execution unit, used to conduct detailed tests on each combination of service functions according to the designed test scenarios. During the test process, record the input data, expected output, and actual output results of each test case, and compare whether the actual output control strategy is consistent with the expectation.

[0054] Furthermore, the multi-scenario comprehensive test module includes a system integration test sub-module, used to conduct system-level integration tests. The test process is as follows:

[0055] Use a dedicated test tool or software to simulate the input of real-time measurement data, input the simulated real-time measurement data into the entire automatic generation control system, and the system performs calculations and control operations according to the pre-set control strategy to verify whether the output control strategy of the system is reasonable.

[0056] Furthermore, the multi-scenario comprehensive test module includes an independent test sub-module for abnormal prevention and error-proofing strategies. The independent test sub-module for abnormal prevention and error-proofing strategies includes:

[0057] External measurement data test unit, used to modify the simulated external measurement data to make it abnormal, and observe whether the abnormal prevention and error-proofing strategy of the system can correctly identify these abnormal data and take corresponding measures;

[0058] Control object test unit, used to simulate that the control object has a fault or abnormal state, and check whether the abnormal prevention and error-proofing strategy of the system can detect the abnormality of the control object in a timely manner and adjust the control strategy;

[0059] The graphical interface test unit is used to simulate the abnormal operations of an operator on the system graphical interface, verify whether the system's abnormal prevention and error-proof strategy can prevent the execution of these illegal operations, or can promptly restore the system to a safe state after the operation is executed, and send corresponding warning messages to the operator.

[0060] Furthermore, the multi-scenario comprehensive test module includes an external system exception test sub-module, and the external system exception test sub-module includes:

[0061] The platform exception test unit is used to simulate the failure of the basic platform of the dispatching control system and check whether the automatic generation control system can maintain basic operation functions in this case;

[0062] The operating system test unit is used to simulate the failure of the operating system and observe the performance of the automatic generation control system when the operating system is abnormal.

[0063] Furthermore, the multi-scenario comprehensive test module includes a system destructive test sub-module, and the system destructive test sub-module includes:

[0064] The file deletion test unit is used to attempt to delete important files on which the automatic generation control system depends during the test environment, including the real-time library file of the automatic generation control function, the hierarchical library file of the automatic generation control function, and the dynamic library on which the automatic generation control function depends, and check the reaction of the system after the files are deleted;

[0065] The process exit test unit is used to forcibly terminate the key processes in the automatic generation control system, including the core control process of the automatic generation control function, and observe how the system handles the unexpected exit of the process.

[0066] In a third aspect, an electronic device includes: one or more processors; a memory; and one or more programs, where the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and when the program is executed by the processor, it implements the automatic test method for the automatic generation control function as described in the first aspect of the present invention.

[0067] In a fourth aspect, a computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the automatic test method for the automatic generation control function as described in the first aspect of the present invention.

[0068] Compared with the prior art, the present invention has the following beneficial effects: (1) Testing based on software hierarchical deconstruction can accurately target the service functions at different levels for targeted testing. The encapsulation services of the data interface layer, various algorithms of the control algorithm layer, and different service functions of the data display layer can all be meticulously detected, thus comprehensively ensuring the reliability of the automatic generation control function and avoiding the impact on the operation of the entire system due to defects in a certain layer. This hierarchical testing method helps to clarify the functional boundaries and interaction relationships of each layer of services. Through the data interaction testing between the data interface layer, the control algorithm layer, and the data display layer, errors and delays in the data transmission process can be promptly discovered, ensuring smooth data flow between layers and improving the overall performance and stability of the system. (2) Through various testing methods (such as white-box testing, black-box testing, etc.) and testing in different scenarios (such as joint testing, system-level integration testing, etc.), various problems that may exist in the system can be effectively discovered, including data interaction problems, algorithm logic problems, etc., improving the quality and reliability of the system. Achieving comprehensive testing of all service functions of the automatic generation control system can comprehensively detect the performance and stability of each part of the system, ensure the reliable operation of the automatic generation function, and avoid putting the system into operation with defects. (3) During the testing process, it can be carried out step by step in the order from the bottom layer to the top layer. First, ensure the normal functions of each layer of services, and then verify the collaborative working effects between layers, which can efficiently discover and solve potential problems in the system. It has good traceability and repeatability. When the service is modified or a problem occurs, the relevant service can be quickly located and retested to ensure the stability and security of the system, and it is also convenient for subsequent optimization and improvement of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] Figure 1 is a schematic diagram of the hierarchical structure of the automatic generation control function module provided by an embodiment of the present invention;

[0070] Figure 2 is a flowchart of the testing method for the automatic generation control function provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0071] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.

[0072] In view of the high safety operation requirements of the automatic generation control system, frequent function upgrades and updates, which are likely to lead to unreasonable settings of the test scope for the new functions of the automatic generation control system, incomplete test steps and imperfect test strategies, resulting in the operation of the automatic generation function with defects and affecting the reliability of the automatic control function, the present invention proposes an automatic test method and system for the automatic generation control function. The service functions and interaction interfaces of the automatic generation control are decomposed according to the overall architecture design of the automatic generation control system, and then independent test methods and test strategies are designed based on each service function. Then, joint tests and incremental tests are designed according to the data interaction between the service functions. Finally, comprehensive function, interface and anti-error tests for the automatic generation control system are realized, further improving the operation reliability of the automatic generation control system.

[0073] Referring to Figure 1 and Figure 2 , a method for automatically testing the automatic generation control function in an embodiment of the present invention specifically includes the following steps:

[0074] Step (1), referring to the technical specification of the automatic generation control function, the automatic generation control system is hierarchically deconstructed and divided into a data interface layer, a control algorithm layer, and a data display layer to clarify the service function composition of each layer;

[0075] The technical specification requirements of the automatic generation control function detail the standard contents in many aspects such as the functions, performance indicators, and data interaction requirements that the automatic generation control system should possess. First, based on the technical specification requirements of the automatic generation control function, the software architecture of the automatic generation function is divided into three layers in total, namely the data interface layer, the control algorithm layer, and the data display layer, as Figure 1 shown.

[0076] The main function of the data interface layer is to encapsulate the data interface services of the basic platform of the dispatching control system. This means that it has to handle the data interaction with the basic platform of the dispatching control system, including receiving data from the basic platform and sending relevant data to the basic platform. Therefore, the data interface layer includes the data interface services for encapsulating the basic platform of the smart grid dispatching control system and the data processing services for processing the original data, simply referred to as real-time data processing and transmission services. The real-time data processing service is responsible for preliminarily processing the real-time data obtained from the real-time data interface service, such as operations like data format conversion and data cleaning (removing invalid data or abnormal data). The real-time data interface service focuses on the real-time data interaction with external systems or devices. It has to ensure the real-time and accurate data, such as using specific communication protocols (such as common power system protocols like IEC 61850) to receive and send data.

[0077] The control algorithm layer includes the area control algorithm, section control algorithm, and plant controller control algorithm, which are the core of the automatic generation control function. The area control algorithm mainly focuses on the generation control within a specific area. Based on factors such as power demand and generation capacity within the area, it calculates appropriate generation control strategies to ensure the balance between power supply and demand within the area and meet relevant power quality requirements (such as frequency stability). The section control algorithm focuses on the power control of specific sections (such as tie-line sections) in the power system. By monitoring the power flow of the section, it adjusts the output of relevant generation equipment to ensure that the section power is within a safe and stable range. The plant controller (PLC) control algorithm module uses the logic control function of the controller to perform precise control operations on the generation equipment, such as starting or stopping the generation equipment according to specific logic conditions and adjusting the operating parameters of the generation equipment.

[0078] The data display layer provides display services for the intermediate results and final results obtained by each control algorithm, including graphical interface display services, standby monitoring services, alarm information display services, historical data statistics services, and unit regulation performance display services. The graphical interface display service visually displays the relevant parameters (such as power generation and power) of the power generation system over time in the form of intuitive graphs (such as line charts and bar charts), facilitating operators to quickly understand the operating status of the system. The standby monitoring service statistically analyzes and displays the regulating reserve and spinning reserve in the current system. This service periodically (for example, once a minute) calculates the regulating reserve and spinning reserve of each unit and control area in the system and displays them in real time in the form of curves and bar charts. The alarm information display service is responsible for promptly displaying alarm information when abnormal situations occur in the system (such as generation equipment failures and power overlimits), including information such as the type of alarm, the time of occurrence, and relevant equipment, so that operators can quickly respond. The historical data statistics service statistically analyzes various data of the power generation system, such as calculating the total power generation and average power within a certain period, providing data support for the management and optimization of the power system. The regulation performance display service mainly displays the regulation performance of the generation equipment under the action of the control algorithm, such as indicators such as regulation speed and accuracy, which helps to evaluate the effectiveness of the control algorithm.

[0079] Step (2): Conduct special service tests. For unit tests, use the white-box method to achieve decision, condition, and path coverage according to the design documents of each service function; for integration tests, use black-box techniques to verify the service function interfaces and input / output.

[0080] The testing of software functions mainly includes black-box testing and white-box testing. Among them, black-box testing, also known as "function testing", mainly tests whether the functions of software products are correctly implemented, regardless of the internal structure of the products, and only makes detection and evaluation of the functions of the products. Common black-box testing methods include equivalence class partitioning, boundary value analysis, scenario method, etc. Equivalence class partitioning is based on the I / O characteristics of the program. The domain of the program is divided into a finite number of equivalent sections - "equivalence classes", and data is selected according to each equivalence class, that is, "test cases". The test cases designed using the equivalence class partitioning method are more representative and targeted. Long-term testing experience tells us that a large number of errors occur at the boundaries of the input or output range, rather than inside the input and output range. Therefore, designing test cases for various boundary conditions can detect more errors. Usually, the boundary value analysis method is used as a supplement to the equivalence class partitioning method. In this case, its test cases come from the boundaries of the equivalence classes. The error guessing method is also a commonly used black-box testing method. It mainly designs the possible deficiencies in the software based on the tester's past experience, and at the same time, it also designs test cases to correct these errors. The tester designs the possible special scenarios and errors that may occur in the software according to the main characteristics of the software.

[0081] White-box testing is also known as "glass box testing" or "structural testing". When testing, the program is regarded as a "white box" (or "transparent box"), and the internal structure of the program is made transparent to test the software product. However, there is a necessary condition, that is, the tester must be familiar with and master the internal structure of the product before testing, so as to design test cases through various programming languages to achieve the testing of the software. In most cases, the testing is mainly about data testing of the reference and definition of data. Secondly, it also includes coverage testing of the logical paths of the program.

[0082] White-box testing includes technical processes such as lexical analysis, syntax analysis, static error analysis, and program instrumentation analysis. It also includes methods such as code inspection method, static structure analysis method, static quality measurement method, logic coverage method, basic path testing method, domain testing, and symbolic testing. Among them, code inspection mainly checks aspects such as the design of the code, standard compliance, logical expression, and structure. The conventional inspection methods are desk checking, code review, and walkthrough. Code inspection should be carried out before compilation and dynamic testing. Its advantage is that it can quickly discover a large number of software logic design and coding defects, and what code inspection finds is the defect itself rather than its manifestation form. The disadvantage of code inspection is that it takes a lot of time and has high requirements for the knowledge and experience accumulated by the inspector himself. The coverage criterion of the logic coverage method is a quantitative answer to "Is it enough when the test execution reaches the appropriate point?" As a measurement standard for testing software, it describes the degree to which the program source code is tested. White-box testing requires a certain degree of coverage of the structural characteristics of the program under test. The coverage criteria include statement coverage, decision coverage, condition coverage, etc. The basic path testing method is based on the program control flow graph. First, analyze the loop complexity of the control structure, then export the set of executable paths, and finally design scientific and reasonable test cases based on this. The basic path testing method requires that the designed test cases execute each executable statement in the program under test at least once. For complex conditions, they can be decomposed into multiple single conditions and mapped into a control flow graph through combination.

[0083] According to the embodiments of the present invention, for unit testing, test cases are designed based on the design documents of each service function. Therefore, it is necessary to carefully study the design documents of each service function to clarify key information such as the internal structure, functional logic, input and output requirements, etc. of the corresponding software code block.

[0084] For decision coverage, all decision conditions in the code block (such as the condition judgment in the if-else statement) should be found, and test cases should be designed so that all possible results (true and false) of each decision condition are tested at least once. For example, in a function that determines whether to adjust the output of a power generation device based on the power value, if there is a decision condition "Is the power greater than 90% of the rated power", then test cases need to be designed to input values greater than 90% of the rated power and values less than or equal to 90% of the rated power respectively to cover the two results of this decision condition.

[0085] For condition coverage, each sub-condition in the decision condition within a code block needs to be analyzed (if the decision condition is a composite condition composed of multiple logical expressions). Test cases are designed such that all possible result combinations of each sub-condition are tested. For example, if a decision condition is "the power is greater than 90% of the rated power and the device running time is greater than 10 hours", then different combinations of the four sub-conditions, namely the power is greater than 90% of the rated power, the power is less than or equal to 90% of the rated power, the device running time is greater than 10 hours, and the device running time is less than or equal to 10 hours, need to be considered to design test cases.

[0086] For path coverage, based on the program flow chart of the code block, all possible execution paths are identified, and test cases are designed to cover each execution path. For example, if there are multiple nested if-else statements in a code block, different input values will cause the program to execute along different nested paths. Sufficient test cases need to be designed to cover all these possible nested paths.

[0087] Black-box testing treats each software function as a black box, only focusing on the input-output relationship of the function and the correctness of the interface. Therefore, it mainly verifies the correctness of its interface and input-output.

[0088] When verifying the interface, check whether the interface definitions between various service functions are consistent, including the parameter types, the number of parameters, the parameter order, etc. For example, when the data interface layer transfers real-time data to the control algorithm layer, it is necessary to ensure that the data format (such as the data type, data precision, etc.) of the transferred data meets the requirements of the control algorithm layer.

[0089] For the verification of the correctness of input-output, various legal and illegal test data are input to the service function, and check whether its output meets the expectations. For example, different regional power demand data (including normal demand data and abnormal data with excessive or too small demand) are input to the regional control algorithm, and verify whether the generated control strategy output by the algorithm is reasonable and meets the requirements of power supply-demand balance and related power quality.

[0090] Step (3), design a combined test plan based on the associations between service functions at each level, conduct combined testing on different services, and retest the relevant plan when the service is modified;

[0091] First, deeply analyze the association relationships between service functions, such as data flow relationships, control dependency relationships, etc. The data interface layer provides real-time data for the control algorithm layer, and the operation results of the control algorithm layer are used by the data display layer for display. This is a typical data flow association relationship; and some algorithms in the control algorithm layer may depend on the intermediate results of other algorithms, which is a control dependency relationship.

[0092] Then, based on these association relationships, determine the combinations of different service functions to be tested. For example, first conduct combined testing on the real-time data interface and the real-time data processing service to check the accuracy and integrity of the real-time data from acquisition to processing. Then, on this basis, add the regional control algorithm to test how the real-time data is utilized by the regional control algorithm after processing and generate corresponding control strategies. Next, add the power plant controller control algorithm to verify how the regional control strategy is further refined into control instructions for the power plant controller. Finally, add each service of the data display layer to check whether the operation results of the control algorithm can be correctly displayed on the data display layer.

[0093] As an example, the test plan includes the following plans:

[0094] Test Plan 1, the combined test includes the real-time data interface service and the real-time data processing service.

[0095] Test Plan 2, the combined test includes the real-time data interface service, the real-time data processing service, and the regional control algorithm service.

[0096] Test Plan 3, the combined test includes the real-time data interface service, the real-time data processing service, the regional control algorithm service, and the power plant controller control algorithm service.

[0097] Test Plan 4, the combined test includes the real-time data interface service, the real-time data processing service, the regional control algorithm service, the power plant controller control algorithm service, and the section control algorithm service.

[0098] Test Plan 5, the combined test includes the real-time data interface service, the real-time data processing service, the regional control algorithm service, the power plant controller control algorithm service, the section control algorithm service, and the graphic refresh service.

[0099] Test Plan 6, the combined test includes the real-time data interface service, the real-time data processing service, the regional control algorithm service, the power plant controller control algorithm service, the section control algorithm service, and the standby monitoring service.

[0100] Test Plan 7, the combined test includes the real-time data interface service, the real-time data processing service, the regional control algorithm service, the power plant controller control algorithm service, the section control algorithm service, and the alarm information display service.

[0101] Test Plan 8, the combined test includes the real-time data interface service, the real-time data processing service, the regional control algorithm service, the power plant controller control algorithm service, the section control algorithm service, and the historical performance statistics service.

[0102] Test Plan 9. The joint test includes real-time data interface service, real-time data processing service, regional control algorithm service, power plant controller control algorithm service, section control algorithm service, historical performance statistics service, and unit regulation performance display service.

[0103] Next, according to the designed test plan, conduct detailed tests on each service combination. During the test process, record the input data, expected output, and actual output results of each test case. For example, when testing the combination including real-time data interface, real-time data processing service, and regional control algorithm service, input a set of simulated real-time power data. It is expected that the control strategy output by the regional control algorithm is reasonably adjusted according to the power demand and generation capacity in the data, and then compare whether the actual output control strategy is consistent with the expectation.

[0104] It should be noted that when the service is modified during the function defect elimination or upgrade process, since the modification may affect the service's functional logic, input-output relationship, or interaction relationship with other services, it is necessary to retest the test plan involving this service. For example, if the regional control algorithm service is upgraded and the algorithm for calculating the power supply-demand balance is modified, then it is necessary to retest all service combinations including the regional control algorithm service to ensure that the modified service can still work correctly with other services and the functions of the entire system are not negatively affected.

[0105] Step (4): Conduct system-level integration test, abnormal prevention and error strategy independent test, external system abnormal test, and system destructive test in sequence. In all tests, if any test item fails the test, regression test starts from the failed step until all items pass.

[0106] (41) System-level integration test: After completing the internal tests of each service function and the joint tests between service functions, continue to carry out the system-level integration test of the automatic generation control function. By simulating the input of real-time measurement data for the normal operation of the automatic generation control application, test whether the control strategy and control results of the entire automatic generation control meet the requirements of the function specification.

[0107] Use specialized test tools or software to simulate the input of real-time measurement data. These simulated data should be as close as possible to the real data situation in the actual power system, including the data change range, data fluctuation frequency, etc. For example, simulate the power load data in a certain area at different time periods. These data can be analyzed and generated based on historical load data and have a certain degree of randomness and periodicity.

[0108] Input the simulated real-time measurement data into the entire automatic generation control system, and the system performs calculations and control operations according to the pre-set control strategy. Then verify whether the control strategy output by the system is reasonable, for example, whether it can adjust the output power of the power generation equipment in a timely manner according to the change of the power load to maintain the balance between power supply and demand. At the same time, verify whether the control result of the system meets the expectations, such as whether the actual output power of the power generation equipment is within the specified range and whether the frequency of the power system is stable within the normal fluctuation range.

[0109] (42) Independent test of abnormal error prevention strategy: After completing the system integration test of the automatic generation control function, continue to carry out the independent test of the abnormal error prevention strategy of the automatic generation control function, including the external measurement data abnormal error prevention test, the control object abnormal response error prevention test, and the interface abnormal operation error prevention test.

[0110] Simulation of external measurement data anomalies: Modify the simulated external measurement data to make it abnormal, such as data loss, data errors (such as modifying the correct power load data to unreasonable maximum or minimum values), etc. Observe whether the system's abnormal error prevention strategy can correctly identify these abnormal data and take corresponding measures, such as sending an alarm message and temporarily stopping the control operation according to the wrong data.

[0111] As an example, the external measurement data abnormal error prevention test includes: simulating abnormal grid frequency and tie-line power, and verifying whether the automatic generation control function can correctly identify and automatically block the anomaly;

[0112] Simulation of control object anomalies: Simulate that the control object (such as a power generation equipment) fails or is in an abnormal state, such as simulating that the power generation equipment suddenly shuts down or the output power of the power generation equipment gets out of control. Check whether the system's abnormal error prevention strategy can detect the anomaly of the control object in a timely manner and adjust the control strategy, such as transferring the load to other normal power generation equipment to avoid a greater failure of the power system.

[0113] As an example, the control object abnormal response error prevention test includes: simulating that a conventional unit incorrectly tracks the control instruction issued by the automatic generation control, and verifying whether the automatic generation control function can correctly identify the abnormal regulation and issue an abnormal alarm.

[0114] Simulation of abnormal interface operations: Simulate that the operator performs abnormal operations on the system graphical interface, such as entering illegal control instructions and accidentally deleting important system parameters. Verify whether the system's abnormal error prevention strategy can prevent the execution of these illegal operations, or can promptly restore the system to a safe state after the operation is executed and send corresponding alarm messages to the operator.

[0115] As an example, the anti-misoperation test for interface abnormal operations includes: simulating the control of the error input area in the automatic generation control function interface to verify whether the automatic generation control function can correctly identify the error input, issue an abnormal prompt, and automatically abort the error operation.

[0116] (43) After completing the independent test of the anti-misoperation strategy for the automatic generation control function, continue to conduct the abnormal test of the external system of the automatic generation control function, including the abnormality of the basic support platform and the abnormality of the operating system in operation.

[0117] Simulation of support platform abnormality: Simulate the failure of the basic platform of the dispatching control system, such as the failure of the communication module of the platform, the damage of the database of the platform, etc. Check whether the automatic generation control system can maintain the basic operating functions in this situation, such as whether it can automatically switch to the backup communication method or obtain data from the backup database to continue running, and whether the anti-misoperation strategy of the system can timely handle the abnormalities related to the support platform failure, such as sending the detailed information of the platform failure to the maintenance personnel for repair.

[0118] As an example, the simulation of the basic support platform abnormality includes the simulation of the real-time database service abnormality, the historical database service abnormality, the message bus abnormality, and the service bus abnormality, and test and verify whether the automatic generation control function can correctly identify and automatically pause the control.

[0119] Simulation of operating system abnormality: Simulate the failure of the operating system, such as the crash of the operating system process, memory leak, etc. Observe the performance of the automatic generation control system when the operating system is abnormal, such as whether the system can automatically restart and return to the normal operating state after the operating system failure is restored, whether the important data of the system will not be lost due to the operating system failure, and whether the anti-misoperation strategy of the system can take appropriate protection measures during the operating system abnormality, such as pausing some non-critical control operations to avoid data chaos.

[0120] As an example, the simulation of the operating system abnormality in operation includes the simulation of the file system abnormality and the memory allocation abnormality, and verify whether the automatic generation control function can correctly identify and automatically pause the control.

[0121] (44) After completing various anti-misoperation tests of the automatic generation control function, finally conduct the system destructive test, including the test of simulating the manual deletion of the real-time library file of the automatic generation control function, the test of simulating the manual deletion of the hierarchical library file of the automatic generation control function, the test of simulating the manual exit of the core control process of the automatic generation control function; and the test of simulating the manual deletion of the dynamic library on which the automatic generation control function depends.

[0122] File deletion simulation: In a test environment, attempt to delete important files on which the automatic generation control system depends, such as configuration files, data storage files, etc. Check the system's reaction after the files are deleted. For example, whether the system can detect the missing files and automatically perform file recovery (if there are backup files) or prompt the operator to perform file repair operations, and whether the overall function of the system will not completely collapse due to file deletion but can maintain basic operating functions to a certain extent.

[0123] As an example, the file deletion simulation test includes:

[0124] Simulate the test of manually deleting the real-time library file of the automatic generation control function, and test whether the automatic generation control function can correctly identify and automatically suspend the control;

[0125] Simulate the test of manually deleting the hierarchical library file of the automatic generation control function, and test whether the automatic generation control function can correctly identify and automatically suspend the control;

[0126] Simulate the test of manually exiting the core control process of the automatic generation control function, and test whether the automatic generation control function can correctly identify and give a normal alarm;

[0127] Simulate the test of manually deleting the dynamic library on which the automatic generation control function depends, and test whether the automatic generation control function can correctly identify and automatically suspend the control.

[0128] Process exit simulation: Forcefully terminate key processes in the automatic generation control system, such as the control algorithm execution process, data acquisition process, etc. Observe how the system handles the unexpected exit of the process. For example, whether the system can automatically restart the terminated process, or whether it can switch to an alternative processing mechanism when the process cannot be restarted, to ensure that the key functions of the system will not be interrupted for a long time due to the process exit.

[0129] Finally, it should be noted that during the execution of each level of testing, if any logical, functional, and module interaction interface and anti-error logic tests fail, regression testing needs to be carried out. The starting point of the regression testing is the failed test step, and the ending point of the testing is that all test items pass the test. That is, if any of the above tests (module special test, module joint test, system-level integration test, abnormal anti-error strategy independent test, external system exception test, system destructive test) fails, regression testing should be carried out starting from the failed step.

[0130] During regression testing, first determine the cause of the test failure, which may be a problem with the function of a certain module, or a malfunction in the interaction between modules, etc. Then, for these possible causes, re-run the relevant test cases, including the test cases that passed before, to ensure that no new errors are introduced while fixing the problem. For example, if the system function is abnormal when simulating a file deletion operation in the system destructive test, after fixing the file recovery mechanism, not only re-test the test cases related to file deletion, but also re-run the relevant test cases involving file usage in the previous module specific tests and joint tests until all test items pass.

[0131] The flowchart of the automatic generation control function test is shown in Figure 2 This method of the present invention decomposes the service functions and interaction interfaces of the automatic generation control system, then designs independent test methods and test strategies based on each service function, and then designs joint tests and incremental tests according to the data interaction between services. Finally, comprehensive function, interface, and anti-error tests for the automatic generation control function are realized, further improving the operation reliability of the automatic generation control function.

[0132] Based on the same technical concept as the method embodiment, another embodiment of the present invention provides an automatic test system for the automatic generation control function, including:

[0133] A system hierarchical decomposition module, which is used to hierarchically decompose the automatic generation control system with reference to the technical specifications of the automatic generation control function, and divide it into a data interface layer, a control algorithm layer, and a data display layer. The data interface layer encapsulates the basic platform data interface of the dispatching control system and provides real-time data processing and transmission services; the control algorithm layer provides area generation control services, section power control services, and power generation equipment control services; the data display layer displays the operation results of the control algorithm layer from multiple aspects through a graphical interface;

[0134] A service special test module, which is used to carry out unit tests on the services provided by each layer of the system using the white box test method for each layer of the system, design test cases according to the design documents of each service function, and achieve decision coverage, condition coverage, and path coverage; use black box test technology for the integration test of each service to verify the correctness of the service function interfaces and input and output;

[0135] A joint test module, which is used to design a joint test plan based on the association relationship between the service functions of each layer after completing the service special test, and test different combinations of the real-time data processing and transmission service, and the services of the control algorithm layer and the data display layer added on this basis. If the service is modified during the function defect elimination or upgrade process, re-test the test plan involving this service;

[0136] The multi-scenario comprehensive testing module is used to conduct system-level integration testing after completing service-specific testing and joint testing. It simulates real-time measurement data input to verify control strategies and results, and then sequentially conducts independent testing of abnormal error prevention strategies, simulating abnormalities in external measurement data, control objects, and interface operations; conducts external system abnormality testing, simulating abnormalities in the support platform and operating system; conducts system destructive testing, simulating file deletion and process exit operations.

[0137] In each test of the service-specific testing module, joint testing module, and multi-scenario comprehensive testing module, if the test fails, regression testing is carried out starting from the failed step until all test items pass.

[0138] According to an embodiment of the present invention, the service-specific testing module includes a unit testing sub-module. The unit testing sub-module uses white-box testing to conduct unit testing on the services provided at each level, designs test cases based on the design documents of each service function, and achieves decision coverage, condition coverage, and path coverage, including:

[0139] The code block analysis unit is used to clarify the internal structure, functional logic, input and output requirements of the corresponding software code block according to the design document of each service function;

[0140] The decision coverage testing unit is used to find all decision conditions in the code block and design test cases so that all possible results of each decision condition are tested at least once;

[0141] The condition coverage testing unit is used to analyze each sub-condition in the decision condition in the code block and design test cases so that all possible result combinations of each sub-condition are tested;

[0142] The path coverage testing unit is used to find all possible execution paths according to the program flow chart of the code block and design test cases to cover each execution path.

[0143] According to an embodiment of the present invention, the service-specific testing module includes a service integration testing sub-module. The service integration testing sub-module uses black-box testing technology to conduct integration testing of each service and verify the correctness of each service function interface and input and output, including:

[0144] The interface testing unit is used to check whether the interface definitions between each service function are consistent, including the parameter type, parameter number, and parameter order of the interface;

[0145] The input and output testing unit is used to input various legal and illegal test data to the service function and check whether its output meets the expectations.

[0146] According to an embodiment of the present invention, the joint testing module includes:

[0147] An association analysis unit for deeply analyzing the association relationships between service functions, including data flow relationships and control dependency relationships;

[0148] A test scenario design unit for determining different combinations of service functions to be tested based on these association relationships, forming multiple test scenarios; the multiple test scenarios sequentially include real-time data processing and transmission services, real-time data processing and transmission services plus one or more services of the control algorithm layer, real-time data processing and transmission services plus one or more services of the control algorithm layer, and one or more services of the control algorithm layer;

[0149] A test scenario execution unit for conducting detailed tests on each service function combination according to the designed test scenarios. During the test process, record the input data, expected output, and actual output results of each test case, and compare whether the actual output control strategy is consistent with the expected one.

[0150] According to an embodiment of the present invention, the multi-scenario comprehensive test module includes a system integration test sub-module for carrying out system-level integration tests. The test process is as follows:

[0151] Use a dedicated test tool or software to simulate the input of real-time measurement data, input the simulated real-time measurement data into the entire automatic generation control system, and the system performs operations and control operations according to the pre-set control strategy to verify whether the output control strategy of the system is reasonable.

[0152] According to an embodiment of the present invention, the multi-scenario comprehensive test module includes an independent test sub-module for abnormal prevention and error-proofing strategies. The independent test sub-module for abnormal prevention and error-proofing strategies includes:

[0153] An external measurement data test unit for modifying the simulated external measurement data to make it abnormal, observing whether the abnormal prevention and error-proofing strategy of the system can correctly identify these abnormal data and take corresponding measures;

[0154] A control object test unit for simulating the failure or abnormal state of the control object, checking whether the abnormal prevention and error-proofing strategy of the system can detect the abnormality of the control object in a timely manner and adjust the control strategy;

[0155] A graphical interface test unit for simulating abnormal operations by operators on the system graphical interface, verifying whether the abnormal prevention and error-proofing strategy of the system can prevent the execution of these illegal operations, or can restore the system to a safe state in a timely manner after the operation is executed and send corresponding warning messages to the operators.

[0156] According to an embodiment of the present invention, the multi-scenario comprehensive test module includes an external system abnormality test sub-module. The external system abnormality test sub-module includes:

[0157] A platform anomaly test unit is used to simulate a failure of the basic platform of the dispatching control system and check whether the automatic generation control system can maintain basic operating functions under such circumstances;

[0158] An operating system test unit is used to simulate an operating system failure and observe the performance of the automatic generation control system when the operating system is abnormal.

[0159] According to an embodiment of the present invention, the multi-scenario comprehensive test module includes a system destructive test sub-module, and the system destructive test sub-module includes:

[0160] A file deletion test unit is used to attempt to delete important files on which the automatic generation control system depends during the test environment, including the real-time library file of the automatic generation control function, the hierarchical library file of the automatic generation control function, and the dynamic library on which the automatic generation control function depends, and check the reaction of the system after the files are deleted;

[0161] A process exit test unit is used to forcibly terminate key processes in the automatic generation control system, including the core control process of the automatic generation control function, and observe how the system handles the unexpected exit of the process.

[0162] The present invention also provides an electronic device, including: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and when the program is executed by the processor, it implements the automatic test method for the automatic generation control function as described above.

[0163] The present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the automatic test method for the automatic generation control function as described above.

[0164] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a device (system), an electronic device, or a computer program product. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) containing computer-usable program code.

[0165] The present invention is described with reference to the flowchart of a method according to an embodiment of the present invention. It should be understood that each process in the flowchart and the combination of processes in the flowchart can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the functions specified in one process Figure 1 or more processes.

[0166] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device that implements the functions specified in one process Figure 1 or more processes.

[0167] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one process Figure 1 or more processes.

Claims

1. An automatic test method for automatic generation control function, characterized in that include: With reference to the technical specifications of automatic power generation control system, the automatic power generation control system is decomposed into layers, divided into data interface layer, control algorithm layer and data display layer. The data interface layer encapsulates the data interface of the basic platform of the dispatching control system and provides real-time data processing and transmission services; the control algorithm layer provides regional power generation control services, section power control services and power generation equipment control services; the data display layer uses a graphical interface to display the calculation results of the control algorithm layer from multiple aspects; For each level of the system, white box testing is used to conduct unit testing on the services provided at each level. Test cases are designed according to the design documents of each service function to achieve decision coverage, condition coverage and path coverage. Black box testing technology is used to conduct integration testing of each service to verify the correctness of each service function interface and input and output; After completing the service-specific test, design a joint test plan based on the correlation between service functions at each level, and test different combinations of real-time data processing and transmission services, as well as the control algorithm layer and data display layer services added on this basis. If the service is modified during the function elimination or upgrade process, retest the test plan involving the service; After completing the service-specific test and joint test, carry out system-level integration test to simulate real-time measurement data input, verify control strategies and results, and then carry out independent test of abnormal error prevention strategy in sequence to simulate abnormal external measurement data, control objects, and interface operation; Conduct external system anomaly testing to simulate support platform and operating system anomalies; Conduct system destructive testing to simulate file deletion and process exit operations; In the above tests, if the test fails, regression testing will be carried out starting from the failed step until all test items pass.

2. The method according to claim 1, wherein Use white box testing to conduct unit testing on services provided at each level. Design test cases based on the functional design documents of each service to achieve decision coverage, condition coverage, and path coverage, including: According to the design documents of each service function, the internal structure, functional logic, and input and output requirements of the corresponding software code block are clearly defined; For decision coverage, find all decision conditions in the code block and design test cases so that all possible results of each decision condition are tested at least once; For condition coverage, analyze each sub-condition in the judgment condition in the code block, and design test cases so that all possible result combinations of each sub-condition are tested; For path coverage, find all possible execution paths based on the program flow chart of the code block, and design test cases to cover each execution path.

3. The method according to claim 1, wherein Use black box testing technology to perform integration testing of each service to verify the correctness of each service function interface and input and output, including: Check whether the interface definitions of each service function are consistent, including the parameter type, number of parameters, and parameter order of the interface; Input various legal and illegal test data into the service function to check whether its output is as expected.

4. The method according to claim 1, wherein Based on the correlation between the service functions at each level, a joint test plan is designed to test the real-time data processing and transmission services, as well as different combinations of the control algorithm layer and data display layer services added on top of them, including: Deeply analyze the correlation relationships between various service functions, including data flow relationships and control dependency relationships; Based on these correlation relationships, determine different service function combinations to be tested and form multiple test scenarios; According to the designed test scenarios, conduct detailed tests on each service function combination. During the testing process, record the input data, expected output, and actual output results of each test case, and compare whether the actual output control strategy is consistent with the expected one; Among them, multiple test scenarios sequentially include real-time data processing and transmission services, real-time data processing and transmission services plus one or more services in the control algorithm layer, real-time data processing and transmission services plus one or more services in the control algorithm layer, and one or more services in the control algorithm layer.

5. The method according to claim 1, characterized in that, Carry out system-level integration testing, simulate the input of real-time measurement data, and verify the control strategy and results, including: Use a dedicated test tool or software to simulate the input of real-time measurement data, input the simulated real-time measurement data into the entire automatic generation control system, and the system performs operations and control operations according to the pre-set control strategy to verify whether the output control strategy of the system is reasonable.

6. The method according to claim 1, wherein Carry out independent testing of the abnormal prevention and error-proofing strategy, simulate abnormalities in external measurement data, control objects, and interface operations, including: Modify the simulated external measurement data to make it abnormal, and observe whether the system's abnormal prevention and error-proofing strategy can correctly identify these abnormal data and take corresponding measures; Simulate that the control object has a fault or abnormal state, and check whether the system's abnormal prevention and error-proofing strategy can detect the abnormality of the control object in a timely manner and adjust the control strategy; Simulate that the operator performs abnormal operations on the system graphical interface, and verify whether the system's abnormal prevention and error-proofing strategy can prevent the execution of these illegal operations, or can restore the system to a safe state in a timely manner after the operation is executed and send corresponding warning messages to the operator.

7. The method according to claim 1, characterized in that, Carry out external system abnormal testing, simulate abnormalities in the support platform and operating system, including: Simulate that the basic platform of the dispatching control system fails, and check whether the automatic generation control system can maintain basic operating functions in this case; Simulate that the operating system fails and observe the performance of the automatic generation control system when the operating system is abnormal.

8. The method according to claim 1, characterized in that, Carry out system destructive testing, simulate file deletion and process exit operations, including: In the test environment, try to delete important files on which the automatic generation control system depends, including the real-time library file of the automatic generation control function, the hierarchical library file of the automatic generation control function, and the dynamic library on which the automatic generation control function depends, and check the reaction of the system after the files are deleted; Forcibly terminate the key processes in the automatic generation control system, including the core control process of the automatic generation control function, and observe how the system processes the unexpected exit of the process.

9. An automatic test system for the automatic generation control function, characterized in that, including: System Hierarchical Deconstruction Module, which is used to hierarchically deconstruct the automatic generation control system with reference to the technical specifications of the automatic generation control function, and is divided into a data interface layer, a control algorithm layer, and a data display layer. The data interface layer encapsulates the data interface of the dispatching control system basic platform and provides real-time data processing and transmission services; the control algorithm layer provides area generation control services, section power control services, and generation equipment control services; the data display layer displays the operation results of the control algorithm layer from multiple aspects through a graphical interface; Service Special Test Module, which is used to conduct unit tests on the services provided by each layer of the system using the white-box testing method for each layer of the system, design test cases based on the service function design documents of each service, and achieve decision coverage, condition coverage, and path coverage; use black-box testing technology to conduct integration tests on each service to verify the correctness of the service function interfaces and input and output; Joint Test Module, which is used to design a joint test plan based on the association relationship between the service functions of each layer after completing the service special test, and test different combinations of the real-time data processing and transmission service, and the services of the control algorithm layer and the data display layer added on this basis. If the service is modified during the function defect elimination or upgrade process, retest the test plan involving this service; Multi-scenario Comprehensive Test Module, which is used to conduct system-level integration tests after completing the service special test and the joint test, simulate the input of real-time measurement data, verify the control strategy and results, and then conduct independent tests on the abnormal prevention and error-proofing strategy in sequence, simulating abnormalities in external measurement data, control objects, and interface operations; Conduct external system abnormality tests to simulate abnormalities in the support platform and operating system; Conduct system destructive tests to simulate file deletion and process exit operations; In each test of the Service Special Test Module, the Joint Test Module, and the Multi-scenario Comprehensive Test Module, if the test fails, regression testing is carried out starting from the failed step until all test items pass.

10. The system according to claim 9, wherein The Service Special Test Module includes a unit test sub-module. The unit test sub-module conducts unit tests on the services provided by each layer using the white-box testing method, designs test cases based on the service function design documents of each service, and achieves decision coverage, condition coverage, and path coverage, including: Code Block Analysis Unit, which is used to clarify the internal structure, function logic, and input and output requirements of the corresponding software code block according to the design document of each service function; Decision Coverage Test Unit, which is used to find all decision conditions in the code block and design test cases so that all possible results of each decision condition are at least tested once; Condition Coverage Test Unit, which is used to analyze each sub-condition in the decision condition in the code block and design test cases so that all possible result combinations of each sub-condition are tested; Path Coverage Test Unit, which is used to find all possible execution paths according to the program flow chart of the code block and design test cases to cover each execution path.

11. The system according to claim 9, wherein The Service Special Test Module includes a service integration test sub-module. The service integration test sub-module uses black-box testing technology to conduct integration tests on each service to verify the correctness of the service function interfaces and input and output, including: Interface test unit, used to check whether the interface definitions between service functions are consistent, including parameter types, number of parameters, and parameter order of the interfaces; Input / output test unit, used to input various legal and illegal test data to the service functions and check whether their outputs meet the expectations.

12. The system according to claim 9, wherein The combined test module includes: Correlation analysis unit, used to deeply analyze the correlation relationships between service functions, including data flow relationships and control dependency relationships; Test scenario design unit, used to determine different combinations of service functions to be tested based on these correlation relationships and form multiple test scenarios; the multiple test scenarios successively include real-time data processing and transmission service, real-time data processing and transmission service plus one or more services in the control algorithm layer, real-time data processing and transmission service plus one or more services in the control algorithm layer, and one or more services in the control algorithm layer; Test scenario execution unit, used to conduct detailed tests on each combination of service functions according to the designed test scenarios. During the test process, record the input data, expected output, and actual output results of each test case, and compare whether the actual output control strategy is consistent with the expectation.

13. The system according to claim 9, wherein The multi-scenario comprehensive test module includes a system integration test sub-module, used to conduct system-level integration tests. The test process is as follows: Use a dedicated test tool or software to simulate the input of real-time measurement data, input the simulated real-time measurement data into the entire automatic generation control system, and the system performs operations and control operations according to the pre-set control strategy to verify whether the output control strategy of the system is reasonable.

14. The system according to claim 9, wherein The multi-scenario comprehensive test module includes an independent test sub-module for abnormal prevention and error-proofing strategies. The independent test sub-module for abnormal prevention and error-proofing strategies includes: External measurement data test unit, used to modify the simulated external measurement data to make it abnormal, and observe whether the abnormal prevention and error-proofing strategy of the system can correctly identify these abnormal data and take corresponding measures; Control object test unit, used to simulate the control object having a fault or abnormal state, and check whether the abnormal prevention and error-proofing strategy of the system can detect the abnormality of the control object in time and adjust the control strategy; Graphical interface test unit, used to simulate the operator performing abnormal operations on the system graphical interface, and verify whether the abnormal prevention and error-proofing strategy of the system can prevent the execution of these illegal operations, or can promptly restore the system to a safe state after the operation is executed and send corresponding warning messages to the operator.

15. The system according to claim 9, wherein The multi-scenario comprehensive test module includes an external system abnormality test sub-module. The external system abnormality test sub-module includes: Platform abnormality test unit, used to simulate the failure of the basic platform of the dispatching control system and check whether the automatic generation control system can maintain basic operating functions in this case; Operating system test unit, used to simulate the failure of the operating system and observe the performance of the automatic generation control system when the operating system is abnormal.

16. The system according to claim 9, wherein The multi-scenario comprehensive test module includes a system destructive test sub-module. The system destructive test sub-module includes: A file deletion test unit, which is used to attempt to delete important files on which the operation of the automatic generation control system depends in a test environment, including the real-time library file of the automatic generation control function, the hierarchical library file of the automatic generation control function, and the dynamic library on which the automatic generation control function depends, and check the reaction of the system after the files are deleted; A process exit test unit, which is used to forcibly terminate key processes in the automatic generation control system, including the core control process of the automatic generation control function, and observe how the system handles the unexpected exit of the process.

17. An electronic device, characterized in that, Comprising: One or more processors; A memory; And one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and when the programs are executed by the processors, the automatic test method for the automatic generation control function described in any one of claims 1-8 is implemented.

18. A computer-readable storage medium, on which a computer program is stored, characterized in that, When the computer program is executed by the processor, the automatic test method for the automatic generation control function described in any one of claims 1-8 is implemented.