CMS client protocol testing method, system, device and storage medium

Through the automated CMS client protocol testing method and system, the problem of heavy workload in substation secondary system communication protocol testing is solved, an efficient and automated testing process is realized, and test consistency and wide-coverage test results are ensured.

CN115333985BActive Publication Date: 2024-09-03CHINA ELECTRIC POWER RESEARCH INSTITUTE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211064380.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-31
Publication Date
2024-09-03
Estimated Expiration
2042-08-31

AI Technical Summary

Technical Problem

The workload of substation secondary system communication protocol testing is huge, and it is necessary to manually record the test steps, input and output, and test conclusions of each test case, resulting in low test efficiency and difficulty in ensuring consistency.

Method used

Provide CMS client protocol testing methods and systems, select test cases through automatic analysis, perform automatic testing, record the testing process and generate test reports, reducing manual intervention and improving testing efficiency and consistency.

Benefits of technology

It realizes automated testing of the equipment under test, reduces tester intervention and workload, improves testing efficiency and consistency, covers all types of devices in the new generation substation, and supports positive and negative testing of various services on the server side. , ensuring test consistency and informative reporting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115333985B
    Figure CN115333985B
Patent Text Reader

Abstract

A CMS client protocol testing method, system, device and storage medium, the method comprising: setting test data for the device under test; setting services for the device under test; automatically analyzing and selecting test cases to be executed for the device under test that has completed the test data and service settings; performing automatic testing according to the selected test cases, recording the test process, giving test conclusions, and finding test problems; exporting the test process, test conclusions and test problems, and generating a test report. The present invention can automatically test the consistency compliance of the client under test, thereby reducing the intervention and testing workload of testers, and effectively improving the client automation test level and test efficiency. It covers all types of devices in the new generation of substations, supports positive and negative tests and security tests of 57 services on the server side, and the test report covers relatively rich information, making it easy to analyze the test problems found.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of substation secondary system communication testing, and in particular relates to a CMS (substation secondary system communication message) client protocol testing method, system, equipment and storage medium. Background Art

[0002] Substation refers to the place in the power system where voltage and current are transformed, electric energy is received and distributed. The electrical equipment in the substation is divided into primary equipment and secondary equipment. Primary equipment refers to equipment that directly produces, transmits, distributes and uses electric energy, and secondary equipment refers to equipment that measures, monitors, controls and protects the operating conditions of primary equipment and systems. It mainly includes relay protection devices, automatic devices, measurement and control devices, metering devices, automation systems and DC equipment that provides power to secondary equipment. The secondary system of the substation is an important part of ensuring the safe operation of the power grid. At present, the chips of the secondary equipment used in power production, operation and management rely heavily on imports, and the security of the supply chain is highly uncontrollable.

[0003] The power industry is an industrial sector that converts primary energy into electrical energy through power generation facilities, and then supplies it to users as energy through transmission, transformation and distribution systems. It mainly includes power generation, transmission, transformation, distribution, and power consumption. Among them, substations are the assembly points for transmission and distribution, and are an important link in the power industry. Substations contain a large number of primary equipment, secondary equipment, and the primary and secondary systems they consist of. In addition to the fact that the chips of secondary equipment are largely dependent on imports, the underlying communication of the substation secondary system that complies with the 61850 specification also relies on the international MMS (Manufacturing Message Specification) protocol.

[0004] The client corresponds to the server and is the party that sends the request. It is generally installed on an ordinary client and needs to cooperate with the server to run. The substation secondary system communication message (CMS) based on the DL / T860 standard is an autonomous and controllable protocol specification, which is mainly used for communication between secondary equipment in the substation. The DL / T860 standard mainly includes DL / T860.3 (Power Automation Communication Network and System Part 3: General Requirements), DL / T860.3 (Power Automation Communication Network and System Part 4: System and Project Management), DL / T860.5 (Power Automation Communication Network and System Part 5: Functional Communication Requirements and Device Models), DL / T860.6 (Power Automation Communication Network and System Part 6: Communication Configuration Description Language in Substations Related to Intelligent Electronic Devices), DL / T860.72 (Power Automation Communication Network and System Part 7: Communication Configuration Description Language in Substations Related to Intelligent Electronic Devices). Part 7-2: Basic information and communication structure - Abstract Communication Service Interface (ACSI)), DL / T860.73 (Electric power automation communication network and system Part 7-3: Basic communication structure common data class), DL / T860.74 (Electric power automation communication network and system Part 7-4: Basic information and communication structure - Logical node and data object class), DL / T860.10 (Electric power automation communication network and system Part 10: Conformance test), etc., among which the substation secondary system communication message is a communication mechanism implemented based on DL / T860.72.

[0005] There are many types of secondary equipment in substations, including protection, monitoring, measurement, recording, switches, auxiliary control and other types of devices. Multiple manufacturers produce multiple types of devices. Communication between devices must be based on the same protocol and the functional specifications implemented must be consistent to achieve smooth interconnection and interoperability. To ensure high consistency, professional centralized testing must be carried out. However, due to the large number of manufacturers and types of devices, the communication protocol of the substation secondary system includes 57 communication services. Each service needs to be tested by a variety of positive and negative test cases. It is necessary to record the test steps, input and output, test questions, test messages, test conclusions of each test case, and automatically generate test reports, etc., which is a huge workload. Summary of the invention

[0006] The purpose of the present invention is to provide a CMS client protocol testing method, system, device and storage medium to address the problems in the above-mentioned prior art, so as to automatically test the consistency compliance of the client under test, thereby reducing the intervention and testing workload of testers and effectively improving the client automation testing level and testing efficiency.

[0007] In order to achieve the above object, the present invention has the following technical solutions:

[0008] In a first aspect, a CMS client protocol testing method is provided, comprising:

[0009] Test data setting of the device under test;

[0010] Service settings of the device under test;

[0011] For the equipment under test that has completed the test data and service settings, it automatically analyzes and selects the test cases that need to be executed;

[0012] Perform automatic testing based on the selected test cases, record the test process, give test conclusions, and identify test problems;

[0013] Export the test process, test conclusions and test issues, and generate a test report.

[0014] As a preferred solution of the CMS client protocol testing method of the present invention, in the step of setting the test data of the device under test, the test data includes pre-set test data and dynamically generated test data;

[0015] The pre-set test data includes the IP address of the device under test, the data types supported by the device under test, the number of data sets that can be created, the index of the readable and writable data sets, the supported remote control modes and control points, the report triggering method, the log triggering method, and the data related to the operability file path;

[0016] Dynamically generated test data is generated based on the data type, current value, maximum value, minimum value and step size.

[0017] As a preferred solution of the CMS client protocol testing method of the present invention, in the step of setting the service of the device under test, the service setting specifically includes selecting the service type supported by the device under test and verifying it according to the test data. If the corresponding test data is not configured, it is considered that the selected service type is not supported.

[0018] As a preferred solution of the CMS client protocol testing method of the present invention, the service type is selected from 57 service types specified in the substation secondary system communication message specification.

[0019] As a preferred solution of the CMS client protocol testing method of the present invention, the automatic test performed according to the selected test case is divided into positive test and negative test, and the specific steps include:

[0020] a) Positive Test

[0021] a1. After starting the forward test and message monitoring, organize the service list and judgment basis according to the selected test case;

[0022] a2. Test server records interaction frames;

[0023] a3. The device under test performs various service operations according to the service list;

[0024] a4. After the service operation is completed, stop testing and stop recording interaction frames;

[0025] a5. Analyze the recorded interaction frames, filter out the services to be verified by the test case, analyze the service information, and determine whether they meet the test case requirements. If so, the test case passes, and then obtain the judgment basis for the next test case to complete the testing of all selected test cases;

[0026] b) Negative test

[0027] b1. The device under test selects the test case for the entire set of tests;

[0028] b2. After starting negative testing and message monitoring, organize a negative test list for various services based on the selected test cases;

[0029] b3. The test server sets a negative test response to the service to be tested according to the test case sequence;

[0030] b4. The device under test makes a service request as prompted;

[0031] b5. Test the server to make a specified negative response;

[0032] b6. Verify the communication status of the device under test after receiving a negative response;

[0033] b7. Perform the next negative test of the service and repeat steps b3 to b6. After all negative tests are completed, draw a conclusion on the test case;

[0034] b8. Perform the next test case test and repeat steps b3 to b7. Stop the test after all test cases are completed.

[0035] In a second aspect, a CMS client protocol testing system is provided, comprising:

[0036] Test data setting module, used for setting test data of the device under test;

[0037] Service setting module, used for service setting of the device under test;

[0038] The test case selection module is used to automatically analyze and select the test cases that need to be executed for the device under test that has completed the test data and service settings;

[0039] Automatic testing module, used to perform automatic testing according to the selected test cases, record the test process, give test conclusions, and find test problems;

[0040] The test report generation module is used to export the test process, test conclusions and test problems, and generate a test report.

[0041] As a preferred solution of the CMS client protocol test system of the present invention, the device under test test data set by the test data setting module includes pre-set test data and dynamically generated test data;

[0042] The pre-set test data includes the IP address of the device under test, the data types supported by the device under test, the number of data sets that can be created, the index of the readable and writable data sets, the supported remote control modes and control points, the report triggering method, the log triggering method, and the data related to the operability file path;

[0043] Dynamically generated test data is generated based on the data type, current value, maximum value, minimum value and step size.

[0044] As a preferred solution of the CMS client protocol test system of the present invention, the service setting module selects the service type supported by the device under test and verifies it according to the test data. If the corresponding test data is not configured, it is considered that the selected service type is not supported.

[0045] As a preferred solution of the CMS client protocol test system of the present invention, when the service setting module selects the service type supported by the device under test, it selects from 57 service types specified in the substation secondary system communication message specification.

[0046] As a preferred solution of the CMS client protocol testing system of the present invention, the automatic testing module performs automatic testing according to the selected test case and is divided into positive testing and negative testing. The specific steps include:

[0047] a) Positive Test

[0048] a1. After starting the forward test and message monitoring, organize the service list and judgment basis according to the selected test case;

[0049] a2. Test server records interaction frames;

[0050] a3. The device under test performs various service operations according to the service list;

[0051] a4. After the service operation is completed, stop testing and stop recording interaction frames;

[0052] a5. Analyze the recorded interaction frames, filter out the services to be verified by the test case, analyze the service information, and determine whether they meet the test case requirements. If so, the test case passes, and then obtain the judgment basis for the next test case to complete the testing of all selected test cases;

[0053] b) Negative test

[0054] b1. The device under test selects the test case for the entire set of tests;

[0055] b2. After starting negative testing and message monitoring, organize a negative test list for various services based on the selected test cases;

[0056] b3. The test server sets a negative test response to the service to be tested according to the test case sequence;

[0057] b4. The device under test makes a service request as prompted;

[0058] b5. Test the server to make a specified negative response;

[0059] b6. Verify the communication status of the device under test after receiving a negative response;

[0060] b7. Perform the next negative test of the service and repeat steps b3 to b6. After all negative tests are completed, draw a conclusion on the test case;

[0061] b8. Perform the next test case test and repeat steps b3 to b7. Stop the test after all test cases are completed.

[0062] According to a third aspect, an electronic device is provided, including:

[0063] a memory storing at least one instruction; and

[0064] The processor executes the instructions stored in the memory to implement the CMS client protocol testing method.

[0065] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the CMS client protocol testing method is implemented.

[0066] Compared with the prior art, the first aspect of the present invention has at least the following beneficial effects:

[0067] For the tested equipment that has completed the test data and service settings, the test cases to be executed are automatically analyzed and selected, and the automatic test is performed according to the selected test cases, the test process is recorded, the test conclusion is given, and the test problems are found. It is easy to analyze and the execution process has a high degree of automation. The method of the present invention performs the service setting of the tested equipment, which can cover all types of devices in the new generation of substations, and supports the affirmative, negative and safety tests of various services on the server side. The test consistency is good. For the input under certain conditions, the corresponding output is required to be returned, and the response is automatically judged whether it meets the substation secondary system communication message regulations. The test process and judgment basis are the same for all the tested equipment and tested servers, and the tested equipment and servers have high compliance. Finally, the test process, test conclusion and test problems are derived, and a test report is generated. For each test case, the present invention records the input and output of the test, the interaction process and interaction results (positive and negative responses) in chronological order, the judgment results of each step, and the final result. The test report covers a relatively rich information, and the test problems found are easy to analyze.

[0068] It can be understood that the beneficial effects of the second to fourth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0070] Figure 1 Flow chart of the CMS client protocol testing method according to an embodiment of the present invention;

[0071] Figure 2 A flowchart of an embodiment of the present invention performing a positive test according to a selected test case;

[0072] Figure 3 A flowchart of an embodiment of the present invention executing a negative test case according to a selected test case;

[0073] Figure 4 A structural block diagram of a CMS client protocol testing system according to an embodiment of the present invention. DETAILED DESCRIPTION

[0074] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0075] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0076] The substation secondary system communication message is a communication service mechanism based on the DL / T860 standard, which specifies the mapping implementation methods of various abstract services, namely, the message headers, data formats, encoding methods, and correct and incorrect response mechanisms of both parties when the client and the server interact. Each manufacturer must correctly and uniformly implement requests and responses based on the substation secondary system communication message to ensure the interconnection and interoperability of the equipment. The present invention implements a client automatic test solution to test the consistency compliance of the tested client, thereby reducing the intervention of testers and the test workload, and improving the level of automated testing and test efficiency.

[0077] Example 1

[0078] See also Figure 1 , a CMS client protocol testing method proposed in an embodiment of the present invention includes:

[0079] S1. Test data setting of the device under test;

[0080] S2, service settings of the device under test;

[0081] S3. Automatically analyze and select the test cases to be executed for the tested device that has completed the test data and service settings;

[0082] S4. Perform automatic testing according to the selected test case, record the test process, give test conclusions, and find out test problems;

[0083] S5. Export the test process, test conclusions and test problems, and generate a test report.

[0084] In a possible implementation, the test data set in step S1 includes two types, namely, pre-set test data and dynamically generated test data. Some services only require one of the two methods, while some services require both methods.

[0085] 1) Preconfigure test parameters

[0086] There are many types of devices under test, and each type of device may support different services. The model index of the same type of device may also be different. Therefore, some service tests require the manufacturer to configure the data index to be able to test and judge normally. In addition, relevant test data will be automatically selected or generated during automatic testing. Pre-configured service parameters include:

[0087] Parameters such as the IP address of the device under test, the data types supported by the device under test, the number of data sets that can be created, the index of the readable and writable data sets, the supported remote control modes and control points, the report triggering method, the log triggering method, the operability file path, etc.

[0088] 2) Dynamically generated test data

[0089] It is generated according to the data type, current value, maximum value, minimum value and step size. For example, for BOOL data, if the current value is FALSE, the test data is TRUE when it needs to change, and FALSE when it does not need to change. For integer data INT8, the test data is the current value plus or minus the step size, and cannot exceed the range specified by the maximum and minimum values. If the maximum value is 100, the minimum value is 0, the step size is 2, and the current value is 3, then the test data may be 3+2, and so on for other data types. In addition, boundary data and abnormal data are also used in the test.

[0090] In one possible implementation, when performing service settings in step S2, the service type supported by the device under test is selected and verified according to the test data configured by the manufacturer. If the corresponding test data is not configured, it is considered that the service is not supported. For example, if the device under test supports the write data service but no writable data is configured, it is considered that the write service is not supported.

[0091] Furthermore, a selection is made from 57 service types specified in the substation secondary system communication message specification.

[0092] The 57 services specified in the substation secondary system communication message specification are as follows:

[0093] 1) Association negotiation service

[0094] Associate, Abort, Release, AssociateNegotiate;

[0095] 2) Model and data services

[0096] GetServerDirectory, GetLogicDeviceDirectory, GetLogicNodeDirectory, GetAllDataValues, GetAllDataDefinition, GetAllCBValues, GetDataValues, SetDataValues, GetDataDirectory, GetDataDefinition;

[0097] 3) Data set service

[0098] CreateDataSet, DeleteDataSet, GetDataSetDirectory, GetDataSetValues, SetDataSetValues;

[0099] 4) Control service

[0100] Select, SelectWithValue, Cancel, Operate, CommandTermination, TimeActivatedOperate, TimeActivatedOperateTermination;

[0101] 5) Setting group service

[0102] SelectActiveSG, SelectEditSG, SetEditSGValue, ConfirmEditSGValues, GetEditSGValue, GetSGCBValues;

[0103] 6) Report service

[0104] Report, GetBRCBValues, SetBRCBValues, GetURCBValues, SetURCBValues;

[0105] 7) Log service

[0106] GetLCBValues, SetLCBValues, QueryLogByTime, QueryLogAfter, GetLogStatusValues;

[0107] 8) GOOSE control block service

[0108] GetGoCBValues, SetGoCBValues;

[0109] 9)MSV control block service

[0110] GetMSVCBValues,SetMSVCBValues;

[0111] 10) Document Services

[0112] GetFile, SetFile, DeleteFile, GetFileAttributeValues, GetFileDirectory;

[0113] 11) Remote Procedure Call

[0114] GetRpcInterfaceDirectory, GetRpcMethodDIrectory, GetRpcInterfaceDefinition, GetRpcMethodDefinition, RpcCall;

[0115] 12) Testing

[0116] Test.

[0117] In a possible implementation manner, after the device under test has set the test data and services in step S3, the test method automatically analyzes the available test cases, automatically selects the test cases for display, and may also add or remove the test cases that need to be executed.

[0118] In a possible implementation, step S4 executes each test case sequentially according to the selected test case, and after a test case is executed individually, a test conclusion is given, such as passed, failed, not applicable, not tested, etc.

[0119] See also Figure 2 and Figure 3 In a possible implementation, step S4 performs automatic testing according to the selected test case, which is divided into positive testing and negative testing. The specific steps include:

[0120] a) Positive Test

[0121] a1. After starting the forward test and message monitoring, organize the service list and judgment basis according to the selected test case;

[0122] a2. Test server records interaction frames;

[0123] a3. The device under test performs various service operations according to the service list;

[0124] a4. After the service operation is completed, stop testing and stop recording interaction frames;

[0125] a5. Analyze the recorded interaction frames, filter out the services to be verified by the test case, analyze the service information, and determine whether they meet the test case requirements. If so, the test case passes, and then obtain the judgment basis for the next test case to complete the testing of all selected test cases;

[0126] b) Negative test

[0127] b1. The device under test selects the test case for the entire set of tests;

[0128] b2. After starting negative testing and message monitoring, organize a negative test list for various services based on the selected test cases;

[0129] b3. The test server sets a negative test response to the service to be tested according to the test case sequence;

[0130] b4. The device under test makes a service request as prompted;

[0131] b5. Test the server to make a specified negative response;

[0132] b6. Verify the communication status of the device under test after receiving a negative response;

[0133] b7. Perform the next negative test of the service and repeat steps b3 to b6. After all negative tests are completed, draw a conclusion on the test case;

[0134] b8. Perform the next test case test and repeat steps b3 to b7. Stop the test after all test cases are completed.

[0135] In a possible implementation, step S5 records the entire test process and test questions in detail and stores them in a database. When the test is finished, the required report format can be exported according to the exported report template.

[0136] Compared with the prior art, the CMS client protocol testing method proposed in the embodiment of the present invention has the following advantages:

[0137] 1. High degree of automation

[0138] Based on the selected device type and data model, the data used is pre-configured, the test system automatically executes all test cases, and automatically records the input, output and service processes. It automatically analyzes whether the received positive and negative responses, data types, data formats, and data ranges are correct based on the sent requests. It automatically records and displays problems, interactive messages, etc., and can export relevant records and problems for easy analysis.

[0139] 2. Comprehensive test coverage

[0140] It covers all types of devices in the new generation of substations, supports positive and negative tests and security tests of 57 services on the server side, and has more than 260 test cases, each of which contains multiple test processes, which is quite rich. It covers protection, monitoring, measurement and control, metering, recording, switches, auxiliary control and other device types; positive tests include different forward parameters, different data types, different services and combination test cases; negative tests include value range, boundary, disorder, repetition, quantity mismatch, type mismatch, coding error and other test cases; security tests include transport layer, application layer and other test cases.

[0141] 3. Good test consistency

[0142] The test cases covered during automatic testing are relatively comprehensive. For inputs under certain conditions, the corresponding outputs are required to be returned, and the response is automatically judged whether it complies with the substation secondary system communication message regulations. The test process and judgment basis are the same for all tested devices and servers, and the tested devices and servers have a high degree of compliance.

[0143] 4. Rich record information

[0144] For each test case, the test input and output, the interaction process and interaction results (positive and negative responses) in chronological order, the analysis results of each step, and the final result are recorded and distinguished by different colors. The underlying interactive messages can also be exported. Test records are also recorded. Tester information, environmental information, etc. are relatively rich in information, which makes it easy to analyze the test problems found.

[0145] Example 2

[0146] See also Figure 4 Another embodiment of the present invention further provides a CMS client protocol testing system, including:

[0147] Test data setting module 1, used for setting test data of the device under test;

[0148] Service setting module 2, used for service setting of the device under test;

[0149] The test case selection module 3 is used to automatically analyze and select the test cases to be executed for the device under test that has completed the test data and service settings;

[0150] Automatic test module 4, used to perform automatic testing according to the selected test case, record the test process, give test conclusions, and find test problems;

[0151] The test report generation module 5 is used to export the test process, test conclusions and test problems and generate a test report.

[0152] In a possible implementation manner, the device under test test data set by the test data setting module 1 includes pre-set test data and dynamically generated test data;

[0153] The pre-set test data includes the IP address of the device under test, the data types supported by the device under test, the number of data sets that can be created, the index of the readable and writable data sets, the supported remote control modes and control points, the report triggering method, the log triggering method, and the data related to the operability file path;

[0154] Dynamically generated test data is generated based on the data type, current value, maximum value, minimum value and step size.

[0155] In a possible implementation, the service setting module 2 selects a service type supported by the device under test and performs verification according to the test data. If the corresponding test data is not configured, it is considered that the selected service type is not supported.

[0156] Furthermore, when the service setting module 2 selects the service type supported by the device under test, it selects from 57 service types specified in the substation secondary system communication message specification.

[0157] In a possible implementation manner, the automatic test module 4 performs automatic testing according to the selected test case, which is divided into positive testing and negative testing. The specific steps include:

[0158] a) Positive Test

[0159] a1. After starting the forward test and message monitoring, organize the service list and judgment basis according to the selected test case;

[0160] a2. Test server records interaction frames;

[0161] a3. The device under test performs various service operations according to the service list;

[0162] a4. After the service operation is completed, stop testing and stop recording interaction frames;

[0163] a5. Analyze the recorded interaction frames, filter out the services to be verified by the test case, analyze the service information, and determine whether they meet the test case requirements. If so, the test case passes, and then obtain the judgment basis for the next test case to complete the testing of all selected test cases;

[0164] b) Negative test

[0165] b1. The device under test selects the test case for the entire set of tests;

[0166] b2. After starting negative testing and message monitoring, organize a negative test list for various services based on the selected test cases;

[0167] b3. The test server sets a negative test response to the service to be tested according to the test case sequence;

[0168] b4. The device under test makes a service request as prompted;

[0169] b5. Test the server to make a specified negative response;

[0170] b6. Verify the communication status of the device under test after receiving a negative response;

[0171] b7. Perform the next negative test of the service and repeat steps b3 to b6. After all negative tests are completed, draw a conclusion on the test case;

[0172] b8. Perform the next test case test and repeat steps b3 to b7. Stop the test after all test cases are completed.

[0173] In order to reduce the intervention of testers, realize automatic testing, and improve work efficiency, the present invention provides necessary rich and varied test parameters through pre-configuration and dynamic methods. The services covered by the test cases are relatively comprehensive, and the test automation can be realized according to the configuration. The test consistency is good, and almost all tests are automatic, ensuring that the test process of the same service of different types of devices is almost the same. The record information is rich, and the entire test process, input and output data, test messages, test results, etc. can be recorded. The degree of automation is relatively high, and the entire test process hardly requires the intervention of testers.

[0174] Example 3

[0175] Another embodiment of the present invention further provides an electronic device, including:

[0176] a memory storing at least one instruction; and

[0177] The processor executes the instructions stored in the memory to implement the CMS client protocol testing method.

[0178] Example 4

[0179] Another embodiment of the present invention further 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 CMS client protocol testing method is implemented.

[0180] The computer program includes computer program code, which may be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may include: any entity or device, medium, USB flash drive, mobile hard disk, disk, optical disk, computer memory, read-only memory, random access memory, electric carrier signal, telecommunication signal and software distribution medium, etc. that can carry the computer program code. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals. For ease of explanation, the above content only shows the part related to the embodiment of the present invention. For specific technical details not disclosed, please refer to the method part of the embodiment of the present invention. The computer-readable storage medium is non-temporary and can be stored in a storage device formed by various electronic devices, which can realize the execution process recorded in the method of the embodiment of the present invention.

[0181] Those skilled in the art will appreciate 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. Moreover, 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 program code.

[0182] 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 process in the flowchart. 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.

[0183] 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.

[0184] 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 A step that specifies a function in one or more boxes.

[0185] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A CMS client protocol testing method, characterized in that: include: Test data setting of the client under test; The client service settings under test; For the tested client that has completed the test data and service settings, automatically analyze and select the test cases that need to be executed; Perform automatic testing based on the selected test cases, record the test process, give test conclusions, and identify test problems; Export the test process, test conclusions and test problems, and generate a test report; The automatic test performed according to the selected test case is divided into positive test and negative test, and the specific steps include: a) Positive Test a1. After starting the forward test and message monitoring, organize the service list and judgment basis according to the selected test case; a2. Test server records interaction frames; a3. The client under test performs various service operations according to the service list; a4. After the service operation is completed, stop testing and stop recording interaction frames; a5. Analyze the recorded interaction frames, filter out the services to be verified by the test case, analyze the service information, and determine whether they meet the test case requirements. If so, the test case passes, and then obtain the judgment basis for the next test case to complete the testing of all selected test cases; b) Negative testing b1. The client under test selects the test case for the entire set of tests; b2. After starting negative testing and message monitoring, organize a negative test list for various services based on the selected test cases; b3. The test server sets a negative test response to the service to be tested according to the test case sequence; b4. The client under test makes service requests according to the prompts; b5. Test the server to make a specified negative response; b6. Verify the communication status of the client under test after receiving a negative response; b7. Perform the next negative test of the service and repeat steps b3 to b6. After all negative tests are completed, draw a conclusion on the test case; b8. Test the next test case, repeat steps b3 to b7, and stop testing after all test cases are completed; The CMS client protocol testing method is used to realize automatic protocol consistency testing of the tested client, test the consistency compliance of the tested client, require the return of corresponding output for input under certain conditions, and automatically judge whether the response complies with the substation secondary system communication message regulations; The CMS is a substation secondary system communication message; The substation secondary system communication message is a communication service mechanism based on the DL / T860 standard, which specifies the mapping implementation methods of multiple abstract services, including the message headers, data formats, encoding methods, and correct and incorrect response mechanisms of both parties when the client and server interact. In the step of setting the test data of the tested client, the test data includes pre-set test data and dynamically generated test data; The pre-set test data includes the IP address of the client under test, the data types supported by the client under test, the number of data sets that can be created, the index of the readable and writable data sets, the supported remote control modes and control points, the report triggering method, the log triggering method, and the data related to the operability file path; Dynamically generated test data is generated based on data type, current value, maximum value, minimum value and step size; In the step of setting the service of the client under test, the service setting specifically includes selecting the service type supported by the client under test and verifying it according to the test data. If the corresponding test data is not configured, it is considered that the selected service type is not supported; The service type is selected from 57 service types specified in the substation secondary system communication message specification.

2. A CMS client protocol testing system, characterized in that: include: Test data setting module, used for testing data setting of the client under test; Service setting module, used for testing client service setting; The test case selection module is used to automatically analyze and select the test cases that need to be executed for the tested client that has completed the test data and service settings; Automatic testing module, used to perform automatic testing according to the selected test cases, record the test process, give test conclusions, and find test problems; Test report generation module, used to export test process, test conclusions and test problems, and generate test reports; The automatic test module performs automatic testing according to the selected test case, which is divided into positive testing and negative testing. The specific steps include: a) Positive Test a1. After starting the forward test and message monitoring, organize the service list and judgment basis according to the selected test case; a2. Test server records interaction frames; a3. The client under test performs various service operations according to the service list; a4. After the service operation is completed, stop testing and stop recording interaction frames; a5. Analyze the recorded interaction frames, filter out the services to be verified by the test case, analyze the service information, and determine whether they meet the test case requirements. If so, the test case passes, and then obtain the judgment basis for the next test case to complete the testing of all selected test cases; b) Negative testing b1. The client under test selects the test case for the entire set of tests; b2. After starting negative testing and message monitoring, organize a negative test list for various services based on the selected test cases; b3. The test server sets a negative test response to the service to be tested according to the test case sequence; b4. The client under test makes service requests according to the prompts; b5. Test the server to make a specified negative response; b6. Verify the communication status of the client under test after receiving a negative response; b7. Perform the next negative test of the service and repeat steps b3 to b6. After all negative tests are completed, draw a conclusion on the test case; b8. Test the next test case, repeat steps b3 to b7, and stop testing after all test cases are completed; The CMS client protocol test system is used to automatically test the protocol consistency of the tested client, test the consistency compliance of the tested client, require the corresponding output to be returned for input under certain conditions, and automatically judge whether the response complies with the substation secondary system communication message regulations; The CMS is a substation secondary system communication message; The substation secondary system communication message is a communication service mechanism based on the DL / T860 standard, which specifies the mapping implementation methods of multiple abstract services, including the message headers, data formats, encoding methods, and correct and incorrect response mechanisms of both parties when the client and server interact. In the step of setting the test data of the tested client, the test data includes pre-set test data and dynamically generated test data; The pre-set test data includes the IP address of the client under test, the data types supported by the client under test, the number of data sets that can be created, the index of the readable and writable data sets, the supported remote control modes and control points, the report triggering method, the log triggering method, and the data related to the operability file path; Dynamically generated test data is generated based on data type, current value, maximum value, minimum value and step size; In the step of setting the service of the client under test, the service setting specifically includes selecting the service type supported by the client under test and verifying it according to the test data. If the corresponding test data is not configured, it is considered that the selected service type is not supported; When the service setting module selects the service type supported by the tested client, it selects from 57 service types specified in the substation secondary system communication message specification.

3. An electronic device, characterized in that: include: A memory storing at least one instruction; and A processor executes instructions stored in the memory to implement the CMS client protocol testing method as claimed in claim 1.

4. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the CMS client protocol testing method as claimed in claim 1 is implemented.