Updating method and device

By automating the process of acquiring and comparing the code artifacts of engineering tools, and combining unit testing and manual testing, the problem of low efficiency of manual testing during the update process is solved, thus achieving automation and security in tool updates.

CN114780113BActive Publication Date: 2026-02-06WIRELESS LIFE (HANGZHOU) INFORMATION TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202210349239.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-01
Publication Date
2026-02-06
Estimated Expiration
2042-04-01

AI Technical Summary

Technical Problem

In existing technologies, updating engineering tools requires manual testing, which leads to long development cycles, is prone to errors, and is inefficient.

Method used

By automating the process to obtain the original and new version code artifacts, comparing functional consistency, and combining unit testing and manual testing, the automated output of successful or failed updates is ensured.

Benefits of technology

It automates the updating of engineering tools, avoids human error, improves efficiency, and ensures the security and reliability of the update process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114780113B_ABST
    Figure CN114780113B_ABST
Patent Text Reader

Abstract

The present disclosure relates to an updating method and device. The method comprises: using an existing version of an engineering tool to package and build project source code to obtain original version code products; installing a new version of the engineering tool; using the new version of the engineering tool to package and build the project source code to obtain new version code products; and determining whether the updating is successful according to whether the implementation functions of the original version code products and the new version code products are consistent. The engineering tool updating process is automated, human intervention is not required for updating, and problems such as human error and low efficiency are avoided. In addition, the cause of a safe updating failure can be output.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of front-end, and in particular, to an updating method and device. BACKGROUND

[0002] When coding a front-end project, new language features and functions may be needed to improve coding efficiency. However, these features and functions may not be supported in browsers, so various engineering tools are used to package and build the project source code, process and downgrade the source code, and generate new code products that can run on different browser ends and have better compatibility, and finally enable the project to run normally on different browsers.

[0003] Different engineering tools implement different functions, such as using webpack to solve the problem of JavaScript packaging and merging, using less to solve the problem of style file compilation, and the like. These tools are finally introduced into the project in the form of a dependency package, such as a fixed version, for example, v1, when installed for the first time. Since the tools will be continuously updated and upgraded in terms of functions, for example, upgraded to v2, the project needs to be packaged and built again after installing the v2 version to generate new code products. The new code products and the original code products may be inconsistent, which may affect user functions. Because different versions of engineering tools may use different implementation ideas to compile source code, although the code products change, the functions may not be affected.

[0004] The current solution is to manually update the engineering tools, and after the update is completed, new code products are obtained by recompilation. The project functions are verified by manual testing or unit testing to determine whether they are consistent with the original functions. If they are consistent, it means that the upgrade is not a problem, and if they are not consistent, it means that the update has a problem, and then the original version is manually rolled back.

[0005] However, the above-mentioned prior art still has some shortcomings:

[0006] Manual testing takes a lot of time and is slow, which affects the project development cycle. SUMMARY

[0007] To overcome the problems in the related art, the embodiments of the present disclosure provide an updating method and device. The technical solution is as follows:

[0008] According to a first aspect of the embodiments of the present disclosure, an updating method is provided, comprising:

[0009] packaging and building the project source code using an existing version of the engineering tool to obtain original version code products;

[0010] installing a new version of the engineering tool;

[0011] packaging and building the project source code using the existing version of the engineering tool to obtain the original version code product;

[0012] determining whether the update is successful according to whether the implementation functions of the original version code product and the new version code product are consistent.

[0013] The technical scheme provided by the embodiments of the present disclosure can have the following beneficial effects: packaging and building the project source code using the existing version of the engineering tool to obtain the original version code product; installing the new version of the engineering tool; packaging and building the project source code using the new version of the engineering tool to obtain the new version code product; and determining whether the update is successful according to whether the implementation functions of the original version code product and the new version code product are consistent. In this way, the engineering tool update process is automated, and human intervention is not required for the update, thereby avoiding problems such as human error and low efficiency, and the cause of a failed safe update can also be output.

[0014] In one embodiment, the determining whether the update is successful according to whether the implementation functions of the original version code product and the new version code product are consistent comprises:

[0015] detecting whether the original version code product and the new version code product are the same;

[0016] if the original version code product and the new version code product are the same, replacing the existing version of the engineering tool with the new version of the engineering tool and outputting a safe update success instruction;

[0017] if the original version code product and the new version code product are not the same, running a project unit test;

[0018] if the project unit test fails, recording a case of the test failure;

[0019] outputting safe update failure indication information, the safe update failure indication information indicating that the project unit test fails, and the safe update failure indication information also including the case;

[0020] if the project unit test passes, automatically simulating the same behavior paths in the new version code product and the old version code product respectively, and detecting whether the performances of the same behavior paths corresponding to the new version code product and the old version code product are consistent;

[0021] if the performances are not consistent, recording the inconsistent behavior paths;

[0022] output the security update failure indication information, the security update failure indication information indicating that the new version code product and the old version code product do not have the same behavior path, and the inconsistent behavior path;

[0023] If consistent, compare the new version code product and the old version code product, and output the inconsistent code in the new version code product and the old version code product for human intervention testing;

[0024] If the human intervention testing fails, output the security update failure indication information, the security update failure indication information indicating that the human intervention testing fails.

[0025] In one embodiment, the method further comprises:

[0026] If the human intervention testing succeeds, output the security update success indication information.

[0027] In one embodiment, after the security update failure indication information is output, the method further comprises:

[0028] receive the modified project source code based on the reason that causes the original version code product and the new version code product to be different;

[0029] continue to perform the above-mentioned update method on the modified project source code.

[0030] According to a second aspect of the embodiments of the present disclosure, an update device is provided, comprising:

[0031] a first obtaining module configured to use an existing version of an engineering tool to package and build project source code to obtain an original version code product;

[0032] an installing module configured to install a new version of the engineering tool;

[0033] a second obtaining module configured to use the new version of the engineering tool to package and build the project source code to obtain a new version code product;

[0034] a determining module configured to determine whether the update succeeds according to whether the implementation functions of the original version code product and the new version code product are consistent.

[0035] In one embodiment, the determining module comprises:

[0036] a first detecting sub-module, configured to detect whether the original version code product and the new version code product are the same;

[0037] a first outputting sub-module, configured to replace the existing version of the engineering tool with the new version of the engineering tool if the original version code product and the new version code product are the same, and output a security update success instruction;

[0038] a running sub-module, configured to run a project unit test if the original version code product and the new version code product are not the same;

[0039] a first recording sub-module, configured to record a case of test failure if the project unit test fails;

[0040] a second outputting sub-module, configured to output the security update failure indication information, the security update failure indication information indicating that the project unit test fails, and the security update failure indication information further including the case;

[0041] a second detecting sub-module, configured to automatically simulate the same behavior paths in the new version code product and the old version code product respectively if the project unit test passes, and detect whether the performances of the same behavior paths corresponding to the new version code product and the old version code product are consistent;

[0042] a second recording sub-module, configured to record the inconsistent behavior paths if the performances are not consistent;

[0043] a third outputting sub-module, configured to output the security update failure indication information, the security update failure indication information indicating that the performances of the same behavior paths corresponding to the new version code product and the old version code product are not consistent, and the security update failure indication information further including the inconsistent behavior paths;

[0044] a fourth outputting sub-module, configured to compare the new version code product and the old version code product if the performances are consistent, and output the inconsistent codes in the new version code product and the old version code product for human intervention test;

[0045] a fifth outputting sub-module, configured to receive a human intervention test failure instruction, the human intervention test failure instruction indicating that the human intervention test fails, and output the security update failure indication information, the security update failure indication information indicating that the human intervention test fails.

[0046] In an embodiment, the determining module further includes:

[0047] The sixth output submodule is configured to receive a human intervention test success instruction, and output the security update success instruction if the human intervention test is passed.

[0048] In one embodiment, the apparatus further comprises:

[0049] The receiving module is configured to receive the modified project source code based on the reason that the original version code product and the new version code product are different.

[0050] The loop module is configured to continue the above-mentioned update steps on the modified project source code.

[0051] According to a third aspect of the embodiments of the present disclosure, an update apparatus is provided, comprising:

[0052] A processor;

[0053] A memory for storing processor-executable instructions;

[0054] The processor is configured to:

[0055] Package and build the project source code using the existing version of the engineering tool to obtain an original version code product;

[0056] Install a new version of the engineering tool;

[0057] Package and build the project source code using the new version of the engineering tool to obtain a new version code product;

[0058] Determine whether the update is successful according to whether the implementation functions of the original version code product and the new version code product are consistent.

[0059] According to a fourth aspect of the embodiments of the present disclosure, a computer readable storage medium is provided, which stores computer instructions, and the instructions are executed by a processor to implement the steps of the method of any one of the first aspect.

[0060] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF DRAWINGS

[0061] The accompanying drawings incorporated in and forming a part of the specification, illustrate embodiments consistent with the present disclosure and serve to explain the principles of the present disclosure together with the specification.

[0062] Figure 1 is a flowchart of an update method according to an exemplary embodiment.

[0063] Figure 2is a flowchart of an updating method according to an example embodiment.

[0064] Figure 3 is a flowchart of an updating method according to an example embodiment.

[0065] Figure 4 is a flowchart of an updating method according to an example embodiment.

[0066] Figure 5 is a block diagram of an updating apparatus according to an example embodiment.

[0067] Figure 6 is a block diagram of a determining module in an updating apparatus according to an example embodiment.

[0068] Figure 7 is a block diagram of a determining module in an updating apparatus according to an example embodiment.

[0069] Figure 8 is a block diagram of an updating apparatus according to an example embodiment.

[0070] Figure 9 is a block diagram of an updating apparatus 90 according to an example embodiment. DETAILED DESCRIPTION

[0071] The example embodiments will be described in detail herein with reference to the attached drawings. In the following description, same numbers refer to same elements in all figures. The following detailed description does not limit the present disclosure. Instead, the scope of the present disclosure is defined by the appended claims. The following detailed description includes specific details for the purpose of providing an understanding of various embodiments of the present disclosure. However, it will be apparent to those skilled in the art that the present disclosure can be practiced without these specific details. In some instances, well-known structures and devices are shown in block diagram form.

[0072] Figure 1 is a flowchart of an updating method according to an example embodiment, as Figure 1 shown, the method includes the following steps S101-S104:

[0073] In step S101, the project source code is packaged and built using the existing version of the engineering tool to obtain the original version code product.

[0074] The project source code at this time can include the current project modification but not submitted code.

[0075] After the current project modification but not submitted code is submitted, the project build command is run to obtain the original version code product.

[0076] In step S102, the new version of the engineering tool is installed.

[0077] The developer can input the name and version of the engineering tool to be installed, and at this time, a new version of the engineering tool is automatically installed.

[0078] In step S103, the project source code is packaged and built using the new version of the engineering tool to obtain a new version of the code product.

[0079] The project build command is run again to obtain a new version of the code product.

[0080] In step S104, it is determined whether the update is successful according to whether the implementation functions of the original version of the code product and the new version of the code product are consistent.

[0081] Specifically, in one embodiment, as shown in FIG. 1, step S104 includes the following sub-steps: Figure 2

[0082] In step S1041, it is detected whether the original version of the code product and the new version of the code product are the same.

[0083] In step S1042, if the original version of the code product and the new version of the code product are the same, the existing version of the engineering tool is replaced with the new version of the engineering tool, and a safe update success instruction is output.

[0084] In step S1043, if the original version of the code product and the new version of the code product are not the same, a project unit test is run.

[0085] In step S1044, if the project unit test fails, a case of test failure is recorded.

[0086] In step S1045, a safe update failure indication information is output, indicating that the project unit test fails, and the safe update failure indication information also includes the case.

[0087] In step S1046, if the project unit test passes, simulation of the same behavior path is automatically performed in the new version of the code product and the old version of the code product, respectively, to detect whether the performances of the same behavior paths corresponding to the new version of the code product and the old version of the code product are consistent.

[0088] In step S1047, if they are not consistent, the inconsistent behavior path is recorded.

[0089] In step S1048, a safe update failure indication information is output, indicating that the performances of the same behavior paths corresponding to the new version of the code product and the old version of the code product are inconsistent, and the safe update failure indication information also includes the inconsistent behavior path.

[0090] ​In step S1049, if consistent, compare the new version code product and the old version code product, output the inconsistent code in the new version code product and the old version code product for manual intervention test;

[0091] In step S10410, a manual intervention test failure instruction is received, the manual intervention test failure instruction indicates that the manual intervention test fails, and safety update failure indication information is output, the safety update failure indication information indicates that the manual intervention test fails.

[0092] In step S10411, a manual intervention test success instruction is received, the manual intervention test success instruction indicates that the manual intervention test passes, and a safety update success instruction is output.

[0093] In the related art, manual testing or unit testing cannot guarantee 100% coverage, and there may be omissions. In the present disclosure, through multiple verification methods such as code product comparison, unit testing, automatic testing, and manual testing intervention, it is verified whether the update is safe, without manual intervention, with higher coverage and faster speed.

[0094] It is worth noting that the simultaneous verification method is not limited to the above several methods, and can be freely added and deleted according to needs.

[0095] In one embodiment, after outputting the safety update failure indication information, the above method further includes the following sub-steps A1-A2:

[0096] A1, receiving the project source code modified based on the reason why the original version code product and the new version code product are different;

[0097] A2, continue to execute the above update method on the modified project source code.

[0098] In the related art, the entire update process needs manual intervention, and if it fails, the version update needs to be rolled back, which is a slow process without automatic process guarantee. In the present disclosure, if it fails, the existing version of the engineering tool is directly continued to be used, and after receiving the project source code modified based on the reason why the original version code product and the new version code product are different, the above update method is continued to be executed on the modified source code, so that manual intervention is impossible.

[0099] In the embodiments of the present disclosure, an updating method is provided, which comprises: using an existing version of an engineering tool to package and build project source code to obtain original version code products; installing a new version of the engineering tool; using the new version of the engineering tool to package and build the project source code to obtain new version code products; and determining whether the updating is successful according to whether the implementation functions of the original version code products and the new version code products are consistent. In the method, the engineering tool updating process is automated, and human intervention is not required for updating, thereby avoiding problems such as human error and low efficiency, and the cause of a failed safe updating can also be output.

[0100] The implementation process will be described in detail through several embodiments.

[0101] The technical solution of the present disclosure can be completed by developing an independent automatic upgrading module. When the engineering tool needs to be upgraded, the module is run in the project, and the upgrading module will be responsible for upgrading the engineering tool and verifying whether the engineering tool updating is successful. If the updating is not successful, the developer is prompted that the updating fails and the cause of the failure is marked. The detailed steps are as shown in Figure 3

[0102] 1. Enter the project directory and run the automatic upgrading module.

[0103] 2. If the upgrading is successful, the developer is prompted that the upgrading is successful.

[0104] 3. If the upgrading fails, the cause prompted by the automatic upgrading module is solved in a targeted manner, and the automatic upgrading module is run again.

[0105] The specific steps of running the automatic upgrading module are as shown in Figure 4

[0106] 1. Submit the current project modification without submitting the code.

[0107] 2. Cut out a new upgrading code branch.

[0108] 3. Run the project build command to obtain the original version code products.

[0109] 4. Store the original version code products and name them as original products.

[0110] 5. The developer inputs the name and version of the engineering tool to be installed.

[0111] 6. Install the new version of the engineering tool.

[0112] 7. Run the project build command again to obtain the new version code products and name them as new products.

[0113] ​​8. Compare whether the new and old products are safe and same, if same, consider that it is safe to update and go to step 9, if not, go to next step a,

[0114] a. Run the project unit test, if the unit test fails, consider that the update fails, go to step 10, and record the test failure case.

[0115] b. If the previous step passes, automatically simulate the same behavior path in the new and old products respectively, verify whether the behavior of the new and old products is consistent, if not, consider that the update fails, go to step 10, and record the inconsistent behavior path.

[0116] c. If the previous step passes, compare the new and old product codes, record the inconsistent codes in the code product, and use them for manual intervention testing by the developer for the inconsistent codes, if the manual intervention considers that it fails, go to step 10.

[0117] 9. If all the previous steps pass, consider that it is safe to update, and name the upgrade branch as the release branch.

[0118] 10. If the previous step fails, prompt the developer for the update failure reason.

[0119] In the present disclosure:

[0120] 1. The engineering tool upgrade process is automated to realize safe upgrade of engineering tools relied by the project, without human intervention, avoiding manual errors and slow efficiency, and the scheme can be used for upgrade of various other dependent packages, and is not limited to engineering tools, such as third-party packages introduced in the code.

[0121] 2. The update safety is verified through multiple verification methods such as code product comparison, unit testing, automated testing, and manual testing intervention, without human intervention, with higher coverage and faster speed, and the verification methods are not limited to the above, and can be freely added or deleted according to needs.

[0122] The following is an apparatus embodiment of the present disclosure, which can be used to execute the method embodiment of the present disclosure.

[0123] Figure 5 is a block diagram of an update apparatus according to an exemplary embodiment, as shown in Figure 5 The update apparatus comprises:

[0124] A first acquisition module 11 is configured to use an existing version of an engineering tool to package and build project source code to obtain original version code product.

[0125] An installation module 12 is configured to install a new version of the engineering tool.

[0126] The second obtaining module 13 is configured to use the new version of the engineering tool to perform a package build on the project source code to obtain a new version of code product.

[0127] The determining module 14 is configured to determine whether the update is successful according to whether the implementation functions of the original version of code product and the new version of code product are consistent.

[0128] In one embodiment, as shown in FIG. 1, the determining module 14 comprises: Figure 6 The first detecting sub-module 141 is configured to detect whether the original version of code product and the new version of code product are the same.

[0129] The first outputting sub-module 142 is configured to replace the existing version of engineering tool with the new version of engineering tool and output a successful update instruction if the original version of code product and the new version of code product are the same.

[0130] The running sub-module 143 is configured to run a project unit test if the original version of code product and the new version of code product are not the same.

[0131] The first recording sub-module 144 is configured to record a case of test failure if the project unit test fails.

[0132] The second outputting sub-module 145 is configured to output the failed update indication information, which indicates that the project unit test fails, and the case is further included in the failed update indication information.

[0133] The second detecting sub-module 146 is configured to automatically simulate the same behavior path in the new version of code product and the old version of code product respectively if the project unit test passes, and detect whether the performances of the same behavior path corresponding to the new version of code product and the old version of code product are consistent.

[0134] The second recording sub-module 147 is configured to record the inconsistent behavior path if the performances of the same behavior path corresponding to the new version of code product and the old version of code product are not consistent.

[0135] The third outputting sub-module 148 is configured to output the failed update indication information, which indicates that the performances of the same behavior path corresponding to the new version of code product and the old version of code product are not consistent, and the inconsistent behavior path is further included in the failed update indication information.

[0136]

[0137] ​The fourth output sub-module 149 is configured to compare the new version code product and the old version code product, and output inconsistent codes in the new version code product and the old version code product for manual intervention test if the new version code product and the old version code product are inconsistent.

[0138] The fifth output sub-module 1410 is configured to receive a manual intervention test failure instruction indicating that the manual intervention test fails, and output the safety update failure indication information indicating that the manual intervention test fails.

[0139] In one embodiment, as shown in FIG. 1, the determining module 14 further includes: Figure 7

[0140] The sixth output sub-module 1411 is configured to receive a manual intervention test success instruction indicating that the manual intervention test succeeds, and output the safety update success instruction.

[0141] In one embodiment, as shown in FIG. 1, the apparatus further includes: Figure 8

[0142] The receiving module 15 is configured to receive the modified project source code based on the reason causing the old version code product and the new version code product to be different.

[0143] The loop module 16 is configured to continue the above-mentioned update steps on the modified project source code.

[0144] According to a third aspect of the embodiments of the present disclosure, an update apparatus is provided, including:

[0145] a processor;

[0146] a memory for storing processor-executable instructions;

[0147] The processor is configured to:

[0148] packaging and building the project source code using an existing version of an engineering tool to obtain an old version code product;

[0149] installing a new version of the engineering tool;

[0150] packaging and building the project source code using the new version of the engineering tool to obtain a new version code product;

[0151] determining whether the update succeeds according to whether the implementation functions of the old version code product and the new version code product are consistent.

[0152] The processor can be further configured to: ​​

[0153] In one embodiment, the determining whether the update is successful according to whether the implementation function of the original version code product and the implementation function of the new version code product are consistent comprises:

[0154] detecting whether the original version code product and the new version code product are the same;

[0155] if the original version code product and the new version code product are the same, replacing the existing version of the engineering tool with the new version of the engineering tool, and outputting a successful security update instruction;

[0156] if the original version code product and the new version code product are not the same, running a project unit test;

[0157] if the project unit test fails, recording a case of the test failure;

[0158] outputting the security update failure indication information, the security update failure indication information indicating that the project unit test fails, and the security update failure indication information further comprising the case;

[0159] if the project unit test passes, automatically simulating the same behavior path in the new version code product and the old version code product respectively, and detecting whether the performances of the same behavior path corresponding to the new version code product and the old version code product are consistent;

[0160] if not, recording the inconsistent behavior path;

[0161] outputting the security update failure indication information, the security update failure indication information indicating that the performances of the same behavior path corresponding to the new version code product and the old version code product are inconsistent, and the security update failure indication information further comprising the inconsistent behavior path;

[0162] if consistent, comparing the new version code product and the old version code product, and outputting the inconsistent code in the new version code product and the old version code product for manual intervention test;

[0163] receiving a manual intervention test failure instruction, the manual intervention test failure instruction indicating that the manual intervention test fails, and outputting the security update failure indication information, the security update failure indication information indicating that the manual intervention test fails.

[0164] In one embodiment, the processor can be further configured to:

[0165] receive a manual intervention test success instruction, the manual intervention test success instruction indicating that the manual intervention test passes, and output the security update success instruction.

[0166] In one embodiment, after outputting the security update failure indication information, the processor is further configured to:

[0167] receive modified project source code based on the cause that results in the original version code product and the new version code product being different;

[0168] continue to perform the above-mentioned update method on the modified project source code.

[0169] As to the apparatus in the above-mentioned embodiments, the specific manners in which the respective modules perform operations have been described in detail in the embodiments of the method, and thus will not be described in detail here.

[0170] Figure 9 is a block diagram of an apparatus 90 for updating according to an exemplary embodiment. For example, the apparatus 90 can be provided as a server. The apparatus 90 includes a processing component 902, which further includes one or more processors, and a memory resource represented by a memory 903 for storing instructions, such as an application program, executable by the processing component 902. The application program stored in the memory 903 can include one or more than one module each corresponding to a set of instructions. In addition, the processing component 902 is configured to execute the instructions to perform the above-mentioned method.

[0171] The apparatus 90 can further include a power supply component 906 configured to perform power management of the apparatus 90, a wired or wireless network interface 905 configured to connect the apparatus 90 to a network, and an input / output (I / O) interface 908. The apparatus 90 can operate based on an operating system stored in the memory 903, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™ or the like.

[0172] A non-transitory computer readable storage medium having instructions stored therein that, when executed by a processor of an apparatus 90, cause the apparatus 90 to perform the above-mentioned update method, the method comprising:

[0173] packaging and building the project source code using the existing version of the engineering tool to obtain an original version code product;

[0174] installing a new version of the engineering tool;

[0175] packaging and building the project source code using the new version of the engineering tool to obtain a new version code product;

[0176] determining whether the update is successful according to whether the implementation function of the original version code product and the implementation function of the new version code product are consistent.

[0177] In one embodiment, the determining whether the update is successful according to whether the implementation function of the original version code product and the implementation function of the new version code product are consistent comprises:

[0178] detecting whether the original version code product and the new version code product are the same;

[0179] if the original version code product and the new version code product are the same, replacing the existing version of the engineering tool with the new version of the engineering tool, and outputting a safe update success instruction;

[0180] if the original version code product and the new version code product are not the same, running a project unit test;

[0181] if the project unit test fails, recording a case of the test failure;

[0182] outputting the safe update failure indication information, the safe update failure indication information indicating that the project unit test fails, and the safe update failure indication information further including the case;

[0183] if the project unit test passes, automatically simulating the same behavior path in the new version code product and the old version code product respectively, and detecting whether the performances of the same behavior paths corresponding to the new version code product and the old version code product are consistent;

[0184] if not, recording the inconsistent behavior path;

[0185] outputting the safe update failure indication information, the safe update failure indication information indicating that the performances of the same behavior paths corresponding to the new version code product and the old version code product are inconsistent, and the safe update failure indication information further including the inconsistent behavior path;

[0186] if consistent, comparing the new version code product and the old version code product, and outputting the inconsistent codes in the new version code product and the old version code product for human intervention test;

[0187] receiving a human intervention test failure instruction, the human intervention test failure instruction indicating that the human intervention test fails, and outputting the safe update failure indication information, the safe update failure indication information indicating that the human intervention test fails.

[0188] In one embodiment, the method further comprises:

[0189] receiving a human intervention test success instruction indicating that the human intervention test is passed, and outputting the security update success instruction.

[0190] In one embodiment, after outputting the security update failure indication information, the method further comprises:

[0191] receiving a modified project source code based on the reason that causes the original version code product and the new version code product to be different;

[0192] continuing to perform the above-mentioned update method on the modified project source code.

[0193] Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the features disclosed herein. It is intended that the specification and examples be considered as exemplary only, with the true scope and spirit of the disclosure being indicated by the following claims.

[0194] It should be understood that the present disclosure is not limited to the precise structures herein described and illustrated in the drawings, and that various modifications and changes can be made without departing from its scope. The scope of the present disclosure is limited only by the claims that follow.

Claims

1. An updating method characterized by comprising: The method comprises the following steps: packaging and building project source code by using an existing version of an engineering tool to obtain original version code products, wherein the project source code comprises project modified but not submitted code; installing a new version of the engineering tool; packaging and building the project source code by using the new version of the engineering tool to obtain new version code products; determining whether the update is successful according to whether the implementation functions of the original version code products and the new version code products are consistent; the step of determining whether the update is successful according to whether the implementation functions of the original version code products and the new version code products are consistent comprises the following steps: detecting whether the original version code products and the new version code products are the same; if the original version code products and the new version code products are the same, replacing the existing version of the engineering tool with the new version of the engineering tool and outputting a safe update success instruction; if the original version code products and the new version code products are not the same, running project unit tests; if the project unit tests fail, recording the cases of the failed tests; outputting safe update failure indication information, wherein the safe update failure indication information indicates that the project unit tests fail, and the safe update failure indication information further comprises the cases; if the project unit tests pass, respectively simulating the same behavior paths of the new version code products and the old version code products automatically, and detecting whether the performances of the same behavior paths corresponding to the new version code products and the old version code products are consistent; if the performances are not consistent, recording the inconsistent behavior paths; outputting the safe update failure indication information, wherein the safe update failure indication information indicates that the performances of the same behavior paths corresponding to the new version code products and the old version code products are not consistent, and the safe update failure indication information further comprises the inconsistent behavior paths; if the performances are consistent, comparing the new version code products and the old version code products, and outputting inconsistent code in the new version code products and the old version code products for manual intervention tests; receiving a manual intervention test failure instruction, wherein the manual intervention test failure instruction indicates that the manual intervention tests fail, and outputting the safe update failure indication information, wherein the safe update failure indication information indicates that the manual intervention tests fail; the method further comprises the following steps: receiving a manual intervention test success instruction, wherein the manual intervention test success instruction indicates that the manual intervention tests pass, and outputting the safe update success instruction.

2. The method of claim 1, wherein, after the step of outputting the safe update failure indication information, the method further comprises the following steps: receiving project source code that is modified based on reasons for causing the original version code products and the new version code products to be not the same; continuing to perform the above-mentioned update method on the modified project source code.

3. An updating apparatus characterized by comprising: The method comprises the following steps: a first obtaining module is configured to package and build project source code by using an existing version of an engineering tool to obtain original version code products, wherein the project source code comprises project modified but not submitted code; an installing module is configured to install a new version of the engineering tool; The second obtaining module is configured to use the new version of the engineering tool to perform package construction on the project source code to obtain a new version of code product; The determining module is configured to determine whether the update is successful according to whether the implementation functions of the original version of code product and the new version of code product are consistent; The determining module comprises: The first detecting submodule is configured to detect whether the original version of code product and the new version of code product are the same; The first output submodule is configured to replace the existing version of the engineering tool with the new version of the engineering tool and output a successful security update instruction if the original version of code product and the new version of code product are the same; The running submodule is configured to run a project unit test if the original version of code product and the new version of code product are not the same; The first recording submodule is configured to record a case of test failure if the project unit test fails; The second output submodule is configured to output the security update failure indication information, which indicates that the project unit test fails, and the security update failure indication information further comprises the case; The second detecting submodule is configured to automatically simulate the same behavior paths in the new version of code product and the old version of code product respectively if the project unit test passes, and detect whether the performances of the same behavior paths corresponding to the new version of code product and the old version of code product are consistent; The second recording submodule is configured to record the inconsistent behavior paths if the performances of the same behavior paths corresponding to the new version of code product and the old version of code product are inconsistent; The third output submodule is configured to output the security update failure indication information, which indicates that the performances of the same behavior paths corresponding to the new version of code product and the old version of code product are inconsistent, and the security update failure indication information further comprises the inconsistent behavior paths; The fourth output submodule is configured to compare the new version of code product and the old version of code product, and output the inconsistent codes in the new version of code product and the old version of code product for human intervention test if the performances of the same behavior paths corresponding to the new version of code product and the old version of code product are consistent; The fifth output submodule is configured to receive a human intervention test failure instruction, which indicates that the human intervention test fails, and output the security update failure indication information, which indicates that the human intervention test fails. The determining module further comprises: The sixth output submodule is configured to receive a human intervention test success instruction, which indicates that the human intervention test passes, and output the security update success instruction.

4. The apparatus of claim 3, wherein, The apparatus further comprises: The receiving module is configured to receive a modified project source code based on a reason causing the original version of code product and the new version of code product to be different; The loop module is configured to continue to perform the above-mentioned update steps on the modified project source code.

5. An updating apparatus characterized by comprising: comprise: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to implement the steps of the method of any one of claims 1 to 2 when executed.

6. A computer readable storage medium having stored thereon computer instructions, wherein, The instructions, when executed by the processor, implement the steps of the method of any one of claims 1 to 2.

Citation Information

Patent Citations

  • Mobile application program real-time updating method and system

    CN103701930A

  • Test case updating method and device

    CN106776265A

  • Emulating non-traced code with a recorded execution of traced code

    CN113632067A

  • Container-based parallel compiling method, device and equipment and readable medium

    CN113721914A