CN112540930A - Evaluation method and device for software update and electronic equipment - Google Patents

Evaluation method and device for software update and electronic equipment Download PDF

Info

Publication number
CN112540930A
CN112540930A CN202011579805.8A CN202011579805A CN112540930A CN 112540930 A CN112540930 A CN 112540930A CN 202011579805 A CN202011579805 A CN 202011579805A CN 112540930 A CN112540930 A CN 112540930A
Authority
CN
China
Prior art keywords
target
link
code
determining
software
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
CN202011579805.8A
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.)
Beijing Baijia Technology Group Co ltd
Original Assignee
Beijing Baijia Technology Group 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 Beijing Baijia Technology Group Co ltd filed Critical Beijing Baijia Technology Group Co ltd
Priority to CN202011579805.8A priority Critical patent/CN112540930A/en
Publication of CN112540930A publication Critical patent/CN112540930A/en
Pending legal-status Critical Current

Links

Images

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/3668Software testing
    • G06F11/3672Test management
    • G06F11/368Test management for test version control, e.g. updating test cases to a new software version
    • 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/3692Test management for test results analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/248Presentation 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 disclosure provides an evaluation method, an evaluation device and electronic equipment for software update, wherein the method comprises the following steps: 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 the execution process of the 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. The method for obtaining the link network comprises the steps of aggregating at least one link corresponding to the method name corresponding to the changed code to obtain the link network, and the influence range influenced by the code change can be more clearly shown.

Description

Evaluation method and device for software update and electronic equipment
Technical Field
The present disclosure relates to the technical field of software evaluation, and in particular, to an evaluation method and apparatus for software update, and an electronic device.
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 performing risk assessment on the software is more and more complicated when the software version is updated. In the existing technical solution, a technician can only obtain, through a tool, an upstream and downstream port affected by a code change after a software version is updated, thereby determining a service node corresponding to the upstream and downstream port affected by the code change.
However, when the prior art scheme is used to evaluate software (for example, risk evaluation), the scheme that the affected upstream and downstream system interfaces are obtained by using the relevant evaluation tool can only determine the service nodes corresponding to the upstream and downstream ports affected by the code change, and cannot determine other service nodes affected by the service nodes.
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 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 the execution process of the 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.
With reference to the first aspect, embodiments of the present disclosure provide a first possible implementation manner of the first aspect, where: the determining at least one link corresponding to each target method name includes: acquiring at least one test case; sequentially operating the at least one test case through the method function corresponding to each method name to obtain at least one test result; and 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.
With reference to the first aspect, or with reference to the first possible implementation manner of the first aspect, embodiments of the present disclosure provide 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 repeated link in at least one link corresponding to all target method names; merging the repeated links to obtain at least one link corresponding to all the target method names after merging; and constructing the link network according to at least one link corresponding to all the target method names after the merging processing.
With reference to the first aspect, an embodiment of the present 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 the code line number 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 incidence relation, wherein the preset incidence relation is used for representing the incidence relation between the code line number and the method name corresponding to the code line number.
With reference to the first aspect, an embodiment of the present disclosure provides a fourth possible implementation manner of the first aspect, where the determining at least one target alteration code in program codes corresponding to target software includes: 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 detecting the code merging action, comparing the difference between the original program code of the target software and the current program code of the target software to determine the target modified code.
With reference to the first aspect, an embodiment of the present disclosure provides a fifth possible implementation manner of the first aspect, where the method further includes: 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.
With reference to the first aspect, an embodiment of the present disclosure provides a sixth possible implementation manner of the first aspect, where the evaluating the influence range of the target software according to the link network includes: acquiring a query request sent by a user through a query terminal, wherein the query request comprises a change code requested to be queried by the user; responding to the query request, and determining at least one target link corresponding to the change code requested to be queried 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.
In a second aspect, an embodiment of the present disclosure further provides an evaluation apparatus for software update, including: the first determining module is used for determining at least one target change code in the program codes corresponding to the target software; determining a target method name corresponding to each target change code to obtain at least one target method name; a second determining module, 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 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.
In a third aspect, an embodiment of the present disclosure further provides an electronic device, including: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating via the bus when the electronic device is running, the machine-readable instructions when executed by the processor performing the steps of the first aspect described above, or any possible implementation of the first aspect.
In a fourth aspect, this disclosed embodiment also provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the steps in the first aspect or any one of the possible implementation manners of the first aspect.
Compared with the prior art that an upstream port and a downstream port which are affected by code change after software version update are obtained through a tool, and service nodes corresponding to the upstream port and the downstream port which are affected by the code change are determined, the method, the device and the system for evaluating the software update solve the problem that the scope of the influence of the code change in software cannot be accurately evaluated in the prior art.
In order to make the aforementioned objects, features and advantages of the present disclosure more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in the embodiments will be briefly described below, and the drawings herein incorporated in and forming a part of the specification illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the technical solutions of the present disclosure. It is appreciated that the following drawings depict only certain embodiments of the disclosure and are therefore not to be considered limiting of its scope, for those skilled in the art will be able to derive additional related drawings therefrom without the benefit of the inventive faculty.
FIG. 1 is a flow chart illustrating a method for profiling a software update according to an embodiment of the present disclosure;
fig. 2 is a flowchart illustrating a tracking process of an Apm system in a method for evaluating a software update according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram illustrating an evaluation apparatus for a software update according to an embodiment of the present disclosure;
fig. 4 shows a schematic diagram of an electronic device provided by an embodiment of the present disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, not all of the embodiments. The components of the embodiments of the present disclosure, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present disclosure, presented in the figures, is not intended to limit the scope of the claimed disclosure, but is merely representative of selected embodiments of the disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the disclosure without making creative efforts, shall fall within the protection scope of the disclosure.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The term "and/or" herein merely describes an associative relationship, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists 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, and may mean including any one or more elements selected from the group consisting of A, B and C.
Research shows that when the prior art scheme is adopted to evaluate software (for example, risk evaluation), the scheme of obtaining 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 cannot determine other service nodes affected by the service nodes.
Based on the above research, the present disclosure provides a method for evaluating software update, in an embodiment of the present disclosure, at least one link corresponding to a method name corresponding to a change code is aggregated to obtain a link network, so that an influence range affected by code change can be more clearly shown, and thus, a problem that a service node affected by code change in software cannot be accurately evaluated in an existing technical scheme is solved.
To facilitate understanding of the present embodiment, first, a detailed description is given to an evaluation method for software update disclosed in an embodiment of the present disclosure, and an execution main body of the evaluation method for software update provided in the embodiment of the present disclosure is generally a computer device with certain computing power, where the computer device includes, for example: a terminal device, which may be a User Equipment (UE), a mobile device, a User terminal, a cellular phone, a cordless phone, a Personal Digital Assistant (PDA), a handheld device, a computing device, a vehicle mounted device, a wearable device, or a server or other processing device. In some possible implementations, the method for evaluating a software update may be implemented by a processor calling computer-readable instructions stored in a memory.
Referring to fig. 1, a flowchart of an evaluation method for a software update provided in an embodiment of the present 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 the target method name corresponding to each target change code to obtain at least one target method name.
In the embodiment of the present disclosure, a change of a program code corresponding to target software may affect at least one operation method in the target software, and therefore, in the embodiment of the present disclosure, a method name of each target change 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 target change codes are the same, the result is counted as a target method name.
In the embodiment of the present disclosure, a target change code may be detected in a version library of a distributed version control system (hereinafter, referred to as a Git system), and when the target change code in the version library of the Git system is detected, mark information may be added to the target change 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 described target method name.
It should be noted that, since the target software is always in an updated state, after each update is completed, the program codes of the respective versions of the target software may be stored in the version library of the Git system.
After obtaining at least one target method name, the at least one target method name may be used as an element and placed 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 change.
S103: and 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 the method function corresponding to the target method name under each test condition.
In the embodiment of the present disclosure, a plurality of test conditions may be preset, and then, each test condition is used to test the method function corresponding to each target method name, so as to obtain a corresponding execution process, and determine at least one link according to the execution process.
It should be noted that, in the embodiment of the present disclosure, multiple test conditions may be set by setting a test case, where one test case represents one test condition, and each method corresponds to at least one test case.
S105: and 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.
In the embodiment of the 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 code modification can be more clearly shown, and thus the problem that a service node affected by code modification in 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 modified code in the program code corresponding to the target software is first determined, and the step specifically includes the following steps S1011 and S1012:
step S1011: 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.
As can be seen from the above description, in an alternative embodiment, the merging the personal development branch into the main branch of the program code corresponding to the target software may be performed in any one of the following manners, specifically including:
the first method is as follows:
in the embodiment, the personal development branch can 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 merged exist, the code merging action can be automatically performed through the monitoring code, so that the personal development branches to be merged are prevented from being missed by manual triggering, and the operation steps of merging the branches to be merged one by one during manual triggering are simplified.
The second method comprises the following steps:
and adopting a manual triggering mode of related technicians to merge the single individual development branch into a main branch of the program code corresponding to the target software.
It should be noted that, the related technical personnel writes the program for updating the version of the target software on the personal development branch, wherein the personal development branch can perform the following operations on the related functions of the current version of the target software: modifying, deleting and adding functions.
In embodiments of the present disclosure, the code merging action may be detected after merging an individual development branch into a main branch of program code corresponding to the target software.
Step S1012: after detecting the code merging action, comparing the difference between the original program code of the target software and the current program code of the target software to determine the target modified code.
In an embodiment of the present disclosure, a version library may be built in the Git system that contains the program code for all versions of the target software. When an action merged onto the main branch of the corresponding program code of the target software is detected, the original program code of the target software and the current program code of the target software are automatically compared in the version library to determine the target alteration code. After the target change code is compared, marking information may also be set for the target change code obtained after the comparison, for example, the change code may be marked with red highlighting.
As can be seen from the above description, in the embodiment of the present disclosure, the personal development branch can be automatically merged into the main branch of the program code corresponding to the target software by monitoring the code. And automatically performing automatic difference comparison of program codes of the target software after detecting the code merging action, 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 procedure can simplify the operation steps, improve the operation accuracy and enhance the evaluation accuracy of the influence range of the modified code.
Meanwhile, in the embodiment of the disclosure, a mode of manually triggering the code merging action can be adopted, and after the code merging action is performed once, a single individual development branch which is subsequently written can still be merged to the main branch in a manually 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 favorable for clearly and intuitively knowing the change code of the merging operation.
In the embodiment of the present disclosure, after at least one target change code in the program codes corresponding to the target software is determined in the manner described above, a target method name corresponding to each target change code may be determined, and the executing of the steps specifically includes steps S1013 to S1014:
step S1013: determining the code line number corresponding to the target change code in the current program code of the target software;
step S1014: and determining a target method name corresponding to the target change code according to a preset incidence relation, wherein the preset incidence relation is used for representing the incidence relation between the code line number and the method name corresponding to the code line number.
According to the above steps, in an alternative embodiment, the following method may be used to determine the target method name corresponding to the target modified code, and specifically includes:
and automatically positioning the code line number of each target change code through a built-in program according to the target change codes in the version library of the Git system, and automatically inquiring all method names corresponding to all the target change codes according to the positioned code line numbers. After all the method names are obtained, the method names are put into a method name set as parameters.
It should be noted that, in the embodiment of the present disclosure, a data table may be constructed in advance, where the data table includes a preset association relationship between a code line number and a method name corresponding to the code line number. When the method name is queried according to the code line number, the method name corresponding to the code line number of the target modified code can be determined according to the preset incidence 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 condition that the search is incomplete 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 optional implementation, in addition to the above-described manner, the method for determining a target method name corresponding to the target change code may further include:
the related art person can search the version library for the target alteration code to which the identification information is set, for example, the alteration code of the red highlighted part, by the identification information set in advance for the target alteration code. And then, determining the method name corresponding to each target change code until all target method names are obtained, and storing the method names as parameters into a method name set after all the target method names are obtained.
According to the content disclosed in 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 can be automatically queried, so that a situation that the affected range of the modification code is not completely searched due to a manner of 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 part of the target modification code needs to be mainly traced, the method name corresponding to the target modification code can be obtained in a manual query mode.
In the embodiment of the present disclosure, after the target method name corresponding to each target alteration code is determined in the manner described above, 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, 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 to understand the system behavior (hereinafter, referred to as "Apm system"). The Apm system is used for circularly calling each method name in a method name set input into the tracking system through a for loop statement by integrating the tracking system aiming at different types of computer languages, wherein the number of circulation is the number of the method names in the set until all methods in the method name set are traversed.
It should be noted that the Apm system may integrate one to multiple tracking systems to perform the above operation flow on target software written based on different computer languages, for example, the Apm system may integrate a jaeger system (for java) and a skywork system (for go) so as 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 a jaeger-agent, which is responsible for processing and sending spanes to a collector, where the collector is the data collection module in fig. 2. The jaeger-agent is deployed on the host as a basic component, and the purpose of the jaeger-agent is to abstract the discovery and routing of the collector from the client (i.e., the client in fig. 2). The jaeger-collector is used for collecting tracking spans and processing tracking data through a pipeline to obtain tracking information. The data store is a data storage module in fig. 2, and is used to store the tracking information). The user interface in fig. 2 may be understood as jaeger-UI for presenting the stored trace information, and jaeger-query is the query module in fig. 2 for retrieving the trace information from the storage and presenting it through the UI.
In an optional embodiment, determining at least one link corresponding to each of the target method names mainly includes the following steps:
step S1031: at least one test case is obtained.
In the embodiment of the present disclosure, at least one test case corresponding to each target method name may be determined first, it should be noted that at least one test case corresponding to different method names may be the same or different, the different test cases are used to represent different test conditions, and specific contents of the test cases may be set according to actual needs.
Step S1032: and sequentially operating the at least one test case through the method function corresponding to each method name to obtain at least one test result.
In the embodiment of the present disclosure, each target method name may be called through a for loop statement loop, and then at least one corresponding test case is executed 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, and at this time, two test conditions may be set for the user payment operation, including: the user carries out payment operation on the terminal equipment but does not pay, and the user carries out payment operation on the terminal equipment and pays the two test conditions, and then corresponding test cases are respectively set for the two test conditions. The Apm system runs the two test cases through the method function corresponding to the user payment operation, and respectively obtains the test results under the two test conditions.
Step S1033: and 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 service node for executing each test case when the method function corresponding to the target method name is executed on the test case. Therefore, in the embodiment of the present disclosure, for the test result of each target method name, the service node in the process of running the test case by the target method name may be tracked by the service node included in the test result, and then, a link is constructed by the determined service node according to the service sequence of the service node, so as to obtain the link of the execution process of the 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 can execute different operation processes when running different test cases, so that the service nodes corresponding to each test condition can be different, and the obtained links formed by the service nodes can also be different.
It should be noted that, since the service nodes operated under different test conditions in the above-mentioned method of aggregation are duplicated but not identical, all the links composed of the service nodes are also duplicated but not identical.
According to 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 through an integrated Apm system, and finally at least one link corresponding to each target method name is output. One or more tracking systems for different computer languages, for example, the tracking system shown in fig. 2, may be integrated inside the Apm system, so that the target software written based on different computer languages is evaluated by the tracking system, and diversified evaluation requirements are met to some extent. Meanwhile, the setting of different test cases can more comprehensively determine the test conditions, so that a more accurate influence range of the change code is obtained.
In this embodiment of the present disclosure, after determining at least one link corresponding to each target method name in the manner described above, a link network may be constructed based on the at least one link corresponding to each target method name, and the executing of the above steps specifically includes:
step S1051: determining a repeated link in at least one link corresponding to all target method names; and merging the repeated links to obtain at least one link corresponding to all the target method names after merging.
In the disclosed embodiment, the Apm system can determine a duplicate link among all links after outputting at least one link for each target method name. The repeated link may be a completely repeated link or a partially repeated link in the whole link. After the duplicate links are determined, the duplicate links may be merged, for example, duplicate portions between multiple links with duplicate links are merged to obtain a merged link.
After the aggregation processing is performed on the at least one link corresponding to all the target method names, the obtained structure of the at least one link after the aggregation processing is more concise. When a user inquires a link affected by the target change code, the search is quicker, and the space for storing data is saved.
Step S1052: and constructing the link network according to at least one link corresponding to all the target method names after the merging processing.
In the embodiment of the present disclosure, through the above merging operation, all links with repeated links may be merged to finally obtain a link network.
In the embodiment of the present disclosure, all links obtained by different test cases for the method names in the target method name set are not completely the same, and then, based on the repeated part existing in all the links, all the links including the repeated part are aggregated, a link network capable of characterizing the code change influence range is obtained through the aggregation operation, and the link network falls into the database, and a user can call the link network through a query operation performed on the terminal device. When relevant technicians evaluate target software, the contact relation of different methods in execution can be visually observed, and the influence range of the modified code can be accurately evaluated.
In the embodiment of the present disclosure, after the link network is constructed in the manner described above, a library dropping operation may be performed on the target link network, and the performing the library dropping operation specifically includes:
step S11: the method comprises the steps of obtaining a database to be stored, and determining a data storage format of the database to be stored.
In the embodiment of the present disclosure, when the link network is subjected to a library dropping operation, a preset database to be stored is first obtained. In addition, since different databases have different data storage formats, the data storage format of the database to be stored needs to be determined.
It should be noted that the type of database to be stored may be set autonomously by the skilled person. For example, the type of database to be stored may be set to Oragle.
Step S12: and 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 user requirements, so that the storage requirements of different users can be met, and the application range of the method provided in the embodiment of the present disclosure is increased to a certain extent.
In the embodiment of the present disclosure, after performing the library falling operation on the link network according to the manner described above, the influence range evaluation may be performed on the target software according to the link network, and the performing of the above steps specifically includes:
step S1053: acquiring a query request sent by a user through a query terminal, wherein the query request comprises a change code requested to be queried by the user;
step S1054: and responding to the query request, and determining at least one target link corresponding to the change code requested by the user in the link network.
In the embodiment of the disclosure, when a user wants to check 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 obtained, at least one target link corresponding to the change code requested to be queried by the user is determined in the link network in response to the query request.
Step S1055: 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.
In the embodiment of the present disclosure, after at least one target link corresponding to a change code requested to be queried by a user is queried, the target link may be displayed on a display interface of the terminal device according to a preset display mode. Then, the user can evaluate the influence range of the change code requested to be inquired by the user aiming at the target link called out on the display interface, thereby finishing the evaluation of the target software update.
It should be noted that after each query request is acquired and successfully executed, a historical query record may be generated in the database, and a user may call a corresponding historical query result by clicking any historical query record on the terminal device, and obtain a priority of an influence after a code is changed according to a comparison result of the historical query records.
For example, the target change code affects a method function related to payment operation in the target software, and the test case corresponding to the method function is as follows: the system comprises a test case 1 and a test case 2, wherein the test case 1 does not pay for carrying out payment operation, and the test case 2 carries out payment operation and pays for carrying out payment operation. At this time, after the method function runs the two test cases, two links are obtained, which respectively represent the links of the service node used by the method function in the execution process under the test conditions represented by the test case 1 and the test case 2. The user can inquire the two links on the terminal device, and after the inquiry, two historical inquiry records are generated, at the moment, the two links can be compared in the historical inquiry records, so that the priority influenced by the target change code is obtained. In addition, for the deleted code, the historical query records corresponding to the code and the calling relationship between the service nodes at the upstream and downstream are synchronously cleared.
As can be seen from the disclosure of the above steps, in the embodiment of the present disclosure, the link corresponding to the target code is called in the operation interface of the terminal device, and the influence range of the target modification code is evaluated according to the calling result, which is beneficial to performing separate analysis and evaluation on the target link and the service node thereof. 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 visually, the historical query records and the calling relation can be eliminated aiming at the deleted codes, and the interference of the invalid historical query records on the searched target link 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, a difference between an original program code of the software and a current program code is compared to determine a change code, a number of affected code lines is located according to the change code, so as to obtain a method set affected by the change, a method in the set is called to obtain a running link, a link network capable of accurately representing a change influence range of the code is output after merging repeated portions of the obtained link, the link network is dropped into a library, a user can query the link network through a terminal device, and a target software is evaluated for update according to a query result, so that a problem that a service node affected by the change of the code in the software cannot be accurately evaluated in an existing technical scheme is solved.
It will be understood by those skilled in the art that in the method of the present invention, the order of writing the steps does not imply a strict order of execution and any limitations on the implementation, and the specific order of execution of the steps should be determined by their function and possible inherent logic.
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 the above-mentioned evaluation method for software update in the embodiment of the present disclosure, the implementation of the device can refer to the implementation of the method, and repeated details are not repeated.
Example two
Referring to fig. 3, a schematic diagram of evaluation for a software update provided in an embodiment of the present disclosure is shown, where the apparatus includes: a first determining module 31, a second determining module 32, a constructing module 33; wherein the content of the first and second substances,
a first determining module 31, configured to determine 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;
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 the building module 33 is configured to build 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 a method name corresponding to a modified code is aggregated to obtain a link network, so that an influence range affected by code modification can be more clearly shown, and thus the problem that a service node affected by code modification in software cannot be accurately evaluated in the prior art is solved.
In a possible implementation, the second determining module is further configured to: acquiring at least one test case; sequentially operating the at least one test case through the method function corresponding to each method name to obtain at least one test result; and 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.
In one possible embodiment, the building module is further configured to: determining a repeated link in at least one link corresponding to all target method names; merging the repeated links to obtain at least one link corresponding to all the target method names after merging; and constructing the link network according to at least one link corresponding to all the target method names after the merging processing.
In a possible implementation, the first determining module is further configured to: determining the code line number 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 incidence relation, wherein the preset incidence relation is used for representing the incidence relation between the code line number and the method name corresponding to the code line number.
In a possible implementation, the second determining module is further configured to: 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 detecting the code merging action, comparing the difference between the original program code of the target software and the current program code of the target software to determine the target modified code.
In one possible embodiment, the building module is further configured to: 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.
In one possible embodiment, the building module is further configured to: acquiring a query request sent by a user through a query terminal, wherein the query request comprises a change code requested to be queried by the user; responding to the query request, and determining at least one target link corresponding to the change code requested to be queried 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.
The description of the processing flow of each module in the device and the interaction flow between the modules may refer to the related description in the above method embodiments, and will not be described in detail here.
EXAMPLE III
Corresponding to fig. 4, an evaluation method for software update is provided in an embodiment of the present disclosure, and as shown in fig. 4, a schematic structural diagram of an electronic device 400 provided in an embodiment of the present disclosure is shown, and includes:
a processor 41, a memory 42, and a bus 43; the memory 42 is used for storing execution instructions and includes a memory 421 and an external memory 422; the memory 421 is also referred to as an internal memory, and is used for temporarily storing the operation data in the processor 41 and the 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 communicates with the memory 42 through the bus 43, so that the processor 41 executes the following instructions:
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 the execution process of the 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.
The embodiment of the present disclosure further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program performs the steps of the evaluation method for software update described in the above method embodiments. The storage medium may be a volatile or non-volatile computer-readable storage medium.
The embodiments of the present disclosure also provide a computer program product, where the computer program product carries a program code, and instructions included in the program code may be used to execute the steps of the evaluation method for software update in the foregoing method embodiments, which may be referred to specifically for the foregoing method embodiments, and are not described herein again.
The computer program product may be implemented by hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied in a computer storage medium, and in another alternative embodiment, the computer program product is embodied in a Software product, such as a Software Development Kit (SDK), or the like.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, apparatus, and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed 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 can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into 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 the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present disclosure. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that: the above-mentioned embodiments are merely specific embodiments of the present disclosure, which are used for illustrating the technical solutions of the present disclosure and not for limiting the same, and the scope of the present disclosure is not limited thereto, and although the present disclosure is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive of the technical solutions described in the foregoing embodiments or equivalent technical features thereof within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present disclosure, and should be construed as being included therein. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (10)

1. An evaluation method for software update is characterized by comprising the following steps:
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 the execution process of the 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 of claim 1, wherein the determining at least one link corresponding to each of the target method names comprises:
acquiring at least one test case;
sequentially operating the at least one test case through the method function corresponding to each method name to obtain at least one test result;
and 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.
3. The method of claim 1 or 2, wherein the constructing a link network based on the at least one link corresponding to each of the target method names comprises:
determining a repeated link in at least one link corresponding to all target method names; merging the repeated links to obtain at least one link corresponding to all the target method names after merging;
and constructing the link network according to at least one link corresponding to all the target method names after the merging processing.
4. The method as recited in claim 1, wherein said determining a target method name for each of said target change codes comprises:
determining the code line number 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 incidence relation, wherein the preset incidence relation is used for representing the incidence relation between the code line number and the method name corresponding to the code line number.
5. The method of claim 1, wherein determining at least one object change code in the program code corresponding to the object 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 detecting the code merging action, comparing the difference between the original program code of the target software and the current program code of the target software to determine the target modified code.
6. The method of claim 1, further comprising:
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.
7. The method according to claim 1, wherein the evaluating the target software for impact according to the link network comprises:
acquiring a query request sent by a user through a query terminal, wherein the query request comprises a change code requested to be queried by the user;
responding to the query request, and determining at least one target link corresponding to the change code requested to be queried 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.
8. An evaluation device for software update, comprising:
the first determining module is used for determining at least one target change code in the program codes corresponding to the target software; determining a target method name corresponding to each target change code to obtain at least one target method name;
a second determining module, 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 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.
9. 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 communicating over the bus when the electronic device is running, the machine-readable instructions when executed by the processor performing the steps of the method for profiling a software update according to claims 1 to 7.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, performs the steps of the method for evaluation of a software update according to any one of claims 1 to 7.
CN202011579805.8A 2020-12-28 2020-12-28 Evaluation method and device for software update and electronic equipment Pending CN112540930A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011579805.8A CN112540930A (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 CN112540930A (en) 2020-12-28 2020-12-28 Evaluation method and device for software update and electronic equipment

Publications (1)

Publication Number Publication Date
CN112540930A true CN112540930A (en) 2021-03-23

Family

ID=75017715

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011579805.8A Pending CN112540930A (en) 2020-12-28 2020-12-28 Evaluation method and device for software update and electronic equipment

Country Status (1)

Country Link
CN (1) CN112540930A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
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

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103176895A (en) * 2011-12-22 2013-06-26 阿里巴巴集团控股有限公司 Method and system of regression testing
US20140130020A1 (en) * 2012-09-28 2014-05-08 Coverity, Inc. Static analysis of computer code to determine impact of change to a code component upon a dependent code component
CN103902255A (en) * 2012-12-24 2014-07-02 腾讯科技(深圳)有限公司 Generating method and system of function relationship call tree
CN107229487A (en) * 2016-03-25 2017-10-03 阿里巴巴集团控股有限公司 Code process method and device
CN108874652A (en) * 2017-05-09 2018-11-23 北京京东尚科信息技术有限公司 It tests and assesses certainly the method, apparatus estimated and electronic equipment for software
CN110334012A (en) * 2019-05-31 2019-10-15 口碑(上海)信息技术有限公司 A kind of methods of risk assessment and device
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
CN111831564A (en) * 2020-07-09 2020-10-27 北京齐尔布莱特科技有限公司 Regression testing method and device and computing equipment

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103176895A (en) * 2011-12-22 2013-06-26 阿里巴巴集团控股有限公司 Method and system of regression testing
US20140130020A1 (en) * 2012-09-28 2014-05-08 Coverity, Inc. Static analysis of computer code to determine impact of change to a code component upon a dependent code component
CN103902255A (en) * 2012-12-24 2014-07-02 腾讯科技(深圳)有限公司 Generating method and system of function relationship call tree
CN107229487A (en) * 2016-03-25 2017-10-03 阿里巴巴集团控股有限公司 Code process method and device
CN108874652A (en) * 2017-05-09 2018-11-23 北京京东尚科信息技术有限公司 It tests and assesses certainly the method, apparatus estimated and electronic equipment for software
CN110334012A (en) * 2019-05-31 2019-10-15 口碑(上海)信息技术有限公司 A kind of methods of risk assessment and device
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
CN111831564A (en) * 2020-07-09 2020-10-27 北京齐尔布莱特科技有限公司 Regression testing method and device and computing equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
杨鹤标等: "面向对象代码变更影响分析模型的研究", 《计算机工程与设计》, vol. 31, no. 19, 16 October 2010 (2010-10-16), pages 4232 - 4234 *

Cited By (1)

* Cited by examiner, † Cited by third party
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

Similar Documents

Publication Publication Date Title
US11409645B1 (en) Intermittent failure metrics in technological processes
CN107622014B (en) Test report generation method and device, readable storage medium and computer equipment
CN109871368B (en) Database detection method, database detection device, computer device and storage medium
CN112817866A (en) Recording playback method, device, system, computer equipment and storage medium
CN113342685A (en) Precise test method and device, computer equipment and storage medium
CN114461534A (en) Software performance testing method and system, electronic equipment and readable storage medium
CN114328566A (en) Relationship graph updating method, device, medium, equipment and generating method
CN112540930A (en) Evaluation method and device for software update and electronic equipment
CN114168565A (en) Backtracking test method, device and system of business rule model and decision engine
CN109240936A (en) Compatibility test method, terminal device and the medium of application program
CN111523921B (en) Funnel analysis method, analysis device, electronic device, and readable storage medium
CN111338959B (en) Data processing method and related equipment
CN113868137A (en) Method, device and system for processing buried point data and server
CN115617623A (en) Performance index data visualization method and device, electronic equipment and storage medium
CN113139112B (en) Information query processing method and device, terminal equipment and storage medium
CN112540919B (en) Test equipment determining method and device
CN113704114A (en) Automatic testing method, device, equipment and medium for functional interface
JP2014115806A (en) System and method for supporting work automation
CN113656318A (en) Software version testing method and device and computer equipment
CN112699014A (en) Method and device for testing and displaying storage performance prediction function
CN111813749A (en) File filtering method and device, electronic equipment and storage medium
CN113495828A (en) Log display method and device and electronic equipment
CN115174366B (en) Data processing method and device
CN103268354B (en) In search engine between correlation strategy the degree of coupling analysis method and device
CN114218091A (en) Regression testing method, device, equipment and 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