Test case generation method and device, equipment, readable storage medium and program product
By obtaining the data source information and test tool information of smart substation equipment, test cases are automatically generated, which solves the problem of poor reliability of manual generation and improves the reliability and efficiency of test case generation.
Patent Information
- Application Number
- CN202510627246.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-15
- Publication Date
- 2025-10-17
AI Technical Summary
In the existing technology, test case generation for smart substations relies on manual operations, resulting in poor generation reliability and the risk of configuration errors.
By obtaining the first data source information and target test model of the target device in the smart substation, as well as the second data source information of the test tool corresponding to the target device, test cases are automatically generated to avoid manual generation.
It realizes the automatic generation of test cases, improves the generation reliability, reduces the risk of errors in manual operations, and improves the efficiency and accuracy of smart substation equipment testing.
Smart Images

Figure CN120803903A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of intelligent substation testing, and in particular to a test case generation method and device, equipment, a readable storage medium and a program product. BACKGROUND
[0002] With the development of science and technology, in order to realize the intelligent management of power grid operation, an intelligent substation is generated, and in order to improve the operation reliability of the intelligent substation, the intelligent substation needs to be tested through test cases.
[0003] In the related art, the generation of test cases is usually completed by manual according to a large amount of configuration information, but the test cases generated by this method have the problem of poor generation reliability. SUMMARY
[0004] Therefore, it is necessary to provide a test case generation method, device, equipment, readable storage medium and program product capable of improving the generation reliability of test cases.
[0005] In a first aspect, the present application provides a test case generation method, comprising:
[0006] obtaining first data source information of a target device in an intelligent substation and a target test model corresponding to the target device;
[0007] obtaining second data source information of a test tool corresponding to the target device;
[0008] generating a test case according to the first data source information, the target test model and the second data source information, the test case being used for testing the target device.
[0009] In one of the embodiments, the generating of the test case according to the first data source information, the target test model and the second data source information comprises:
[0010] determining a target test template corresponding to the target device according to the target test model;
[0011] in response to the received test case generation instruction, generating the test case according to the target test template, the first data source information and the second data source information.
[0012] In one of the embodiments, the method further comprises:
[0013] obtaining device information of each device in the intelligent substation, the device information at least including a test model, a device model and device version information;
[0014] generating a plurality of test templates according to the device information of each device;
[0015] Determine the target test template corresponding to the target device based on the target test model, including:
[0016] According to the target test model, a target test template is determined from various test templates.
[0017] In one embodiment, the method further comprises:
[0018] Use the test tool to test the target device based on the test case and obtain the test information generated during the test process, including the test status and test case execution data;
[0019] Generate display information based on the test information and display the display information on the display interface.
[0020] In one embodiment, obtaining first data source information of a target device in a smart substation includes:
[0021] Obtain the fixed value file corresponding to the target device, and obtain the fixed value data source information corresponding to the target device according to the fixed value file;
[0022] Obtain the configuration description file corresponding to the smart substation, and obtain the non-fixed value data source information corresponding to the target device according to the configuration description file;
[0023] The fixed-value data source information and the non-fixed-value data source information are determined as the first data source information.
[0024] In one embodiment, the fixed value data source information includes a device fixed value parameter name and a fixed value parameter value of the target device;
[0025] The non-fixed value data source information includes at least one of a device version number, a device name, and a device model of the target device.
[0026] In a second aspect, the present application also provides a test case generation device, comprising:
[0027] A first acquisition module is used to obtain first data source information of a target device in the smart substation and a target test model corresponding to the target device;
[0028] A second acquisition module is used to obtain second data source information of the test tool corresponding to the target device;
[0029] The generating module is used to generate a test case according to the first data source information, the target test model and the second data source information, and the test case is used to test the target device.
[0030] In a third aspect, an embodiment of the present application provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method of the first aspect described above when executing the computer program.
[0031] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the method of the first aspect described above when the computer program is executed by a processor.
[0032] In a fifth aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of the method in the first aspect.
[0033] The test case generation method, apparatus, device, readable storage medium, and program product described above obtain first data source information of a target device in a smart substation and a target test model corresponding to the target device, and also obtain second data source information of a test tool corresponding to the target device, thereby generating a test case based on the first data source information, target test model, and second data source information. The test case is used to test the target device. In this way, by obtaining the first data source information and target test model corresponding to the target device to be tested in the smart substation, and then obtaining the second data source information corresponding to the test tool, a test case for testing the target device can be automatically generated based on the first data source information, target test model, and second data source information. This avoids the problem of poor reliability associated with the traditional technique of manually generating test cases based on massive amounts of configuration information. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments of the present application or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.
[0035] Figure 1 An application environment diagram of a test case generation method in one embodiment;
[0036] Figure 2 A flowchart of a test case generation method according to an embodiment;
[0037] Figure 3 203 is a flow chart of step 203 in one embodiment;
[0038] Figure 4A flowchart of an exemplary test case generation method in another embodiment;
[0039] Figure 5 A block diagram of a test case generation apparatus in an embodiment;
[0040] Figure 6 An internal structure diagram of a computer device in an embodiment. DETAILED DESCRIPTION
[0041] In order to make the purposes, technical solutions and advantages of the present application clearer, further detailed description will be made to the present application in combination with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not used to limit the present application.
[0042] With the development of science and technology, in order to realize the intelligent management of power grid operation, an intelligent substation is generated, and in order to improve the operation reliability of the intelligent substation, the intelligent devices in the intelligent substation need to be tested.
[0043] In the related art, the intelligent substation is tested by a test case. In the traditional technology, the test case is usually manually generated by an artificial. In the generation process of the test case, the artificial needs to manually check the massive configuration information of the device. The long operation process not only consumes time and effort, but also is prone to configuration errors and omissions due to too many artificial intervention links, and has the problem of poor generation reliability.
[0044] In view of this, the present application provides a test case generation method, apparatus, device, readable storage medium and program product. The first data source information of a target device in an intelligent substation and the target test model corresponding to the target device are obtained, and the second data source information of a test tool corresponding to the target device is also obtained, so as to generate a test case according to the first data source information, the target test model and the second data source information. The test case is used to test the target device. In this way, for the target device to be tested in the intelligent substation, the corresponding first data source information and target test model are obtained, and the second data source information corresponding to the test tool is also obtained. The test case for testing the target device can be automatically generated according to the first data source information, the target test model and the second data source information, avoiding the problem of poor reliability in the traditional technology that the test case needs to be manually generated by an artificial according to massive configuration information.
[0045] The test case generation method provided in the embodiments of the present application can be applied to, for example, Figure 1The application environment shown. The data storage system can store the data required by the server 101 to process. The data storage system can be integrated on the server 101, or placed on the cloud or other network servers. The server 101 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The server 101 is in communication connection with the target device 102 to be tested and the test tool 103, wherein the target device 102 can be a device in the smart substation waiting to be tested, and the test tool 103 can be a physical machine for testing the target device. The test tool 103 can include a lower machine, a module, and a tester.
[0046] In an exemplary embodiment, as shown, a test case generation method is provided. The method is applied to the server 101 in the smart substation as an example for illustration, which includes the following steps 201 to 203. Wherein: Figure 2 Figure 1 In an exemplary embodiment, as shown, a test case generation method is provided. The method is applied to the server 101 in the smart substation as an example for illustration, which includes the following steps 201 to 203. Wherein:
[0047] Step 201, obtaining the first data source information of the target device in the smart substation and the target test model corresponding to the target device.
[0048] In the embodiment of the application, the target device can be a device in the smart substation, and the server can obtain the first data source information corresponding to the target device. The first data source information can be related information of the target device.
[0049] In a possible implementation manner, the first data source information can include fixed value data source information and non-fixed value data source information of the target device. The fixed value data source information can include the device fixed value parameter name and the fixed value parameter value of the target device. It can be understood that the device fixed value parameter is associated with the function of the target device. For example, the target device can be a relay, and its corresponding device fixed value parameter can include voltage, power, etc. The non-fixed value data source information can be used to represent the device information of the target device. In the embodiment of the application, the non-fixed value data source information can include at least one of the device version number, the device name, and the device model number of the target device.
[0050] Based on this, the process of the server obtaining the first data source information of the target device in the smart substation can include obtaining the fixed value file corresponding to the target device, and obtaining the fixed value data source information corresponding to the target device according to the fixed value file; obtaining the configuration description file corresponding to the smart substation, and obtaining the non-fixed value data source information corresponding to the target device according to the configuration description file; and determining the fixed value data source information and the non-fixed value data source information as the first data source information.
[0051] Optionally, the server can obtain the pre-archived fixed value file and the configuration description file from the database, and optionally, the server can obtain the user-uploaded fixed value file and the configuration description file through an upload control on the upload interface. After obtaining the fixed value file, the server can automatically parse the fixed value file to obtain the customized data source information corresponding to the target device. After obtaining the configuration description file, the server can parse the non-fixed value data source information corresponding to the target device from the configuration description file.
[0052] In the embodiments of the present application, the server can also obtain a target test model corresponding to the target device. Optionally, the target test model can represent a test type. Optionally, the target test model can represent the number of a test template. It can be understood that the test template can be a standard test case. The server can generate a test template based on the first data source information and the second data source information, thereby generating a test case that meets the test requirements of the target device.
[0053] In a possible implementation, the server can directly obtain the target test model input by the user through the input control. In another possible implementation, the server can first obtain the test requirements corresponding to the target device and directly determine the target test model according to the test requirements.
[0054] Step 202: Obtain second data source information of a test tool corresponding to the target device.
[0055] The second data source information can be tool information (such as IP address, device model, etc.), current, voltage, etc. of the test tool. In a possible implementation, the server can directly obtain the second data source information from the database. In another possible implementation, the server can obtain the second data source information of the test tool in real time through the communication connection.
[0056] Step 203: Generate a test case according to the first data source information, the target test model, and the second data source information.
[0057] The test case is used to test the target device.
[0058] After obtaining the first data source information, the target test model, and the second data source information, the server can generate a test case according to the first data source information, the target test model, and the second data source information. Optionally, when the target test model represents a test type, the server can determine a target test template that meets the test type according to the target test model. Optionally, the target test model can represent the number of a test template, and the server can directly determine a target test template that matches the target test model from a plurality of candidate test templates.
[0059] Based on the above description, it can be known that the test template can be a standard test case, therefore, the server can generate the test case conforming to the test requirement of the target device based on the first data source information and the second data source information, and after obtaining the test case, the server can test the target device based on the test case through the test tool.
[0060] In a possible implementation, in order to meet the requirement of digital display of the test process, when the target device is tested based on the test case through the test tool, the server can obtain test information generated in the test process, generate display information according to the test information, and display the display information on a display interface, wherein the test information includes test status and test case execution data.
[0061] In the embodiments of the present application, the test status can be used to represent the test situation of the target device, such as that the target device is in the test, the test of the target device is completed, etc., and the test case execution data can be data generated in the test process of each device of the smart substation, such as the total number of the current test case, the number of devices in the test process, etc.
[0062] In the above embodiments, for the target device to be tested in the smart substation, the first data source information corresponding to the target device and the target test model are obtained, and then the second data source information corresponding to the test tool is obtained, so that the test case for testing the target device can be automatically generated according to the first data source information, the target test model and the second data source information, thereby avoiding the problem of poor reliability in the prior art that the test case needs to be manually generated according to a large amount of configuration information.
[0063] In one embodiment, based on the above Figure 2 As shown in the embodiment, referring to Figure 3 The present embodiment relates to the process of generating the test case according to the first data source information, the target test model and the second data source information. As shown in Figure 3 Step 301, the target test template corresponding to the target device is determined according to the target test model.
[0064] Step 301, the target test template corresponding to the target device is determined according to the target test model.
[0065] Step 302, in response to the received test case generation instruction, the test case is generated according to the target test template, the first data source information and the second data source information.
[0066] In the embodiments of the present application, the server can obtain a plurality of different test templates, and the different test templates correspond to different test types. Optionally, when a target test type is used to represent a test type, the server can determine a target test template corresponding to the test type according to the target test type. Optionally, the target test type can represent a number of a test template, and the server can directly determine a target test template matched with the target test type from a plurality of candidate test templates according to the target test type.
[0067] After the target test template is determined, the server can receive a test case generation instruction input by a user through an instruction input control, or receive a test case generation instruction generated by the system itself. In response to the test case generation instruction, the server can generate a test case according to the target test template, the first data source information, and the second data source information.
[0068] It can be understood that the test template is not fixed, and each test template needs to be updated when the equipment in the smart substation is updated. Therefore, the server can also generate a test template.
[0069] In a possible implementation, the server can obtain a template new creation instruction input by a user and device information of each device in the smart substation. In response to the template new creation instruction, the server can create a test template according to the device information of each device. In another possible implementation, the server can automatically obtain the device information of each device in the smart substation, and generate a plurality of test templates according to the device information, wherein the device information at least includes a test type, a device type, and device version information.
[0070] Based on the above description, it can be understood that the number of test templates is a plurality, and therefore, the process of determining a target test template corresponding to a target device according to a target test type can include: determining a target test template from each test template according to the target test type.
[0071] In one embodiment, referring to Figure 4 , an exemplary test case generation method is provided, which can be applied to a server in the implementation environment shown in Figure 1 .
[0072] Step 401: Obtain device information of each device in the smart substation.
[0073] The device information at least includes a test type, a device type, and device version information.
[0074] Step 402: Generate a plurality of test templates according to the device information of each device.
[0075] In step 403, the fixed value file corresponding to the target device is acquired, and the fixed value data source information corresponding to the target device is acquired according to the fixed value file.
[0076] In step 404, the configuration description file corresponding to the smart substation is acquired, and the non-fixed value data source information corresponding to the target device is acquired according to the configuration description file.
[0077] In step 405, the fixed value data source information and the non-fixed value data source information are determined as the first data source information.
[0078] The fixed value data source information includes at least one of the device fixed value parameter name and the fixed value parameter value of the target device, and the non-fixed value data source information includes at least one of the device version number, the device name and the device model of the target device.
[0079] In step 406, the target test model corresponding to the target device is acquired.
[0080] In step 407, the second data source information of the test tool corresponding to the target device is acquired.
[0081] In step 408, the target test template is determined from the test templates according to the target test model.
[0082] In step 409, the test case is generated according to the target test template, the first data source information and the second data source information in response to the received test case generation instruction.
[0083] The test case is used for testing the target device.
[0084] In step 410, the target device is tested based on the test case by the test tool, and the test information generated in the test process is acquired.
[0085] The test information includes the test state and the test case execution data.
[0086] In step 411, the display information is generated according to the test information, and the display information is displayed on the display interface.
[0087] It should be understood that although each step in the flowchart involved in the embodiments described above is shown in sequence according to the arrow, these steps are not necessarily executed in the order indicated by the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other orders. Moreover, at least part of the steps in the flowchart involved in the embodiments described above can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least part of other steps or steps or stages in other steps.
[0088] Based on the same inventive concept, the embodiments of the present application also provide a test case generation device for implementing the test case generation method described above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more test case generation device embodiments provided below can refer to the limitations of the test case generation method described above, which will not be repeated here.
[0089] In one exemplary embodiment, as shown in Figure 5 A test case generation device is provided, comprising: a first acquisition module 501, a second acquisition module 502, and a generation module 503, wherein:
[0090] The first acquisition module 501 is configured to acquire first data source information of a target device in a smart substation and a target test model corresponding to the target device.
[0091] The second acquisition module 502 is configured to acquire second data source information of a test tool corresponding to the target device.
[0092] The generation module 503 is configured to generate a test case according to the first data source information, the target test model, and the second data source information, wherein the test case is used for testing the target device.
[0093] In one embodiment, the generation module 503 comprises:
[0094] A determination unit is configured to determine a target test template corresponding to the target device according to the target test model.
[0095] A response generation unit is configured to generate the test case according to the target test template, the first data source information, and the second data source information in response to a received test case generation instruction.
[0096] In one embodiment, the test case generation device further comprises:
[0097] a template generation module, configured to acquire device information of each device in the smart substation, the device information at least including test type, device type and device version information; and generate a plurality of test templates according to the device information;
[0098] The determination unit is specifically configured to determine the target test template from the test templates according to the target test type.
[0099] In one embodiment, the test case generation apparatus further includes:
[0100] a test module, configured to test the target device based on the test case by using the test tool, and acquire test information generated in the test process, the test information including test status and test case execution data;
[0101] a display module, configured to generate display information according to the test information, and display the display information on a display interface.
[0102] In one embodiment, the first acquisition module 501 includes:
[0103] a fixed value acquisition unit, configured to acquire a fixed value file corresponding to the target device, and acquire fixed value data source information corresponding to the target device according to the fixed value file;
[0104] a non-fixed value acquisition unit, configured to acquire a configuration description file corresponding to the smart substation, and acquire non-fixed value data source information corresponding to the target device according to the configuration description file;
[0105] an information determination unit, configured to determine the fixed value data source information and the non-fixed value data source information as the first data source information.
[0106] In one embodiment, the fixed value data source information includes device fixed value parameter name and fixed value parameter value of the target device; and the non-fixed value data source information includes at least one of device version number, device name and device type of the target device.
[0107] Each module in the test case generation apparatus can be realized by software, hardware and a combination thereof in whole or in part. Each module can be embedded in or independent of a processor in a computer device in hardware form, or stored in a memory in a computer device in software form, so as to be called and executed by a processor to perform operations corresponding to each module.
[0108] In one exemplary embodiment, a computer device is provided, which can be a server, and an internal structure diagram of the computer device can be as shown in Figure 6As shown in the figure. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through the system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capability. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store test case generation data. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with the terminal outside through the network connection. The computer program is executed by the processor to realize a test case generation method.
[0109] Those skilled in the art can understand that, Figure 6 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.
[0110] In one exemplary embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the following steps:
[0111] Obtaining first data source information of a target device in a smart substation and a target test model corresponding to the target device;
[0112] Obtaining second data source information of a test tool corresponding to the target device;
[0113] Generating a test case according to the first data source information, the target test model and the second data source information, the test case being used to test the target device.
[0114] In one embodiment, the processor executing the computer program further implements the following steps:
[0115] Determining a target test template corresponding to the target device according to the target test model;
[0116] In response to the received test case generation instruction, generating the test case according to the target test template, the first data source information and the second data source information.
[0117] In one embodiment, the processor, when executing the computer program, also implements the following steps:
[0118] Obtaining device information of each device in the smart substation, the device information at least including test model, device model and device version information;
[0119] Generating a plurality of test templates according to each of the device information;
[0120] The target test template corresponding to the target device is determined according to the target test model, comprising:
[0121] According to the target test model, the target test template is determined from each of the test templates.
[0122] In one embodiment, the processor, when executing the computer program, also implements the following steps:
[0123] Testing the target device based on the test case by the test tool, and obtaining test information generated in the testing process, the test information including test state and test case execution data;
[0124] Generating display information according to the test information, and displaying the display information on a display interface.
[0125] In one embodiment, the processor, when executing the computer program, also implements the following steps:
[0126] Obtaining the fixed value file corresponding to the target device, and obtaining the fixed value data source information corresponding to the target device according to the fixed value file;
[0127] Obtaining the configuration description file corresponding to the smart substation, and obtaining the non-fixed value data source information corresponding to the target device according to the configuration description file;
[0128] The fixed value data source information and the non-fixed value data source information are determined as the first data source information.
[0129] In one embodiment, the fixed value data source information includes device fixed value parameter name and fixed value parameter value of the target device; and the non-fixed value data source information includes at least one of device version number, device name and device model of the target device.
[0130] In one embodiment, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the following steps:
[0131] Obtaining first data source information of a target device in a smart substation and a target test model corresponding to the target device;
[0132] obtain second data source information of a test tool corresponding to the target device;
[0133] generate a test case according to the first data source information, the target test model and the second data source information, the test case being used for testing the target device.
[0134] In one embodiment, the computer program, when executed by the processor, further implements the following steps:
[0135] determine a target test template corresponding to the target device according to the target test model;
[0136] generate the test case according to the target test template, the first data source information and the second data source information in response to the received test case generation instruction.
[0137] In one embodiment, the computer program, when executed by the processor, further implements the following steps:
[0138] obtain device information of each device in the smart substation, the device information at least including test model, device model and device version information;
[0139] generate a plurality of test templates according to each of the device information;
[0140] The determining of the target test template corresponding to the target device according to the target test model comprises:
[0141] determining the target test template from each of the test templates according to the target test model.
[0142] In one embodiment, the computer program, when executed by the processor, further implements the following steps:
[0143] test the target device based on the test case by the test tool, and obtain test information generated in the testing process, the test information including test state and test case execution data;
[0144] generate display information according to the test information, and display the display information on a display interface.
[0145] In one embodiment, the computer program, when executed by the processor, further implements the following steps:
[0146] obtain fixed value file corresponding to the target device, and obtain fixed value data source information corresponding to the target device according to the fixed value file;
[0147] obtain configuration description file corresponding to the smart substation, and obtain non-fixed value data source information corresponding to the target device according to the configuration description file;
[0148] determining the fixed-value data source information and the non-fixed-value data source information as the first data source information.
[0149] In one embodiment, the fixed-value data source information includes a device fixed-value parameter name and a fixed-value parameter value of the target device; and the non-fixed-value data source information includes at least one of a device version number, a device name and a device model number of the target device.
[0150] In one embodiment, a computer program product is provided, including a computer program which, when executed by a processor, implements the following steps:
[0151] obtaining first data source information of a target device in a smart substation and a target test model corresponding to the target device;
[0152] obtaining second data source information of a test tool corresponding to the target device;
[0153] generating a test case according to the first data source information, the target test model and the second data source information, the test case being used for testing the target device.
[0154] In one embodiment, the computer program, when executed by the processor, further implements the following steps:
[0155] determining a target test template corresponding to the target device according to the target test model;
[0156] generating the test case according to the target test template, the first data source information and the second data source information in response to a received test case generation instruction.
[0157] In one embodiment, the computer program, when executed by the processor, further implements the following steps:
[0158] obtaining device information of each device in the smart substation, the device information at least including a test model, a device model number and device version information;
[0159] generating a plurality of test templates according to the device information;
[0160] The determining of the target test template corresponding to the target device according to the target test model includes:
[0161] determining the target test template from the test templates according to the target test model.
[0162] In one embodiment, the computer program, when executed by the processor, further implements the following steps:
[0163] Test the target device based on the test case through the test tool, and acquire test information generated in a test process, the test information including test status and test case execution data;
[0164] Generate display information according to the test information, and display the display information on a display interface.
[0165] In one embodiment, the computer program, when executed by the processor, further implements the following steps:
[0166] Acquire a fixed value file corresponding to the target device, and acquire fixed value data source information corresponding to the target device according to the fixed value file;
[0167] Acquire a configuration description file corresponding to the smart substation, and acquire non-fixed value data source information corresponding to the target device according to the configuration description file;
[0168] Determine the fixed value data source information and the non-fixed value data source information as the first data source information.
[0169] In one embodiment, the fixed value data source information includes device fixed value parameter names and fixed value parameter values of the target device; and the non-fixed value data source information includes at least one of device version numbers, device names and device models of the target device.
[0170] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of the related data need to comply with relevant regulations.
[0171] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiment methods. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. The non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. The volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, the RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., without being limited thereto.
[0172] The technical features of the above embodiments can be combined in any manner. To make the description concise, all possible combinations of the technical features in the above embodiments are not described, but as long as the combinations of the technical features do not exist contradictions, they should be considered as the scope of the present application.
[0173] The above-described embodiments are merely illustrative of several embodiments of the present application, and the description is relatively specific and detailed, but should not be understood as a limitation on the scope of the patent. It should be noted that for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the scope of the present application. Therefore, the scope of protection of the present application should be subject to the appended claims.
Claims
1. A test case generation method, characterized in that: The method comprises: Obtaining first data source information of a target device in a smart substation and a target test model corresponding to the target device; Obtaining second data source information of a test tool corresponding to the target device; A test case is generated according to the first data source information, the target test model, and the second data source information, where the test case is used to test the target device.
2. The method according to claim 1, characterized in that The generating of a test case according to the first data source information, the target test model, and the second data source information includes: Determine a target test template corresponding to the target device according to the target test model; In response to the received test case generation instruction, the test case is generated according to the target test template, the first data source information, and the second data source information.
3. The method according to claim 2, characterized in that The method further comprises: Obtaining device information of each device in the smart substation, wherein the device information includes at least a test model, a device model, and a device version information; generating a plurality of test templates according to the device information; The determining, according to the target test model, a target test template corresponding to the target device includes: According to the target test model, the target test template is determined from the test templates.
4. The method according to claim 1, wherein The method further comprises: Testing the target device based on the test case using the test tool, and obtaining test information generated during the test, the test information including test status and test case execution data; Display information is generated according to the test information, and the display information is displayed on a display interface.
5. The method according to claim 1, wherein The obtaining of first data source information of a target device in the smart substation includes: Obtaining a fixed value file corresponding to the target device, and obtaining fixed value data source information corresponding to the target device according to the fixed value file; Obtaining a configuration description file corresponding to the smart substation, and obtaining non-fixed value data source information corresponding to the target device according to the configuration description file; The fixed-value data source information and the non-fixed-value data source information are determined as the first data source information.
6. The method according to claim 5, characterized in that The fixed value data source information includes the device fixed value parameter name and fixed value parameter value of the target device; The non-fixed value data source information includes at least one of a device version number, a device name, and a device model of the target device.
7. A test case generating device, characterized in that: The device comprises: A first acquisition module is used to obtain first data source information of a target device in a smart substation and a target test model corresponding to the target device; A second acquisition module, configured to acquire second data source information of a test tool corresponding to the target device; A generating module is used to generate a test case according to the first data source information, the target test model and the second data source information, wherein the test case is used to test the target device.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Cited By
Calibration method and device of playback device, storage medium and program product
CN122386218A