WO2023065438A1 - Virtual hardware test acceleration method and apparatus for software function of electricity meter - Google Patents

Virtual hardware test acceleration method and apparatus for software function of electricity meter Download PDF

Info

Publication number
WO2023065438A1
WO2023065438A1 PCT/CN2021/130799 CN2021130799W WO2023065438A1 WO 2023065438 A1 WO2023065438 A1 WO 2023065438A1 CN 2021130799 W CN2021130799 W CN 2021130799W WO 2023065438 A1 WO2023065438 A1 WO 2023065438A1
Authority
WO
WIPO (PCT)
Prior art keywords
electric energy
energy meter
virtual
input
input signal
Prior art date
Application number
PCT/CN2021/130799
Other languages
French (fr)
Chinese (zh)
Inventor
刘金权
秦涛
贾海亮
李龙龙
张巧玲
王文龙
刘晓辉
Original Assignee
河南许继仪表有限公司
许继集团有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 河南许继仪表有限公司, 许继集团有限公司 filed Critical 河南许继仪表有限公司
Publication of WO2023065438A1 publication Critical patent/WO2023065438A1/en

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R35/00Testing or calibrating of apparatus covered by the other groups of this subclass
    • G01R35/04Testing or calibrating of apparatus covered by the other groups of this subclass of instruments for measuring time integral of power or current
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the invention relates to the technical field of smart electric meter testing, in particular to a hardware virtual acceleration test method and device for electric energy meter software functions.
  • test testing is mainly carried out by manually compiling use cases.
  • the software testing steps at this stage are 1) use case compilation. According to the product function, test cases are compiled manually, and the test cases include preconditions, operation steps and result judgments. 2) Test case execution. Test product functionality by executing test cases. 3) Analysis of test results. Evaluate the correctness of software functionality based on use case execution results. With the promotion and application of image recognition equipment and automated signal sources, the execution of automated use cases has been greatly improved. In the future, with the development of artificial intelligence and virtual technology, automatic generation of test cases and automatic judgment will become a trend. But the main problems at this stage are 1) The use of artificially generated test cases has high requirements on testers' ability and needs to be familiar with the characteristics of product application scenarios. At the same time, the number of test cases is small and cannot cover the use scenarios well.
  • Prior art solution 1 use case compilation The steps of use case compilation are: 1) Analyze product functions and determine test function points; 2) Design input and execution steps. For test function points, design input typical values and execution steps, 3) design judgment criteria. Based on the input and operation steps, determine the method of judging that the function is correct. 2) Use case execution. According to the test case, manually or automatically input the signal, collect the data of the equipment, judge whether it meets the expected value, and judge whether the function point is correct. 3) Analysis of results. According to the execution results of multiple use cases, judge whether the product software function is correct.
  • the purpose of the embodiment of the present invention is to provide a hardware virtual acceleration test method and device for the software function of an electric energy meter.
  • a virtual hardware device to simulate the electric energy meter to be tested, a large number of use cases can be quickly generated, and product functions can be quickly performed on the virtual hardware device.
  • the test can fully cover the trigger signal input, and can use the virtual hardware device to accelerate the test speed. It can not only be applied to the automatic test of the electric energy meter, but also can be widely used in the embedded product test, which has broad application prospects.
  • the first aspect of the embodiment of the present invention provides a hardware virtual acceleration test method for the software function of the electric energy meter, including the following steps:
  • a preset number of input signals are generated according to the input signal preset rules
  • the input semaphore of the virtual hardware system and its corresponding time are stored.
  • the input signal preset rules include: the start value, end value, step value and association rules of different input signals of the input signal.
  • the second aspect of the embodiment of the present invention provides a hardware virtual acceleration test device for the software function of the electric energy meter, including:
  • a signal generation module which is used to generate a preset number of input signals based on a virtual hardware system according to input signal preset rules
  • a signal acquisition module which is used to acquire the input signal amount of the electric energy meter to be tested
  • a signal comparison module which is used to analyze and compare the preset number of input signals and the input signal quantities of the electric energy meter to be tested, so as to obtain the operating status of the software of the electric energy meter to be tested.
  • the hardware virtual acceleration test device for the software function of the electric energy meter also includes: a signal storage module;
  • the signal storage module is used to store the input semaphore of the virtual hardware system and its corresponding time.
  • the hardware virtual acceleration testing device of the electric energy meter software function also includes: a rule setting module;
  • the rule setting module is used for setting the input signal preset rule.
  • rule setting module is used to set the start value, end value, step value of the input signal and association rules of different input signals.
  • a third aspect of the embodiments of the present invention provides an electronic device, including: at least one processor; and a memory connected to the at least one processor; wherein, the memory stores information that can be processed by the one processor.
  • the instruction executed by the processor the instruction is executed by the one processor, so that the at least one processor executes the hardware virtual acceleration testing method of the above electric energy meter software function.
  • the fourth aspect of the embodiments of the present invention provides a computer-readable storage medium, on which computer instructions are stored.
  • the instructions are executed by a processor, the hardware virtual acceleration testing method for the above-mentioned software functions of the electric energy meter is realized.
  • the virtual hardware device By using the virtual hardware device to simulate the electric energy meter to be tested, a large number of use cases can be quickly generated, and the product function test can be quickly carried out on the virtual hardware device, which can fully cover the trigger signal input, and can use the virtual hardware device to accelerate the test speed, not only can It can be widely used in embedded product testing and has broad application prospects.
  • Fig. 1 is the flow chart of the hardware virtual acceleration test method of the electric energy meter software function provided by the embodiment of the present invention
  • Fig. 2 is a block diagram of a hardware virtual accelerated testing device for the software function of the electric energy meter provided by the embodiment of the present invention.
  • Signal generation module 2. Signal acquisition module, 3. Signal comparison module, 4. Signal storage module, 5. Rule setting module.
  • the first aspect of the embodiment of the present invention provides a kind of hardware virtual acceleration testing method of electric energy meter software function, comprises the following steps:
  • S200 based on the virtual hardware system, generates a preset number of input signals according to a preset rule of the input signal.
  • step S300 after obtaining the input semaphore of the virtual hardware system to be tested, further includes:
  • S310 stores the input semaphore of the virtual hardware system and its corresponding time.
  • step S200 before generating a preset number of input signals according to input signal preset rules, it also includes:
  • the input signal preset rules include: the start value, end value, step value of the input signal and association rules of different input signals.
  • the above technical solution generates a large amount of input data by setting simple input excitation conditions, increasing the input range of the input signal to cover the application function; through the virtual device, the input response is accelerated, and a large amount of input and output data is quickly formed, which is used for functional analysis and shortens the test cycle. ; Perform data analysis on a large amount of test data, analyze the correctness of the function, overcome the first use case design, and formulate input and output test methods.
  • the hardware virtual acceleration test method of the above-mentioned electric energy meter software function simulates the electric energy meter to be tested by using a virtual hardware device, quickly generates a large number of use cases, and quickly performs product function tests on the virtual hardware device, realizing full coverage of trigger signal input, and can Using the virtual hardware device to accelerate the test speed can not only be applied to the automatic test of the electric energy meter, but also can be widely used in the embedded product test, and has broad application prospects.
  • the second aspect of the embodiment of the present invention provides a hardware virtual acceleration test device for the software function of the electric energy meter, including: a signal generation module 1 , a signal acquisition module 2 and a signal comparison module 3 .
  • the signal generating module 1 is used to generate a preset number of input signals according to the input signal preset rules based on the virtual hardware system;
  • the signal acquisition module 2 is used to obtain the input signal amount of the electric energy meter to be tested;
  • the signal comparison module 3 is used for The preset number of input signals is analyzed and compared with the input signal quantity of the electric energy meter to be tested to obtain the operating status of the software of the electric energy meter to be tested.
  • the hardware virtual acceleration test device for the software function of the electric energy meter also includes: a signal storage module 4; the signal storage module 4 is used to store the input signal amount of the virtual hardware system and its corresponding time.
  • the hardware virtual accelerated testing device for the software function of the electric energy meter further includes: a rule setting module 5; the rule setting module is used for setting preset rules for input signals.
  • rule setting module is used to set the start value, end value, step value of the input signal and association rules of different input signals.
  • the hardware virtual acceleration test device for the above-mentioned electric energy meter software function uses a virtual hardware device to simulate the electric energy meter to be tested, quickly generates a large number of use cases, and quickly performs product function tests on the virtual hardware device, realizing full coverage of trigger signal input, and can Using the virtual hardware device to accelerate the test speed can not only be applied to the automatic test of the electric energy meter, but also can be widely used in the embedded product test, and has broad application prospects.
  • a third aspect of the embodiments of the present invention provides an electronic device, including: at least one processor; and a memory connected to the at least one processor; wherein, the memory stores instructions that can be executed by a processor, and the instructions Executed by a processor, so that at least one processor executes the hardware virtual accelerated testing method of the above electric energy meter software function.
  • the fourth aspect of the embodiments of the present invention provides a computer-readable storage medium, on which computer instructions are stored.
  • the instructions are executed by a processor, the hardware virtual acceleration testing method for the above-mentioned software functions of the electric energy meter is realized.
  • the embodiment of the present invention aims to protect a hardware virtual acceleration test method and device for the software function of an electric energy meter, wherein the method includes the following steps: based on the virtual hardware system, a preset number of input signals is generated according to the preset rules of the input signal; The input semaphore of the virtual hardware system; analyze and compare the preset number of input signals and the input semaphore of the virtual hardware system to obtain the operating status of the software to be tested.
  • the above technical scheme has the following effects:
  • the virtual hardware device By using the virtual hardware device to simulate the electric energy meter to be tested, a large number of use cases can be quickly generated, and the product function test can be quickly carried out on the virtual hardware device, which can fully cover the trigger signal input, and can use the virtual hardware device to accelerate the test speed, not only can It can be widely used in embedded product testing and has broad application prospects.
  • the embodiments of the present application may be provided as methods, systems, or computer program products. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions
  • the device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • Tests Of Electronic Circuits (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

A virtual hardware test acceleration method and apparatus for a software function of an electricity meter. The method comprises the following steps: on the basis of a virtual hardware system, generating a preset number of input signals according to a preset input signal rule (S200); obtaining an input signal amount of the virtual hardware system to be tested (S300); and analyzing and comparing the preset number of input signals with the input signal amount of the virtual hardware system to obtain the running status of software to be tested (S400). A virtual hardware apparatus is used to simulate an electricity meter to be tested so as to quickly generate a large number of cases, product function testing is quickly performed on the virtual hardware apparatus, full coverage of trigger signal input is implemented, and a test speed can be accelerated by using the virtual hardware apparatus, so that the present invention can be applied to automated testing of electricity meters and can also be applied to embedded product testing, and has broad application prospects.

Description

一种电能表软件功能的硬件虚拟加速测试方法及装置A hardware virtual acceleration test method and device for the software function of an electric energy meter 技术领域technical field
本发明涉及智能电表测试技术领域,特别涉及一种电能表软件功能的硬件虚拟加速测试方法及装置。The invention relates to the technical field of smart electric meter testing, in particular to a hardware virtual acceleration test method and device for electric energy meter software functions.
背景技术Background technique
现阶段软件测试主要采用人工编制用例的方法进行。现阶段软件测试步骤为1)用例编制。根据产品功能,由人工编制测试用例,测试用例包含前置条件,操作步骤和结果判断。2)测试用例执行。通过执行测试用例,测试产品功能。3)测试结果分析。根据用例执行结果评估软件功能的正确性。随着图像识别设备和自动化信号源的推广应用,自动化用例执行有了很大层度的提升。未来随着人工智能和虚拟技术的发展,自动生成测试用例,自动判断成为趋势。但现阶段存在的主要问题有1)采用人工生成用例具有对测试人员能力要求高,需要熟悉产品应用场景的特点,同时测试用例数量少,不能很好的使用场景覆盖。At present, software testing is mainly carried out by manually compiling use cases. The software testing steps at this stage are 1) use case compilation. According to the product function, test cases are compiled manually, and the test cases include preconditions, operation steps and result judgments. 2) Test case execution. Test product functionality by executing test cases. 3) Analysis of test results. Evaluate the correctness of software functionality based on use case execution results. With the promotion and application of image recognition equipment and automated signal sources, the execution of automated use cases has been greatly improved. In the future, with the development of artificial intelligence and virtual technology, automatic generation of test cases and automatic judgment will become a trend. But the main problems at this stage are 1) The use of artificially generated test cases has high requirements on testers' ability and needs to be familiar with the characteristics of product application scenarios. At the same time, the number of test cases is small and cannot cover the use scenarios well.
现有技术方案1)用例编制。用例编制的步骤是:1)分析产品功能,确定测试功能点;2)设计输入和执行步骤。针对测试功能点,设计输入的典型值和执行步骤,3)设计判断标准。根据输入和操作步骤,确定功能正确的判断方法。2)用例执行。依据测试用例,人工或自动输入信号,采集设备的数据,判断是否符合预期值,判断功能点是否正确。3)结果分析。根据多个用例的执行结果,判断产品软件功能是否正确。Prior art solution 1) use case compilation. The steps of use case compilation are: 1) Analyze product functions and determine test function points; 2) Design input and execution steps. For test function points, design input typical values and execution steps, 3) design judgment criteria. Based on the input and operation steps, determine the method of judging that the function is correct. 2) Use case execution. According to the test case, manually or automatically input the signal, collect the data of the equipment, judge whether it meets the expected value, and judge whether the function point is correct. 3) Analysis of results. According to the execution results of multiple use cases, judge whether the product software function is correct.
现有用例采用人工分析功能点,选择典型值作为输入,典型值输入所对应的输入作为产品用例数据进行分析,往往具有工作量大,用例数量少,易引起测试范围覆盖不全。同时测试针在嵌入式设备上进行测试,受限于嵌入式设备的硬件性能限制,往往具有测试周期长,不能进行加速测试的 缺陷。Existing use cases use manual analysis of function points, select typical values as input, and the input corresponding to the typical value input is analyzed as product use case data, which often has a large workload and a small number of use cases, which may easily lead to incomplete coverage of the test scope. At the same time, the test needle is tested on the embedded device, which is limited by the hardware performance of the embedded device, and often has the defect that the test cycle is long and the accelerated test cannot be performed.
发明内容Contents of the invention
本发明实施例的目的是提供一种电能表软件功能的硬件虚拟加速测试方法及装置,通过采用虚拟硬件装置来模拟待测试的电能表,快速生成大量用例,在虚拟硬件装置上快速进行产品功能测试,实现了全面覆盖触发信号输入,并可利用虚拟硬件装置进行测试速度加速,不仅可以应用于电能表自动化测试,也可以广泛应用于嵌入式产品测试,具有广阔的应用前景。The purpose of the embodiment of the present invention is to provide a hardware virtual acceleration test method and device for the software function of an electric energy meter. By using a virtual hardware device to simulate the electric energy meter to be tested, a large number of use cases can be quickly generated, and product functions can be quickly performed on the virtual hardware device. The test can fully cover the trigger signal input, and can use the virtual hardware device to accelerate the test speed. It can not only be applied to the automatic test of the electric energy meter, but also can be widely used in the embedded product test, which has broad application prospects.
为解决上述技术问题,本发明实施例的第一方面提供了一种电能表软件功能的硬件虚拟加速测试方法,包括如下步骤:In order to solve the above technical problems, the first aspect of the embodiment of the present invention provides a hardware virtual acceleration test method for the software function of the electric energy meter, including the following steps:
基于虚拟硬件系统,依据输入信号预设规则生成预设数量的输入信号;Based on the virtual hardware system, a preset number of input signals are generated according to the input signal preset rules;
获取待测试的所述虚拟硬件系统的输入信号量;Obtain the input semaphore of the virtual hardware system to be tested;
对所述预设数量的所述输入信号和所述虚拟硬件系统的输入信号量进行分析对比,得到待测试软件的运行状况。Analyzing and comparing the preset number of input signals with the input signal quantities of the virtual hardware system to obtain the running status of the software to be tested.
进一步地,所述获取待测试的所述虚拟硬件系统的输入信号量之后,还包括:Further, after the acquisition of the input semaphore of the virtual hardware system to be tested, further includes:
对所述虚拟硬件系统的输入信号量及其对应时间进行存储。The input semaphore of the virtual hardware system and its corresponding time are stored.
进一步地,所述依据输入信号预设规则生成预设数量的所述输入信号之前,还包括:Further, before generating a preset number of input signals according to input signal preset rules, it also includes:
设定所述输入信号预设规则。Set a preset rule for the input signal.
进一步地,所述输入信号预设规则包括:所述输入信号的起始值、结束值、步进值及不同输入信号的关联规则。Further, the input signal preset rules include: the start value, end value, step value and association rules of different input signals of the input signal.
相应地,本发明实施例的第二方面提供了一种电能表软件功能的硬件虚拟加速测试装置,包括:Correspondingly, the second aspect of the embodiment of the present invention provides a hardware virtual acceleration test device for the software function of the electric energy meter, including:
信号生成模块,其用于基于虚拟硬件系统,依据输入信号预设规则生 成预设数量的输入信号;A signal generation module, which is used to generate a preset number of input signals based on a virtual hardware system according to input signal preset rules;
信号获取模块,其用于获取待测试电能表的输入信号量;A signal acquisition module, which is used to acquire the input signal amount of the electric energy meter to be tested;
信号对比模块,其用于对所述预设数量的所述输入信号和所述待测试电能表的输入信号量进行分析对比,得到所述待测试电能表软件的运行状况。A signal comparison module, which is used to analyze and compare the preset number of input signals and the input signal quantities of the electric energy meter to be tested, so as to obtain the operating status of the software of the electric energy meter to be tested.
进一步地,所述电能表软件功能的硬件虚拟加速测试装置还包括:信号存储模块;Further, the hardware virtual acceleration test device for the software function of the electric energy meter also includes: a signal storage module;
所述信号存储模块用于对所述虚拟硬件系统的输入信号量及其对应时间进行存储。The signal storage module is used to store the input semaphore of the virtual hardware system and its corresponding time.
进一步地,所述电能表软件功能的硬件虚拟加速测试装置还包括:规则设定模块;Further, the hardware virtual acceleration testing device of the electric energy meter software function also includes: a rule setting module;
所述规则设定模块用于设定所述输入信号预设规则。The rule setting module is used for setting the input signal preset rule.
进一步地,所述规则设定模块用于设定所述输入信号的起始值、结束值、步进值及不同输入信号的关联规则。Further, the rule setting module is used to set the start value, end value, step value of the input signal and association rules of different input signals.
相应地,本发明实施例的第三方面提供了一种电子设备,包括:至少一个处理器;以及与所述至少一个处理器连接的存储器;其中,所述存储器存储有可被所述一个处理器执行的指令,所述指令被所述一个处理器执行,以使所述至少一个处理器执行上述电能表软件功能的硬件虚拟加速测试方法。Correspondingly, a third aspect of the embodiments of the present invention provides an electronic device, including: at least one processor; and a memory connected to the at least one processor; wherein, the memory stores information that can be processed by the one processor. The instruction executed by the processor, the instruction is executed by the one processor, so that the at least one processor executes the hardware virtual acceleration testing method of the above electric energy meter software function.
相应地,本发明实施例的第四方面提供了一种计算机可读存储介质,其上存储有计算机指令,该指令被处理器执行时实现上述电能表软件功能的硬件虚拟加速测试方法。Correspondingly, the fourth aspect of the embodiments of the present invention provides a computer-readable storage medium, on which computer instructions are stored. When the instructions are executed by a processor, the hardware virtual acceleration testing method for the above-mentioned software functions of the electric energy meter is realized.
本发明实施例的上述技术方案具有如下有益的技术效果:The above technical solutions of the embodiments of the present invention have the following beneficial technical effects:
通过采用虚拟硬件装置来模拟待测试的电能表,快速生成大量用例,在虚拟硬件装置上快速进行产品功能测试,实现了全面覆盖触发信号输入,并可利用虚拟硬件装置进行测试速度加速,不仅可以应用于电能表自动化测试,也可以广泛应用于嵌入式产品测试,具有广阔的应用前景。By using the virtual hardware device to simulate the electric energy meter to be tested, a large number of use cases can be quickly generated, and the product function test can be quickly carried out on the virtual hardware device, which can fully cover the trigger signal input, and can use the virtual hardware device to accelerate the test speed, not only can It can be widely used in embedded product testing and has broad application prospects.
附图说明Description of drawings
图1是本发明实施例提供的电能表软件功能的硬件虚拟加速测试方法流程图;Fig. 1 is the flow chart of the hardware virtual acceleration test method of the electric energy meter software function provided by the embodiment of the present invention;
图2是本发明实施例提供的电能表软件功能的硬件虚拟加速测试装置模块框图。Fig. 2 is a block diagram of a hardware virtual accelerated testing device for the software function of the electric energy meter provided by the embodiment of the present invention.
附图标记:Reference signs:
1、信号生成模块,2、信号获取模块,3、信号对比模块,4、信号存储模块,5、规则设定模块。1. Signal generation module, 2. Signal acquisition module, 3. Signal comparison module, 4. Signal storage module, 5. Rule setting module.
具体实施方式Detailed ways
为使本发明的目的、技术方案和优点更加清楚明了,下面结合具体实施方式并参照附图,对本发明进一步详细说明。应该理解,这些描述只是示例性的,而并非要限制本发明的范围。此外,在以下说明中,省略了对公知结构和技术的描述,以避免不必要地混淆本发明的概念。In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in combination with specific embodiments and with reference to the accompanying drawings. It should be understood that these descriptions are exemplary only, and are not intended to limit the scope of the present invention. Also, in the following description, descriptions of well-known structures and techniques are omitted to avoid unnecessarily obscuring the concept of the present invention.
请参照图1,本发明实施例的第一方面提供了一种电能表软件功能的硬件虚拟加速测试方法,包括如下步骤:Please refer to Fig. 1, the first aspect of the embodiment of the present invention provides a kind of hardware virtual acceleration testing method of electric energy meter software function, comprises the following steps:
S200,基于虚拟硬件系统,依据输入信号预设规则生成预设数量的输入信号。S200, based on the virtual hardware system, generates a preset number of input signals according to a preset rule of the input signal.
S300,获取待测试的虚拟硬件系统的输入信号量。S300. Obtain an input semaphore of the virtual hardware system to be tested.
S400,对预设数量的输入信号和虚拟硬件系统的输入信号量进行分析对比,得到待测试软件的运行状况。S400, analyzing and comparing the preset number of input signals and the input signal quantities of the virtual hardware system to obtain the running status of the software to be tested.
进一步地,步骤S300中,获取待测试的虚拟硬件系统的输入信号量之后,还包括:Further, in step S300, after obtaining the input semaphore of the virtual hardware system to be tested, further includes:
S310对虚拟硬件系统的输入信号量及其对应时间进行存储。S310 stores the input semaphore of the virtual hardware system and its corresponding time.
进一步地,步骤S200中,依据输入信号预设规则生成预设数量的输入信号之前,还包括:Further, in step S200, before generating a preset number of input signals according to input signal preset rules, it also includes:
S100,设定输入信号预设规则。S100, setting a preset rule of an input signal.
具体的,输入信号预设规则包括:输入信号的起始值、结束值、步进值及不同输入信号的关联规则。Specifically, the input signal preset rules include: the start value, end value, step value of the input signal and association rules of different input signals.
上述技术方案通过设置简单的输入激励条件,生成大量输入数据,增加输入信号的输入范围覆盖应用功能;通过虚拟设备,加速输入响应,快速形成大量输入和输出数据,用于功能分析,缩短测试周期;对大量测试数据,进行数据分析,分析功能的正确性,克服首先进行用例设计,制定输入和输出的测试方法。The above technical solution generates a large amount of input data by setting simple input excitation conditions, increasing the input range of the input signal to cover the application function; through the virtual device, the input response is accelerated, and a large amount of input and output data is quickly formed, which is used for functional analysis and shortens the test cycle. ; Perform data analysis on a large amount of test data, analyze the correctness of the function, overcome the first use case design, and formulate input and output test methods.
上述电能表软件功能的硬件虚拟加速测试方法通过采用虚拟硬件装置来模拟待测试的电能表,快速生成大量用例,在虚拟硬件装置上快速进行产品功能测试,实现了全面覆盖触发信号输入,并可利用虚拟硬件装置进行测试速度加速,不仅可以应用于电能表自动化测试,也可以广泛应用于嵌入式产品测试,具有广阔的应用前景。The hardware virtual acceleration test method of the above-mentioned electric energy meter software function simulates the electric energy meter to be tested by using a virtual hardware device, quickly generates a large number of use cases, and quickly performs product function tests on the virtual hardware device, realizing full coverage of trigger signal input, and can Using the virtual hardware device to accelerate the test speed can not only be applied to the automatic test of the electric energy meter, but also can be widely used in the embedded product test, and has broad application prospects.
相应地,请参照图2,本发明实施例的第二方面提供了一种电能表软件功能的硬件虚拟加速测试装置,包括:信号生成模块1、信号获取模块2和信号对比模块3。其中,信号生成模块1用于基于虚拟硬件系统,依据输入信号预设规则生成预设数量的输入信号;信号获取模块2用于获取待测试电能表的输入信号量;信号对比模块3用于对预设数量的输入信号和待测试电能表的输入信号量进行分析对比,得到待测试电能表软件的运行状况。Correspondingly, please refer to FIG. 2 , the second aspect of the embodiment of the present invention provides a hardware virtual acceleration test device for the software function of the electric energy meter, including: a signal generation module 1 , a signal acquisition module 2 and a signal comparison module 3 . Wherein, the signal generating module 1 is used to generate a preset number of input signals according to the input signal preset rules based on the virtual hardware system; the signal acquisition module 2 is used to obtain the input signal amount of the electric energy meter to be tested; the signal comparison module 3 is used for The preset number of input signals is analyzed and compared with the input signal quantity of the electric energy meter to be tested to obtain the operating status of the software of the electric energy meter to be tested.
进一步地,电能表软件功能的硬件虚拟加速测试装置还包括:信号存储模块4;信号存储模块4用于对虚拟硬件系统的输入信号量及其对应时间进行存储。Further, the hardware virtual acceleration test device for the software function of the electric energy meter also includes: a signal storage module 4; the signal storage module 4 is used to store the input signal amount of the virtual hardware system and its corresponding time.
进一步地,电能表软件功能的硬件虚拟加速测试装置还包括:规则设定模块5;规则设定模块用于设定输入信号预设规则。Further, the hardware virtual accelerated testing device for the software function of the electric energy meter further includes: a rule setting module 5; the rule setting module is used for setting preset rules for input signals.
进一步地,规则设定模块用于设定输入信号的起始值、结束值、步进值及不同输入信号的关联规则。Further, the rule setting module is used to set the start value, end value, step value of the input signal and association rules of different input signals.
上述电能表软件功能的硬件虚拟加速测试装置通过采用虚拟硬件装 置来模拟待测试的电能表,快速生成大量用例,在虚拟硬件装置上快速进行产品功能测试,实现了全面覆盖触发信号输入,并可利用虚拟硬件装置进行测试速度加速,不仅可以应用于电能表自动化测试,也可以广泛应用于嵌入式产品测试,具有广阔的应用前景。The hardware virtual acceleration test device for the above-mentioned electric energy meter software function uses a virtual hardware device to simulate the electric energy meter to be tested, quickly generates a large number of use cases, and quickly performs product function tests on the virtual hardware device, realizing full coverage of trigger signal input, and can Using the virtual hardware device to accelerate the test speed can not only be applied to the automatic test of the electric energy meter, but also can be widely used in the embedded product test, and has broad application prospects.
相应地,本发明实施例的第三方面提供了一种电子设备,包括:至少一个处理器;以及与至少一个处理器连接的存储器;其中,存储器存储有可被一个处理器执行的指令,指令被一个处理器执行,以使至少一个处理器执行上述电能表软件功能的硬件虚拟加速测试方法。Correspondingly, a third aspect of the embodiments of the present invention provides an electronic device, including: at least one processor; and a memory connected to the at least one processor; wherein, the memory stores instructions that can be executed by a processor, and the instructions Executed by a processor, so that at least one processor executes the hardware virtual accelerated testing method of the above electric energy meter software function.
相应地,本发明实施例的第四方面提供了一种计算机可读存储介质,其上存储有计算机指令,该指令被处理器执行时实现上述电能表软件功能的硬件虚拟加速测试方法。Correspondingly, the fourth aspect of the embodiments of the present invention provides a computer-readable storage medium, on which computer instructions are stored. When the instructions are executed by a processor, the hardware virtual acceleration testing method for the above-mentioned software functions of the electric energy meter is realized.
本发明实施例旨在保护一种电能表软件功能的硬件虚拟加速测试方法及装置,其中方法包括如下步骤:基于虚拟硬件系统,依据输入信号预设规则生成预设数量的输入信号;获取待测试的虚拟硬件系统的输入信号量;对预设数量的输入信号和虚拟硬件系统的输入信号量进行分析对比,得到待测试软件的运行状况。上述技术方案具备如下效果:The embodiment of the present invention aims to protect a hardware virtual acceleration test method and device for the software function of an electric energy meter, wherein the method includes the following steps: based on the virtual hardware system, a preset number of input signals is generated according to the preset rules of the input signal; The input semaphore of the virtual hardware system; analyze and compare the preset number of input signals and the input semaphore of the virtual hardware system to obtain the operating status of the software to be tested. The above technical scheme has the following effects:
通过采用虚拟硬件装置来模拟待测试的电能表,快速生成大量用例,在虚拟硬件装置上快速进行产品功能测试,实现了全面覆盖触发信号输入,并可利用虚拟硬件装置进行测试速度加速,不仅可以应用于电能表自动化测试,也可以广泛应用于嵌入式产品测试,具有广阔的应用前景。By using the virtual hardware device to simulate the electric energy meter to be tested, a large number of use cases can be quickly generated, and the product function test can be quickly carried out on the virtual hardware device, which can fully cover the trigger signal input, and can use the virtual hardware device to accelerate the test speed, not only can It can be widely used in embedded product testing and has broad application prospects.
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present application may be provided as methods, systems, or computer program products. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程 序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present application. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor, or processor of other programmable data processing equipment to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing equipment produce a An apparatus for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions The device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby The instructions provide steps for implementing the functions specified in the flow chart or blocks of the flowchart and/or the block or blocks of the block diagrams.
最后应当说明的是:以上实施例仅用以说明本发明的技术方案而非对其限制,尽管参照上述实施例对本发明进行了详细的说明,所属领域的普通技术人员应当理解:依然可以对本发明的具体实施方式进行修改或者等同替换,而未脱离本发明精神和范围的任何修改或者等同替换,其均应涵盖在本发明的权利要求保护范围之内。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that: the present invention can still be Any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention shall fall within the protection scope of the claims of the present invention.

Claims (10)

  1. 一种电能表软件功能的硬件虚拟加速测试方法,其特征在于,包括如下步骤:A hardware virtual acceleration testing method of electric energy meter software function, is characterized in that, comprises the steps:
    基于虚拟硬件系统,依据输入信号预设规则生成预设数量的输入信号;Based on the virtual hardware system, a preset number of input signals are generated according to the input signal preset rules;
    获取待测试的所述虚拟硬件系统的输入信号量;Obtain the input semaphore of the virtual hardware system to be tested;
    对所述预设数量的所述输入信号和所述虚拟硬件系统的输入信号量进行分析对比,得到待测试软件的运行状况。Analyzing and comparing the preset number of input signals with the input signal quantities of the virtual hardware system to obtain the running status of the software to be tested.
  2. 根据权利要求1所述的电能表软件功能的硬件虚拟加速测试方法,其特征在于,所述获取待测试的所述虚拟硬件系统的输入信号量之后,还包括:The hardware virtual acceleration testing method of the electric energy meter software function according to claim 1, wherein, after the acquisition of the input semaphore of the virtual hardware system to be tested, further comprising:
    对所述虚拟硬件系统的输入信号量及其对应时间进行存储。The input semaphore of the virtual hardware system and its corresponding time are stored.
  3. 根据权利要求1所述的电能表软件功能的硬件虚拟加速测试方法,其特征在于,所述依据输入信号预设规则生成预设数量的输入信号之前,还包括:The hardware virtual acceleration test method of the software function of the electric energy meter according to claim 1, wherein, before generating a preset number of input signals according to input signal preset rules, further comprising:
    设定所述输入信号预设规则。Set a preset rule for the input signal.
  4. 根据权利要求3所述的电能表软件功能的硬件虚拟加速测试方法,其特征在于,The hardware virtual accelerated testing method of the electric energy meter software function according to claim 3, is characterized in that,
    所述输入信号预设规则包括:所述输入信号的起始值、结束值、步进值及不同输入信号的关联规则。The input signal preset rules include: the start value, end value, step value and association rules of different input signals of the input signal.
  5. 一种电能表软件功能的硬件虚拟加速测试装置,其特征在于,包括:A hardware virtual acceleration test device for electric energy meter software functions, characterized in that it comprises:
    信号生成模块,其用于基于虚拟硬件系统,依据输入信号预设规则生成预设数量的输入信号;A signal generation module, which is used to generate a preset number of input signals based on a virtual hardware system according to input signal preset rules;
    信号获取模块,其用于获取待测试电能表的输入信号量;A signal acquisition module, which is used to acquire the input signal amount of the electric energy meter to be tested;
    信号对比模块,其用于对所述预设数量的所述输入信号和所述待测试 电能表的输入信号量进行分析对比,得到所述待测试电能表软件的运行状况。A signal comparison module, which is used to analyze and compare the preset number of input signals and the input signal quantities of the electric energy meter to be tested, so as to obtain the operating status of the electric energy meter to be tested software.
  6. 根据权利要求5所述的电能表软件功能的硬件虚拟加速测试装置,其特征在于,还包括:信号存储模块;The hardware virtual acceleration testing device of the electric energy meter software function according to claim 5, further comprising: a signal storage module;
    所述信号存储模块用于对所述虚拟硬件系统的输入信号量及其对应时间进行存储。The signal storage module is used to store the input semaphore of the virtual hardware system and its corresponding time.
  7. 根据权利要求5所述的电能表软件功能的硬件虚拟加速测试装置,其特征在于,还包括:规则设定模块;The hardware virtual acceleration testing device of the electric energy meter software function according to claim 5, is characterized in that, also comprises: rule setting module;
    所述规则设定模块用于设定所述输入信号预设规则。The rule setting module is used for setting the input signal preset rule.
  8. 根据权利要求7所述的电能表软件功能的硬件虚拟加速测试装置,其特征在于,The hardware virtual acceleration testing device of the electric energy meter software function according to claim 7, characterized in that,
    所述规则设定模块用于设定所述输入信号的起始值、结束值、步进值及不同输入信号的关联规则。The rule setting module is used to set the start value, end value, step value of the input signal and association rules of different input signals.
  9. 一种电子设备,其特征在于,包括:至少一个处理器;以及与所述至少一个处理器连接的存储器;其中,所述存储器存储有可被所述一个处理器执行的指令,所述指令被所述一个处理器执行,以使所述至少一个处理器执行如权利要求1-4任一项所述的电能表软件功能的硬件虚拟加速测试方法。An electronic device, characterized by comprising: at least one processor; and a memory connected to the at least one processor; wherein, the memory stores instructions executable by the one processor, and the instructions are Said one processor executes, so that said at least one processor executes the hardware virtual acceleration testing method of the electric energy meter software function according to any one of claims 1-4.
  10. 一种计算机可读存储介质,其特征在于,其上存储有计算机指令,该指令被处理器执行时实现如权利要求1-4任一项所述的电能表软件功能的硬件虚拟加速测试方法。A computer-readable storage medium, characterized in that computer instructions are stored thereon, and when the instructions are executed by a processor, the hardware virtual accelerated testing method for the software function of the electric energy meter according to any one of claims 1-4 is realized.
PCT/CN2021/130799 2021-10-18 2021-11-16 Virtual hardware test acceleration method and apparatus for software function of electricity meter WO2023065438A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111237211.3A CN115993570A (en) 2021-10-18 2021-10-18 Hardware virtual acceleration test method and device for electric energy meter software function
CN202111237211.3 2021-10-18

Publications (1)

Publication Number Publication Date
WO2023065438A1 true WO2023065438A1 (en) 2023-04-27

Family

ID=85993021

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/130799 WO2023065438A1 (en) 2021-10-18 2021-11-16 Virtual hardware test acceleration method and apparatus for software function of electricity meter

Country Status (2)

Country Link
CN (1) CN115993570A (en)
WO (1) WO2023065438A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110837466A (en) * 2019-10-15 2020-02-25 中国电子科技集团公司第三十研究所 Embedded software dynamic test method based on source code piling
CN111949533A (en) * 2020-08-12 2020-11-17 安徽继远检验检测技术有限公司 Embedded software automatic test platform of electric power intelligent terminal
CN112230175A (en) * 2019-12-20 2021-01-15 青岛鼎信通讯股份有限公司 Electric energy meter full-function test platform based on script language
CN112286833A (en) * 2020-12-31 2021-01-29 中国电力科学研究院有限公司 Intelligent electric energy meter real-time operating system drive test method and device
CN112463614A (en) * 2020-12-01 2021-03-09 北京计算机技术及应用研究所 Software virtualization test environment construction method based on hardware board card access

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110837466A (en) * 2019-10-15 2020-02-25 中国电子科技集团公司第三十研究所 Embedded software dynamic test method based on source code piling
CN112230175A (en) * 2019-12-20 2021-01-15 青岛鼎信通讯股份有限公司 Electric energy meter full-function test platform based on script language
CN111949533A (en) * 2020-08-12 2020-11-17 安徽继远检验检测技术有限公司 Embedded software automatic test platform of electric power intelligent terminal
CN112463614A (en) * 2020-12-01 2021-03-09 北京计算机技术及应用研究所 Software virtualization test environment construction method based on hardware board card access
CN112286833A (en) * 2020-12-31 2021-01-29 中国电力科学研究院有限公司 Intelligent electric energy meter real-time operating system drive test method and device

Also Published As

Publication number Publication date
CN115993570A (en) 2023-04-21

Similar Documents

Publication Publication Date Title
US10678673B2 (en) Software program fault localization
US8683442B2 (en) Software test case generation from a partial design model
US9158514B2 (en) Method and apparatus for providing change-related information
JP4266226B2 (en) Design verification system and method using checker validated selectively
CN111831573B (en) Method, device, computer system and medium for determining code branch coverage condition
US20070180414A1 (en) Facilitating structural coverage of a design during design verification
CN107710166A (en) Using checking after the silicon of the quick error detection of symbol and debug
US20100077381A1 (en) Method to speed Up Creation of JUnit Test Cases
CN111752833B (en) Software quality system approval method, device, server and storage medium
US11663113B2 (en) Real time fault localization using combinatorial test design techniques and test case priority selection
US10606732B2 (en) Hybrid genetic concolic co-verification of hardware and software
WO2023065438A1 (en) Virtual hardware test acceleration method and apparatus for software function of electricity meter
CN115803642A (en) Automatically assisted circuit verification
CN114661615B (en) FPGA software testing method and device
US8954310B2 (en) Automatic designation of equivalent variable values
CN110347589B (en) Software unit test automatic detection method and system
Condia et al. Untestable faults identification in GPGPUs for safety-critical applications
CN113127364A (en) Performance test method and device, electronic equipment and storage medium
CN112527631A (en) bug positioning method, system, electronic equipment and storage medium
CN110688297A (en) Automatic test method for computational logic configuration
Godboley et al. Dy-COPECA: A Dynamic Version of MC/DC Analyzer for C Program.
CN117093353B (en) Interrupt control method and device, electronic equipment and readable storage medium
CN115878454A (en) Torque path testing method and device based on historical testing data and electronic equipment
CN110598320B (en) Instruction set simulator calibration method based on hardware simulation accelerator
CN115525573A (en) Inter-chip communication testing method and system in instrument

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21961177

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE