A method and apparatus for telemechanical test case instantiation
By constructing and assembling abstract templates, combined with SCD model files, the test cases and test points of the remote control engine are automatically selected, solving the problem of low testing efficiency of the remote control engine and realizing efficient test plan generation.
Patent Information
- Application Number
- CN202210690743.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-17
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2042-06-17
AI Technical Summary
In existing technologies, the testing methods for remote control devices vary, and the number of remote signaling and telemetry signals involved is large, resulting in a heavy workload for substation staff and low testing efficiency.
By obtaining the configuration parameters and test case identification information of the remote motor, an abstract template is constructed, a second abstract template is generated by splicing them together, and test points are selected from the instantiated test point set and mapped to the abstract template to generate a test case scheme. The test point information is accurately obtained using the SCD model file.
It automates the selection of test points for telemetry equipment, simplifies the test plan editing process, improves testing efficiency, and reduces manual workload.
Smart Images

Figure CN115168184B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of telescopic engine testing technology, and in particular to a method and apparatus for instantiating test cases for telescopic engines. Background Technology
[0002] The standalone testing of intelligent telemetry machines covers multiple motion functions and performance test indicators. The functional performance test case scheme is generated by randomly combining measurement point data under different telemetry zones. Test cases are a very important type of document in the testing process, forming the core of the testing work, and also serving as a set of standard inputs and outputs during testing.
[0003] In the existing technology, the testing methods for different remote control devices are different, and the number of remote signaling and telemetry signals involved is also relatively large. The workload of substation staff when triggering device signals and manually selecting points is relatively large, which results in a lot of energy and time being consumed during the testing process, making the testing efficiency of remote control devices low. Summary of the Invention
[0004] The purpose of this invention is to provide a method and apparatus for instantiating test cases for telemetry engines, thereby improving the testing efficiency of telemetry engines.
[0005] The first aspect of this invention provides a method for instantiating test cases for telemetry engines, comprising:
[0006] Obtain the configuration parameters of the telemetry engine and the identification information of the test cases;
[0007] Based on the configuration parameters, at least one identical first abstract template is constructed under the corresponding identification information;
[0008] The first abstract template is combined to generate the second abstract template;
[0009] The test case scheme for the telemotor is obtained by selecting the second test point from the instantiated test point set and mapping the second test point to the second abstract template. The instantiated test point set is accurately obtained by loading the SCD model file.
[0010] Optionally, before constructing at least one identical first abstract template under the corresponding identification information based on the configuration parameters, the method further includes:
[0011] The corresponding abstract template XML format is matched from the abstract template library based on the identification information, and the abstract template library is designed based on the test cases.
[0012] Optionally, the abstract template XML format includes a general format and a special format.
[0013] Optionally, before selecting the second measurement point from the instantiated measurement point set and mapping the second measurement point to the second abstract template, the method further includes:
[0014] The instantiation mapping of the first measurement point under the remote transmission area of the remote motor is performed by setting the attribute category features of the first measurement point to generate the instantiation set of the remote transmission area.
[0015] Optionally, the step of selecting a second test point from the instantiated test point set and mapping the second test point to the second abstract template to obtain the test case scheme for the telemotor, wherein the instantiated test point set is accurately obtained by loading the SCD model file, including:
[0016] Iterate through and parse the instantiated set of test points;
[0017] The second measurement point is selected from the traversed set of instantiated measurement points using a point-selection algorithm.
[0018] The test case scheme for the telemotor is generated by improving the node attributes of the second abstract template.
[0019] Optionally, the configuration parameters include the number of participating devices, the method of selecting the remote transmission area, the number of triggering devices, and the number of trigger measurement points.
[0020] A second aspect of the present invention provides an apparatus for instantiating test cases for a telescopic engine, comprising:
[0021] The acquisition unit is used to acquire the configuration parameters of the telemotor and the identification information of the test cases;
[0022] Construction unit; used to construct at least one identical first abstract template under the corresponding identification information based on the configuration parameters;
[0023] The splicing unit is used to splice the first abstract template to generate the second abstract template;
[0024] The mapping unit is used to select a second test point from the instantiated test point set and map the second test point to the second abstract template to obtain the test case scheme of the telemotor. The instantiated test point set is accurately obtained by loading the SCD model file.
[0025] Optionally, prior to the building unit, the apparatus further includes:
[0026] The matching unit is used to match the corresponding abstract template XML format from the abstract template library according to the identification information. The abstract template library is designed based on the test case, and the abstract template XML format includes a general format and a special format.
[0027] Optionally, prior to the mapping unit, the apparatus further includes:
[0028] The generation unit is used to generate a set of instantiated measurement points in the remote transmission area by performing instantiation mapping of the first measurement point under the remote transmission area of the remote motor by setting the attribute category features of the first measurement point.
[0029] Optionally, the mapping unit includes:
[0030] The traversal module is used to traverse and parse the instantiated measurement point set;
[0031] The selection module is used to select a second measurement point from the traversed set of instantiated measurement points using a selection algorithm.
[0032] The generation module is used to generate a test case scheme for the telemotor by improving the node attributes of the second abstract template.
[0033] A third aspect of the present invention provides an apparatus for instantiating test cases for telescopic engines, comprising:
[0034] Processor, memory, input / output unit, bus;
[0035] The processor is connected to the memory, the input / output unit, and the bus;
[0036] The processor specifically performs the following operations.
[0037] Obtain the configuration parameters of the telemetry engine and the identification information of the test cases;
[0038] Based on the configuration parameters, at least one identical first abstract template is constructed under the corresponding identification information;
[0039] The first abstract template is combined to generate the second abstract template;
[0040] The test case scheme for the telemotor is obtained by selecting the second test point from the instantiated test point set and mapping the second test point to the second abstract template. The instantiated test point set is accurately obtained by loading the SCD model file.
[0041] The fourth aspect of this application provides a computer-readable storage medium for instantiating telemetry test cases, including:
[0042] The computer-readable storage medium contains a program that executes the aforementioned method for instantiating motion machine test cases on a computer.
[0043] As can be seen from the above technical solutions, the embodiments of this application have the following advantages:
[0044] In this application, given the configuration parameters of the remote control engine and the identification information of the test cases, the system constructs at least one identical first abstract template based on the configuration parameters and the corresponding identification information. Then, the first abstract templates are concatenated to generate a second abstract template. Next, second test points are selected from the instantiated test point set and mapped to the second abstract template to obtain the test case scheme for the remote control engine. The instantiated test point set is precisely obtained by loading the SCD model file. This invention uses an abstract mapping mechanism to generate test case schemes, achieving automatic test point selection while greatly simplifying the test scheme editing process and effectively improving the testing efficiency of the remote control engine. Attached Figure Description
[0045] Figure 1 This is a flowchart illustrating an embodiment of the method for instantiating test cases for the propulsion engine in this invention;
[0046] Figure 2 This is a flowchart illustrating another embodiment of the method for instantiating test cases for the propulsion engine in this invention;
[0047] Figure 3 This is a schematic diagram of an embodiment of the device for instantiating test cases of the telescopic motor in this invention;
[0048] Figure 4 This is a schematic diagram of another embodiment of the device for instantiating test cases of the motor in this invention. Detailed Implementation
[0049] This application provides a method and apparatus for instantiating test cases for remote motors, which can improve the testing efficiency of remote motors.
[0050] In this embodiment, the method for instantiating test cases of the remote control machine can be implemented in the system, on the server, or on the terminal, without any specific limitation.
[0051] Please see Figure 1 This application uses system examples for description. One embodiment of the method for instantiating test cases for remote motors in this application includes:
[0052] 101. The system obtains the configuration parameters of the remote control unit and the identification information of the test cases;
[0053] In this embodiment, the system obtains the configuration parameters of the remote motor, including the number of participating devices, the remote transmission area selection method, the number of triggering devices, and the number of triggering test points. The remote transmission area selection method may include randomly selecting the remote transmission area or specifying the remote transmission area. The identification information of the test case includes the test case ID.
[0054] In addition, the test cases in this embodiment are special scenarios, specifying the information corresponding to the test scenario. The scenario is a clear and sequential system operation trajectory, which has a wide range of applications in the software life cycle. The expression of test scenarios includes static ones. Static expressions can be defined in the form of tables, etc., to organize the system and provide conditional data for the automatic generation of test cases in the subsequent dynamic expressions, thereby realizing the automatic generation of test cases.
[0055] 102. The system matches at least one identical first abstract template under the corresponding identifier information based on the configuration parameters;
[0056] In this embodiment, the configuration parameter refers to the number of participating devices. The system clones multiple identical first abstract templates under the corresponding test case ID according to the number of participating devices. These first abstract templates are identical sub-abstract templates. In addition, a shallow cloning method is used in the process of cloning sub-abstract templates, that is, variables of the configuration parameter type are directly assigned values.
[0057] 103. The system combines the first abstract template to generate the second abstract template;
[0058] In this embodiment, the system first determines whether the number of test case IDs, the number of participating devices, the method of selecting the remote transmission area, the number of triggering devices, and the number of triggering test points are greater than i, where i is the length of the test case. The path of the test case does not contain loop states, meaning the path and the test case are consistent. The structure generated by the test case is a test set, which is a finite set of test cases. When the number of configuration parameters is greater than i, identical sub-abstract templates are cloned. When the maximum number is reached, all sub-abstract templates are concatenated to generate a second abstract template, which is the final abstract template file (xml).
[0059] 104. Select the second test point from the instantiated test point set and map the second test point to the second abstract template to obtain the test case scheme of the remote motor. The instantiated test point set is accurately obtained by loading the SCD model file.
[0060] In this embodiment, the system first finds all remote transmission areas that meet the conditions, have imported RCD and SCD, and have generated instantiated measurement point records (i.e., containing actual information such as specific IED, dataset, and reference).<remote_no> A set, wherein the condition that satisfies the configuration parameter satisfies the instantiation mapping condition;
[0061] In the remote transmission area that meets the conditions<remote_no> The system uses a for loop within the set to iterate and parse the remote_N.xml file, which contains all instantiated test point records, based on the number of triggering devices (IEDs) and the number of trigger test points. It then automatically selects test points according to a selection algorithm, finding all second test points that meet the conditions, where the second test points are those that satisfy the abstract template environment. Finally, based on these second test points, test cases are automatically generated with a single click. This allows for automated testing of the subsequent functional performance of the intelligent remote actuator, which can be loaded and used at any time, reducing the workload of testers and effectively improving the testing efficiency of the remote actuator.
[0062] Please see Figure 2 The embodiments of this application use system examples for description. Another embodiment of the method for instantiating test cases for remote motors in this application includes:
[0063] 201. The system obtains the configuration parameters of the remote control unit and the identification information of the test cases;
[0064] Step 201 in this embodiment is similar to step 101 in the previous embodiment, and is not limited here.
[0065] 202. The system matches the corresponding abstract template XML format from the abstract template library based on the identification information. The abstract template library is designed based on the test cases.
[0066] In this embodiment, the system designs a unified abstract sub-template XML format based on different test cases. The format includes a general format and a special format, as detailed below:
[0067] 1. The general format is applicable to test cases including: three-phase combined signal, SOE signal testing, remote control testing, and remote adjustment testing. Format content representation:
[0068]
[0069] 2. Test cases applicable to this special format include: avalanche simulation tests and site-wide load loss tests. Format content representation:
[0070]
[0071]
[0072] Test cases for which this special format applies also include: Motion Unification Configuration Tool checks. Format content representation:
[0073]
[0074] It should be noted that the above format... <function>Generally includes <param> Parameter nodes and <group>Nodes, such as timeouts for parameters required by this test case; among which <group>A node is information about a certain remote transmission area, and then its child items... <data>These are certain measurement points and their attributes within this remote transmission area. <data>The information is abstract and not bound to any actual device IED information.
[0075] In addition, the abstract template repository is composed of abstract sub-templates, which are designed according to the test case ID. The large abstract template repository TestCases.xml can be extracted and used later. In this embodiment, the test case abstract template repository has traceable test plan data and can meet the test case requirements of different scenarios.
[0076] 203. The system constructs at least one identical first abstract template under the corresponding identification information based on the configuration parameters;
[0077] 204. The system combines the first abstract template to generate the second abstract template;
[0078] Steps 203 to 204 in this embodiment are similar to steps 102 to 103 in the previous embodiment, and will not be described again here.
[0079] 205. By setting the attribute category features of the first measurement point under the remote transmission area of the remote motor, the instantiation mapping of the first measurement point is performed, and the instantiation measurement point set of the remote transmission area is generated.
[0080] The system sets the attribute category features of the first measurement point under remote_no for each remote transmission zone, completes the instantiation mapping of all measurement points, and generates a collection of instantiated measurement point record files remote_1.xml, remote_2.xml, ..., remote_N.xml for all remote transmission zones. Specific settings are as follows:
[0081] Import the remote control configuration description file (RCD) and the substation SCD model file under each remote control zone. The SCD model file is a type of model file specified in the IEC 61850 standard, used to describe the information of the primary and secondary equipment of the entire substation. Generate a list of all remote signaling, telemetry, and remote control under this remote control configuration. The list should include the actual information such as the specific 61850 device IED, dataset, and 61850 leaf reference, and provide editable measurement point attribute categories.
[0082] Add one attribute column to the remote message list<my_class> (Remote signaling category yxclass): 0 - Basic remote signaling class (default); 1 - Communication status virtual signal class; 2 - Formula calculation generated quantity class; 3 - Total accident signal. One attribute column has been added to the telemetry list.<my_class> (Telemetry Category ycclass): 0--Basic Telemetry; 1--Combined Calculation Class; 2--Other Virtual Telemetry. Add one attribute column to the remote control list.<my_class> (Remote control category ykclass): 0-Remote control switch knife switch type (default value); 1-Remote control pressure plate type; 2-Remote adjustment gear type; 3-Reset remote control type.
[0083] 206. System traverses and parses the instantiated set of measurement points;
[0084] In this embodiment, the system operates in a remote transmission area that meets certain conditions.<remote_no> The collection uses a for loop to iterate and parse the remote_N.xml file, which contains all instantiated measurement point records, based on the number of triggering devices (IEDs) and the number of triggering measurement points.
[0085] 207. Select the second measurement point from the traversed set of instantiated measurement points using the point selection algorithm system;
[0086] The system internally binds based on different test cases. <data>A node expansion mechanism is established, along with corresponding node selection algorithms. For example: SOE signal testing should satisfy yxclass = 0; remote adjustment testing should satisfy ykclass = 2; total fault signal should satisfy yxclass = 3; three-phase combined signal should satisfy yxclass = 2 && the formula expression contains no less than two "|".
[0087] 208. The system generates test case schemes for the telemotor by improving the node attributes of the second abstract template.
[0088] After the instantiation of the test point set is completed in the above steps, the system expands and improves all node attributes under the final abstract template, generating the final remote_1.xml, remote_2.xml, ..., remote_N.xml. This invention simplifies the test case editing process by using an abstract mapping mechanism to generate test case schemes, avoiding the inefficiency, error-proneness, and lack of reproducibility associated with manually generating test cases by software testers, which increases the overall cost of software development.
[0089] Please see Figure 3 One embodiment of the apparatus for instantiating test cases for remote motors in this application includes:
[0090] Acquisition unit 301 is used to acquire the configuration parameters of the remote motor and the identification information of the test cases;
[0091] Matching unit 302 is used to match the corresponding abstract template XML format from the abstract template library based on the identification information. The abstract template library is designed based on test cases, and the abstract template XML format includes general format and special format.
[0092] Construction unit 303; used to construct at least one identical first abstract template under the corresponding identification information based on configuration parameters;
[0093] The splicing unit 304 is used to splice the first abstract template to generate the second abstract template;
[0094] The generation unit 305 is used to generate a set of instantiated measurement points in the remote transmission area by setting the attribute category features of the first measurement point under the remote transmission area of the remote motor and performing instantiation mapping of the first measurement point.
[0095] Mapping unit 306 is used to select the second test point from the instantiated test point set and map the second test point to the second abstract template to obtain the test case scheme of the telemotor. The instantiated test point set is accurately obtained by loading the SCD model file.
[0096] In this embodiment, the mapping unit 306 further includes a traversal module 3061, a selection module 3062, and a generation module 3063.
[0097] Traversal module 3061 is used to traverse and parse the instantiated measurement point set;
[0098] The selection module 3062 is used to select a second measurement point from the traversed set of instantiated measurement points using a point selection algorithm.
[0099] Module 3063 is used to generate test case schemes for the telemotor by improving the node attributes of the second abstract template.
[0100] In this embodiment, the system obtains the configuration parameters and test case representation information of the remote motor through the acquisition unit 301; the matching unit 302 matches a unified abstract sub-template XML format according to different test cases, including general and special formats; the construction unit 303 constructs at least one identical sub-abstract template under the corresponding identification information based on the configuration parameters; the splicing unit 304 splices all sub-abstract templates to generate the final abstract template; the system then generates an instantiated test point set for the remote transmission area through the generation unit 305, wherein the instantiated test point set is obtained by setting the attribute category features of the first test point under the remote transmission area of the remote motor and performing the instantiation mapping of the first test point; specifically, the SCD parsing algorithm is adopted to improve the parsing efficiency; finally, the traversal module 3061 in the mapping unit 306 traverses and parses the instantiated test point set, the selection module 3062 selects the second test point from the traversed instantiated test point set through the point selection algorithm, and the generation module 3063 generates the test case scheme of the remote motor after improving the node attributes of the second abstract template. This invention uses an abstract mapping mechanism to generate test case schemes, which greatly simplifies the test scheme editing process.
[0101] Please see Figure 4 Another embodiment of the apparatus for instantiating test cases for the remote motor in this application includes:
[0102] Processor 401, memory 402, input / output unit 403, bus 404;
[0103] The processor 401 is connected to the memory 402, the input / output unit 403, and the bus 404;
[0104] Processor 401 performs the following operations:
[0105] Obtain the configuration parameters of the telemetry engine and the identification information of the test cases;
[0106] Construct at least one identical first abstract template under the corresponding identification information based on the configuration parameters;
[0107] The first abstract template is combined to generate the second abstract template;
[0108] The test case scheme for the telemotor is obtained by selecting the second test point from the instantiated test point set and mapping the second test point to the second abstract template. The instantiated test point set is accurately obtained by loading the SCD model file.
[0109] Optionally, the processor 401 has the same functions as described above. Figures 1 to 2 The steps in the illustrated embodiments are the same and will not be repeated here.
[0110] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0111] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.
[0112] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0113] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0114] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.< / data> < / data> < / data> < / group> < / group> < / function>
Claims
1. A method for instantiating test cases for a telescopic engine, characterized in that, include: Obtain the configuration parameters of the telemetry engine and the identification information of the test cases; Configuration parameters include the number of participating devices, the method of selecting the remote transmission area, the number of triggering devices, and the number of trigger measurement points; Based on the configuration parameters, at least one identical first abstract template is constructed under the corresponding identification information; The configuration parameter refers to the number of participating devices. Based on the number of participating devices, multiple identical first abstract templates under the corresponding test case ID are cloned. These first abstract templates are identical sub-abstract templates. A shallow cloning method is used in the process of cloning sub-abstract templates, and variables of the configuration parameter type are directly assigned values. The first abstract template is combined to generate the second abstract template; The test case scheme for the telemotor is obtained by selecting a second test point from the instantiated test point set and mapping the second test point to the second abstract template. The instantiated test point set is accurately obtained by loading the SCD model file and includes: Iterate through and parse the instantiated set of test points; The second measurement point is selected from the traversed set of instantiated measurement points using a point-selection algorithm. The test case scheme for the telemotor is generated by improving the node attributes of the second abstract template.
2. The method according to claim 1, characterized in that, Before constructing at least one identical first abstract template under the corresponding identification information based on the configuration parameters, the method further includes: The corresponding abstract template XML format is matched from the abstract template library based on the identification information, and the abstract template library is designed based on the test cases.
3. The method according to claim 2, characterized in that, The abstract template XML format includes general and special formats.
4. The method according to claim 1, characterized in that, Before selecting the second measurement point from the instantiated measurement point set and mapping the second measurement point to the second abstract template, the method further includes: The instantiation mapping of the first measurement point under the remote transmission area of the remote motor is performed by setting the attribute category features of the first measurement point to generate the instantiation set of the remote transmission area.
5. A device for instantiating test cases for a remote motor, characterized in that, include: The acquisition unit is used to acquire the configuration parameters of the telemotor and the identification information of the test cases; Configuration parameters include the number of participating devices, the method of selecting the remote transmission area, the number of triggering devices, and the number of trigger measurement points; The construction unit is used to construct at least one identical first abstract template under the corresponding identification information based on the configuration parameters; The configuration parameter refers to the number of participating devices. Based on the number of participating devices, multiple identical first abstract templates under the corresponding test case ID are cloned. These first abstract templates are identical sub-abstract templates. A shallow cloning method is used in the process of cloning sub-abstract templates, and variables of the configuration parameter type are directly assigned values. The splicing unit is used to splice the first abstract template to generate the second abstract template; The mapping unit is used to select a second test point from the instantiated test point set and map the second test point to the second abstract template to obtain the test case scheme of the telemotor. The instantiated test point set is accurately obtained by loading the SCD model file and includes: Iterate through and parse the instantiated set of test points; The second measurement point is selected from the traversed set of instantiated measurement points using a point-selection algorithm. The test case scheme for the telemotor is generated by improving the node attributes of the second abstract template.
6. The apparatus according to claim 5, characterized in that, Prior to the building unit, the device further includes: The matching unit is used to match the corresponding abstract template XML format from the abstract template library according to the identification information. The abstract template library is designed based on the test case, and the abstract template XML format includes a general format and a special format.
7. The apparatus according to claim 5, characterized in that, Prior to the mapping unit, the apparatus further includes: The generation unit is used to generate a set of instantiated measurement points in the remote transmission area by performing instantiation mapping of the first measurement point under the remote transmission area of the remote motor by setting the attribute category features of the first measurement point.
Citation Information
Patent Citations
Cloud platform based testing platform and method for intelligent transformer station
CN105717390A
Intelligent telecontrol machine closed-loop comprehensive test method
CN111708700A