CN117033203A - Method and device for determining association influence of change codes and electronic equipment - Google Patents

Method and device for determining association influence of change codes and electronic equipment Download PDF

Info

Publication number
CN117033203A
CN117033203A CN202310995172.6A CN202310995172A CN117033203A CN 117033203 A CN117033203 A CN 117033203A CN 202310995172 A CN202310995172 A CN 202310995172A CN 117033203 A CN117033203 A CN 117033203A
Authority
CN
China
Prior art keywords
function
call relation
parameter information
relation
source code
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202310995172.6A
Other languages
Chinese (zh)
Inventor
梅强强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Bank Co Ltd
Original Assignee
Ping An Bank Co Ltd
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 Ping An Bank Co Ltd filed Critical Ping An Bank Co Ltd
Priority to CN202310995172.6A priority Critical patent/CN117033203A/en
Publication of CN117033203A publication Critical patent/CN117033203A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties of programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties of programs
    • G06F11/3612Software analysis for verifying properties of programs by runtime analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/75Structural analysis for program understanding
    • 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

Abstract

The application provides a method, a device and electronic equipment for determining the association influence of a change code, wherein in the method, the static call relation of a function in a source code corresponding to a code change system, the dynamic call relation of the function, the call relation of the function when the function is executed, the input parameter information and the output parameter information of the function are collected, further, a function call relation diagram is built according to the collected information, finally, an objective function call relation chain to which the current change function belongs is determined in the function call relation diagram, and the association function influenced by the current change function is determined according to the objective function call relation chain.

Description

Method and device for determining association influence of change codes and electronic equipment
Technical Field
The present application relates to the technical field of software testing, and in particular, to a method and apparatus for determining an influence of association of a modified code, and an electronic device.
Background
Along with the rapid development of banking business, the iteration speed of a banking system is faster and faster, the engineering scale of system software is larger and larger, the code quantity is larger and larger, and the influence evaluation workload of each change is larger and larger due to the huge system scale and high complexity of a banking traditional system architecture, so that the testing workload caused by each change is also gradually increased. For example, in a financial transaction scenario (such as a daily asset), since a new transaction code is often required to be added in the business development, the transaction code is also required to be correspondingly added in the link of the accounting processing system, so as to ensure that multiple links such as "daily- & gt transaction- & gt accounting- & gt authorized matching- & gt big data downloading- & gt are matched layer by layer, thus the change in multiple business systems is required. However, since these changes are made on existing systems, there is no effective way to identify and quickly verify what effects have on existing business functions, other than to satisfy the newly added transaction scenario.
Although the techniques of automated testing, code test coverage analysis, etc. are mature, they can support rapid verification or accurate verification coverage for altered codes, for those portions of the code that may be affected by the alteration, they may not be in the automated test coverage and may not be identified by the test coverage analysis. If the change-affected surface and which codes are affected by the current change code cannot be accurately identified, new quality risks may be introduced by the change.
In summary, how to accurately identify the associated influence of code change is a technical problem to be solved.
Disclosure of Invention
Accordingly, the present application is directed to a method, an apparatus and an electronic device for determining the influence of code modification, so as to solve the technical problem that the influence of code modification cannot be accurately identified in the prior art.
In a first aspect, an embodiment of the present application provides a method for determining an association effect of a change code, including:
acquiring a static call relation of a function in a source code corresponding to a code changing system;
acquiring a dynamic calling relation of a function in the source code;
recording the calling relation of a function, the input parameter information and the output parameter information of the function when the function is executed;
analyzing the static call relation of the function, the dynamic call relation of the function, the call relation of the function when the function is executed, the input parameter information and the output parameter information of the function so as to establish a function call relation diagram;
and determining an objective function call relation chain to which the current change function belongs in the function call relation diagram, and determining an associated function influenced by the current change function according to the objective function call relation chain.
Further, obtaining a static call relation of a function in a source code corresponding to the code changing system includes:
analyzing the source code by using a grammar analyzer to obtain a grammar tree corresponding to the source code;
traversing the grammar tree to obtain the static call relation of the function.
Further, obtaining the dynamic call relation of the function in the source code includes:
and dynamically executing the source code on a preset platform, and collecting the dynamic call relation of the function when the source code runs.
Further, recording a call relation of a function, input parameter information and output parameter information of the function when the function is executed, including:
recording the calling relation of the function, the input parameter information and the output parameter information of the function when the function is executed by using the annotation and metadata, wherein the calling relation of the function carries the name of the function and the name of the class to which the function belongs when the function is recorded.
Further, the function call relation graph is a structure based on call relation among functions.
Further, the method further comprises:
and designing test cases for the current change function and the association function so as to test the current change function and the association function.
Further, the method further comprises:
multiplexing the test cases corresponding to the current change function and the association function to test the current change function and the association function.
In a second aspect, an embodiment of the present application further provides a device for determining an association effect of a change code, including:
the first acquisition unit is used for acquiring the static call relation of the function in the source code corresponding to the code changing system;
the second acquisition unit is used for acquiring the dynamic calling relation of the function in the source code;
the recording unit is used for recording the calling relation of the function, the input parameter information and the output parameter information of the function when the function is executed;
the analysis unit is used for analyzing the static call relation of the function, the dynamic call relation of the function, the call relation of the function when the function is executed, the input parameter information and the output parameter information of the function so as to establish a function call relation diagram;
and the determining unit is used for determining an objective function call relation chain to which the current change function belongs in the function call relation diagram, and determining an associated function influenced by the current change function according to the objective function call relation chain.
In a third aspect, an embodiment of the present application further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the steps of the method according to any one of the first aspects when the processor executes the computer program.
In a fourth aspect, embodiments of the present application also provide a computer-readable storage medium storing machine-executable instructions which, when invoked and executed by a processor, cause the processor to perform the method of any one of the first aspects.
In an embodiment of the present application, a method for determining an influence of association of a change code is provided, including: acquiring a static call relation of a function in a source code corresponding to a code changing system; acquiring a dynamic calling relation of a function in a source code; recording the calling relation of the function, the input parameter information and the output parameter information of the function when the function is executed; analyzing the static call relation of the function, the dynamic call relation of the function, the call relation of the function during the execution of the function, the input parameter information and the output parameter information of the function so as to establish a function call relation diagram; and determining an objective function calling relation chain to which the current change function belongs in the function calling relation diagram, and determining an associated function influenced by the current change function according to the objective function calling relation chain. As can be seen from the above description, in the method for determining the association influence of the change code of the present application, the static call relationship, the dynamic call relationship, the input parameter information and the output parameter information of the function in the source code corresponding to the code change system are collected, and then a function call relationship graph is established according to the collected information.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present application, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for determining the influence of association of a change code according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a determining apparatus for determining an influence of association of a change code according to an embodiment of the present application;
fig. 3 is a schematic diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions of the present application will be clearly and completely described in connection with the embodiments, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The prior art cannot accurately identify the associated effects of code changes.
Based on the above, in the method for determining the association influence of the change code of the present application, the static call relationship, the dynamic call relationship, the input parameter information and the output parameter information of the function in the source code corresponding to the code change system are collected, and then a function call relationship graph is established according to the collected information, finally, the objective function call relationship chain to which the current change function belongs is determined in the function call relationship graph, and the association function influenced by the current change function is determined according to the objective function call relationship chain.
For the convenience of understanding the present embodiment, a detailed description will be given of the determination of the influence of association of a modification code disclosed in the embodiment of the present application.
Embodiment one:
in accordance with an embodiment of the present application, there is provided an embodiment of a method of determining the associated impact of altering code, it being noted that the steps illustrated in the flowchart of the figures may be performed in a computer system, such as a set of computer executable instructions, and that, although a logical order is illustrated in the flowchart, in some cases, the steps illustrated or described may be performed in an order other than that illustrated herein.
FIG. 1 is a flow chart of a method for determining the influence of the association of a change code according to an embodiment of the present application, as shown in FIG. 1, the method comprising the steps of:
step S102, obtaining a static call relation of a function in a source code corresponding to a code changing system;
step S104, obtaining the dynamic calling relation of the function in the source code;
step S106, recording the calling relation of the function, the input parameter information and the output parameter information of the function when the function is executed;
step S108, analyzing the static call relation of the function, the dynamic call relation of the function, the call relation of the function during the execution of the function, the input parameter information and the output parameter information of the function so as to establish a function call relation diagram;
specifically, by analyzing the recorded data, a function call relationship graph can be established. A function call relationship graph is a structure based on call relationships between functions that indicates which function called which other functions. This allows us to understand the overall structure of the program to identify potential associative effects or problems for improvement (the process is a process that invokes relational analysis).
Step S110, determining an objective function calling relation chain to which the current change function belongs in the function calling relation diagram, and determining an associated function influenced by the current change function according to the objective function calling relation chain.
Specifically, the target function call relation chain to which the current change function belongs is queried through the function call relation graph, and the affected association function or code function is analyzed according to the target function call relation chain (the process is a change influence analysis process).
In an embodiment of the present application, a method for determining an influence of association of a change code is provided, including: acquiring a static call relation of a function in a source code corresponding to a code changing system; acquiring a dynamic calling relation of a function in a source code; recording the calling relation of the function, the input parameter information and the output parameter information of the function when the function is executed; analyzing the static call relation of the function, the dynamic call relation of the function, the call relation of the function during the execution of the function, the input parameter information and the output parameter information of the function so as to establish a function call relation diagram; and determining an objective function calling relation chain to which the current change function belongs in the function calling relation diagram, and determining an associated function influenced by the current change function according to the objective function calling relation chain. As can be seen from the above description, in the method for determining the association influence of the change code of the present application, the static call relationship, the dynamic call relationship, the input parameter information and the output parameter information of the function in the source code corresponding to the code change system are collected, and then a function call relationship graph is established according to the collected information.
The above-mentioned content briefly describes a method for determining the influence of the association of the change code of the present application, and the detailed description will be given below on the specific content involved therein.
In an optional embodiment of the present application, a static call relationship of a function in a source code corresponding to a code change system is obtained, which specifically includes the following steps:
(1) Analyzing the source code by using a grammar analyzer to obtain a grammar tree corresponding to the source code;
(2) Traversing the grammar tree to obtain the static call relation of the function.
The above process is a source code parsing process.
In an alternative embodiment of the present application, the method for obtaining the dynamic call relation of the function in the source code specifically includes the following steps:
and dynamically executing the source code on a preset platform, and collecting the dynamic calling relation of the function when the source code runs.
Specifically, the source code can be dynamically executed by using preset platforms such as JVM, node. Js and the like, and the dynamic call relation of the function is collected when the source code runs.
The above-described process is a dynamically running process.
In an alternative embodiment of the present application, the call relation of the function, the input parameter information and the output parameter information of the function when the function is executed are recorded, and the method specifically includes the following steps:
recording the calling relation of the function, the input parameter information and the output parameter information of the function when the function is executed by using the annotation and metadata, wherein the calling relation of the function carries the name of the function and the name of the class to which the function belongs when the function is recorded.
Specifically, when each function is executed, related information such as call relation, input parameter information, output parameter information and the like of the function is recorded in a data structure.
The input and output parameters of each function are observed and connected with the calling relations of other functions. At the time of recording, it is necessary to specify the names of functions and the names of the classes to which they belong, and their input-output parameters. This can be achieved by using annotations and metadata (this process is a process of running analysis for a function).
In an alternative embodiment of the present application, the function call relationship graph is a structure based on call relationships between functions.
In an alternative embodiment of the application, the method further comprises:
and designing test cases for the current change function and the associated function to test the current change function and the associated function.
In an alternative embodiment of the application, the method further comprises:
multiplexing the test cases corresponding to the current change function and the association function to test the current change function and the association function.
The test cases are accurate minimum test coverage cases.
The method for determining the association influence of the change code expands aiming at how to accurately identify the association influence of the code change so as to test and verify the function affected by the association, thereby comprehensively evaluating the change quality, accurately analyzing the association or potential influence of the identification code change, and aiming at the influence code, designing and testing with pertinence, thereby accurately evaluating the association influence of the change on the basis of evaluating the quality of the change.
Embodiment two:
the embodiment of the application also provides a device for determining the association influence of the change code, which is mainly used for executing the method for determining the association influence of the change code provided in the first embodiment of the application.
FIG. 2 is a schematic diagram of a device for determining the influence of association of a change code according to an embodiment of the present application, as shown in FIG. 2, the device mainly includes: a first acquisition unit 10, a second acquisition unit 20, a recording unit 30, an analysis unit 40, and a determination unit 50, wherein:
the first acquisition unit is used for acquiring the static call relation of the function in the source code corresponding to the code changing system;
the second acquisition unit is used for acquiring the dynamic calling relation of the function in the source code;
the recording unit is used for recording the calling relation of the function, the input parameter information and the output parameter information of the function when the function is executed;
the analysis unit is used for analyzing the static call relation of the function, the dynamic call relation of the function, the call relation of the function during the execution of the function, the input parameter information and the output parameter information of the function so as to establish a function call relation diagram;
and the determining unit is used for determining an objective function calling relation chain to which the current change function belongs in the function calling relation diagram, and determining an associated function influenced by the current change function according to the objective function calling relation chain.
In an embodiment of the present application, a device for determining an influence of association of a change code is provided, including: acquiring a static call relation of a function in a source code corresponding to a code changing system; acquiring a dynamic calling relation of a function in a source code; recording the calling relation of the function, the input parameter information and the output parameter information of the function when the function is executed; analyzing the static call relation of the function, the dynamic call relation of the function, the call relation of the function during the execution of the function, the input parameter information and the output parameter information of the function so as to establish a function call relation diagram; and determining an objective function calling relation chain to which the current change function belongs in the function calling relation diagram, and determining an associated function influenced by the current change function according to the objective function calling relation chain. As can be seen from the above description, in the determining device for the association influence of the change code of the present application, the static call relationship, the dynamic call relationship, the input parameter information and the output parameter information of the function in the source code corresponding to the code change system are collected, and then a function call relationship graph is established according to the collected information.
Optionally, the first obtaining unit is further configured to: analyzing the source code by using a grammar analyzer to obtain a grammar tree corresponding to the source code; traversing the grammar tree to obtain the static call relation of the function.
Optionally, the second acquisition unit is further configured to: and dynamically executing the source code on a preset platform, and collecting the dynamic calling relation of the function when the source code runs.
Optionally, the recording unit is further configured to: recording the calling relation of the function, the input parameter information and the output parameter information of the function when the function is executed by using the annotation and metadata, wherein the calling relation of the function carries the name of the function and the name of the class to which the function belongs when the function is recorded.
Optionally, the function call relationship graph is a structure based on call relationships between functions.
Optionally, the device is further configured to: and designing test cases for the current change function and the associated function to test the current change function and the associated function.
Optionally, the device is further configured to: multiplexing the test cases corresponding to the current change function and the association function to test the current change function and the association function.
The device provided by the embodiment of the present application has the same implementation principle and technical effects as those of the foregoing method embodiment, and for the sake of brevity, reference may be made to the corresponding content in the foregoing method embodiment where the device embodiment is not mentioned.
As shown in fig. 3, an electronic device 600 provided in an embodiment of the present application includes: the system comprises a processor 601, a memory 602 and a bus, wherein the memory 602 stores machine-readable instructions executable by the processor 601, the processor 601 and the memory 602 communicate through the bus when the electronic device is running, and the processor 601 executes the machine-readable instructions to perform the steps of the method for determining the associative effect of the change code as follows.
The method comprises the following steps:
acquiring a static call relation of a function in a source code corresponding to a code changing system;
acquiring a dynamic calling relation of a function in a source code;
recording the calling relation of the function, the input parameter information and the output parameter information of the function when the function is executed;
analyzing the static call relation of the function, the dynamic call relation of the function, the call relation of the function during the execution of the function, the input parameter information and the output parameter information of the function so as to establish a function call relation diagram;
and determining an objective function calling relation chain to which the current change function belongs in the function calling relation diagram, and determining an associated function influenced by the current change function according to the objective function calling relation chain.
Optionally, acquiring a static call relationship of a function in source code corresponding to the code changing system includes: analyzing the source code by using a grammar analyzer to obtain a grammar tree corresponding to the source code; traversing the grammar tree to obtain the static call relation of the function.
Optionally, obtaining a dynamic call relation of a function in the source code includes: and dynamically executing the source code on a preset platform, and collecting the dynamic calling relation of the function when the source code runs.
Optionally, recording the calling relation of the function, the input parameter information and the output parameter information of the function when the function is executed, including: recording the calling relation of the function, the input parameter information and the output parameter information of the function when the function is executed by using the annotation and metadata, wherein the calling relation of the function carries the name of the function and the name of the class to which the function belongs when the function is recorded.
Optionally, the function call relationship graph is a structure based on call relationships between functions.
Optionally, the method further comprises: and designing test cases for the current change function and the associated function to test the current change function and the associated function.
Optionally, the method further comprises: multiplexing the test cases corresponding to the current change function and the association function to test the current change function and the association function.
Specifically, the memory 602 and the processor 601 can be general-purpose memories and processors, and the method for determining the influence of the modification code can be performed when the processor 601 runs a computer program stored in the memory 602.
The processor 601 may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in the processor 601 or instructions in the form of software. The processor 601 may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but may also be a digital signal processor (Digital Signal Processing, DSP for short), application specific integrated circuit (Application Specific Integrated Circuit, ASIC for short), off-the-shelf programmable gate array (Field-Programmable Gate Array, FPGA for short), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be embodied directly in the execution of a hardware decoding processor, or in the execution of a combination of hardware and software modules in a decoding processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory 602, and the processor 601 reads information in the memory 602 and performs the steps of the above method in combination with its hardware.
In response to the above method for determining the influence of the association of the change code, embodiments of the present application also provide a computer-readable storage medium storing machine-executable instructions that, when invoked and executed by a processor, cause the processor to perform the steps of the method for determining the influence of the association of the change code described below.
The method comprises the following steps:
acquiring a static call relation of a function in a source code corresponding to a code changing system;
acquiring a dynamic calling relation of a function in a source code;
recording the calling relation of the function, the input parameter information and the output parameter information of the function when the function is executed;
analyzing the static call relation of the function, the dynamic call relation of the function, the call relation of the function during the execution of the function, the input parameter information and the output parameter information of the function so as to establish a function call relation diagram;
and determining an objective function calling relation chain to which the current change function belongs in the function calling relation diagram, and determining an associated function influenced by the current change function according to the objective function calling relation chain.
Optionally, acquiring a static call relationship of a function in source code corresponding to the code changing system includes: analyzing the source code by using a grammar analyzer to obtain a grammar tree corresponding to the source code; traversing the grammar tree to obtain the static call relation of the function.
Optionally, obtaining a dynamic call relation of a function in the source code includes: and dynamically executing the source code on a preset platform, and collecting the dynamic calling relation of the function when the source code runs.
Optionally, recording the calling relation of the function, the input parameter information and the output parameter information of the function when the function is executed, including: recording the calling relation of the function, the input parameter information and the output parameter information of the function when the function is executed by using the annotation and metadata, wherein the calling relation of the function carries the name of the function and the name of the class to which the function belongs when the function is recorded.
Optionally, the function call relationship graph is a structure based on call relationships between functions.
Optionally, the method further comprises: and designing test cases for the current change function and the associated function to test the current change function and the associated function.
Optionally, the method further comprises: multiplexing the test cases corresponding to the current change function and the association function to test the current change function and the association function.
The determining device for the association influence of the change code provided by the embodiment of the application can be specific hardware on the equipment or software or firmware installed on the equipment. The device provided by the embodiment of the present application has the same implementation principle and technical effects as those of the foregoing method embodiment, and for the sake of brevity, reference may be made to the corresponding content in the foregoing method embodiment where the device embodiment is not mentioned. It will be clear to those skilled in the art that, for convenience and brevity, the specific operation of the system, apparatus and unit described above may refer to the corresponding process in the above method embodiment, which is not described in detail herein.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, for example, the division of the units is merely a logical function division, and there may be other manners of division in actual implementation, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some communication interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
As another example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments provided in the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing an electronic device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the vehicle marking method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
It should be noted that: like reference numerals and letters in the following figures denote like items, and thus once an item is defined in one figure, no further definition or explanation of it is required in the following figures, and furthermore, the terms "first," "second," "third," etc. are used merely to distinguish one description from another and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: the above examples are only specific embodiments of the present application, and are not intended to limit the scope of the present application, but it should be understood by those skilled in the art that the present application is not limited thereto, and that the present application is described in detail with reference to the foregoing examples: any person skilled in the art may modify or easily conceive of the technical solution described in the foregoing embodiments, or perform equivalent substitution of some of the technical features, while remaining within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit of the corresponding technical solutions. Are intended to be encompassed within the scope of the present application. Therefore, the protection scope of the application is subject to the protection scope of the claims.

Claims (10)

1. A method for determining an associated effect of a change code, comprising:
acquiring a static call relation of a function in a source code corresponding to a code changing system;
acquiring a dynamic calling relation of a function in the source code;
recording the calling relation of a function, the input parameter information and the output parameter information of the function when the function is executed;
analyzing the static call relation of the function, the dynamic call relation of the function, the call relation of the function when the function is executed, the input parameter information and the output parameter information of the function so as to establish a function call relation diagram;
and determining an objective function call relation chain to which the current change function belongs in the function call relation diagram, and determining an associated function influenced by the current change function according to the objective function call relation chain.
2. The method of claim 1, wherein obtaining a static call relationship of a function in source code corresponding to a code altering system comprises:
analyzing the source code by using a grammar analyzer to obtain a grammar tree corresponding to the source code;
traversing the grammar tree to obtain the static call relation of the function.
3. The method of claim 1, wherein obtaining the dynamic call relationship of the function in the source code comprises:
and dynamically executing the source code on a preset platform, and collecting the dynamic call relation of the function when the source code runs.
4. The method according to claim 1, wherein recording a call relation of a function at the time of execution of the function, input parameter information and output parameter information of the function, comprises:
recording the calling relation of the function, the input parameter information and the output parameter information of the function when the function is executed by using the annotation and metadata, wherein the calling relation of the function carries the name of the function and the name of the class to which the function belongs when the function is recorded.
5. The method of claim 1, wherein the function call graph is a structure based on call relationships between functions.
6. The method according to claim 1, wherein the method further comprises:
and designing test cases for the current change function and the association function so as to test the current change function and the association function.
7. The method according to claim 1, wherein the method further comprises:
multiplexing the test cases corresponding to the current change function and the association function to test the current change function and the association function.
8. A device for determining the influence of an association of a change code, comprising:
the first acquisition unit is used for acquiring the static call relation of the function in the source code corresponding to the code changing system;
the second acquisition unit is used for acquiring the dynamic calling relation of the function in the source code;
the recording unit is used for recording the calling relation of the function, the input parameter information and the output parameter information of the function when the function is executed;
the analysis unit is used for analyzing the static call relation of the function, the dynamic call relation of the function, the call relation of the function when the function is executed, the input parameter information and the output parameter information of the function so as to establish a function call relation diagram;
and the determining unit is used for determining an objective function call relation chain to which the current change function belongs in the function call relation diagram, and determining an associated function influenced by the current change function according to the objective function call relation chain.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method of any of the preceding claims 1 to 7 when the computer program is executed.
10. A computer readable storage medium storing machine executable instructions which, when invoked and executed by a processor, cause the processor to perform the method of any one of the preceding claims 1 to 7.
CN202310995172.6A 2023-08-08 2023-08-08 Method and device for determining association influence of change codes and electronic equipment Pending CN117033203A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310995172.6A CN117033203A (en) 2023-08-08 2023-08-08 Method and device for determining association influence of change codes and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310995172.6A CN117033203A (en) 2023-08-08 2023-08-08 Method and device for determining association influence of change codes and electronic equipment

Publications (1)

Publication Number Publication Date
CN117033203A true CN117033203A (en) 2023-11-10

Family

ID=88642387

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310995172.6A Pending CN117033203A (en) 2023-08-08 2023-08-08 Method and device for determining association influence of change codes and electronic equipment

Country Status (1)

Country Link
CN (1) CN117033203A (en)

Similar Documents

Publication Publication Date Title
US9152731B2 (en) Detecting a broken point in a web application automatic test case
TW201941058A (en) Anomaly detection method and device
US20230020646A1 (en) Methods and Apparatus for Finding Long Methods in Code
CN108491321B (en) Method and device for determining test case range and storage medium
CN112149136A (en) loT device firmware vulnerability detection method and system and electronic device
KR101979329B1 (en) Method and apparatus for tracking security vulnerable input data of executable binaries thereof
CN114116496A (en) Automatic testing method, device, equipment and medium
CN111338622B (en) Supply chain code identification method, device, server and readable storage medium
CN105630656A (en) Log model based system robustness analysis method and apparatus
CN112181430A (en) Code change statistical method and device, electronic equipment and storage medium
CN112925524A (en) Method and device for detecting unsafe direct memory access in driver
CN115686961A (en) Processor testing method and device and electronic equipment
CN110287700B (en) iOS application security analysis method and device
CN110334012B (en) Risk assessment method and device
CN110046086B (en) Expected data generation method and device for test and electronic equipment
CN109388568B (en) Code testing method and device
US20240036841A1 (en) Method and Apparatus for Compatibility Detection, Device and Non-transitory computer-readable storage medium
CN116738091A (en) Page monitoring method and device, electronic equipment and storage medium
CN114355171B (en) Reconfigurable chip performance bottleneck detection platform, detection method and electronic equipment
CN117033203A (en) Method and device for determining association influence of change codes and electronic equipment
CN111382052A (en) Code quality evaluation method and device and electronic equipment
CN115576831A (en) Test case recommendation method, device, equipment and storage medium
US8458523B2 (en) Meta attributes in functional coverage models
CN112486823B (en) Error code verification method and device, electronic equipment and readable storage medium
CN112099838B (en) Method, device and storage medium for determining version difference

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination