CN117609087A - Code processing method, device, equipment and medium - Google Patents

Code processing method, device, equipment and medium Download PDF

Info

Publication number
CN117609087A
CN117609087A CN202311659675.2A CN202311659675A CN117609087A CN 117609087 A CN117609087 A CN 117609087A CN 202311659675 A CN202311659675 A CN 202311659675A CN 117609087 A CN117609087 A CN 117609087A
Authority
CN
China
Prior art keywords
code
branch
processed
codes
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311659675.2A
Other languages
Chinese (zh)
Inventor
赵晓鹏
甘勋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Agricultural Bank of China
Original Assignee
Agricultural Bank of China
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Agricultural Bank of China filed Critical Agricultural Bank of China
Priority to CN202311659675.2A priority Critical patent/CN117609087A/en
Publication of CN117609087A publication Critical patent/CN117609087A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a code processing method, a device, equipment and a medium. The method comprises the following steps: acquiring a branch code file which is sent by a user and corresponds to a target application program; performing quality detection on the branch codes to be processed, and determining a quality detection result; if the quality detection result is qualified, acquiring a target trunk code file corresponding to the branch code to be processed; storing the branch codes to be processed into a target trunk code file so as to combine the branch codes to be processed into application program trunk codes corresponding to the branch codes to be processed, thereby obtaining a code file to be tested; and submitting the code file to be tested to a test platform. The embodiment of the invention can automatically detect the quality of the branch codes, automatically combine the branch codes into the application program trunk codes corresponding to the branch codes under the condition that the quality detection result of the branch codes is qualified, obtain new codes and submit the new codes to the test platform.

Description

Code processing method, device, equipment and medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a code processing method, apparatus, device, and medium.
Background
Each developer of an application is typically responsible for the development of different functions of the application. After the development of the branch code for implementing the new function is completed, the branch code needs to be integrated into the application backbone code to generate a new code, and then the new code is tested through the test platform.
In the related art, the code processing scheme is as follows: after the development of the branch code for implementing the new function is completed, the developer merges the branch code into the application backbone code, generates a new code, and then submits the new code to the test platform. The code processing scheme in the related art depends on manual operation, can consume a large amount of manpower cost and time cost, and is low in efficiency and cannot guarantee accuracy.
Disclosure of Invention
The invention provides a code processing method, a device, equipment and a medium, which are used for solving the problems that a code processing scheme in the related technology depends on manual operation, consumes a great deal of labor cost and time cost, and is low in efficiency and cannot guarantee accuracy.
According to an aspect of the present invention, there is provided a code processing method including:
acquiring a branch code file which is sent by a user and corresponds to a target application program; the branch code file is used for storing the branch codes to be processed;
Performing quality detection on the to-be-processed branch codes in the branch code file, and determining a quality detection result of the to-be-processed branch codes;
if the quality detection result of the branch code to be processed is qualified, acquiring a target trunk code file corresponding to the branch code to be processed; the target trunk code file is used for storing an application program trunk code corresponding to the branch code to be processed;
storing the branch codes to be processed into the target trunk code file so as to merge the branch codes to be processed into application program trunk codes corresponding to the branch codes to be processed, thereby obtaining a code file to be tested;
and submitting the code file to be tested to a test platform.
According to another aspect of the present invention, there is provided a code processing apparatus including:
the branch file acquisition module is used for acquiring a branch code file which is sent by a user and corresponds to the target application program; the branch code file is used for storing the branch codes to be processed;
the branch code detection module is used for detecting the quality of the branch code to be processed in the branch code file and determining the quality detection result of the branch code to be processed;
The trunk file acquisition module is used for acquiring a target trunk code file corresponding to the branch code to be processed if the quality detection result of the branch code to be processed is qualified; the target trunk code file is used for storing an application program trunk code corresponding to the branch code to be processed;
the code merging module is used for storing the branch codes to be processed into the target trunk code file so as to merge the branch codes to be processed into the application program trunk code corresponding to the branch codes to be processed, and obtaining a code file to be tested;
and the file submitting module is used for submitting the code file to be tested to a test platform.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor;
and a memory communicatively coupled to the at least one processor;
wherein the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the code processing method according to any one of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to execute the code processing method according to any one of the embodiments of the present invention.
According to the technical scheme, the branch code file corresponding to the target application program and sent by the user is obtained; then, quality detection is carried out on the branch codes to be processed in the branch code file, and the quality detection result of the branch codes to be processed is determined; under the condition that the quality detection result of the branch code to be processed is qualified, acquiring a target trunk code file corresponding to the branch code to be processed; storing the branch codes to be processed into a target trunk code file so as to combine the branch codes to be processed into application program trunk codes corresponding to the branch codes to be processed, thereby obtaining a code file to be tested; and finally submitting the code file to be tested to a test platform, so that the problems that a code processing scheme in the related technology depends on manual operation, a great amount of labor cost and time cost are consumed, the efficiency is lower, and the accuracy cannot be guaranteed are solved, the quality of the branch codes can be automatically detected, the branch codes can be automatically combined to the application program trunk codes corresponding to the branch codes under the condition that the quality detection result of the branch codes is qualified, new codes are obtained, and submitted to the test platform, and after the development of the branch codes for realizing the new functions is completed, the branch codes can be automatically processed, the branch codes are combined into the application program trunk codes to generate new codes, and then the new codes are submitted to the test platform, so that the efficiency and the accuracy of the code processing process are improved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a code processing method according to a first embodiment of the present invention.
Fig. 2 is a flowchart of a code processing method according to a second embodiment of the present invention.
Fig. 3 is a schematic structural diagram of a code processing apparatus according to a third embodiment of the present invention.
Fig. 4 is a schematic structural diagram of an electronic device implementing a code processing method according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "object," "first," "second," and the like in the description and the claims of the present invention and the above drawings are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a code processing method according to a first embodiment of the present invention. The present embodiment is applicable to a case of processing branch codes for realizing new functions of an application program. The method may be performed by a code processing apparatus, which may be implemented in hardware and/or software, which may be configured in an electronic device. The electronic device is used for managing the branch codes of the target application program and processing the branch codes for realizing the new functions of the target application program. As shown in fig. 1, the method includes:
Step 101, acquiring a branch code file corresponding to a target application program, which is sent by a user.
The branch code file is used for storing the branch codes to be processed.
Alternatively, the target application may be one or more applications in a new functionality development stage. The user may be a developer responsible for developing new functionality of the target application. The application backbone code of the target application is the application source code of the target application that has been developed and put into use. In general, as new functions of a target application are continuously developed, the backbone code of the application of the target application is continuously updated. The target application may have multiple versions of application backbone code. The latest version of the application backbone code is the latest application source code of the target application that has been developed and put into use. Each application backbone has a corresponding backbone code file. The backbone code file is a file for storing the application backbone code of the target application. Each application source code is stored in a corresponding backbone code file. The versions of the application backbone code stored in different backbone code files are not identical.
Optionally, the branch code file corresponding to the target application is a file for storing the branch code to be processed. The branch code to be processed is newly developed by the user and needs to be combined with the latest version of the application backbone code of the target application, so that new application source code of new functions of the target application is added. The user may send the branch code file corresponding to the target application to the electronic device through the terminal device. The electronic equipment acquires a branch code file which is sent by a user and corresponds to the target application program.
And 102, performing quality detection on the to-be-processed branch codes in the branch code file, and determining a quality detection result of the to-be-processed branch codes.
Alternatively, the quality detection result of the pending branch code may be information that characterizes whether the pending branch code has a static error. Static errors include, but are not limited to: syntax errors, parameter naming errors, and function call errors. And the quality detection result of the branch code to be processed is qualified or unqualified. And the quality detection result of the branch code to be processed is qualified, which indicates that the branch code to be processed has no static error. And the quality detection result of the branch code to be processed is unqualified, which indicates that the branch code to be processed has static errors.
Optionally, performing quality detection on the to-be-processed branch code in the branch code file, and determining a quality detection result of the to-be-processed branch code includes: and detecting the quality of the branch codes to be processed in the branch code file through a code detection script, and determining the quality detection result of the branch codes to be processed.
Optionally, the code detection script is a script which can be used for detecting whether static errors exist in the to-be-processed branch code after running, and generating a quality detection result of the to-be-processed branch code. The code detection script is stored in the electronic device. When the code detection script is run, the operation of detecting whether the branch code to be processed has static errors or not and generating a quality detection result of the branch code to be processed is executed. The electronic equipment runs a code detection script, so that quality detection is carried out on the to-be-processed branch codes in the branch code file through the code detection script, and a quality detection result of the to-be-processed branch codes is determined.
Optionally, the quality detection of the to-be-processed branch code in the branch code file is performed through a code detection script, and determining a quality detection result of the to-be-processed branch code includes: the following operations are performed by the code detection script: detecting whether static errors exist in the to-be-processed branch codes in the branch code file; if the static error exists in the branch code to be processed, determining that the quality detection result of the branch code to be processed is unqualified; and if the static error does not exist in the branch code to be processed, determining that the quality detection result of the branch code to be processed is qualified.
Optionally, after performing quality detection on the to-be-processed branch code in the branch code file and determining a quality detection result of the to-be-processed branch code, the method further includes: if the quality detection result of the branch code to be processed is unqualified, code abnormality prompt information is sent to the user, and the current processing process is stopped.
Optionally, if the quality detection result of the to-be-processed branch code is unqualified, which indicates that the to-be-processed branch code has a static error, and the user is required to modify the to-be-processed branch code, the code abnormality prompt information may be sent to the user, and the current processing process is stopped.
Optionally, the code exception prompting information is preset information for prompting that the branch code to be processed has static errors and requires a user to modify the branch code to be processed. Sending the code abnormality prompt information to the user, including: and sending the code abnormality prompt information to the terminal equipment of the user so as to enable the user to modify the branch code to be processed in time. The terminal device of the user is a terminal device used by the user. After the code abnormality prompt information is sent to the user, the subsequent operation steps are not executed any more, and the end of the current processing process of the to-be-processed branch code is determined, so that the current processing process of the to-be-processed branch code is stopped.
And step 103, if the quality detection result of the branch code to be processed is qualified, acquiring a target trunk code file corresponding to the branch code to be processed.
The target trunk code file is used for storing the application program trunk code corresponding to the branch code to be processed.
Optionally, if the quality detection result of the to-be-processed branch code is qualified, which indicates that the to-be-processed branch code has no static error, and the to-be-processed branch code can be continuously processed, a target trunk code file corresponding to the to-be-processed branch code is obtained.
Optionally, the application program trunk code corresponding to the branch code to be processed is an application program trunk code of the latest version of the target application program to which the branch code to be processed needs to be merged. The target trunk code file corresponding to the branch code to be processed is a trunk code file for storing the application program trunk code corresponding to the branch code to be processed, that is, for storing the latest version of the application program trunk code of the target application program.
Optionally, acquiring a target trunk code file corresponding to the branch code to be processed includes: and acquiring a target trunk code file corresponding to the branch code to be processed from a preset code database corresponding to the target application program. The preset code database corresponding to the target application may be a preset database for storing backbone code files of the target application.
Optionally, each backbone code file stored in the preset code database is a file for storing different versions of the application backbone code of the target application. Each backbone code file stores an application backbone code. The versions of the application backbone code stored in different backbone code files are not identical. The preset code database stores the storage time of each trunk code file. The storage time of the backbone code file is the time when the backbone code file is stored in the preset code database. The trunk code file with the latest storage time in each trunk code file stored in the preset code database is the trunk code file of the application program trunk code for storing the latest version of the target application program.
Optionally, the obtaining, from a preset code database corresponding to the target application program, a target backbone code file corresponding to the branch code to be processed includes: and acquiring a trunk code file with the latest storage time in each trunk code file stored in a preset code database from the preset code database corresponding to the target application program, and determining the acquired trunk code file as a target trunk code file corresponding to the branch code to be processed. The application backbone code corresponding to the branch code to be processed is the latest version of the application backbone code of the target application to which the branch code to be processed needs to be incorporated. The target backbone code file corresponding to the branch code to be processed is a backbone code file for storing the application backbone code corresponding to the branch code to be processed, i.e. for storing the latest version of the application backbone code of the target application. The trunk code file with the latest storage time in each trunk code file stored in the preset code database is the trunk code file of the application program trunk code for storing the latest version of the target application program. Thus, the acquired trunk code file can be determined as the target trunk code file corresponding to the branch code to be processed.
And 104, storing the branch codes to be processed into the target trunk code file, so as to merge the branch codes to be processed into the application program trunk code corresponding to the branch codes to be processed, and obtaining a code file to be tested.
Optionally, a code insertion position is set in the trunk code file. The code insertion location is the location in the backbone code file where new application source code can be inserted. The electronic device may complete the merging process of the branch code to be processed and the application program backbone code stored in the backbone code file by storing the branch code to be processed to a code insertion position of the backbone code file.
Optionally, storing the to-be-processed branch code in the target backbone code file, so as to merge the to-be-processed branch code into an application program backbone code corresponding to the to-be-processed branch code, to obtain a to-be-tested code file, including: acquiring the branch code to be processed from the branch code file; and storing the branch codes to be processed to a code insertion position of the target trunk code file so as to merge the branch codes to be processed into application program trunk codes corresponding to the branch codes to be processed, thereby obtaining a code file to be tested.
Optionally, after the target trunk code file corresponding to the branch code to be processed is obtained, the electronic device obtains the branch code to be processed from the branch code file, and then stores the branch code to be processed to a code insertion position of the target trunk code file, so as to complete merging processing of the branch code to be processed and the application program trunk code stored in the target trunk code file, and merge the branch code to be processed into the application program trunk code stored in the target trunk code file. And the target trunk code file storing the branch code to be processed is the code file to be tested. The source code of the application program stored in the code file to be tested is a new code.
Step 105, submitting the code file to be tested to a test platform.
Alternatively, the test platform may be a cloud platform for testing application source code of the target application. And the electronic equipment submits the code file to be tested to a test platform, so that a new code is submitted to the test platform. Submitting the code file to be tested to a test platform, including: and sending the code file to be tested to a test platform so that the test platform tests the combined application program source codes in the code file to be tested and feeds back the test passing prompt information or the test failing prompt information.
Optionally, after receiving the code file to be tested, the test platform tests the combined application source code in the code file to be tested. And if the combined application program source codes in the code file to be tested do not pass the test, sending a prompt message that the test fails to pass to the electronic equipment. And if the combined application program source codes in the code file to be tested pass the test, sending the test passing prompt information to the electronic equipment. The test passing prompt information is information for prompting the application program source code to pass the test. The test failed hint information is information for hint that the application source code failed the test.
Optionally, after submitting the code file to be tested to a test platform, the method further includes: and after receiving the test passing prompt information fed back by the test platform, sending the test passing prompt information to the user. And after receiving the test passing prompt information fed back by the test platform, the electronic equipment sends the test passing prompt information to the terminal equipment of the user.
Optionally, after submitting the code file to be tested to a test platform, the method further includes: and after receiving the test failing prompt information fed back by the test platform, sending the test failing prompt information to the user. And after receiving the test failing prompt information fed back by the test platform, the electronic equipment sends the test failing prompt information to the terminal equipment of the user.
According to the technical scheme, the branch code file corresponding to the target application program and sent by the user is obtained; then, quality detection is carried out on the branch codes to be processed in the branch code file, and the quality detection result of the branch codes to be processed is determined; under the condition that the quality detection result of the branch code to be processed is qualified, acquiring a target trunk code file corresponding to the branch code to be processed; storing the branch codes to be processed into a target trunk code file so as to combine the branch codes to be processed into application program trunk codes corresponding to the branch codes to be processed, thereby obtaining a code file to be tested; and finally submitting the code file to be tested to a test platform, so that the problems that a code processing scheme in the related technology depends on manual operation, a great amount of labor cost and time cost are consumed, the efficiency is lower, and the accuracy cannot be guaranteed are solved, the quality of the branch codes can be automatically detected, the branch codes can be automatically combined to the application program trunk codes corresponding to the branch codes under the condition that the quality detection result of the branch codes is qualified, new codes are obtained, and submitted to the test platform, and after the development of the branch codes for realizing the new functions is completed, the branch codes can be automatically processed, the branch codes are combined into the application program trunk codes to generate new codes, and then the new codes are submitted to the test platform, so that the efficiency and the accuracy of the code processing process are improved.
Example two
Fig. 2 is a flowchart of a code processing method according to a second embodiment of the present invention. Embodiments of the invention may be combined with various alternatives to one or more of the embodiments described above. As shown in fig. 2, the method includes:
step 201, acquiring a branch code file corresponding to a target application program, which is sent by a user.
The branch code file is used for storing the branch codes to be processed.
And 202, performing quality detection on the to-be-processed branch codes in the branch code file through a code detection script, and determining a quality detection result of the to-be-processed branch codes.
And 203, if the quality detection result of the to-be-processed branch code is qualified, acquiring a target trunk code file corresponding to the to-be-processed branch code from a preset code database corresponding to the target application program.
The target trunk code file is used for storing the application program trunk code corresponding to the branch code to be processed.
And 204, acquiring the branch codes to be processed from the branch code file.
Step 205, storing the branch code to be processed to a code insertion position of the target trunk code file, so as to merge the branch code to be processed into an application program trunk code corresponding to the branch code to be processed, thereby obtaining a code file to be tested.
And 206, submitting the code file to be tested to a test platform.
According to the technical scheme, the quality detection of the branch codes can be automatically carried out based on the code detection script, the trunk code file storing the application program trunk codes corresponding to the branch codes can be automatically obtained from the code database under the condition that the quality detection result of the branch codes is qualified, the branch codes are combined to the application program trunk codes corresponding to the branch codes to obtain new codes, the new codes are submitted to the test platform, after the development of the branch codes for realizing the new functions is completed, the branch codes can be automatically processed, the branch codes are combined to the application program trunk codes to generate new codes, and then the new codes are submitted to the test platform, so that the efficiency and accuracy of the code processing process are improved.
Example III
Fig. 3 is a schematic structural diagram of a code processing apparatus according to a third embodiment of the present invention. The apparatus may be configured in an electronic device. As shown in fig. 3, the apparatus includes: a branch file acquisition module 301, a branch code detection module 302, a backbone file acquisition module 303, a code merging module 304, and a file submission module 305.
The branch file obtaining module 301 is configured to obtain a branch code file corresponding to a target application program sent by a user; the branch code file is used for storing the branch codes to be processed; a branch code detection module 302, configured to perform quality detection on the to-be-processed branch code in the branch code file, and determine a quality detection result of the to-be-processed branch code; a trunk file obtaining module 303, configured to obtain a target trunk code file corresponding to the branch code to be processed if the quality detection result of the branch code to be processed is qualified; the target trunk code file is used for storing an application program trunk code corresponding to the branch code to be processed; the code merging module 304 is configured to store the branch code to be processed in the target backbone code file, so as to merge the branch code to be processed into an application program backbone code corresponding to the branch code to be processed, thereby obtaining a code file to be tested; and the file submitting module 305 is used for submitting the code file to be tested to a test platform.
According to the technical scheme, the branch code file corresponding to the target application program and sent by the user is obtained; then, quality detection is carried out on the branch codes to be processed in the branch code file, and the quality detection result of the branch codes to be processed is determined; under the condition that the quality detection result of the branch code to be processed is qualified, acquiring a target trunk code file corresponding to the branch code to be processed; storing the branch codes to be processed into a target trunk code file so as to combine the branch codes to be processed into application program trunk codes corresponding to the branch codes to be processed, thereby obtaining a code file to be tested; and finally submitting the code file to be tested to a test platform, so that the problems that a code processing scheme in the related technology depends on manual operation, a great amount of labor cost and time cost are consumed, the efficiency is lower, and the accuracy cannot be guaranteed are solved, the quality of the branch codes can be automatically detected, the branch codes can be automatically combined to the application program trunk codes corresponding to the branch codes under the condition that the quality detection result of the branch codes is qualified, new codes are obtained, and submitted to the test platform, and after the development of the branch codes for realizing the new functions is completed, the branch codes can be automatically processed, the branch codes are combined into the application program trunk codes to generate new codes, and then the new codes are submitted to the test platform, so that the efficiency and the accuracy of the code processing process are improved.
In an optional implementation manner of the embodiment of the present invention, optionally, the code processing apparatus further includes: and the prompt information sending module is used for sending the code abnormal prompt information to the user and stopping the current processing process if the quality detection result of the to-be-processed branch code is unqualified.
In an optional implementation manner of the embodiment of the present invention, optionally, the branch code detection module 302 is specifically configured to: and detecting the quality of the branch codes to be processed in the branch code file through a code detection script, and determining the quality detection result of the branch codes to be processed.
In an optional implementation manner of the embodiment of the present invention, optionally, when performing an operation of acquiring a target trunk code file corresponding to the branch code to be processed, the trunk file acquiring module 303 is specifically configured to: and acquiring a target trunk code file corresponding to the branch code to be processed from a preset code database corresponding to the target application program.
In an optional implementation manner of the embodiment of the present invention, optionally, the code merging module 304 is specifically configured to: acquiring the branch code to be processed from the branch code file; and storing the branch codes to be processed to a code insertion position of the target trunk code file so as to merge the branch codes to be processed into application program trunk codes corresponding to the branch codes to be processed, thereby obtaining a code file to be tested.
In an optional implementation manner of the embodiment of the present invention, optionally, the code processing apparatus further includes: and the test information sending module is used for sending the test passing prompt information to the user after receiving the test passing prompt information fed back by the test platform.
In an optional implementation manner of the embodiment of the present invention, optionally, when performing an operation of performing quality detection on the to-be-processed branch code in the branch code file through a code detection script, the branch code detection module 302 is specifically configured to: the following operations are performed by the code detection script: detecting whether static errors exist in the to-be-processed branch codes in the branch code file; if the static error exists in the branch code to be processed, determining that the quality detection result of the branch code to be processed is unqualified; and if the static error does not exist in the branch code to be processed, determining that the quality detection result of the branch code to be processed is qualified.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
The code processing device can execute the code processing method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of executing the code processing method.
Example IV
Fig. 4 shows a schematic diagram of the architecture of an electronic device 10 that may be used to implement the code processing method of an embodiment of the present invention. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 4, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program built into the Random Access Memory (RAM) 13 from the storage unit 18. In the Random Access Memory (RAM) 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, read Only Memory (ROM) 12 and Random Access Memory (RAM) 13 are connected to each other by a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
The various components in the electronic device 10 are connected to an input/output (I/O) interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the respective methods and processes described above, for example, a code processing method.
In some embodiments, the code processing method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via Read Only Memory (ROM) 12 and/or communication unit 19. One or more steps of the code processing method described above may be performed when a computer program is built into Random Access Memory (RAM) 13 and executed by processor 11. Alternatively, in other embodiments, the processor 11 may be configured to perform the code processing method in any other suitable way (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for implementing the code processing methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A code processing method, comprising:
acquiring a branch code file which is sent by a user and corresponds to a target application program; the branch code file is used for storing the branch codes to be processed;
performing quality detection on the to-be-processed branch codes in the branch code file, and determining a quality detection result of the to-be-processed branch codes;
if the quality detection result of the branch code to be processed is qualified, acquiring a target trunk code file corresponding to the branch code to be processed; the target trunk code file is used for storing an application program trunk code corresponding to the branch code to be processed;
Storing the branch codes to be processed into the target trunk code file so as to merge the branch codes to be processed into application program trunk codes corresponding to the branch codes to be processed, thereby obtaining a code file to be tested;
and submitting the code file to be tested to a test platform.
2. The code processing method according to claim 1, further comprising, after quality detection of the to-be-processed branch code in the branch code file and determination of a quality detection result of the to-be-processed branch code:
if the quality detection result of the branch code to be processed is unqualified, code abnormality prompt information is sent to the user, and the current processing process is stopped.
3. The code processing method according to claim 1, wherein performing quality detection on the to-be-processed branch code in the branch code file, determining a quality detection result of the to-be-processed branch code, comprises:
and detecting the quality of the branch codes to be processed in the branch code file through a code detection script, and determining the quality detection result of the branch codes to be processed.
4. The code processing method according to claim 1, wherein acquiring a target backbone code file corresponding to the branch code to be processed includes:
and acquiring a target trunk code file corresponding to the branch code to be processed from a preset code database corresponding to the target application program.
5. The code processing method according to claim 1, wherein storing the branch code to be processed in the target backbone code file to merge the branch code to be processed into an application backbone code corresponding to the branch code to be processed, to obtain a code file to be tested, includes:
acquiring the branch code to be processed from the branch code file;
and storing the branch codes to be processed to a code insertion position of the target trunk code file so as to merge the branch codes to be processed into application program trunk codes corresponding to the branch codes to be processed, thereby obtaining a code file to be tested.
6. The code processing method according to claim 1, further comprising, after submitting the code file to be tested to a test platform:
And after receiving the test passing prompt information fed back by the test platform, sending the test passing prompt information to the user.
7. A code processing method according to claim 3, wherein the quality detection of the branch code to be processed in the branch code file by a code detection script, determining the quality detection result of the branch code to be processed, comprises:
the following operations are performed by the code detection script:
detecting whether static errors exist in the to-be-processed branch codes in the branch code file;
if the static error exists in the branch code to be processed, determining that the quality detection result of the branch code to be processed is unqualified;
and if the static error does not exist in the branch code to be processed, determining that the quality detection result of the branch code to be processed is qualified.
8. A code processing apparatus, comprising:
the branch file acquisition module is used for acquiring a branch code file which is sent by a user and corresponds to the target application program; the branch code file is used for storing the branch codes to be processed;
the branch code detection module is used for detecting the quality of the branch code to be processed in the branch code file and determining the quality detection result of the branch code to be processed;
The trunk file acquisition module is used for acquiring a target trunk code file corresponding to the branch code to be processed if the quality detection result of the branch code to be processed is qualified; the target trunk code file is used for storing an application program trunk code corresponding to the branch code to be processed;
the code merging module is used for storing the branch codes to be processed into the target trunk code file so as to merge the branch codes to be processed into the application program trunk code corresponding to the branch codes to be processed, and obtaining a code file to be tested;
and the file submitting module is used for submitting the code file to be tested to a test platform.
9. An electronic device, the electronic device comprising:
at least one processor;
and a memory communicatively coupled to the at least one processor;
wherein the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the code processing method of any one of claims 1-7.
10. A computer readable storage medium, characterized in that the computer readable storage medium stores computer instructions for causing a processor to implement the code processing method of any one of claims 1-7 when executed.
CN202311659675.2A 2023-12-05 2023-12-05 Code processing method, device, equipment and medium Pending CN117609087A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311659675.2A CN117609087A (en) 2023-12-05 2023-12-05 Code processing method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311659675.2A CN117609087A (en) 2023-12-05 2023-12-05 Code processing method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN117609087A true CN117609087A (en) 2024-02-27

Family

ID=89953303

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311659675.2A Pending CN117609087A (en) 2023-12-05 2023-12-05 Code processing method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN117609087A (en)

Similar Documents

Publication Publication Date Title
CN115598505A (en) Chip detection method, device, equipment and storage medium
CN116627432A (en) Front-end application automatic deployment method, device, equipment and medium
CN116467161A (en) Application testing method and device, electronic equipment and storage medium
CN116301997A (en) Upgrading method, device, equipment and medium of controller
CN115481594B (en) Scoreboard implementation method, scoreboard, electronic equipment and storage medium
CN115203158A (en) Data comparison method, device, equipment and storage medium
CN117609087A (en) Code processing method, device, equipment and medium
CN116401113B (en) Environment verification method, device and medium for heterogeneous many-core architecture acceleration card
CN116303074A (en) Server testing method, device, equipment and medium
CN116149709A (en) Firmware upgrading method, device, equipment and medium
CN118277275A (en) Interface testing method and device, electronic equipment and storage medium
CN117687853A (en) Firmware detection method, device, equipment and medium
CN116302944A (en) Service system testing method and device, electronic equipment and storage medium
CN114238149A (en) Batch testing method of accounting system, electronic device and storage medium
CN116303019A (en) Test tracing method, device, equipment and medium
CN115374010A (en) Function testing method, device, equipment and storage medium
CN117609064A (en) Unit test method and device, electronic equipment and storage medium
CN115238212A (en) Page designated element detection and replacement method, device, equipment and storage medium
CN117221158A (en) Micro-service application monitoring method, device, equipment and medium
CN117609801A (en) Data comparison method, device, equipment and medium
CN117648252A (en) Function test method and device for software application, electronic equipment and storage medium
CN117539700A (en) Test management method, device, equipment and medium
CN117520080A (en) Server testing method, device, equipment and medium
CN116820727A (en) Task processing method and device, electronic equipment and storage medium
CN117539699A (en) BMC test method, device, equipment and medium

Legal Events

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