Method and system for destructive program function verification
Patent Information
- Application Number
- CN202110805165.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-16
- Publication Date
- 2026-08-28
- Estimated Expiration
- 2041-07-16
AI Technical Summary
[0004]然而,现行验证方法需先全面测试后再针对不同问题点重复执行,需耗费冗长时间在系统一次次重新建置上,测试效率低
[0015] Therefore, based on the technical content of this case, since the method of importing the difference elements one by one is used for program function verification, the location of the problem can be identified when the program function verification fails, and there is no need to update all the difference elements to the verification area before confirmation. Therefore, verification time can be saved, making the overall verification process more efficient.
Smart Images

Figure CN115617645B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a verification method, and more particularly to a program function verification method and its corresponding system. Background Technology
[0002] With the continuous development of computer technology, all kinds of applications have been developed. However, as the number, types and application scope of programs continue to increase, if a program suddenly malfunctions during operation, it is necessary to immediately identify the location of the problem. Otherwise, in addition to the inability to complete its own tasks smoothly, it may also affect the continued operation of other programs.
[0003] Traditionally, during program verification testing, after a function is fixed or adjusted, the modified program code is completely updated to the test verification area for confirmation. This involves verifying the code against the original program framework, targeting a single functionality or all functions. If discrepancies are found with expectations, a line-by-line verification is performed, and the above steps are repeated until the program passes verification.
[0004] However, current verification methods require comprehensive testing before repeated execution for different problem points, which takes a long time to rebuild the system repeatedly, resulting in low testing efficiency. Summary of the Invention
[0005] One embodiment of this case provides a destructive program function verification method for verifying the program function of a code block to be verified, comprising: comparing the code block to be verified with a standard code block to search for at least one difference element between the code block to be verified and the standard code block; moving the at least one difference element to the standard code block one by one to perform a program function verification of the standard code block; and determining whether the program function verification of the standard code block is normal, wherein if the program function verification of the standard code block is normal, a new case is activated to execute the program function to form a new code block to be verified.
[0006] In some embodiments, the standard code block is the code block that was originally installed when the code block to be verified was first installed.
[0007] In some embodiments, the at least one difference element is a binary code.
[0008] In some embodiments, the step-by-step transfer of the at least one difference element to the standard code block for verification further includes: replacing the element in the standard code block corresponding to the at least one difference element with the at least one difference element; and verifying whether the program function of the standard code block having the at least one difference element is working properly.
[0009] In some embodiments, the at least one difference element includes a plurality of difference elements, which form a plurality of different combinations of difference elements.
[0010] In some embodiments, the destructive program functionality verification method further includes: replacing the elements in the standard program code block corresponding to the combinations of differences with the differences in the combinations of differences respectively; and verifying whether the program functionality of the standard program code block having the combinations of differences is operating correctly.
[0011] In some embodiments, the destructive program functionality verification method further includes marking the corresponding difference element combination that fails verification as verification failure.
[0012] In some embodiments, when the program function of the standard code block having the combinations of the difference elements is not working properly, the method further includes: replacing each difference element in the combinations of the difference elements with the corresponding element in the standard code block in sequence, and re-verifying the program function.
[0013] In some embodiments, the destructive program function verification method further includes: comparing the new code block to be verified with the standard code block to search for at least one difference element between the new code block to be verified and the standard code block; moving the at least one difference element to the standard code block one by one to perform a program function verification of the standard code block; and determining whether the program function verification of the standard code block is normal.
[0014] Another embodiment of this case provides a destructive program function verification system for verifying the program function of a code block to be verified, comprising: a comparison element for comparing the code block to be verified with a standard code block to search for at least one difference element between the code block to be verified and the standard code block; a verification element coupled to the comparison element for transferring the at least one difference element to the standard code block item by item to perform a program function verification of the standard code block; and a judgment element coupled to the verification element for judging whether the program function verification of the standard code block is normal, wherein when the program function verification of the standard code block is normal, a new case is activated to execute the program function to form a new code block to be verified.
[0015] Therefore, based on the technical content of this case, since the method of importing the difference elements one by one is used for program function verification, the location of the problem can be identified when the program function verification fails, and there is no need to update all the difference elements to the verification area before confirmation. Therefore, verification time can be saved, making the overall verification process more efficient. Attached Figure Description
[0016] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present invention and, together with the specification, serve to explain the technical solutions of the embodiments of the present invention.
[0017] Figure 1 The diagram shown is a schematic flowchart of a destructive program functionality verification process according to a preferred embodiment of the present invention.
[0018] Figure 2 The diagram shown is a schematic representation of a destructive program functionality verification system according to a preferred embodiment of the present invention.
[0019] [Symbol Explanation]
[0020] 100: Destructive Program Functionality Verification Method
[0021] 101-105: Steps
[0022] 200: Verification System
[0023] 220: Memory
[0024] 240: Processor
[0025] 242: Comparison Components
[0026] 244: Verification Element
[0027] 246: Determine the component Detailed Implementation
[0028] The spirit of this case will be clearly explained below with reference to the accompanying drawings and detailed description. Anyone skilled in the art can make changes and modifications based on the technology taught in this case after understanding the embodiments of this case, without departing from the spirit and scope of this case.
[0029] The terminology used herein is for the purpose of describing specific embodiments only and is not intended to limit the scope of this work. Singular forms such as “a,” “this,” “this,” “the,” and “the” as used herein also include plural forms.
[0030] The terms "coupled" or "connected" as used in this article can refer to two or more components or devices making direct physical contact with each other, or making indirect physical contact with each other, or to two or more components or devices operating or acting on each other.
[0031] The terms “include,” “including,” “have,” “contain,” etc., used in this article are all open-ended terms, meaning that they include but are not limited to.
[0032] The term "and / or" as used herein refers to any or all of the things mentioned.
[0033] Unless otherwise specified, the terms used herein generally have their ordinary meaning in the context of the art, the subject matter, and the specific content of this case. Certain terms used to describe this case will be discussed below or elsewhere in this specification to provide additional guidance to those skilled in the art in describing the case.
[0034] Figure 1 The diagram illustrates a flowchart of a destructive program functionality verification method according to a preferred embodiment of the present invention. The present invention provides a destructive program functionality verification method to improve program verification efficiency and reduce verification costs, such as... Figure 1 As shown, the destructive program functionality verification method 100 first performs element comparison in step 101. In one embodiment, a program code block to be verified is compared with a standard program code block to identify the differences between the two program code regions. The program code block to be verified is, for example, a program code block that a client considers to be malfunctioning, while the standard program code block is, for example, the standard program code block that was initially installed corresponding to this malfunctioning program code block. Through this comparison, the differences between the program code block to be verified and the standard program code block can be separated. In one embodiment, these differences are binary codes. If a program code block to be verified and the standard program code block have 10 different binary codes, these 10 different binary codes will be separated for subsequent verification.
[0035] Step 102: Move the difference element item by item to the standard code block for program function verification. In one embodiment, the element corresponding to this difference element in the standard code block is replaced by this difference element to verify whether the program function of the standard code block with this difference element is working properly. If the standard code block can still maintain normal program function after being replaced with the difference element, then this difference element is not the element causing the abnormal program function, the verification is passed, and the next difference element program function verification is performed. In one embodiment, each difference element will first replace the corresponding element in the standard code block in sequence for program function verification, and then the collaborative operation between the difference elements will be verified to verify whether the abnormal operation of the standard code block program function is caused by the joint operation of different difference elements. In this case, different combinations will be formed between the difference elements to perform program function verification. In one embodiment, the different combinations of difference elements are verified sequentially in the manner of minimum constituent elements. That is, first, a combination formed by a single difference element replaces the corresponding element in the standard code block for program function verification. Then, a combination formed by two difference elements replaces the corresponding element in the standard code block for program function verification, and so on. If the verification passes, the difference element combination is marked as having passed the difference verification. In one embodiment, if the program function verification of one of the difference element combinations fails during the verification process, each difference element in this difference element combination is replaced sequentially with the corresponding element in the standard code block. By decomposing the combination, the program function verification is performed again to search for the combination that is actually causing the abnormal operation of the standard code block. In one embodiment, a combination of difference elements includes five difference elements: A, B, C, D, and E. When an error occurs during program function verification by replacing the corresponding element in the standard program code block with this combination of difference elements, the difference element E in the combination of difference elements can be replaced with the corresponding element in the standard program code block first, and then the program function verification can be performed again with the combination of difference elements A, B, C, and D. If the verification passes, then the difference element E is confirmed to be the element causing the abnormal program function operation. In another embodiment, if the program function operation still causes an abnormality, the program function verification is performed again by sequentially replacing each difference element in the combination of difference elements with the corresponding element in the standard program code block using a decomposition method.
[0036] Step 103: Determine whether a discrepancy element causing abnormal program function operation has been found. If, in step 103, it is determined that a discrepancy element causing abnormal program function operation has been found in step 102, then proceed to step 104 to end the destructive program function verification. Otherwise, if no discrepancy element causing abnormal program function operation is found in step 102, then proceed to step 105 to test with a new case. In one embodiment, to avoid the inability to use discrepancy elements to determine all program functions of a program block because the case used does not utilize all program functions of the block, a new case is used to fully execute all program functions of the code block to be verified, thereby generating a new code block to be verified. Then, step 101 is re-executed for element comparison, and the destructive program function verification method 100 is performed again.
[0037] Figure 2 The diagram illustrates a schematic representation of a destructive program functional verification system according to a preferred embodiment of the present invention. In this embodiment, the destructive program functional verification system 200 includes at least a memory 220 and a processor 240, the memory 220 being communicatively or electrically coupled to the processor 240. In some embodiments, the processor 240 may include, but is not limited to, a single processing unit or an integration of multiple microprocessors, the single processing unit or the integration of microprocessors being electrically coupled to the memory 220, wherein the memory 220 may be internal or external memory, including volatile or non-volatile memory. In this embodiment, the processor 240 may access and execute at least one instruction from the memory 220 to further implement a destructive program functional verification procedure defined by the at least one instruction. In some embodiments, the processor 240 may be implemented using an application-specific integrated circuit (ASIC). In one embodiment, the processor 240 includes a comparison element 242, a verification element 244, and a judgment element 246.
[0038] The comparison element 242 is used to perform element comparison. In one embodiment, a code block to be verified is compared with a standard code block to identify the differences between the two code regions. In one embodiment, this difference element is a binary code.
[0039] Verification element 244 is coupled to comparison element 242 to move the difference elements identified by comparison element 242 to the standard code block for program function verification. In one embodiment, different combinations are formed between the difference elements for program function verification. By replacing the element in the standard code block corresponding to this difference element combination with this difference element combination, the program function of the standard code block with this difference element combination is verified to be normal. If the verification passes, verification element 244 marks this difference element combination as having passed the difference verification. In one embodiment, if one difference element combination fails the verification process, verification element 244 will sequentially replace each difference element in this difference element combination with the corresponding element in the standard code block, and re-perform the program function verification in a decombination manner to find the difference element combination that is actually causing the abnormal operation of the standard code block.
[0040] The judgment element 246, coupled to the verification element 244, determines whether a discrepancy element causing abnormal program operation has been found. If the judgment element 246 determines that a discrepancy element causing abnormal program operation of a code block to be verified has been found, the judgment element 246 terminates the destructive program function verification process. If the judgment element 246 determines that no discrepancy element causing abnormal program operation has been found, the processor 240 generates a code block to be verified again using a new case and re-performs the destructive program function verification process to avoid some program functions not being executed due to insufficient case coverage.
[0041] Accordingly, this invention provides a destructive program functionality verification system and method. Because it uses a method of importing differential elements one by one for program functionality verification, the location of the problem can be identified immediately when the program functionality verification fails, making it quite convenient to use. Furthermore, it eliminates the need to update all differential elements to the verification area before performing program functionality verification, thus saving verification time and making the overall verification process more efficient.
[0042] Although the present invention has been disclosed above with reference to embodiments, it is not intended to limit the scope of the present invention. Any person skilled in the art may make various modifications and alterations without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention shall be determined by the scope defined in the appended claims.
Claims
1. A destructive program function verification method, used to verify the program function of a code block to be verified, characterized in that, include: Compare the code block to be verified with a standard code block to search for at least one difference element between the code block to be verified and the standard code block; The at least one differing element is moved item by item to the standard code block to perform a program function verification of the standard code block; as well as Determine whether the program function verification of the standard code block is normal. If the program function verification of the standard code block is normal, a new case is used to execute the program function to form a new code block to be verified. This also includes: Compare the new code block to be verified with the standard code block to search for at least one difference element between the new code block to be verified and the standard code block; The at least one differing element is moved item by item to the standard code block to perform a program function verification of the standard code block; as well as Determine whether the program function verification of this standard program code block is normal. The standard program code block is the program code block that was originally installed when the program code block to be verified was installed, and the at least one difference element is a binary code.
2. The destructive program functionality verification method according to claim 1, characterized in that, The step-by-step relocation of the at least one differing element to the standard code block for verification also includes: Replace the element in the standard code block that corresponds to at least one difference element with the element that corresponds to at least one difference element; and Verify whether the program function is working correctly for the standard code block that has at least one difference element.
3. The destructive program functionality verification method according to claim 1, characterized in that, The at least one difference element includes multiple difference elements, which form multiple different combinations of difference elements.
4. The destructive program functionality verification method according to claim 3, characterized in that, Also includes: The elements in the standard code block corresponding to the multiple combinations of differing elements are replaced with the differing elements from the multiple combinations of differing elements. as well as Verify whether the program function is working properly for each standard program code block with the aforementioned combinations of different elements.
5. The destructive program functionality verification method according to claim 4, characterized in that, It also includes marking the corresponding difference element combination that fails to validate as a validation failure.
6. The destructive program functionality verification method according to claim 4, characterized in that, When the program function of the standard program code block having the aforementioned combination of multiple difference elements malfunctions, it also includes: Each of the multiple difference elements in the combination of difference elements is replaced sequentially with the corresponding element in the standard program code block, and the program function is verified again.
7. A destructive program function verification system, used to verify the program function of a code block to be verified, characterized in that, include: A comparison element is used to compare the code block to be verified with a standard code block to search for at least one difference element between the code block to be verified and the standard code block. A verification element is coupled to the comparison element to move the at least one difference element to the standard code block one by one to perform a program function verification of the standard code block. as well as A judgment element is coupled to the verification element to determine whether the program function verification of the standard program code block is normal. If the program function verification of the standard program code block is normal, a new case is activated to execute the program function to form a new program code block to be verified. The system also includes: Compare the new code block to be verified with the standard code block to search for at least one difference element between the new code block to be verified and the standard code block; The at least one different element is moved item by item to the standard code block to perform a program function verification of the standard code block; as well as Determine whether the program function verification of this standard program code block is normal. The standard program code block is the program code block that was originally installed when the program code block to be verified was installed, and the at least one difference element is a binary code.
Citation Information
Patent Citations
Method and equipment for automatically testing software
CN104765692A
Software test method, device and apparatus and computer storage medium
CN108491331A