CN112540930B - Evaluation method and device for software update and electronic equipment - Google Patents
Evaluation method and device for software update and electronic equipment Download PDFInfo
- Publication number
- CN112540930B CN112540930B CN202011579805.8A CN202011579805A CN112540930B CN 112540930 B CN112540930 B CN 112540930B CN 202011579805 A CN202011579805 A CN 202011579805A CN 112540930 B CN112540930 B CN 112540930B
- Authority
- CN
- China
- Prior art keywords
- target
- link
- code
- method name
- determining
- 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.)
- Active
Links
- 238000011156 evaluation Methods 0.000 title claims abstract description 34
- 238000000034 method Methods 0.000 claims abstract description 247
- 238000012360 testing method Methods 0.000 claims abstract description 90
- 230000008859 change Effects 0.000 claims abstract description 64
- 230000008569 process Effects 0.000 claims abstract description 29
- 230000004048 modification Effects 0.000 claims description 43
- 238000012986 modification Methods 0.000 claims description 43
- 230000006870 function Effects 0.000 claims description 32
- 230000009471 action Effects 0.000 claims description 26
- 238000011161 development Methods 0.000 claims description 16
- 238000012545 processing Methods 0.000 claims description 12
- 238000013500 data storage Methods 0.000 claims description 11
- 238000004590 computer program Methods 0.000 claims description 8
- 238000010276 construction Methods 0.000 claims description 7
- 238000004891 communication Methods 0.000 claims description 5
- 238000012502 risk assessment Methods 0.000 claims description 4
- 230000004931 aggregating effect Effects 0.000 abstract 1
- 238000011144 upstream manufacturing Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 4
- 230000004044 response Effects 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 125000004122 cyclic group Chemical group 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 238000006116 polymerization reaction Methods 0.000 description 2
- 241000529895 Stercorarius Species 0.000 description 1
- 230000002776 aggregation Effects 0.000 description 1
- 238000004220 aggregation Methods 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000013480 data collection Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- G06F11/3672—Test management
- G06F11/368—Test management for test version control, e.g. updating test cases to a new software version
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- G06F11/3672—Test management
- G06F11/3692—Test management for test results analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/242—Query formulation
- G06F16/2433—Query languages
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/248—Presentation of query results
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Mathematical Physics (AREA)
- Stored Programmes (AREA)
Abstract
The invention provides an evaluation method, device and electronic equipment for software updating, wherein the method comprises the steps of determining at least one target change code in program codes corresponding to target software, determining a target method name corresponding to each target change code to obtain at least one target method name, determining at least one link corresponding to each target method name, wherein each link in the at least one link is used for representing an execution process of a method function corresponding to the target method name under corresponding test conditions, and constructing a link network based on the at least one link corresponding to each target method name so as to evaluate the influence range of the target software according to the link network. According to the embodiment of the disclosure, the method for obtaining the link network by aggregating at least one link corresponding to the method name corresponding to the changed code can be used for more clearly showing the influence range of the changed code.
Description
Technical Field
The disclosure relates to the technical field of software evaluation, and in particular relates to an evaluation method and device for software update and electronic equipment.
Background
At present, with the continuous development of the software industry, newly developed software is more and more complex, functions are more and more, and meanwhile, the process of risk assessment on the software is more and more complicated when the software version is updated. In the prior art, a technician can only acquire the upstream and downstream ports affected by the code change after the software version is updated through a tool, so as to determine the service nodes corresponding to the upstream and downstream ports affected by the code change.
However, when the software is evaluated (for example, risk evaluation) by adopting the prior art scheme, only the service nodes corresponding to the upstream and downstream ports affected by the code change can be determined by the scheme of the related evaluation tool for acquiring the affected upstream and downstream system interfaces, and other service nodes affected by the service nodes cannot be determined, so that all the service nodes affected by the code change cannot be comprehensively and intuitively displayed by the prior art method, and thus the service nodes affected by the code change in the software cannot be accurately evaluated.
Disclosure of Invention
The embodiment of the disclosure at least provides an evaluation method and device for software update and electronic equipment.
In a first aspect, an embodiment of the present disclosure provides an evaluation method for software update, including determining at least one target modification code in program codes corresponding to target software, determining a target method name corresponding to each target modification code to obtain at least one target method name, determining at least one link corresponding to each target method name, where each link in the at least one link is used to characterize an execution process of a method function corresponding to the target method name under a corresponding test condition, and constructing a link network based on at least one link corresponding to each target method name, so as to evaluate an influence scope of the target software according to the link network.
With reference to the first aspect, the embodiment of the disclosure provides a first possible implementation manner of the first aspect, wherein the determining at least one link corresponding to each target method name includes obtaining at least one test case, sequentially running the at least one test case through a method function corresponding to each method name to obtain at least one test result, determining a service node for running the test case in each test result for each test case, and determining each link corresponding to each method name according to the determined service node.
With reference to the first aspect or the first possible implementation manner of the first aspect, the embodiment of the disclosure provides a second possible implementation manner of the first aspect, where the constructing a link network based on at least one link corresponding to each target method name includes determining a duplicate link among at least one link corresponding to all target method names, performing a merging process on the duplicate link to obtain at least one link corresponding to all target method names after the merging process, and constructing the link network according to at least one link corresponding to all target method names after the merging process.
With reference to the first aspect, the embodiment of the disclosure provides a third possible implementation manner of the first aspect, where the determining a target method name corresponding to each target change code includes determining, in current program code of the target software, a code line number corresponding to the target change code, and determining, according to a preset association relationship, the target method name corresponding to the target change code, where the preset association relationship is used to characterize an association relationship between the code line number and a method name corresponding to the code line number.
With reference to the first aspect, the embodiment of the disclosure provides a fourth possible implementation manner of the first aspect, wherein the determining at least one target modification code in the program code corresponding to the target software includes detecting a code merging action, where the code merging action is an action of merging a personal development branch into a main branch of the program code corresponding to the target software, and after detecting the code merging action, comparing a difference between an original program code of the target software and a current program code of the target software to determine the target modification code.
With reference to the first aspect, the embodiment of the disclosure provides a fifth possible implementation manner of the first aspect, wherein the method further includes obtaining a database to be stored, determining a data storage format of the database to be stored, and storing the link network into the database to be stored according to the data storage format.
With reference to the first aspect, the embodiment of the disclosure provides a sixth possible implementation manner of the first aspect, where the performing, according to the link network, the impact range evaluation on the target software includes obtaining a query request sent by a user through a query terminal, where the query request includes a modification code of a query requested by the user, determining, in the link network, at least one target link corresponding to the modification code of the query requested by the user in response to the query request, and displaying, according to a preset display mode, the at least one target link on a display interface of the query terminal, so that the user performs the impact range evaluation on the target software according to the at least one target link.
The embodiment of the disclosure also provides an evaluation device for software update, which comprises a first determination module, a second determination module and a construction module, wherein the first determination module is used for determining at least one target change code in program codes corresponding to target software, determining a target method name corresponding to each target change code to obtain at least one target method name, the second determination module is used for determining at least one link corresponding to each target method name, each link in the at least one link is used for representing an executing process of a method function corresponding to the target method name under each test condition, and the construction module is used for constructing a link network based on at least one link corresponding to each target method name so as to evaluate risk of the target software according to the link network.
In a third aspect, the disclosed embodiments also provide an electronic device comprising a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory in communication via the bus when the electronic device is in operation, the machine-readable instructions when executed by the processor performing the steps of the first aspect, or any of the possible implementations of the first aspect.
In a fourth aspect, the presently disclosed embodiments also provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the first aspect, or any of the possible implementations of the first aspect.
The method, the device and the system for evaluating the software update provided by the embodiment of the disclosure adopt a link network for acquiring the target change code and inquiring the link network at the terminal equipment, and perform the evaluation on the update of the target software according to the inquiring result.
The foregoing objects, features and advantages of the disclosure will be more readily apparent from the following detailed description of the preferred embodiments taken in conjunction with the accompanying drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for the embodiments are briefly described below, which are incorporated in and constitute a part of the specification, these drawings showing embodiments consistent with the present disclosure and together with the description serve to illustrate the technical solutions of the present disclosure. It is to be understood that the following drawings illustrate only certain embodiments of the present disclosure and are therefore not to be considered limiting of its scope, for the person of ordinary skill in the art may admit to other equally relevant drawings without inventive effort.
FIG. 1 illustrates a flow chart of an evaluation method for software updates provided by embodiments of the present disclosure;
FIG. 2 is a flowchart of a tracking process of the Apm system in an evaluation method for software update according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a software updated evaluation device according to an embodiment of the present disclosure;
Fig. 4 shows a schematic diagram of an electronic device provided by an embodiment of the disclosure.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present disclosure more apparent, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are only some embodiments of the present disclosure, but not all embodiments. The components of the embodiments of the present disclosure, which are generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present disclosure provided in the accompanying drawings is not intended to limit the scope of the disclosure, as claimed, but is merely representative of selected embodiments of the disclosure. All other embodiments, which can be made by those skilled in the art based on the embodiments of this disclosure without making any inventive effort, are intended to be within the scope of this disclosure.
It should be noted that like reference numerals and letters refer to like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures.
The term "and/or" is used herein to describe only one relationship, and means that three relationships may exist, for example, A and/or B, and that three cases exist, A alone, A and B together, and B alone. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, may mean including any one or more elements selected from the group consisting of A, B and C.
According to research, when the prior art scheme is adopted to evaluate software (for example, risk evaluation), the scheme of acquiring the affected upstream and downstream system interfaces through the related evaluation tool can only determine the service nodes corresponding to the upstream and downstream ports affected by the code change, and other service nodes affected by the service nodes cannot be determined, so that all the service nodes affected by the code change cannot be comprehensively and intuitively displayed by the prior art method, and thus the service nodes affected by the code change in the software cannot be accurately evaluated.
Based on the above study, the present disclosure provides a method for evaluating software update, in the embodiment of the present disclosure, at least one link corresponding to a method name corresponding to a modified code is aggregated to obtain a link network, so that an influence range affected by the code modification can be more clearly displayed, thereby solving the problem that in the prior art, a service node affected by the code modification in software cannot be accurately evaluated.
For the sake of understanding the present embodiment, first, a detailed description will be given of a method for evaluating a software update disclosed in the present embodiment, where an execution subject of the method for evaluating a software update provided in the present embodiment is generally a computer device with a certain computing capability, and the computer device includes, for example, a terminal device or a server or other processing device, where the terminal device may be a User Equipment (UE), a mobile device, a User terminal, a cellular phone, a cordless phone, a Personal digital assistant (Personal DIGITAL ASSISTANT, PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, and so on. In some possible implementations, the evaluation method for software update may be implemented by way of a processor calling computer readable instructions stored in a memory.
Referring to fig. 1, a flowchart of an evaluation method for software update according to an embodiment of the disclosure is shown, where the method includes steps S101 to S105, where:
S101, determining at least one target change code in program codes corresponding to target software, and determining a target method name corresponding to each target change code to obtain at least one target method name.
In the embodiment of the present disclosure, the modification of the program code corresponding to the target software affects at least one operation method in the target software, and therefore, in the embodiment of the present disclosure, a method name of each target modification code in the program code corresponding to the target software is first determined. It should be noted that if the method names corresponding to the plurality of target modification codes are the same, the statistics is one target method name.
In the embodiment of the present disclosure, the target modification code may be detected in a version library of a distributed version control system (hereinafter, referred to simply as a Git system), and when the target modification code is in the version library of the Git system, the tag information may be added to the target modification code. And then, locating the line number of the target change code and tracking all the method names corresponding to the target change code, thereby obtaining at least one target method name described above.
It should be noted that, since the target software is always in an updated state, after each update is completed, program codes of each version of the target software may be stored in the version library of the Git system.
After obtaining the at least one target method name, the at least one target method name may be put as an element into a method name collection, where the number of elements in the collection is the number of methods that are all affected by the code modification.
And S103, determining at least one link corresponding to each target method name, wherein each link in the at least one link is used for representing the execution process of a method function corresponding to the target method name under each test condition.
In the embodiment of the disclosure, a plurality of test conditions may be preset, and then, a method function corresponding to each target method name is tested by using each test condition, so as to obtain a corresponding execution process, and at least one link is determined according to the execution process.
It should be noted that, in the embodiment of the present disclosure, a plurality of test conditions may be set by setting test cases, where one test case represents one test condition, and each method corresponds to at least one test case.
S105, constructing a link network based on at least one link corresponding to each target method name, so as to perform risk assessment on the target software according to the link network.
In the embodiment of the disclosure, at least one link corresponding to the method name corresponding to the changed code is aggregated to obtain the link network, so that the influence range influenced by the code change can be more clearly displayed, and the problem that the service node influenced by the code change in the software cannot be accurately evaluated in the prior art is solved.
As can be seen from the above description, in the embodiment of the present disclosure, at least one target modification code in the program code corresponding to the target software is first determined, and the steps specifically include the following steps S1011 and S1012:
and step S1011, detecting a code merging action, wherein the code merging action is an action of merging the personal development branch into a main branch of the program code corresponding to the target software.
From the above description, in an alternative embodiment, the personal development branch may be merged into the main branch of the program code corresponding to the target software in any one of the following manners, which specifically includes:
mode one:
In this embodiment, the personal development branch may be automatically merged into the main branch of the program code corresponding to the target software through the built-in monitoring code.
In the embodiment of the disclosure, when a large number of personal development branches to be combined exist, the code combining action can be automatically performed through the monitoring code, so that the missing of the personal development branches to be combined in the manual triggering action is avoided, and the operation steps of combining the branches to be combined one by one in the manual triggering are simplified.
Mode two:
and combining the single personal development branch into the main branch of the program code corresponding to the target software by adopting a manual triggering mode of a related technician.
It should be noted that, the related technicians write programs for updating the version of the target software on the personal development branch, wherein the personal development branch can perform several operations of modifying, deleting and adding functions on the related functions of the current version of the target software.
In the disclosed embodiment, after merging the personal development branch into the main branch of the program code corresponding to the target software, the code merging action may be detected.
Step S1012, after the code merging action is detected, difference comparison is carried out on the original program code of the target software and the current program code of the target software so as to determine the target modification code.
In the disclosed embodiments, a version library may be built in the Git system, which contains all versions of program code for the target software. And after detecting the action on the main branch of the corresponding program code combined with the target software, automatically comparing the difference between the original program code of the target software and the current program code of the target software in the version library to determine the target change code. After the comparison of the target modification code, the target modification code obtained after the comparison may also be provided with marking information, for example, marking the modification code with a red highlighting.
From the above description, in the embodiments of the present disclosure, the personal development branch may be automatically merged into the main branch of the program code corresponding to the target software through the monitor code. And automatically performing automatic difference comparison of the program codes of the target software after the code merging action is detected, and identifying the changed target change codes in a version library of the Git system after the automatic difference comparison. Under the condition that a large number of branch merging actions exist, the processing process can simplify operation steps, improve operation accuracy and enhance evaluation accuracy for changing the influence range of codes.
Meanwhile, in the embodiment of the disclosure, a mode of manually triggering the code merging action can be adopted, and after one code merging action, a single personal development branch which is compiled later can still be merged onto a main branch in a manual triggering mode, so that the operation requirements of related technicians under different conditions can be met. And after the code merging action is detected, the mode of automatically setting the identification information for the target change code in the version library of the Git system is beneficial to clearly and intuitively knowing the change code of the merging operation.
In the embodiment of the present disclosure, after at least one target modification code in the program codes corresponding to the target software is determined in the above-described manner, the target method name corresponding to each target modification code may be determined, and the steps specifically include steps S1013 to S1014:
Step S1013, determining the number of code lines corresponding to the target change code in the current program code of the target software;
Step S1014, determining a target method name corresponding to the target change code according to a preset association relationship, wherein the preset association relationship is used for representing the association relationship between the number of lines of the code and the corresponding method name.
As can be seen from the above-described steps, in an alternative embodiment, the method name of the target corresponding to the target modification code may be determined by the following method specifically including:
According to the target change codes in the version library of the Git system, the number of code lines of each target change code is automatically positioned through a built-in program, and all method names corresponding to all target change codes are automatically inquired according to the positioned number of code lines. After all the method names are obtained, the method names are put into a method name collection as parameters.
It should be noted that, in the embodiment of the present disclosure, a data table may be pre-constructed, where the data table includes a preset association relationship between the number of code lines and the corresponding method name. When the method name is inquired according to the number of code lines, the method name corresponding to the number of code lines of the target change code can be determined according to the preset association relation.
In the embodiment of the disclosure, the method name corresponding to the target change code in the version library can be automatically queried, so that the situation that the searching is not complete possibly caused by manually tracing the method name corresponding to each change code under the condition that a large number of change codes exist is avoided.
In another alternative embodiment, in addition to the above-described manner, the target method name corresponding to the target modification code may be determined by the following manner, which specifically includes:
the related technician can search the version library for the target change code, e.g., the change code of the red highlighting part, for the identification information set for the target change code in advance. Then, determining the method name corresponding to each target change code until all target method names are acquired, and storing the method names as parameters in a method name collection set after all the target method names are acquired.
As can be seen from the disclosure of the above steps, in the embodiment of the present disclosure, the method name corresponding to the target modification code in the program code corresponding to the target software may be automatically queried, so that the situation that the influence range of the modification code is not found fully by manually tracing the method name corresponding to each modification code when a large number of modification codes exist is avoided. Meanwhile, in the embodiment of the disclosure, when the method name corresponding to the target change code of the part needs to be traced back, the method name corresponding to the target change code can be obtained through a manual query mode.
In an embodiment of the present disclosure, after determining the target method name corresponding to each target change code in the above-described manner, at least one link corresponding to each target method name may be determined, where each link in the at least one link is used to characterize an execution process of a method function corresponding to the target method name under each test condition.
In the embodiment of the present disclosure, the at least one link corresponding to each target method name may be determined by integrating a system for analyzing performance problems based on different types of computer languages (hereinafter abbreviated as Apm system) for understanding system behaviors. The Apm system performs cyclic call on each method name in the method name collection input into the Apm system through a for cyclic statement by integrating tracking systems aiming at different types of computer languages, wherein the cyclic times are the number of the method names in the collection until all methods in the method name collection are traversed.
It should be noted that the Apm system may be integrated with one or more tracking systems to perform the above operation procedure on target software written based on different computer languages, for example, the Apm system may be integrated with jaeger system (for java) and skyworking system (for go) to be able to be used for software written based on java and go. The tracking process of the Apm system is shown in fig. 2. The agent in fig. 2 may be jaeger-agent, jaeger-agent is responsible for processing spans and sending it to collector, where collector is the data collection module in fig. 2. jaeger-agent is deployed as a base component onto the host, the purpose of jaeger-agent is to abstract collector discovery and routing from clients (i.e., clients in FIG. 2). jaeger-collector are used to collect trace spans and process the trace data through a pipeline to obtain trace information. The data store is a data storage module in fig. 2, and is used for storing trace information). The user interface in fig. 2 can be understood as jaeger-UI for presenting stored trace information, jaeger-query being the query module in fig. 2 for retrieving trace information from storage and presenting it via UI.
In an optional embodiment, determining at least one link corresponding to each target method name mainly includes the following processes:
And step S1031, obtaining at least one test case.
In the embodiment of the disclosure, at least one test case corresponding to each target method name may be determined first, and it should be noted that at least one test case corresponding to different method names may be the same, or may be different, where different test cases are used to represent different test conditions, and specific contents of the test cases may be set according to actual needs.
And S1032, running the at least one test case through the method function corresponding to each method name in sequence to obtain at least one test result.
In the embodiment of the disclosure, each target method name can be circularly called through a for-loop statement, and then at least one corresponding test case is operated through each target method name. After the operation is finished, each test case obtains a corresponding test result.
For example, a method function corresponding to a target method name is a method function corresponding to a user payment operation, at this time, two test conditions may be set for the user payment operation, including two test conditions that the user performs a payment operation but does not pay on the terminal device, and the user performs a payment operation and pays on the terminal device, and then corresponding test cases are set for the two test conditions, respectively. And the Apm system runs the two test cases through a method function corresponding to the payment operation of the user to respectively obtain test results under the two test conditions.
Step S1033, for each test case, determining a service node for running the test case in each test result, and determining each link corresponding to each method name according to the determined service node.
It should be noted that, in the embodiment of the present disclosure, each test result includes a method function corresponding to a target method name, and the service node is used for executing each test case when the test case is executed. Therefore, in the embodiment of the present disclosure, a test result of each target method name may be targeted, by tracking, by a service node included in the test result, a service node in a process of running the test case by the target method name, and then, constructing the determined service node according to a service order of the service node to obtain a link, thereby obtaining a link of an execution process of a method function of each method name under multiple test conditions.
In the process of running each test case through the method function corresponding to the target method name, each target method name executes different operation processes when running different test cases, so that the service nodes corresponding to each test condition can be different, and thus the obtained links formed by the service nodes can also be different.
It should be noted that, since the service nodes of the method in the aggregate set operating under different test conditions are duplicated but not identical, all the links formed by the service nodes are duplicated but not identical.
As can be seen from the disclosure of the above steps, in the embodiment of the present disclosure, a series of operations are performed on at least one target method name input therein by using an integrated Apm system, and at least one link corresponding to each target method name is finally output. One or more tracking systems for different computer languages, for example, the tracking system shown in fig. 2, can be integrated inside the Apm system, so that the target software written based on the different computer languages can be evaluated through the tracking system, and the diversified evaluation requirements are met to a certain extent. Meanwhile, the test conditions can be more comprehensively determined by setting different test cases, so that a more accurate influence range of changing codes is obtained.
In the embodiment of the present disclosure, after determining at least one link corresponding to each target method name in the above-described manner, a link network may be constructed based on at least one link corresponding to each target method name, and the steps specifically include:
And step S1051, determining repeated links in at least one link corresponding to all target method names, and carrying out combination processing on the repeated links to obtain at least one link corresponding to all target method names after combination processing.
In the embodiment of the disclosure, the Apm system may determine duplicate links among all links after outputting at least one link of each target method name. The repeated link may be a completely repeated link, or may be a partially repeated link in the entire link. After determining the repeated links, the repeated links may be combined, e.g., repeated portions between multiple links with repeated links may be combined to obtain a combined link.
After the at least one link corresponding to all the target method names is subjected to polymerization treatment, the structure of the at least one link after the obtained polymerization treatment is simpler. When a user inquires a link influenced by a target change code, the user searches more quickly, and the space for storing data is saved more.
Step S1052, constructing the link network according to at least one link corresponding to all the target method names after the merging process.
In the embodiment of the present disclosure, through the above-mentioned merging operation, links with all repeated links may be merged, and finally a link network is obtained.
In the embodiment of the disclosure, all links obtained by using different test cases as the method names in the target method name set are not identical, and then, based on the repeated parts existing in all links, links all including the repeated parts are aggregated, a link network capable of characterizing the influence range of code modification is obtained through the aggregation operation, and falls into a database, and a user can call out the link network through a query operation performed on a terminal device. When relevant technicians evaluate target software, contact relations of different methods in execution can be intuitively observed, and the influence range of the changed codes can be accurately evaluated.
In the embodiment of the present disclosure, after the link network is constructed in the manner described above, a dropping operation may be performed on the target link network, where the performing the dropping operation specifically includes:
Step S11, acquiring a database to be stored, and determining a data storage format of the database to be stored.
In the embodiment of the disclosure, when the link network performs the database-falling operation, a preset database to be stored is first obtained. In addition, since different databases have different data storage formats, it is necessary to determine the data storage format of the database to be stored.
It should be noted that the type of the database to be stored may be set autonomously by the relevant technician. For example, the type of database to be stored may be set to Oragle.
And step S12, storing the link network into the database to be stored according to the data storage format.
As can be seen from the disclosure of the above steps, in the embodiment of the present disclosure, the link network may be stored in different types of databases according to the needs of the user, so that the storage needs of different users can be satisfied, and the application range of the method provided by the embodiment of the present disclosure is increased to a certain extent.
In the embodiment of the present disclosure, after the link network performs the library dropping operation in the manner described above, the evaluation of the impact range of the target software may be performed according to the link network, where the performing steps specifically includes:
Step S1053, obtaining a query request sent by a user through a query terminal, wherein the query request comprises a change code of the query requested by the user;
Step S1054, in response to the query request, determines at least one label link corresponding to the modification code of the query requested by the user in the link network.
In the embodiment of the disclosure, when a user wants to view a link corresponding to a target change code, a query request for calling the link from a database can be sent through an operation interface of a terminal device. After the query request is acquired, at least one target link corresponding to the change code of the query requested by the user is determined in the link network in response to the query request.
And step S1055, displaying the at least one target link on a display interface of the query terminal according to a preset display mode, so that a user can evaluate the influence range of the target software according to the at least one target link.
In the embodiment of the present disclosure, after at least one target link corresponding to the modification code requested to be queried by the user is queried, the target link may be displayed on the display interface of the terminal device according to a preset display mode. And then, the user can evaluate the influence range of the change code of the query requested by the user aiming at the target link called up on the display interface, thereby completing the evaluation of the target software update.
It should be noted that after each query request is obtained and the query request is successfully executed, a history query record may be generated in the database, and the user may call out a corresponding history query result by clicking any history query record on the terminal device, and obtain the priority of the influence after the code is changed according to the comparison result of the history query record.
For example, the target modification code affects a method function related to payment operation in the target software, and test cases corresponding to the method function are test case 1 and test case 2, wherein the test case 1 is unpaid for performing the payment operation, and the test case 2 is unpaid for performing the payment operation. At this time, after the method function runs the two test cases, two links are obtained, which respectively represent links of the service node used in the execution process of the method function under the test conditions characterized by the test case 1 and the test case 2. The user can inquire the two links on the terminal equipment, two historical inquiry records are generated after inquiry, and the two links can be compared in the historical inquiry records to obtain the priority of the influence of the target change code. In addition, aiming at the deleted codes, the historical query records corresponding to the codes and the calling relations between the upstream and downstream service nodes are synchronously cleared.
As can be seen from the disclosure of the above steps, in the embodiment of the present disclosure, by calling a link corresponding to the target code at the operation interface of the terminal device, and evaluating the scope of influence of the target change code according to the calling result, the method is helpful for performing separate analysis and evaluation on the target link and its service node. Meanwhile, at least one link corresponding to each method name can be compared according to the historical query records, so that the priority of the influence of the code change result can be seen more intuitively, the historical query records and the calling relationship can be cleared for the deleted codes, and interference of the invalid historical query records on searching the target links is avoided.
In summary, in the embodiment of the present invention, by detecting an action of merging a personal development branch into a main branch of a program code corresponding to software, comparing an original program code of the software with a current program code to determine a modified code, locating an affected code line number according to the modified code, thereby obtaining a modified method set, calling a method in the set to obtain an operating link thereof, merging repeated parts of the obtained link, outputting a link network capable of accurately characterizing a code modification influence range, and dropping the link network into a library, a user can query the link network through a terminal device, and perform an update-specific evaluation on a target software according to a query result, thereby solving the problem that a service node affected by the code modification in the software cannot be accurately evaluated in the prior art.
It will be appreciated by those skilled in the art that in the above-described method of the specific embodiments, the written order of steps is not meant to imply a strict order of execution but rather should be construed according to the function and possibly inherent logic of the steps.
Based on the same inventive concept, the embodiment of the present disclosure further provides an evaluation device for software update corresponding to the evaluation method for software update, and since the principle of solving the problem of the device in the embodiment of the present disclosure is similar to that of the foregoing evaluation method for software update, the implementation of the device may refer to the implementation of the method, and the repetition is omitted.
Example two
Referring to fig. 3, a schematic diagram of evaluation for software update is provided for an embodiment of the present disclosure, where the apparatus includes a first determining module 31, a second determining module 32, and a constructing module 33, where,
The first determining module 31 is configured to determine at least one target modification code in program codes corresponding to target software, and determine a target method name corresponding to each target modification code, so as to obtain at least one target method name;
A second determining module 32, configured to determine at least one link corresponding to each target method name, where each link in the at least one link is used to characterize an execution process of a method function corresponding to the target method name under each test condition;
and a construction module 33, configured to construct a link network based on at least one link corresponding to each target method name, so as to perform risk assessment on the target software according to the link network.
In the embodiment of the disclosure, at least one link corresponding to the method name corresponding to the changed code is aggregated to obtain the link network, so that the influence range influenced by the code change can be more clearly displayed, and the problem that the service node influenced by the code change in the software cannot be accurately evaluated in the prior art is solved.
In a possible implementation manner, the second determining module is further configured to obtain at least one test case, run the at least one test case through a method function corresponding to each method name in sequence to obtain at least one test result, determine, for each test case, a service node for running the test case in each test result, and determine each link corresponding to each method name according to the determined service node.
In a possible implementation manner, the construction module is further configured to determine a duplicate link from at least one link corresponding to all target method names, perform merging processing on the duplicate link to obtain at least one link corresponding to all target method names after merging processing, and construct the link network according to at least one link corresponding to all target method names after merging processing.
In a possible implementation manner, the first determining module is further configured to determine a number of lines of code corresponding to the target modification code in a current program code of the target software, and determine a target method name corresponding to the target modification code according to a preset association relationship, where the preset association relationship is used for representing an association relationship between the number of lines of code and the corresponding method name.
In a possible implementation manner, the second determining module is further configured to detect a code merging action, where the code merging action is an action of merging a personal development branch into a main branch of a program code corresponding to the target software, and after detecting the code merging action, perform difference comparison on an original program code of the target software and a current program code of the target software to determine the target modification code.
In a possible implementation manner, the construction module is further used for acquiring a database to be stored, determining a data storage format of the database to be stored, and storing the link network into the database to be stored according to the data storage format.
In a possible implementation manner, the construction module is further configured to obtain a query request sent by a user through a query terminal, where the query request includes a modification code of a query requested by the user, determine, in response to the query request, at least one target link corresponding to the modification code of the query requested by the user in the link network, and display the at least one target link on a display interface of the query terminal according to a preset display mode, so that the user performs influence range evaluation on the target software according to the at least one target link.
The process flow of each module in the apparatus and the interaction flow between the modules may be described with reference to the related descriptions in the above method embodiments, which are not described in detail herein.
Example III
Corresponding to an evaluation method for software update of fig. 4, an embodiment of the present disclosure further provides an electronic device 400, as shown in fig. 4, which is a schematic structural diagram of the electronic device 400 provided in the embodiment of the present disclosure, including:
The electronic device comprises a processor 41, a memory 42 and a bus 43, wherein the memory 42 is used for storing execution instructions, and comprises a memory 421 and an external memory 422, the memory 421 is also called an internal memory, and is used for temporarily storing operation data in the processor 41 and data exchanged with the external memory 422 such as a hard disk, the processor 41 exchanges data with the external memory 422 through the memory 421, and when the electronic device 400 operates, the processor 41 and the memory 42 are communicated through the bus 43, so that the processor 41 executes the following instructions:
The method comprises the steps of determining at least one target change code in program codes corresponding to target software, determining a target method name corresponding to each target change code to obtain at least one target method name, determining at least one link corresponding to each target method name, wherein each link in the at least one link is used for representing an executing process of a method function corresponding to the target method name under corresponding test conditions, and constructing a link network based on the at least one link corresponding to each target method name so as to evaluate the influence range of the target software according to the link network.
The disclosed embodiments also provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the evaluation method for software updates described in the method embodiments above. Wherein the storage medium may be a volatile or nonvolatile computer readable storage medium.
The embodiments of the present disclosure further provide a computer program product, where the computer program product carries program code, where instructions included in the program code may be used to perform the steps of the evaluating method for software update described in the foregoing method embodiments, and specific reference may be made to the foregoing method embodiments, which are not described herein.
Wherein the above-mentioned computer program product may be realized in particular by means of hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied as a computer storage medium, and in another alternative embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK), or the like.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described system and apparatus may refer to corresponding procedures in the foregoing method embodiments, which are not described herein again. In the several embodiments provided in the present disclosure, it should be understood that the disclosed systems, devices, and methods 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.
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 each embodiment of the present disclosure 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 non-volatile computer readable storage medium executable by a processor. Based on such understanding, the technical solution of the present disclosure may be embodied in essence or a part contributing to the prior art or a part of the technical solution, or in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in the embodiments of the present disclosure. The 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, an optical disk, or other various media capable of storing program codes.
It should be noted that the foregoing embodiments are merely specific implementations of the disclosure, and are not intended to limit the scope of the disclosure, and although the disclosure has been described in detail with reference to the foregoing embodiments, it should be understood by those skilled in the art that any modification, variation or substitution of some of the technical features described in the foregoing embodiments may be made or equivalents may be substituted for those within the scope of the disclosure without departing from the spirit and scope of the technical aspects of the embodiments of the disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.
Claims (9)
1. An evaluation method for software update, comprising:
determining at least one target change code in program codes corresponding to target software, and determining a target method name corresponding to each target change code to obtain at least one target method name;
acquiring at least one test case;
Calling the at least one target method name through a circulation statement, and running the at least one test case according to a method function corresponding to the target method name aiming at each target method name to obtain at least one test result; executing different operation processes when each target method name runs different test cases, wherein the test result comprises a service node for executing each test case when a method function corresponding to the target method name runs each test case;
For each target method name, determining a service node for running the test case in each test result according to each target method name, and determining each link corresponding to each method name according to the determined service node and the service sequence of the service node, wherein each link is used for representing the execution process of a method function corresponding to the target method name under the corresponding test condition;
And constructing a link network based on at least one link corresponding to each target method name, so as to evaluate the influence range of the target software according to the link network.
2. The method according to claim 1, wherein said constructing a link network based on at least one link corresponding to each of said target method names comprises:
Determining repeated links in at least one link corresponding to all target method names, and carrying out combination processing on the repeated links to obtain at least one link corresponding to all target method names after combination processing;
and constructing the link network according to at least one link corresponding to all the target method names after the merging processing.
3. The method of claim 1, wherein determining the target method name for each of the target change codes comprises:
determining the number of code lines corresponding to the target change code in the current program code of the target software;
And determining a target method name corresponding to the target change code according to a preset association relationship, wherein the preset association relationship is used for representing the association relationship between the number of lines of the code and the corresponding method name.
4. The method of claim 1, wherein determining at least one target change code of the program code corresponding to the target software comprises:
Detecting a code merging action, wherein the code merging action is an action of merging a personal development branch into a main branch of program code corresponding to the target software;
after the code merging action is detected, the original program code of the target software and the current program code of the target software are compared in difference to determine the target modification code.
5. The method according to claim 1, wherein the method further comprises:
acquiring a database to be stored, and determining a data storage format of the database to be stored;
and storing the link network into the database to be stored according to the data storage format.
6. The method of claim 1, wherein said evaluating the scope of influence of the target software based on the link network comprises:
Acquiring a query request sent by a user through a query terminal, wherein the query request comprises a change code of the query requested by the user;
Responding to the inquiry request, and determining at least one label link corresponding to the change code of the inquiry requested by the user in the link network;
and displaying the at least one target link on a display interface of the query terminal according to a preset display mode, so that a user can evaluate the influence range of the target software according to the at least one target link.
7. An evaluation device for software update, comprising:
The first determining module is used for determining at least one target change code in program codes corresponding to target software, determining a target method name corresponding to each target change code and obtaining at least one target method name;
the second determining module is used for acquiring at least one test case;
Calling the at least one target method name through a circulation statement, and running the at least one test case according to a method function corresponding to the target method name aiming at each target method name to obtain at least one test result; executing different operation processes when each target method name runs different test cases, wherein the test result comprises a service node for executing each test case when a method function corresponding to the target method name runs each test case;
For each target method name, determining a service node for running the test case in each test result according to each target method name, and determining each link corresponding to each method name according to the determined service node and the service sequence of the service node, wherein each link is used for representing the execution process of a method function corresponding to the target method name under each test condition;
and the construction module is used for constructing a link network based on at least one link corresponding to each target method name so as to carry out risk assessment on the target software according to the link network.
8. An electronic device comprising a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory in communication over the bus when the electronic device is in operation, the machine-readable instructions when executed by the processor performing the steps of the method for evaluating a software update according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that it has stored thereon a computer program which, when run by a processor, performs the steps of the method for evaluating a software update according to any of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011579805.8A CN112540930B (en) | 2020-12-28 | 2020-12-28 | Evaluation method and device for software update and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011579805.8A CN112540930B (en) | 2020-12-28 | 2020-12-28 | Evaluation method and device for software update and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112540930A CN112540930A (en) | 2021-03-23 |
CN112540930B true CN112540930B (en) | 2024-12-17 |
Family
ID=75017715
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011579805.8A Active CN112540930B (en) | 2020-12-28 | 2020-12-28 | Evaluation method and device for software update and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112540930B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112948478A (en) * | 2021-04-07 | 2021-06-11 | 深圳市易博天下科技有限公司 | Link-based code analysis method and device, electronic equipment and storage medium |
CN115129584A (en) * | 2022-05-23 | 2022-09-30 | 网易(杭州)网络有限公司 | Data processing method, data processing apparatus, storage medium, and electronic apparatus |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111290950A (en) * | 2020-01-22 | 2020-06-16 | 腾讯科技(深圳)有限公司 | Test point obtaining method and device in program test, storage medium and equipment |
CN111459824A (en) * | 2020-04-01 | 2020-07-28 | 腾讯科技(深圳)有限公司 | Test case processing method and device for concurrent service |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2012001667A1 (en) * | 2010-07-01 | 2012-01-05 | Nunez Di Croce Mariano | Automated security assessment of business-critical systems and applications |
CN103176895B (en) * | 2011-12-22 | 2016-03-30 | 阿里巴巴集团控股有限公司 | A kind of regression testing method and system |
US9032376B2 (en) * | 2012-09-28 | 2015-05-12 | Synopsys, Inc. | Static analysis of computer code to determine impact of change to a code component upon a dependent code component |
CN103902255B (en) * | 2012-12-24 | 2019-01-15 | 腾讯科技(深圳)有限公司 | A kind of generation method and system of functional relation call-tree |
CN107229487B (en) * | 2016-03-25 | 2020-09-29 | 阿里巴巴集团控股有限公司 | Code processing method and device |
CN108874652B (en) * | 2017-05-09 | 2022-06-07 | 北京京东尚科信息技术有限公司 | Method and device for software self-test evaluation and electronic equipment |
CN110334012B (en) * | 2019-05-31 | 2023-10-20 | 口碑(上海)信息技术有限公司 | Risk assessment method and device |
CN111831564B (en) * | 2020-07-09 | 2025-05-02 | 北京齐尔布莱特科技有限公司 | A regression testing method, device and computing equipment |
-
2020
- 2020-12-28 CN CN202011579805.8A patent/CN112540930B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111290950A (en) * | 2020-01-22 | 2020-06-16 | 腾讯科技(深圳)有限公司 | Test point obtaining method and device in program test, storage medium and equipment |
CN111459824A (en) * | 2020-04-01 | 2020-07-28 | 腾讯科技(深圳)有限公司 | Test case processing method and device for concurrent service |
Non-Patent Citations (1)
Title |
---|
面向对象代码变更影响分析模型的研究;杨鹤标等;《计算机工程与设计》;20101016;第31卷(第19期);第4232-4234+4246页 * |
Also Published As
Publication number | Publication date |
---|---|
CN112540930A (en) | 2021-03-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113342685A (en) | Precise test method and device, computer equipment and storage medium | |
CN112540930B (en) | Evaluation method and device for software update and electronic equipment | |
CN114490375B (en) | Performance test method, device, equipment and storage medium of application program | |
CN113656318A (en) | Software version testing method, device and computer equipment | |
CN112887123A (en) | Service alarm method, system and device based on call chain | |
CN114168565B (en) | Backtracking test method, device and system of business rule model and decision engine | |
CN105183658A (en) | Software code testing method and device | |
CN116795636B (en) | Service system data monitoring method and device, electronic equipment and storage medium | |
CN109582751B (en) | Retrieval effect measuring method and server | |
CN109871368B (en) | Database detection method, database detection device, computer device and storage medium | |
CN114153747B (en) | Interface testing method, electronic device and computer readable storage medium | |
CN111523921B (en) | Funnel analysis method, analysis device, electronic device, and readable storage medium | |
CN113868137A (en) | Method, device and system for processing buried point data and server | |
CN111506455B (en) | Method and device for checking service release result | |
CN117389612A (en) | Software version compatibility comparison method and device | |
CN110825609B (en) | Service testing method, device and system | |
CN115185833B (en) | Abnormal code processing method, device, computer equipment and storage medium | |
CN116955140A (en) | SDK test method, device, equipment and storage medium | |
CN112165530B (en) | Service calling relation analysis method and device | |
CN114218091A (en) | Regression testing method, device, equipment and readable storage medium | |
CN115174366B (en) | Data processing method and device | |
CN114625656B (en) | Test methods and devices | |
CN116795723B (en) | Chain unit test processing method and device and computer equipment | |
WO2024113128A1 (en) | A code branch managing system for comparing and/or updating a master code branch with a new code branch | |
CN119513168A (en) | Link data collection and analysis method, computer device and computer readable storage medium |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |