Synchronization methods and apparatus for functional components, electronic devices and storage media
By creating a target feature branch with the same name under the mobile component-based architecture and merging it into the main branch and regression branch, the redundancy problem of component iteration and update process in multiple apps is solved, the synchronization of functional components is realized, and the R&D efficiency and quality testing efficiency are improved.
Patent Information
- Application Number
- CN202211464376.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-22
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2042-11-22
AI Technical Summary
In a mobile component-based architecture, the functional iteration of the same component cannot be updated and released simultaneously in multiple apps, resulting in a cumbersome development process, repeated building and waiting, low development efficiency, and high release costs.
By creating a feature branch with the same name as the target, obtaining test instructions, and merging them into the main branch and regression branches of multiple applications after the test passes, the synchronization of functional components is achieved.
It improved the efficiency of R&D and quality testing, reduced redundant builds and waiting, lowered additional workloads and release costs, and enhanced overall R&D efficiency.
Smart Images

Figure CN115801810B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of research and development technology, and in particular to a method and apparatus for synchronizing functional components, electronic devices, and storage media. Background Technology
[0002] Currently, with the company's business development, mobile products have adopted an APP matrix development approach, simultaneously developing and releasing multiple APP applications. During development, scenarios frequently arise where a single requirement or feature needs to be used and released across multiple apps. However, in the component-based architecture development model for mobile devices, some components are integrated into multiple apps, and these components are isolated within the applications by version numbers. Once a component's feature is iterated and released, other applications can integrate the new feature by upgrading the component's version. This approach cannot simultaneously update and release the same component's feature across multiple apps, and the development process is quite cumbersome, requiring each app to create its own requirement branch sequentially to complete the application development process.
[0003] To address the issue that the same component's functional iterations cannot be updated and released simultaneously in multiple apps, existing technologies require developers and testers to complete a full development process on each app. This process includes creating development branches, building artifacts under those branches, submitting branches for testing, functional testing, merging branches into the main branch, and merging branches into regression branches.
[0004] However, the above-mentioned operations of existing technologies bring a lot of repetitive and tedious tasks to developers and testers in the complete development process of each APP, resulting in repeated building and waiting of development products, a lot of extra work tasks and release costs, and relatively low overall development efficiency. Summary of the Invention
[0005] This application provides a method and apparatus for synchronizing functional components, an electronic device, and a storage medium to at least solve the problem in related technologies where repeated construction and waiting of R&D products result in a large number of additional tasks and release costs, leading to relatively low overall R&D efficiency.
[0006] According to one aspect of the embodiments of this application, a synchronization method for functional components is provided, the method comprising:
[0007] Get test commands;
[0008] Test the branch with the same name as the target feature;
[0009] If the target feature branch passes the test, the target feature branch is merged into the main branch and the regression branches of multiple applications, so that the functional components corresponding to the target feature branch in the multiple applications are synchronized.
[0010] According to another aspect of the embodiments of this application, a synchronization device for functional components is also provided, the device comprising:
[0011] The first acquisition module is used to acquire test commands;
[0012] The first test module is used to test the target feature branch with the same name;
[0013] The merging module is used to merge the target feature branch with the same name into the trunk branch and the regression branches of multiple applications, provided that the test of the target feature branch with the same name has passed, so that the functional components in the multiple applications corresponding to the target feature branch with the same name are synchronized.
[0014] Optionally, the device further includes:
[0015] A selection module is used to select multiple applications before obtaining the test instructions;
[0016] A module is established to create a one-to-many relationship between the target feature branch with the same name and multiple applications.
[0017] Optionally, the merging module includes:
[0018] The first acquisition unit is used to acquire the version number and code of the functional component corresponding to the target feature branch with the same name;
[0019] The first update unit is used to update the code and the version number to the functional components corresponding to the target feature branches of the multiple applications.
[0020] Optionally, the device further includes:
[0021] The testing module is used to perform a one-click testing operation on the application having the same target feature branch before testing the target feature branch with the same name.
[0022] The build module is used to trigger a one-click build of the application with the same target and the same name feature branch based on the test results;
[0023] The second testing module is used to perform tests based on the build results.
[0024] Optionally, the first test module includes:
[0025] The second acquisition unit is used to acquire reusable test cases, wherein the reusable test cases are applied to multiple applications for testing;
[0026] The test unit is used to test the target feature branch with the same name using the reused test cases.
[0027] Optionally, the device further includes:
[0028] The first judgment module is used to determine whether there is a target-named feature branch among multiple applications after the target-named feature branch has passed the test;
[0029] The second judgment module is used to determine whether the functional component corresponding to the target characteristic branch is a co-built component when it is determined that there is a target characteristic branch with the same name.
[0030] The second update unit is used to update the version number of the functional component when it is determined that the functional component is the co-construction component.
[0031] Optionally, the device further includes:
[0032] The traversal module is used to traverse the target feature branch after determining whether the functional component corresponding to the target feature branch is a co-constructed component, and if it is determined that the functional component is not the co-constructed component, until the last branch, and then end the traversal.
[0033] According to another aspect of the embodiments of this application, an electronic device is also provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; wherein the memory is used to store a computer program; and the processor is used to execute the method steps of any of the above embodiments by running the computer program stored in the memory.
[0034] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored therein, wherein the computer program is configured to execute the method steps of any of the above embodiments when running.
[0035] In this embodiment, test instructions are obtained; a target feature branch with the same name is tested; and if the target feature branch passes the test, it is merged into the main branch and the regression branches of multiple applications, thus synchronizing the functional components corresponding to the target feature branch within multiple applications. Because this embodiment creates target feature branches for multiple application components in the development and release of multiple applications for the same requirements, and merges them into the main branch and the regression branches of multiple applications after the target feature branch passes the test, the development and updates of functional components in one application can be synchronously applied to other applications, completing the synchronization between functional components of multiple applications. This effectively solves the problem of process redundancy in development, improves the efficiency of development and quality testing, enhances the efficiency of the development process, and solves the problem of repeated building and waiting of development products in related technologies, resulting in many additional tasks and release costs, and overall low development efficiency. Attached Figure Description
[0036] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0037] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0038] Figure 1 This is a flowchart illustrating a synchronization method for an optional functional component according to an embodiment of this application;
[0039] Figure 2 This is a schematic diagram of the overall process of a synchronization method for an optional functional component according to an embodiment of this application;
[0040] Figure 3 This is a structural block diagram of a synchronization device for an optional functional component according to an embodiment of this application;
[0041] Figure 4 This is a structural block diagram of an optional electronic device according to an embodiment of this application. Detailed Implementation
[0042] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0043] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0044] Current mobile products employ a matrix-style development approach, involving the research and development and release of multiple apps. During development, scenarios frequently arise where a single requirement or feature needs to be used across multiple apps. This necessitates developers and testers completing a full development process for each app, leading to numerous problems:
[0045] First, the iteration of a functional component requires development and release on one application before other applications can integrate the new version of the component for feature iteration, resulting in poor timeliness of feature releases across multiple applications.
[0046] Secondly, after fixing and updating problematic code in one application, it's difficult to conduct timely compatibility testing in other applications. Code modification and iterative updates are costly, and often the code is only updated in the current application or a portion of it, leaving some applications without resolving existing issues. This results in additional workload and release costs.
[0047] Finally, the repeated operation of the development process in multiple APP development processes brings a lot of repetitive and tedious work to the developers and testers, as well as repeated building and waiting of the development products, resulting in low overall development efficiency and long development cycle.
[0048] To address the aforementioned problems, embodiments of this application propose a method for synchronizing functional components, such as... Figure 1As shown, this method can be applied to the backend server side, and the method includes:
[0049] Step S101: Obtain test instructions;
[0050] Step S102: Test the target feature branch with the same name, wherein the target feature branch with the same name is a pre-established branch used to synchronize functional components of multiple applications;
[0051] Step S103: If the target feature branch passes the test, merge the target feature branch into the trunk branch and the regression branches of multiple applications, so that the functional components corresponding to the target feature branch in multiple applications are synchronized.
[0052] Optionally, in this embodiment of the application, in order to efficiently develop and release the same requirements across multiple apps (i.e., applications), a target feature branch with the same name is set up. This target feature branch with the same name is a pre-established branch used to synchronize the functional components of multiple applications. If the server receives a test instruction for the target feature branch with the same name, the target feature branch with the same name is tested. If the test passes, the target feature branch with the same name is merged into the main branch and the regression branches of multiple applications.
[0053] It needs to be explained that when the target feature branch with the same name is merged into the regression branches of multiple applications, a relationship is established between the multiple applications and the target feature branch with the same name, as well as the functional components corresponding to the target feature branch with the same name. Code modifications to the functional components will be applied to the target feature branches with the same name in multiple applications at the same time. This allows multiple applications to use the same code and the same version of the functional components, and completes the synchronization of the functional components corresponding to the target feature branch with the same name in multiple applications.
[0054] Taking multiple applications such as ZRAPP, Butler APP, and Owner APP as an example, since ZRAPP, Butler APP, and Owner APP all use the electricity fee component during development, when the power grid electricity fee is upgraded, it may involve upgrading ZRAPP, Butler APP, and Owner APP. Or when the power grid electricity fee function is iterated, it may be necessary to upgrade the function on ZRAPP, Butler APP, and Owner APP at the same time. In this application, the power grid electricity fee is used as the target feature branch with the same name. After its test is passed, the power grid electricity fee branch is merged into ZRAPP, Butler APP, and Owner APP. In this way, as long as the functional component corresponding to the target feature branch of any application is updated, it can be directly synchronized to other APPs.
[0055] In this embodiment, test instructions are obtained; a target feature branch with the same name is tested; and if the target feature branch passes the test, it is merged into the main branch and the regression branches of multiple applications, thus synchronizing the functional components corresponding to the target feature branch within multiple applications. Because this embodiment creates target feature branches for multiple application components in the development and release of multiple applications for the same requirements, and merges them into the main branch and the regression branches of multiple applications after the target feature branch passes the test, the development and updates of functional components in one application can be synchronously applied to other applications, completing the synchronization between functional components of multiple applications. This effectively solves the problem of process redundancy in development, improves the efficiency of development and quality testing, enhances the efficiency of the development process, and solves the problem of repeated building and waiting of development products in related technologies, resulting in many additional tasks and release costs, and overall low development efficiency.
[0056] Based on the content of the above embodiments, as an optional embodiment, the method further includes the following before obtaining the test instructions:
[0057] Select multiple applications;
[0058] Establish a one-to-many relationship between the target feature branch with the same name and multiple applications.
[0059] Optionally, when creating a target feature branch with the same name during the development phase, multiple applications can be selected. Once a target feature branch with the same name is created, a relationship is established between the target feature branch and multiple applications.
[0060] In this embodiment of the application, by supporting the creation of a target feature branch with the same name for multiple apps, the iteration of functional components can be carried out synchronously across multiple apps.
[0061] Based on the above embodiments, as an optional embodiment, to enable synchronization of functional components corresponding to the same-named feature branches within multiple applications, the method further includes:
[0062] Get the version number and code of the functional component corresponding to the target feature branch with the same name;
[0063] Update the code and version number to the corresponding feature components of the target feature branch in multiple applications.
[0064] Optionally, during development, the construction of functional component code in one app will synchronously update the versions of dependent components in the target feature branch of other apps, ensuring that the functional components used by multiple apps use the same code and the same version. That is, whenever the code of a functional component corresponding to the target feature branch is modified, the corresponding version number is updated, and then the updated code and version number are synchronized to the functional components in the target feature branch of other applications.
[0065] In this embodiment, the development results of the functional components corresponding to the target feature branch with the same name can be applied to the functional components in multiple apps with the target feature branch with the same name. This avoids the need for continuous updates and upgrades when building the same component and synchronizing the component version number in multiple apps, which reduces R&D efficiency.
[0066] Based on the content of the above embodiments, as an optional embodiment, before testing the target feature branch with the same name, the method further includes:
[0067] Perform a one-click testing operation on applications with branches that have the same target and the same name;
[0068] Based on the test results, trigger a one-click build of applications with branches that have the same target and the same name;
[0069] Test based on the build results.
[0070] Optionally, during the branch testing phase, by supporting one-click testing of multiple apps with the same target feature branch, the testing process for the same feature iteration can be completed across multiple apps. Based on the testing results, the build of multiple apps can be triggered with one click, such as... Figure 2 The build results will be synchronized and then tested based on the build results.
[0071] Additionally, after testing is complete, you can also choose to merge multiple target feature branches with the same name into one click, merging the target feature branches with the same name into each app.
[0072] In this embodiment of the application, the development process provides support for selecting multiple apps with the same target feature branch, and then completes the testing, merging, and building of multiple apps with one click, eliminating the need to perform testing, building, and merging operations on each app separately.
[0073] Based on the content of the above embodiments, as an optional embodiment, testing the target feature branch with the same name is performed, including:
[0074] Obtain reusable test cases, which are applied to multiple applications for testing;
[0075] Use reused test cases to test the target feature branch with the same name.
[0076] Optionally, during testing, multiple apps with the same target feature branch can reuse the same test cases, and after the test is completed, the test can be passed or failed with a single click.
[0077] In this embodiment, the need to use different test cases in each app is eliminated.
[0078] Based on the above embodiments, as an optional embodiment, after the target feature branch test passes, the method further includes:
[0079] Determine if there are branches with the same target feature name across multiple applications;
[0080] If it is determined that there is a target feature branch with the same name, determine whether the functional component corresponding to the target feature branch with the same name is a co-built component;
[0081] If it is determined that the functional component is a co-built component, update the version number of the functional component.
[0082] Optionally, such as Figure 2 As shown, after triggering the construction of functional components of multiple apps with one click, it is determined whether there are target feature branches with the same name among multiple applications; if it is determined that there are target feature branches with the same name, the target feature branches are traversed; if it is determined that there are no target feature branches with the same name, the version number of the corresponding component of each app is updated respectively.
[0083] After traversing the target feature branch with the same name, determine whether the functional component corresponding to the target feature branch with the same name is a co-built component; if it is determined that the functional component is a co-built component, update the version number of the functional component; if it is determined that the functional component is not a co-built component, traverse the target feature branch with the same name until the last branch, and end the traversal.
[0084] This application embodiment satisfies the requirement for simultaneous functional development and updates across multiple apps, reduces the repetitive execution of processes and building tasks during the development process, improves the efficiency of development and testing, and solves the problem of code and version inconsistency between applications caused by missed functional updates in the development process.
[0085] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0086] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM (Read-Only Memory) / RAM (Random Access Memory), magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.
[0087] According to another aspect of the embodiments of this application, a synchronization apparatus for a functional component for implementing the synchronization method of the above-described functional component is also provided. Figure 3 This is a structural block diagram of a synchronization device for an optional functional component according to an embodiment of this application, such as... Figure 3 As shown, the device may include:
[0088] The first acquisition module 301 is used to acquire test instructions;
[0089] The first test module 302 is connected to the first acquisition module 301 and is used to test the target same-name feature branch, wherein the target same-name feature branch is a pre-established branch used to synchronize the functional components of multiple applications.
[0090] The merging module 303, connected to the first testing module 302, is used to merge the target feature branch with the same name into the trunk branch and the regression branches of multiple applications when the target feature branch with the same name passes the test, so that the functional components corresponding to the target feature branch with the same name in multiple applications can be synchronized.
[0091] It should be noted that the first acquisition module 301 in this embodiment can be used to perform the above step S101, the first test module 302 in this embodiment can be used to perform the above step S102, and the merging module 303 in this embodiment can be used to perform the above step S103.
[0092] Through the modules described above, for the same requirements in the development and release of multiple applications, target feature branches with the same name are created for multiple application components. After the target feature branch passes the test, it is merged into the main branch and the regression branches of multiple applications. In this way, the development and updates of functional components in one application can be applied to other applications simultaneously, completing the synchronization between functional components of multiple applications. This effectively solves the problem of process redundancy in development, improves the work efficiency of development and quality testing, enhances the efficiency of the development process, and solves the problem of repeated building and waiting of development products in related technologies, resulting in a lot of extra work tasks and release costs, and the overall low development efficiency.
[0093] As an optional embodiment, the device further includes:
[0094] The selection module is used to select multiple applications before receiving test instructions;
[0095] Create a module to establish a one-to-many relationship between a target feature branch with the same name and multiple applications.
[0096] As an optional embodiment, the merging module includes:
[0097] The first acquisition unit is used to acquire the version number and code of the functional component corresponding to the target feature branch with the same name;
[0098] The first update unit is used to update the code and version number to the functional components corresponding to the target feature branches of multiple applications.
[0099] As an optional embodiment, the device further includes:
[0100] The testing module is used to perform a one-click testing operation on applications with the same target feature branch before testing the target feature branch with the same name.
[0101] The build module is used to trigger a one-click build of applications with branches that have the same target and the same name, based on the test results;
[0102] The second testing module is used to perform tests based on the build results.
[0103] As an optional embodiment, the first test module includes:
[0104] The second acquisition unit is used to acquire reusable test cases, wherein the reusable test cases are applied to multiple applications for testing.
[0105] Test units are used to test branches of the same-named target feature using reused test cases.
[0106] As an optional embodiment, the device further includes:
[0107] The first judgment module is used to determine whether there are target feature branches with the same name among multiple applications after the target feature branch has passed the test.
[0108] The second judgment module is used to determine whether the functional component corresponding to the target feature branch with the same name is a co-built component when it is determined that there is a target feature branch with the same name.
[0109] The second update unit is used to update the version number of a functional component when it is determined that the functional component is a co-built component.
[0110] As an optional embodiment, the device further includes:
[0111] The traversal module is used to determine whether the functional component corresponding to the target feature branch with the same name is a co-built component. If it is determined that the functional component is not a co-built component, the module traverses the target feature branch with the same name until the last branch, and then ends the traversal.
[0112] According to another aspect of the embodiments of this application, an electronic device for implementing the synchronization method of the above-described functional components is also provided. The electronic device may be a server, a terminal, or a combination thereof.
[0113] Figure 4 This is a structural block diagram of an optional electronic device according to an embodiment of this application, such as... Figure 4 As shown, it includes a processor 401, a communication interface 402, a memory 403, and a communication bus 404. The processor 401, communication interface 402, and memory 403 communicate with each other via the communication bus 404.
[0114] Memory 403 is used to store computer programs;
[0115] When processor 401 executes a computer program stored in memory 403, it performs the following steps:
[0116] Get test commands;
[0117] Test the target feature branch with the same name, where the target feature branch is a pre-established branch used to synchronize functional components of multiple applications;
[0118] If the target feature branch passes the test, merge the target feature branch into the main branch and the regression branches of multiple applications, so that the functional components corresponding to the target feature branch in multiple applications are synchronized.
[0119] Optionally, in this embodiment, the communication bus can be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0120] The communication interface is used for communication between the aforementioned electronic devices and other devices.
[0121] The memory may include RAM, or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0122] As an example, such as Figure 4 As shown, the memory 403 may include, but is not limited to, the first acquisition module 301, the first test module 302, and the merging module 303 in the synchronization device containing the aforementioned functional components. Furthermore, it may include, but is not limited to, other module units in the synchronization device containing the aforementioned functional components, which will not be elaborated upon in this example.
[0123] The processors mentioned above can be general-purpose processors, including but not limited to: CPU (Central Processing Unit), NP (Network Processor), etc.; they can also be DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0124] In addition, the aforementioned electronic device also includes a display for showing the synchronization results of the functional components.
[0125] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments, and will not be repeated here.
[0126] Those skilled in the art will understand that Figure 4The structure shown is for illustrative purposes only. The device implementing the synchronization method of the above functional components can be a terminal device, such as a smartphone (e.g., Android phone, iOS phone), tablet computer, PDA, mobile Internet Device (MID), PAD, etc. Figure 4 This does not limit the structure of the aforementioned electronic devices. For example, the terminal device may also include components that are more advanced than those described above. Figure 4 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 4 The different configurations shown.
[0127] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, ROM, RAM, disk or optical disk, etc.
[0128] According to another aspect of the embodiments of this application, a storage medium is also provided. Optionally, in this embodiment, the storage medium can be used to execute program code for a synchronization method of functional components.
[0129] Optionally, in this embodiment, the storage medium may be located on at least one of the network devices in the network shown in the above embodiment.
[0130] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps:
[0131] Get test commands;
[0132] Test the target feature branch with the same name, where the target feature branch is a pre-established branch used to synchronize functional components of multiple applications;
[0133] If the target feature branch passes the test, merge the target feature branch into the main branch and the regression branches of multiple applications, so that the functional components corresponding to the target feature branch in multiple applications are synchronized.
[0134] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments, and will not be repeated in this embodiment.
[0135] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, ROMs, RAMs, portable hard drives, magnetic disks, or optical disks.
[0136] According to another aspect of the embodiments of this application, a computer program product or computer program is also provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to perform the synchronization method steps of the functional components in any of the above embodiments.
[0137] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0138] If the integrated units in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in the aforementioned computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the synchronization method of the functional components of the various embodiments of this application.
[0139] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0140] In the several embodiments provided in this application, it should be understood that the disclosed client can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or the indirect coupling or communication connection of units or modules may be electrical or other forms.
[0141] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the solution provided in this embodiment, depending on actual needs.
[0142] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0143] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for synchronizing functional components, characterized in that, The method includes: Get test instructions; Test the target feature branch with the same name, wherein the target feature branch with the same name is a pre-established branch used to synchronize functional components of multiple applications; If the target feature branch passes the test, the target feature branch is merged into the main branch and the regression branches of multiple applications, so that the functional components corresponding to the target feature branch in multiple applications are synchronized.
2. The method according to claim 1, characterized in that, Prior to obtaining the test instructions, the method further includes: Select multiple of the aforementioned applications; Establish a one-to-many relationship between the target feature branch with the same name and multiple applications.
3. The method according to claim 1, characterized in that, The process of synchronizing functional components corresponding to the target feature branch within multiple applications also includes: Obtain the version number and code of the functional component corresponding to the target feature branch with the same name; Update the code and version number to the functional components corresponding to the target feature branches of the multiple applications.
4. The method according to claim 1, characterized in that, Before testing the target feature branch with the same name, the method further includes: Perform a one-click testing operation on the application that has the same target and the same name characteristic branch; Based on the test results, trigger a one-click build of the application with the same target and the same name feature branch; Test based on the build results.
5. The method according to claim 1 or 4, characterized in that, The testing of the target feature branch with the same name includes: Obtain reusable test cases, wherein the reusable test cases are applied to multiple applications for testing; The target feature branch with the same name is tested using the reused test cases.
6. The method according to claim 1, characterized in that, After the test of the target feature branch with the same name passes, the method further includes: Determine whether there are branches with the same target feature name among the multiple applications; If it is determined that there is a target feature branch with the same name, it is determined whether the functional component corresponding to the target feature branch with the same name is a co-built component; If it is determined that the functional component is the co-construction component, update the version number of the functional component.
7. The method according to claim 6, characterized in that, After determining whether the functional component corresponding to the target feature branch with the same name is a co-built component, the method further includes: If it is determined that the functional component is not the co-constructed component, traverse the target feature branches with the same name until the last branch, and then end the traversal.
8. A synchronization device for functional components, characterized in that, The device includes: The first acquisition module is used to acquire test commands; The first test module is used to test the target feature branch with the same name, wherein the target feature branch with the same name is a pre-established branch used to synchronize functional components of multiple applications; The merging module is used to merge the target feature branch with the same name into the trunk branch and the regression branches of multiple applications, provided that the test of the target feature branch with the same name has passed, so that the functional components in the multiple applications corresponding to the target feature branch with the same name are synchronized.
9. An electronic device comprising a processor, a communication interface, a memory, and a communication bus, wherein, The processor, the communication interface, and the memory communicate with each other via the communication bus, characterized in that... The memory is used to store computer programs; The processor is configured to perform the method steps of any one of claims 1 to 7 by running the computer program stored in the memory.
10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method described in any one of claims 1 to 7.
Citation Information
Patent Citations
Code development method and device, electronic equipment and readable storage medium
CN113900630A