Script generation method and device, electronic equipment and storage medium

By generating business processes and performing automated testing and review on terminal devices, the problem of low code quality caused by poor document constraints has been solved, and the automation and standardization of script generation have been improved.

CN114489667BActive Publication Date: 2026-03-20GUAHAO (HANGZHOU) TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-30
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

In existing technologies, relying on documentation to constrain code contributors is ineffective, leading to poor code quality and low standardization.

Method used

By generating a business process to be processed, script development instructions are sent to the terminal device of the development user, so that the user can execute the sub-tasks to be tested corresponding to the process nodes, and perform automated detection and review on the terminal to ensure that the sub-tasks to be tested meet the preset requirements before generating the target script.

Benefits of technology

It effectively constrains the code generation process, improves the automation and standardization of script generation, and enhances code quality and standardization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114489667B_ABST
    Figure CN114489667B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a script development method and device, electronic equipment and a storage medium. The method comprises: generating a to-be-processed business process according to at least one pre-set business configuration item; sending a script development instruction to a terminal device of a corresponding development user based on at least one process node in the to-be-processed business process, so that the development user executes a to-be-detected subtask corresponding to the process node; obtaining the to-be-detected subtask carried in the received task detection instruction, and determining whether the to-be-detected subtask meets a preset requirement; and if each to-be-detected subtask meets the preset requirement, generating a target script corresponding to a target project. The problem that a code co-builder is constrained based on a description on a document in the prior art, resulting in poor code quality and low standardization, is solved, and the process nodes executed by the user based on the terminal script development instruction are effectively constrained, so that the technical effect of improving the automation and standardization of script generation is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to computer processing technology, and particularly relate to a script generation method and device, electronic equipment and storage medium. BACKGROUND

[0002] Currently, before the code written by a developer is submitted to testing, a reviewer usually needs to review the code to ensure the code quality, and then the code reviewed and passed by the reviewer is submitted to a testing end for testing, and then the tested code is submitted to a code repository to complete the code development, review, testing and submission process. In the process of submitting the code to the code repository, the code builder is usually constrained based on the description on the document, which has poor constraint and leads to poor code quality and low standardization. SUMMARY

[0003] Embodiments of the present application provide a script generation method and device, electronic equipment and storage medium to achieve the technical effect of improving the automation and standardization of script generation.

[0004] In a first aspect, embodiments of the present application provide a script generation method, which comprises:

[0005] generating a to-be-processed business process according to at least one pre-set business configuration item, wherein the at least one business configuration item corresponds to a target project;

[0006] sending a script development instruction to a terminal device of a corresponding development user based on at least one process node in the to-be-processed business process, so that the development user executes a to-be-detected subtask corresponding to the process node;

[0007] obtaining the to-be-detected subtask carried in the received task detection instruction, and determining whether the to-be-detected subtask meets a preset requirement;

[0008] if each to-be-detected subtask meets the preset requirement, generating a target script corresponding to the target project.

[0009] In a second aspect, embodiments of the present application further provide a script generation device, which comprises:

[0010] a to-be-processed business process determination module configured to generate a to-be-processed business process according to at least one pre-set business configuration item, wherein the at least one business configuration item corresponds to a target project;

[0011] a script development instruction sending module configured to send a script development instruction to a terminal device of a corresponding development user based on at least one process node in the to-be-processed business process, so that the development user executes a to-be-detected subtask corresponding to the process node;

[0012] The to-be-detected sub-task acquisition module is configured to acquire a to-be-detected sub-task carried in the received task detection instruction, and determine whether the to-be-detected sub-task meets preset requirements.

[0013] The target script generation module is configured to generate a target script corresponding to the target project if all the to-be-detected sub-tasks meet the preset requirements.

[0014] In a third aspect, an electronic device is provided, and the device includes:

[0015] One or more processors;

[0016] A storage device configured to store one or more programs,

[0017] When the one or more programs are executed by the one or more processors, the one or more processors implement the script generation method according to any of the embodiments of the present application.

[0018] In a fourth aspect, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program, which, when executed by a processor, implements the script generation method according to any of the embodiments of the present application.

[0019] The technical solution of the embodiments of the present application generates a to-be-processed business process according to at least one business configuration item set in advance, sends a script development instruction to a terminal device of a corresponding development user based on at least one process node in the to-be-processed business process, so that the development user performs a to-be-detected sub-task corresponding to the process node, acquires a to-be-detected sub-task carried in a received task detection instruction, determines whether the to-be-detected sub-task meets preset requirements, and generates a target script corresponding to a target project if all the to-be-detected sub-tasks meet the preset requirements. The technical solution solves the problem that the code co-builder is constrained based on a description on a document in the prior art, and the constraint is poor, resulting in poor code quality and low standardization. The technical solution effectively constrains the process node performed by the user based on the terminal script development instruction, so as to improve the automation and standardization of script generation. BRIEF DESCRIPTION OF DRAWINGS

[0020] In order to more clearly illustrate the technical solutions of the example embodiments of the present application, the drawings needed in the description of the embodiments are briefly introduced below. Obviously, the drawings introduced are only a part of the drawings of the embodiments to be described by the present application, and not all the drawings. Those skilled in the art can obtain other drawings from these drawings without creating labor.

[0021] Figure 1 A flowchart of a script generation method provided by the first embodiment of the present application;

[0022] Figure 2 A flowchart of a script generation method provided by Embodiment Two of the present application is shown in Figure 2.

[0023] Figure 3 A block diagram of a script generation device provided by Embodiment Three of the present application is shown in Figure 3.

[0024] Figure 4 A structural diagram of an electronic device provided by Embodiment Four of the present application is shown in Figure 4. DETAILED DESCRIPTION

[0025] The present application will be further described below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely intended for the purpose of explanation of the present application, and are not intended to limit the present application. In addition, it should be noted that, for the purpose of description, only the parts related to the present application are shown in the accompanying drawings, rather than all the parts.

[0026] Embodiment One

[0027] Figure 1 A flowchart of a script generation method provided by Embodiment One of the present application is shown in Figure 1. The present embodiment can be applied to the case of generating a script. The method can be executed by a script generation device in the present application. The device can be implemented in the form of software and / or hardware. Alternatively, the device can be implemented by an electronic device, which can be a mobile terminal, a PC terminal, or a server, etc. The device can be configured in a computing device. The script generation method provided by the present embodiment specifically includes the following steps:

[0028] S110, generating a to-be-processed business process according to at least one pre-set business configuration item.

[0029] The at least one business configuration item corresponds to a target project. The target project can be composed of one or more sub-business projects. Each business configuration item can encapsulate program code for executing the function of the corresponding sub-business project.

[0030] Specifically, a user can determine a plurality of sub-business projects involved in a business process according to actual needs, such as a save sub-business project, a submit sub-business project, and a maintenance sub-business project, etc. Each sub-business project can be used to implement a corresponding function. Correspondingly, each sub-business project can be used to form a business process that can implement a target project based on the pre-set business configuration item corresponding to each sub-business project, as a to-be-processed business process.

[0031] It should be noted that in actual application, before the target project is landed, the development and testing of the project need to be performed, the development business and the testing business corresponding to the target project can be generated based on the business configuration items, so that the user can perform corresponding development operation based on the development business and perform corresponding testing operation based on the testing business. Correspondingly, the business process can include the development business process and the testing business process.

[0032] Optionally, the to-be-processed business process is generated according to the at least one business configuration item, including: generating a testing business sub-process and a development business sub-process in the to-be-processed business process according to the at least one business configuration item; setting testing device information for each process node of the testing business sub-process, and setting development device information for each process node of the development business sub-process, so as to perform script development based on the development device information and perform required testing on the developed script based on the testing device information.

[0033] In the development business sub-process, a plurality of process nodes can be included, and each process node corresponds to a corresponding business requirement. The development device information can be a terminal device.

[0034] In this embodiment, the testing business sub-process and the development business sub-process in the to-be-processed business process can be generated according to the pre-set business configuration item. For example, on the terminal device, a project branch can be created by using a pre-configured script tool, for example, the branch name is demand. The script tool, that is, the business configuration item, can be executed, at this time, the tool can automatically create a dev (development) branch and a test (testing) branch as the branches corresponding to the testing business sub-process and the development business sub-process, and the development can be performed on the dev branch and the testing can be performed on the test branch. The branch naming is named in a standard format, for example, the format is dev / test_Requirement_Name_Date, then the dev branch name is dev_demand_lcz1_20211212, and the test branch name is test_demand_lcz1_20211212. Correspondingly, the development device corresponding to the dev development branch is the development device information of each process node of the development business sub-process, and the testing device corresponding to the test testing branch is the testing device information of each process node of the testing business sub-process, so that the user can perform script development on the dev development branch and perform required testing on the developed script on the test testing branch.

[0035] S120, based on at least one process node in the to-be-processed business process, a script development instruction is sent to a terminal device of a corresponding development user, so that the development user performs a to-be-detected sub-task corresponding to the process node.

[0036] The script development instruction is an instruction for instructing the user to perform script development.

[0037] In practical applications, at least one development process node in the to-be-processed business process can be developed based on actual business needs to generate an execution instruction of the development script, and the execution instruction can be sent to the development user to enable the development user to perform the development business corresponding to the process node. For example, after the script tool automatically creates the dev development branch and the test test branch, it automatically switches to the dev development branch by default. It can be considered that the terminal device has received the script development instruction to enable the development user to develop on the current dev development branch. The development business at this time is also a task that needs to be detected subsequently, i.e., as a to-be-detected subtask.

[0038] It should be noted that each process node corresponds to a corresponding business requirement. Based on at least one process node in the to-be-processed business process, a script development instruction is sent to the terminal device of the corresponding development user. The business corresponding to all process nodes can also be reasonably allocated to each development user for execution. For example, the business can be allocated according to the business level, or the business can be allocated according to the relationship strength between the businesses, or the development user can be allocated according to the development user's ability, so that the development user performs the business corresponding to the received process node.

[0039] Optionally, based on at least one process node in the to-be-processed business process, a script development instruction is sent to the terminal device of the corresponding development user to enable the development user to perform the to-be-detected subtask corresponding to the process node, including: sending a script development instruction to the terminal device of the highest level process node according to the hierarchical information of the process nodes in the development business sub-process; or, sending a script development instruction to the terminal device of each process node in the development business sub-process; based on the terminal device receiving the script development instruction and according to the task information carried in the script development instruction, generating a corresponding to-be-detected subtask.

[0040] In practical applications, the tasks corresponding to each process node in the development business sub-process can be pre-labeled according to a fixed level standard, such as process node 1 level A and process node 2 level B. If level A is greater than level B, process node 1 can be used as the highest level process node, and the script development instruction corresponding to process node 1 can be sent to the corresponding terminal device. Correspondingly, the development user can perform the development task corresponding to process node 1. Alternatively, a script development instruction can also be sent to the terminal device of each process node in the development business sub-process. When the terminal device receives the script development instruction, the task information carried on the script development instruction can be detected using an algorithm, and the development user can perform the task corresponding to the task information as a to-be-detected subtask.

[0041] It should be noted that after the development user receives the to-be-detected subtask, in order to improve the standardization of development, auditing and testing, the development user can automatically create a dev development branch and a test test branch by using a script tool, and at this time, the development user is switched to the dev development branch by default for development. Correspondingly, when the test is submitted, the development code corresponding to the to-be-detected subtask can be submitted to the corresponding test test branch for testing, so as to improve the automation and standardization of the finally generated script.

[0042] It should be further noted that in order to improve the quality of the generated script, in the process of generating the to-be-detected subtask based on the terminal device, the script tool can also be used to automatically detect the development code corresponding to the to-be-detected subtask to prompt the development user whether there is an error in the code, and modify it in time. In the case of passing the automatic detection, subsequent auditing and testing are performed, which improves the development efficiency.

[0043] Optionally, in the process of generating the to-be-detected subtask based on the terminal device, the pre-set program detection code is used to automatically detect the to-be-detected subtask to determine whether there is error information in the to-be-detected subtask.

[0044] In this embodiment, the program detection code, for example, a static code checking tool and an automatic testing tool, can be pre-configured in the terminal device to automatically detect the to-be-detected subtask. For example, in actual application, when the user submits the development code corresponding to the to-be-detected subtask after completing the development on the dev development branch, the ci (continuous integration) of gitlib (an open source project for repository management system) can be automatically triggered to start executing the static code checking and automatic testing process, for example, checking the naming format, abbreviation specification, calling relationship and the like, that is, automatically detecting the code, which improves the constraint on the code specification. Whether there is error information in the to-be-detected subtask can be determined based on the automatic detection result. If not, it means that the automatic detection is passed, and only then the user can submit a request to merge the code on the dev development branch to the test test branch for testing. If yes, the user needs to modify the code on the dev development branch to pass the automatic detection.

[0045] S130, acquiring the to-be-detected subtask carried in the received task detection instruction, and determining whether the to-be-detected subtask meets a preset requirement.

[0046] In actual application, after the to-be-detected subtask passes the automatic detection, the development user can automatically submit the to-be-detected subtask on the current dev development branch to the test branch for testing by executing the script command line preview mr. When the test branch receives the development code corresponding to the to-be-detected subtask, it can be considered that the to-be-detected subtask is received, and the development code can be tested by using the test equipment corresponding to the test branch to determine whether the to-be-detected subtask corresponding to the development code meets the preset requirement. If not, the development user needs to be prompted with error information to make the development user modify the code on the original dev development branch. If yes, it means that the test is completed, and the development code at this time can be used as the development script of the to-be-detected subtask.

[0047] It should be noted that before obtaining the to-be-detected subtask carried in the received task detection instruction and determining whether the to-be-detected subtask meets the preset requirement, that is, before submitting the development code on the dev development branch to the test branch, the development code needs to go through a code review process to check whether the development code is qualified.

[0048] Optionally, before obtaining the to-be-detected subtask carried in the received task detection instruction and determining whether the to-be-detected subtask meets the preset requirement, the method further includes: sending the to-be-detected subtask to an auditing device, so that an auditing user corresponding to the auditing device determines the compliance of the to-be-detected subtask; and when the compliance meets a preset condition, testing the to-be-detected subtask based on a test device.

[0049] In actual application, before the development user submits the to-be-tested subtask from the dev development branch to the test test branch, the script tool can be used to automatically send the to-be-tested subtask to the terminal device corresponding to the designated reviewer for review. For example, when the development user submits the to-be-tested subtask for testing, the development user can give a submission instruction. The user can input the OA (Office Automation) account of the reviewer in the tool, and the tool will automatically submit the to-be-tested subtask to the reviewer corresponding to the OA account. Alternatively, the notification information of the code review can be sent to the designated reviewer to notify the reviewer to review the development code corresponding to the to-be-tested subtask. For example, the notification information of the code review can be sent to the designated reviewer by means of email, short message, etc. When the reviewer receives the review notification corresponding to the to-be-tested subtask, the reviewer can review the development code to determine whether the development code corresponding to the to-be-tested subtask meets the preset compliance requirement. If yes, the merge request operation can be performed to move the development code of the dev development branch to the test test branch. At this time, the review process is completed. In this case, the to-be-tested subtask can be merged into the test test branch for testing, and the to-be-tested subtask can be tested based on the test test branch corresponding to the test equipment.

[0050] It should be noted that if the development code corresponding to the to-be-tested subtask does not meet the preset compliance requirement, it means that the to-be-tested subtask does not meet the preset business requirement at this time, or there is an error in the specification, and the development code needs to be returned to the terminal device corresponding to the development user for modification to obtain the development code meeting the preset compliance requirement.

[0051] Optionally, when the compliance does not meet the preset condition, an error prompt is sent to the development device corresponding to the to-be-tested subtask, so that the development user processes the to-be-tested subtask based on the error prompt to obtain the to-be-tested subtask meeting the preset condition.

[0052] The error prompt includes an error code line, which can be stored in the form of a document.

[0053] In the embodiment, when the compliance does not meet the preset condition, the review user can fill in the corresponding document information based on the business that does not meet the preset condition, can send the document information as error prompt information, and can further send the error prompt information to the test equipment corresponding to the to-be-detected subtask, that is, send the error prompt. For example, the review user reviews the development code, when the development code does not meet the preset condition, a question can be raised, and the question can be sent to the development user. The development user needs to modify on the original dev development branch, and after modification, needs to continue to submit the test test branch, and continue to send to the review user for review. After the review is correct, the to-be-detected subtask that meets the preset condition can be obtained. At this time, the submit test test branch operation can be performed, the MR (Merge request, merge request) from dev to test is completed, and the development code on the dev development branch is submitted to the test test branch for testing.

[0054] S140, if each to-be-detected subtask meets the preset requirement, a target script corresponding to the target project is generated.

[0055] In actual application, after the to-be-detected subtask is reviewed by the review user, the to-be-detected subtask on the development branch can be submitted to the test branch, so that the test end tests on the test branch. Correspondingly, if the test results corresponding to each to-be-detected subtask meet the preset requirement, a target script corresponding to the target project can be generated.

[0056] The technical scheme of the embodiment generates a to-be-processed business process according to at least one pre-set business configuration item, sends a script development instruction to the terminal device of the corresponding development user based on at least one process node in the to-be-processed business process, so that the development user executes the to-be-detected subtask corresponding to the process node, acquires the to-be-detected subtask carried in the received task detection instruction, and determines whether the to-be-detected subtask meets the preset requirement. If each to-be-detected subtask meets the preset requirement, a target script corresponding to the target project is generated. The technical scheme solves the problem in the prior art that the code co-builder is constrained based on the description on the document, and the constraint is poor, resulting in poor code quality and low standardization. The technical scheme effectively constrains the process node executed by the user based on the terminal script development instruction, so as to improve the automation and standardization of script generation.

[0057] Embodiment two

[0058] As an optional embodiment of the above-mentioned embodiment, Figure 2 A flowchart of a script generation method provided by the embodiment of the application is shown. Specifically, the specific content can be referred to below.

[0059] For example, Figure 2The technical solution can provide a standardized code review process for enterprises. When the demand starts, a branch is created according to the demand name. If the demand name is demand, the script command line tool can automatically create a dev development branch and a test test branch, that is, the test business sub-process and the development business sub-process corresponding to the branch are generated. Business development of the to-be-tested sub-task is performed on the dev development branch, and development code testing is performed on the test test branch. The branch name can be named according to a standard format, which is dev / test_demand_name_date. For example, the dev development branch is dev_demand_lcz1_20211212, and the test test branch is test_demand_lcz1_20211212. At this time, the dev development branch is switched by default. After completing the demand development on the dev development branch, the developer submits the modified content, which automatically triggers the ci (continuous integration) of gitlib, starts the static code checking and automatic testing process. After the automatic detection, the code developer submits MR (Merge request) on the dev development branch through the tool author, that is, requests to merge the development code on the dev development branch to the test test branch, and prompts the commit (submission description). In the tool, the OA account of the review user is input, and the tool automatically submits the MR to the review user. The review user has been pre-specified not to be the developer. The review user reviews the code and raises questions. After the developer modifies on the dev development branch, the MR is continuously submitted, and the review user reviews the code without error, and the review process is completed, that is, the review is passed. The MR merging operation is performed, the MR of dev to test is completed, and the task can be submitted to the test. Finally, the demand corresponding to the to-be-tested sub-task is tested on the test test branch, and the merging of the dev development branch to the test test branch must pass the code review process. When testing the demand on the test test branch, if the code needs to be changed, the developer cannot directly modify the code on the test test branch, and needs to modify the code on the dev development branch. When the test is completed, the release plan can be filled in, the development code can be merged to the release branch, and the release manager can review it. If the review is not passed, the developer needs to modify the code on the dev development branch. If the review is passed, the next step of acceptance can be entered. If the acceptance is not passed, the developer needs to modify the code on the dev development branch. If the acceptance is passed, it can be released to the online environment. If all the to-be-tested sub-tasks meet all the requirements, the development code corresponding to each to-be-tested sub-task can be merged to generate a target script corresponding to a target project.

[0060] The technical scheme of the embodiment generates a to-be-processed business process according to at least one pre-set business configuration item, sends a script development instruction to a terminal device of a corresponding development user based on at least one process node in the to-be-processed business process, so that the development user executes a to-be-detected subtask corresponding to the process node, acquires the to-be-detected subtask carried in the received task detection instruction, and determines whether the to-be-detected subtask meets a pre-set requirement. If each to-be-detected subtask meets the pre-set requirement, a target script corresponding to a target project is generated. The technical scheme solves the problem in the prior art that a code co-builder is constrained based on a description on a document, poor constraint results in poor code quality and low standardization, and effectively constrains a process node executed by a user based on a terminal script development instruction, so as to achieve the technical effect of improving the automation and standardization of script generation.

[0061] Embodiment three

[0062] Figure 3 A structural block diagram of a script generation device provided for the third embodiment of the application is shown in FIG. 3. The device includes a to-be-processed business process determination module 310, a script development instruction sending module 320, a to-be-detected subtask acquisition module 330, and a target script generation module 340.

[0063] The to-be-processed business process determination module 310 is configured to generate a to-be-processed business process according to at least one pre-set business configuration item. The at least one business configuration item corresponds to a target project. The script development instruction sending module 320 is configured to send a script development instruction to a terminal device of a corresponding development user based on at least one process node in the to-be-processed business process, so that the development user executes a to-be-detected subtask corresponding to the process node. The to-be-detected subtask acquisition module 330 is configured to acquire the to-be-detected subtask carried in a received task detection instruction, and determine whether the to-be-detected subtask meets a pre-set requirement. The target script generation module 340 is configured to generate a target script corresponding to the target project if each to-be-detected subtask meets the pre-set requirement.

[0064] The technical scheme of the embodiment generates a to-be-processed business process according to at least one pre-set business configuration item, sends a script development instruction to a terminal device of a corresponding development user based on at least one process node in the to-be-processed business process, so that the development user performs a to-be-detected subtask corresponding to the process node, acquires the to-be-detected subtask carried in the received task detection instruction, and determines whether the to-be-detected subtask meets a preset requirement. If each to-be-detected subtask meets the preset requirement, a target script corresponding to a target project is generated. The technical scheme solves the problem in the prior art that a code co-builder is constrained based on a description on a document, poor constraint results in poor code quality and low standardization, and effectively constrains a process node performed by a user based on a terminal script development instruction, so as to improve the automation and standardization of script generation.

[0065] On the basis of the above device, optionally, the to-be-processed business process determination module 310 comprises a business sub-process generation unit and a device information setting unit.

[0066] The business sub-process generation unit is configured to generate a test business sub-process and a development business sub-process in the to-be-processed business process according to the at least one business configuration item.

[0067] The device information setting unit is configured to set test device information for each process node of the test business sub-process, and set development device information for each process node of the development business sub-process, so as to develop a script based on the development device information and test the developed script based on the test device information.

[0068] On the basis of the above device, optionally, the script development instruction sending module 320 comprises a script development instruction sending unit and a to-be-detected subtask generation unit.

[0069] The script development instruction sending unit is configured to send a script development instruction to a terminal device of a highest-level process node according to hierarchical information of a process node in the development business sub-process, or send a script development instruction to a terminal device of each process node in the development business sub-process.

[0070] The to-be-detected subtask generation unit is configured to receive the script development instruction based on the terminal device, and generate a corresponding to-be-detected subtask according to task information carried in the script development instruction.

[0071] On the basis of the above device, optionally, the script development instruction sending module 320 further comprises an automatic detection unit.

[0072] The automation detection unit is configured to detect the to-be-detected subtask based on a preset program detection code to determine whether there is error information in the to-be-detected subtask in a process of generating the to-be-detected subtask based on the terminal device.

[0073] On the basis of the above device, optionally, the device further comprises a compliance detection module. The compliance detection module comprises a compliance determination unit and a to-be-detected subtask test unit.

[0074] The compliance determination unit is configured to send the to-be-detected subtask to an auditing device, so that an auditing user corresponding to the auditing device determines the compliance of the to-be-detected subtask.

[0075] The to-be-detected subtask test unit is configured to test the to-be-detected subtask based on the test device when the compliance satisfies a preset condition.

[0076] On the basis of the above device, optionally, the compliance detection module further comprises an error prompt sending unit.

[0077] The error prompt sending unit is configured to send an error prompt to a development device corresponding to the to-be-detected subtask when the compliance does not satisfy the preset condition, so that a development user processes the to-be-detected subtask based on the error prompt to obtain a to-be-detected subtask satisfying the preset condition.

[0078] The error prompt comprises an error code line.

[0079] The script generation device provided in the embodiments of the present application can execute the script generation method provided in any of the embodiments of the present application, and has the corresponding function modules and beneficial effects of the execution method.

[0080] It should be noted that each unit and module included in the above device is only divided according to the function logic, and is not limited to the above division, as long as the corresponding function can be realized; in addition, the specific name of each functional unit is only for convenient mutual distinction, and does not limit the protection scope of the embodiments of the present application.

[0081] Embodiment Four

[0082] Figure 4 A structural schematic diagram of an electronic device provided for the fourth embodiment of the present application. Figure 4 A block diagram of an exemplary electronic device 40 suitable for use in implementing embodiments of the present application is shown. Figure 4 The electronic device 40 shown is merely an example and should not bring any limitation to the function and use range of the embodiments of the present application.

[0083] AsFigure 4 As shown, electronic device 40 is represented in the form of a general-purpose computing device. The components of electronic device 40 may include, but are not limited to: one or more processors or processing units 401, system memory 402, and bus 403 connecting different system components (including system memory 402 and processing unit 401).

[0084] Bus 403 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. Examples of these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.

[0085] Electronic device 40 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by electronic device 40, including volatile and non-volatile media, removable and non-removable media.

[0086] System memory 402 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 404 and / or cache memory 405. Electronic device 40 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 406 may be used to read and write non-removable, non-volatile magnetic media (… Figure 4 Not shown; usually referred to as a "hard drive"). Although Figure 4 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 403 via one or more data media interfaces. Memory 402 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present invention.

[0087] A program / utility 408 having a set (at least one) of program modules 407 may be stored, for example, in memory 402. Such program modules 407 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 407 typically perform the functions and / or methods described in the embodiments of the present invention.

[0088] The electronic device 40 can also communicate with one or more external devices 409, such as a keyboard or a pointing device, displays 410, etc.; other devices that enable a user to interact with the electronic device 40; and / or any devices (e.g., modems, network cards, etc.) that enable the electronic device 40 to communicate with one or more other computing devices. Such communication can occur via Input / Output (I / O) interfaces 411. Still yet, the electronic device 40 can communicate with one or more networks, such as a local area network (LAN), a general wide area network (WAN), and / or a public network, such as the Internet, via network adapter 412. As depicted, network adapter 412 communicates with the other components of the electronic device 40 via bus 403. It should be appreciated that although not shown, other hardware and / or software modules could be used in conjunction with the electronic device 40. Examples, include, but are not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archival storage systems, etc. Figure 4

[0089] The processing unit 401 performs various function applications and data processing by running programs stored in the system memory 402, such as implementing the script generation method provided by the embodiments of the present application.

[0090] Embodiment Five

[0091] The embodiment five of the present application further provides a storage medium containing computer executable instructions, which are used for executing a script generation method when executed by a computer processor. The method comprises:

[0092] generating a to-be-processed business process according to at least one business configuration item preset, wherein the at least one business configuration item corresponds to a target project;

[0093] sending a script development instruction to a terminal device of a corresponding development user based on at least one process node in the to-be-processed business process, so that the development user executes a to-be-detected subtask corresponding to the process node;

[0094] obtaining the to-be-detected subtask carried in the received task detection instruction, and determining whether the to-be-detected subtask meets a preset requirement;

[0095] if all the to-be-detected subtasks meet the preset requirement, generating a target script corresponding to the target project.

[0096] ​The computer storage medium of the embodiments of the present application can adopt any combination of one or more computer readable media. The computer readable medium can be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium may, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination thereof. More specific examples (non-exhaustive list) of the computer readable storage medium include an electrical connection having 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 above. In this document, the computer readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus or device.

[0097] The computer readable signal medium can include a data signal propagated in baseband or propagated as a carrier wave, in which computer readable program code is embodied. Such propagated data signals can take a wide variety of forms, including but not limited to electro-magnetic signals, optical signals, or any suitable combination thereof. The computer readable signal medium can also be any computer readable medium that is not a storage medium, that is capable of storing the program for use by or in connection with the instruction execution system, apparatus or device.

[0098] The program code embodied on the computer readable medium can be transmitted using any appropriate medium, including but not limited to wireless, wire line, optical fiber cable, RF, etc., or any suitable combination of the above.

[0099] The computer program code for carrying out operations of the embodiments of the present application can be written in one or more programming languages or combinations of languages including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages such as "C" or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0100] Note that the above merely describes preferred embodiments of the present application and the principles of the technology applied. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, modifications and substitutions can be made to the present application without departing from the scope of the present application. Therefore, although the present application has been described in detail through the above embodiments, the present application is not limited to the above embodiments, and can include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the claims.

Claims

1. A script generation method, characterized in that, include: Based on at least one business configuration item, generate test business sub-processes and development business sub-processes in the business process to be processed; Test equipment information is set for each process node of the test business sub-process, and development equipment information is set for each process node of the development business sub-process, so as to develop scripts based on the development equipment information and perform requirement testing on the developed scripts based on the test equipment information; wherein, the at least one business configuration item corresponds to the target project; Based on at least one process node in the business process to be processed, a script development instruction is sent to the terminal device of the corresponding developer user so that the developer user executes the sub-task to be detected corresponding to the process node. Obtain the subtask to be detected carried in the received task detection instruction, and determine whether the subtask to be detected meets the preset requirements; If all subtasks to be detected meet the preset requirements, a target script corresponding to the target project is generated.

2. The method according to claim 1, characterized in that, The step of sending script development instructions to the terminal device of the corresponding developer user based on at least one process node in the business process to be processed, so that the developer user executes the sub-task to be detected corresponding to the process node, includes: Based on the hierarchical information of the process nodes in the development business sub-process, script development instructions are sent to the terminal device of the highest-level process node; or, Send script development instructions to the terminal devices of each process node in the development business sub-process; The terminal device receives the script development instructions and generates corresponding subtasks to be detected based on the task information carried in the script development instructions.

3. The method according to claim 2, characterized in that, Also includes: During the process of generating the subtask to be tested based on the terminal device, the subtask to be tested is automatically detected based on the pre-set program detection code to determine whether there is any error information in the subtask to be tested.

4. The method according to claim 1, characterized in that, Before acquiring the subtask to be detected carried in the received task detection instruction and determining whether the subtask to be detected meets the preset requirements, the method further includes: The subtask to be tested is sent to the auditing device so that the auditing user corresponding to the auditing device can determine the compliance of the subtask to be tested. When the compliance meets the preset conditions, the subtask to be tested is tested based on the testing equipment.

5. The method according to claim 4, characterized in that, Also includes: When the compliance does not meet the preset conditions, an error message is sent to the development device corresponding to the subtask to be tested, so that the development user can process the subtask to be tested based on the error message and obtain the subtask to be tested that meets the preset conditions. The error message includes an error code line.

6. A script generation device, characterized in that, include: The pending business process determination module is used to generate a pending business process based on at least one pre-set business configuration item; wherein, the at least one business configuration item corresponds to a target project; The script development instruction sending module is used to send script development instructions to the terminal device of the corresponding development user based on at least one process node in the business process to be processed, so that the development user can execute the sub-task to be detected corresponding to the process node. The subtask to be detected module is used to acquire the subtask to be detected carried in the received task detection instruction and determine whether the subtask to be detected meets the preset requirements. The target script generation module is used to generate a target script corresponding to the target project if each subtask to be detected meets the preset requirements. The pending business process determination module includes: A business sub-process generation unit is used to generate test business sub-processes and development business sub-processes in the business process to be processed based on the at least one business configuration item. The device information setting unit is used to set test device information for each process node of the test business sub-process and to set development device information for each process node of the development business sub-process, so as to develop scripts based on the development device information and perform requirement testing on the developed scripts based on the test device information.

7. An electronic device, characterized in that, The device includes: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the script generation method as described in any one of claims 1-5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the script generation method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • A continuous integration automated test method

    CN109542769A

  • Method and device for cooperatively developing software project

    CN113762722A