CN114489667A - Script generation method and device, electronic equipment and storage medium - Google Patents

Script generation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114489667A
CN114489667A CN202111653742.0A CN202111653742A CN114489667A CN 114489667 A CN114489667 A CN 114489667A CN 202111653742 A CN202111653742 A CN 202111653742A CN 114489667 A CN114489667 A CN 114489667A
Authority
CN
China
Prior art keywords
development
detected
script
subtasks
service
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
CN202111653742.0A
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.)
Guahao Net Hangzhou Technology Co Ltd
Original Assignee
Guahao Net Hangzhou Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guahao Net Hangzhou Technology Co Ltd filed Critical Guahao Net Hangzhou Technology Co Ltd
Priority to CN202111653742.0A priority Critical patent/CN114489667A/en
Publication of CN114489667A publication Critical patent/CN114489667A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/447Target code generation
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention discloses a script development method and device, electronic equipment and a storage medium. The method comprises the following steps: generating a business process to be processed according to at least one preset business configuration item; sending a script development instruction to terminal equipment of a corresponding development user based on at least one process node in the service process to be processed so that the development user can execute the subtasks to be detected corresponding to the process node; acquiring a subtask to be detected carried in a received task detection instruction, and determining whether the subtask to be detected meets a preset requirement; and if each subtask to be detected meets the preset requirement, generating a target script corresponding to the target project. The problem that code co-constructors are constrained based on description on documents in the prior art, so that the code quality is poor and the normative is low is solved, the effective constraint on the process nodes executed by the user based on the terminal script development instruction is realized, and the technical effect of improving the automation and the normative of script generation is achieved.

Description

Script generation method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to a computer processing technology, in particular to a script generation method and device, electronic equipment and a storage medium.
Background
At present, before a developer submits a written code to a test, a reviewer is generally required to review the code to ensure the quality of the code, the code approved by the reviewer is submitted to a test terminal for testing, and the tested code is submitted to a code warehouse to complete the processes of code development, review, test and submission. In the process of submitting the codes to the code warehouse, the code co-constructor is usually restricted based on the description on the document, and the problems of poor restriction, poor code quality and low normalization exist.
Disclosure of Invention
The embodiment of the invention provides a script generation method and device, electronic equipment and a storage medium, and aims to achieve the technical effects of improving the automation and the standardization of script generation.
In a first aspect, an embodiment of the present invention provides a script generation method, where the method includes:
generating a service flow to be processed according to at least one preset service configuration item; wherein the at least one business configuration item corresponds to a target project;
sending a script development instruction to terminal equipment of a 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 subtasks to be detected corresponding to the process node;
acquiring a subtask to be detected carried in a received task detection instruction, and determining whether the subtask to be detected meets a preset requirement;
and if each subtask to be detected meets the preset requirement, generating a target script corresponding to the target project.
In a second aspect, an embodiment of the present invention further provides a script generating apparatus, where the script generating apparatus includes:
the system comprises a to-be-processed business process determining module, a to-be-processed business process determining module and a processing module, wherein the to-be-processed business process determining module is used for generating a to-be-processed business process according to at least one preset business configuration item; wherein the at least one business configuration item corresponds to a target project;
the script development instruction sending module is used for sending a script development instruction to the terminal equipment of a corresponding development user based on at least one process node in the to-be-processed business process so as to enable the development user to execute the to-be-detected subtasks corresponding to the process node;
the task detection module is used for receiving a task detection instruction sent by a user, and sending the task detection instruction to a task detection module;
and the target script generation module is used for generating a target script corresponding to the target project if each subtask to be detected meets the preset requirement.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
one or more processors;
a 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 according to any one of the embodiments of the present invention.
In a fourth aspect, the embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the script generation method according to any one of the embodiments of the present invention.
The technical scheme of the embodiment of the invention generates the service flow to be processed according to at least one preset service configuration item, sends a script development instruction to the terminal equipment of a corresponding development user based on at least one flow node in the service flow to be processed so that the development user executes the subtasks to be detected corresponding to the flow node, acquires the subtasks to be detected carried in the received task detection instruction, determines whether the subtasks to be detected meet the preset requirement, generates the target script corresponding to the target project if each subtask to be detected meets the preset requirement, solves the problems of poor constraint, poor code quality and low normalization caused by the fact that a code co-builder is constrained based on description on a document in the prior art, and realizes effective constraint of the flow node executed by the user based on the terminal script development instruction, so as to achieve the technical effects of improving the automation and the standardization of script generation.
Drawings
In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, a brief description is given below of the drawings used in describing the embodiments. It should be clear that the described figures are only views of some of the embodiments of the invention to be described, not all, and that for a person skilled in the art, other figures can be derived from these figures without inventive effort.
Fig. 1 is a flowchart of a script generation method according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a script generation method according to a second embodiment of the present invention;
fig. 3 is a block diagram of a script generating apparatus according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a script generating method according to an embodiment of the present invention, where this embodiment is applicable to a scenario of generating a script, and the method may be executed by a script generating apparatus according to an embodiment of the present invention, where the script generating apparatus may be implemented in a software and/or hardware manner, and optionally, the script generating apparatus is implemented by an electronic device, and the electronic device may be a mobile terminal, a PC end, a server end, or the like. The device can be configured in a computing device, and the script generation method provided by the embodiment specifically includes the following steps:
and S110, generating a business process to be processed according to at least one preset business configuration item.
Wherein the at least one service configuration item corresponds to a target project. The target project may be collectively composed of one or more sub-business projects. Each service configuration item may have encapsulated therein program code for performing the function of the corresponding sub-service item.
Specifically, the user may determine a plurality of sub-service items related to the service flow according to actual requirements, such as saving the sub-service items, submitting the sub-service items, and operating and maintaining the sub-service items. Corresponding functions can be realized based on each sub-service project, and correspondingly, a service flow capable of realizing a target project can be formed as a to-be-processed service flow based on a preset service configuration item corresponding to each sub-service project.
It should be noted that, in practical applications, before a target project falls into the ground, development and testing of the project need to be performed, and development services and testing services corresponding to the target project may be generated based on each service configuration item, so that a user may perform corresponding development operations based on the development services and perform corresponding testing operations based on the testing services. Correspondingly, the business process may include a development business process and a test business process.
Optionally, generating a to-be-processed service flow according to at least one preset service configuration item, including: generating a testing service sub-process and a developing service sub-process in a service process to be processed according to at least one service configuration item; and setting test equipment information for each process node of the test service sub-process, and setting development equipment information for each process node of the development service sub-process, so as to develop scripts based on the development equipment information, and performing requirement test on the developed scripts based on the test equipment information.
The development service sub-process may include a plurality of process nodes, and each process node corresponds to a corresponding service requirement. The development device information may be a terminal device.
In this embodiment, a test service sub-flow and a development service sub-flow in a to-be-processed service flow may be generated according to a preset service configuration item. For example, on a terminal device, a pre-configured scripting tool may be used to create a project branch, e.g., with the branch name demand. A script tool, that is, a service configuration item, may be executed, at this time, the tool may automatically create a dev branch and a test branch as branches corresponding to the test service sub-flow and the development service sub-flow, may perform development on the dev branch, and perform testing on the test branch. The branch naming is named according to a standard format, for example, the format is dev/test _ demand _ name _ date, the dev branch name is dev _ demand _ lcz1_20211212, and the test branch name is test _ demand _ lcz1_ 20211212. Correspondingly, the development equipment corresponding to the dev development branch is development equipment information of each flow node of the development service sub-flow, and the test equipment corresponding to the test branch is test equipment information of each flow node of the test service sub-flow, so that a user can perform script development on the dev development branch and perform requirement test on the developed script on the test branch.
And S120, sending a script development instruction to the terminal equipment 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 subtasks corresponding to the process node.
The script development instruction is used for instructing a user to perform script development.
In practical application, at least one development flow node in a to-be-processed service flow can be generated into an execution instruction of a development script based on actual service needs, and the execution instruction can be sent to a development user so that the development user can execute the development service corresponding to the flow node. The development service at this time is also a task which needs to be detected subsequently, namely, is used as a subtask to be detected.
It should be noted that each process node corresponds to a corresponding service requirement, and based on at least one process node in the to-be-processed service process, a script development instruction is sent to the terminal device of a corresponding development user, and the services corresponding to all the process nodes can also be reasonably distributed to each development user for execution, for example, the services can be distributed according to the service level, or the relationship strength between the services, or the capabilities of the development users, so that the development users execute the received services corresponding to the process nodes.
Optionally, based on at least one process node in the to-be-processed service process, sending a script development instruction to the terminal device of the corresponding development user, so that the development user executes the to-be-detected subtask corresponding to the process node, where the method includes: sending a script development instruction to terminal equipment of the highest level flow node according to the level information of the flow node in the development service sub-flow; or, sending a script development instruction to terminal equipment of each process node in the development service sub-process; and receiving a script development instruction based on the terminal equipment, and generating a corresponding subtask to be detected according to task information carried in the script development instruction.
In practical application, task hierarchy calibration can be performed on tasks corresponding to each flow node in a development service sub-flow in advance according to a fixed level standard, for example, a flow node 1 level a and a flow node 2 level B, if the level a is greater than the level B, the flow node 1 can be used as a flow node of the highest hierarchy, a script development instruction corresponding to the flow node 1 can be sent to a corresponding terminal device, and accordingly, a development user can execute a development task corresponding to the flow node 1. Or, a script development instruction can be sent to the terminal device of each process node in the development service sub-process, when the terminal device receives the script development instruction, the task information carried on the script development instruction can be detected by using an algorithm, and a development user can execute a task corresponding to the task information to serve as a to-be-detected sub-task.
It should be noted that, after receiving the subtasks to be detected, the development user may automatically create the dev development branch and the test branch by using a script tool, and at this time, the development user may default to switch to the dev development branch for development.
It should be further noted that, in order to improve the quality of the generated script, in the process of generating the subtasks to be detected based on the terminal device, the development codes corresponding to the subtasks to be detected may also be automatically detected by using a script tool, so as to prompt whether errors exist in the development user codes, and modify the development user codes in time.
Optionally, in the process of generating the subtasks to be detected based on the terminal device, the subtasks to be detected are automatically detected based on a preset program detection code, so as to determine whether there is error information in the subtasks to be detected.
In this embodiment, program detection codes, such as a static code inspection tool and an automatic test tool, may be configured in advance in the terminal device, and are used to perform automatic detection on the subtask to be detected. For example, in practical application, when a user submits development codes corresponding to subtasks to be detected after the development is completed on a dev development branch, ci (continuous integration) of gitlb (open source item for a warehouse management system) may be automatically triggered to start executing static code inspection and automatic test processes, for example, the naming format, abbreviation specification, calling relationship, and the like are inspected, that is, automatic detection is executed on codes, and constraints on code specifications are increased. Whether error information exists in the subtasks to be detected can be determined based on the automatic detection result. If not, the automatic detection is passed, and the subsequent user can submit a request for merging the codes on the dev development branch into the test branch for testing. If so, the user needs to modify the code on the dev development branch to pass the automated detection.
S130, sub tasks to be detected carried in the received task detection instruction are obtained, and whether the sub tasks to be detected meet preset requirements or not is determined.
In practical application, after the subtasks to be detected pass automatic detection, a development user can automatically submit the subtasks to be detected on the current dev development branch to a test branch for testing by executing a script command line preview mr, when the test branch receives development codes corresponding to the subtasks to be detected, the development codes can be considered to be received, test equipment corresponding to the test branch can be used for testing the development codes, and whether the subtasks to be detected corresponding to the development codes meet preset requirements is determined. If not, error information needs to be prompted to the development user, so that the development user can modify the codes on the original dev development branch. If so, the test is completed, and the development code at the moment can be used as a development script of the subtask to be detected.
It should be noted that before the subtasks to be detected carried in the received task detection instruction are acquired and whether the subtasks to be detected meet the preset requirement is determined, that is, before the development codes on the dev development branch are submitted to the test branch, the development codes need to pass through a code review process to review whether the development codes are qualified.
Optionally, before 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, the method further includes: sending the subtasks to be detected to auditing equipment so that auditing users corresponding to the auditing equipment can determine the compliance of the subtasks to be detected; and when the compliance meets a preset condition, testing the subtask to be detected based on the testing equipment.
In practical application, before a development user submits a subtask to be detected to a test branch from a dev development branch, the subtask to be detected can be automatically sent to a terminal device corresponding to a designated reviewer by using a script tool for review. Or sending notification information of code review to the designated reviewer to notify the reviewer to review the development code corresponding to the to-be-inspected subtask. For example, the notification information of code review can be sent to the designated reviewer by means of mail, short message, and the like. And after receiving the review notification corresponding to the subtask to be detected, the reviewer can review the development code and determine whether the development code corresponding to the subtask to be detected meets the preset compliance requirement, if so, the merge request operation can be executed, and the development code of the dev development branch is provided to the test branch. At this point the review process is complete. In this case, the subtasks to be detected may be merged into the test branch for testing, and accordingly, the subtasks to be detected may be tested based on the test device corresponding to the test branch.
It should be noted that, it is determined whether the development code corresponding to the subtask to be detected meets the preset compliance requirement, and if not, it is determined that the subtask to be detected does not meet the preset service requirement at this time, or there is a specification error, and the development code needs to be returned to the terminal device corresponding to the development user for modification, so as to obtain the development code meeting the preset compliance requirement.
Optionally, when the compliance does not meet the preset condition, an error prompt is sent to the development device corresponding to the subtask to be detected, so that the development user processes the subtask to be detected based on the error prompt to obtain the subtask to be detected meeting the preset condition.
The error prompt comprises an error code line, and can be stored in a document form.
In this embodiment, when the compliance does not satisfy the preset condition, the reviewing user may fill in corresponding document information based on the service that does not satisfy the preset condition, may use the document information as the error prompt information, and may further send the error prompt information to the testing device corresponding to the subtask to be detected, 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 problem can be raised, and then the raised problem can be sent to the development user, the development user needs to modify the original dev development branch, after the modification, the test branch needs to be submitted continuously, the test branch is sent to the review user continuously for review, and after the review is correct, the subtask to be detected meeting the preset condition can be obtained. At this time, the method can perform a branch operation of submitting test, complete the MR (Merge request) from dev to test, and provide the development code on the dev development branch to the test branch for testing.
And S140, if each subtask to be detected meets the preset requirement, generating a target script corresponding to the target project.
In practical application, after the subtasks to be detected pass the audit of the user, the subtasks to be detected on the development branch can be submitted to the test branch, so that the test end can perform the test on the test branch. Correspondingly, if the test result corresponding to each subtask to be detected meets the preset requirement, a target script corresponding to the target project can be generated.
According to the technical scheme of the embodiment, a to-be-processed service flow is generated according to at least one preset service configuration item, a script development instruction is sent to the terminal equipment of a corresponding development user based on at least one flow node in the to-be-processed service flow, so that the development user executes the to-be-detected subtask corresponding to the flow node, the to-be-detected subtask carried in the received task detection instruction is obtained, whether the to-be-detected subtask meets the preset requirement is determined, if all the to-be-detected subtasks meet the preset requirement, a target script corresponding to the target project is generated, the problems that in the prior art, a code co-builder is constrained based on description on a document, the constraint is poor, the code quality is poor, and the normalization is low are solved, the effective constraint of the flow node executed by the user based on the terminal script development instruction is realized, and the automation of script generation is improved, Normative technical effect.
Example two
As an alternative embodiment of the foregoing embodiment, fig. 2 is a flowchart illustrating a script generating method according to a second embodiment of the present invention. Specifically, the following details can be referred to.
For example, referring to fig. 2, the technical solution may provide a normalized code review process for an enterprise, when a demand starts, a branch is created according to a demand name, if the demand name is demand, a script command line tool may automatically create a dev development branch and a test branch, that is, expenses corresponding to a test service subprocess and a development service subprocess are generated, service development of a subtask to be detected is performed on the dev development branch, a development code test is performed on the test branch, the branch naming may be named according to a canonical format, the format is dev/test _ demand _ name _ date, if the dev development branch is dev _ demand _ lcz1_20211212, the test branch is test _ demand _ lcz1_20211212, and at this time, the default is switched to the dev development branch. After the requirement development is completed on the dev development branch, a development user submits modification content, ci (continuous integration) of the gitlb is automatically triggered, and static code inspection and automatic test processes are started. After the automatic detection is passed, the code developer submits an MR (Merge request) on the dev development branch through a tool author, namely, requests to Merge the development codes on the dev development branch into the test branch, prompts commit (submission description), inputs an OA account of the examination user in the tool, and the tool automatically submits the MR to the examination user. The reviewing user may not be a developing user if it has been specified in advance. And (4) examining the code by the examination user and raising a problem, continuously submitting the MR after the dev development branch is modified by the development user, and finishing the examination process after the examination by the examination user is correct, namely passing the examination. And performing MR merging operation to complete dev merging to the MR of the test, and then submitting the task to the test. Finally, the requirements corresponding to the subtasks to be detected are tested in the test branch, and the combination from the dev development branch to the test branch must pass through the code review flow. When testing is required on the test branch, if a code needs to be changed, a development user cannot directly modify the code on the test branch, and the code needs to be modified on the dev development branch. And after the test is passed, filling in the release plan, merging the development codes into a release branch, and examining by a release manager, wherein if the examination is not passed, the development user needs to modify the codes in a dev development branch. If the examination is passed, the next checking link can be entered, and if the checking is not passed, a development user needs to modify the code in the dev development branch. If the acceptance passes, the information can be released to the online environment. If all the subtasks to be detected meet all the requirements, the development codes corresponding to the subtasks to be detected can be combined to generate a target script corresponding to the target project.
According to the technical scheme of the embodiment, a to-be-processed service flow is generated according to at least one preset service configuration item, a script development instruction is sent to the terminal equipment of a corresponding development user based on at least one flow node in the to-be-processed service flow, so that the development user executes the to-be-detected subtask corresponding to the flow node, the to-be-detected subtask carried in the received task detection instruction is obtained, whether the to-be-detected subtask meets the preset requirement is determined, if all the to-be-detected subtasks meet the preset requirement, a target script corresponding to the target project is generated, the problems that in the prior art, a code co-builder is constrained based on description on a document, the constraint is poor, the code quality is poor, and the normalization is low are solved, the effective constraint of the flow node executed by the user based on the terminal script development instruction is realized, and the automation of script generation is improved, Normative technical effect.
EXAMPLE III
Fig. 3 is a block diagram of a script generating apparatus according to a third embodiment of the present invention. The device comprises: the system comprises a to-be-processed business process determining module 310, a script development instruction sending module 320, a to-be-detected subtask obtaining module 330 and a target script generating module 340.
The to-be-processed business process determining module 310 is configured to generate a to-be-processed business process according to at least one preset business configuration item; wherein the at least one business configuration item corresponds to a target project; a script development instruction sending module 320, 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 service process, so that the development user executes a to-be-detected subtask corresponding to the process node; the to-be-detected subtask obtaining module 330 is configured to obtain a to-be-detected subtask carried in the received task detection instruction, and determine whether the to-be-detected subtask meets a preset requirement; and the target script generating module 340 is configured to generate a target script corresponding to the target project if each to-be-detected subtask meets the preset requirement.
According to the technical scheme of the embodiment, a to-be-processed service flow is generated according to at least one preset service configuration item, a script development instruction is sent to the terminal equipment of a corresponding development user based on at least one flow node in the to-be-processed service flow, so that the development user executes the to-be-detected subtask corresponding to the flow node, the to-be-detected subtask carried in the received task detection instruction is obtained, whether the to-be-detected subtask meets the preset requirement is determined, if all the to-be-detected subtasks meet the preset requirement, a target script corresponding to the target project is generated, the problems that in the prior art, a code co-builder is constrained based on description on a document, the constraint is poor, the code quality is poor, and the normalization is low are solved, the effective constraint of the flow node executed by the user based on the terminal script development instruction is realized, and the automation of script generation is improved, Normative technical effect.
On the basis of the foregoing apparatus, optionally, the to-be-processed business process determining module 310 includes: a service sub-process generating unit and an equipment information setting unit.
A service sub-process generating unit, configured to generate a test service sub-process and a development service sub-process in the to-be-processed service process according to the at least one service configuration item;
and the equipment information setting unit is used for setting test equipment information for each process node of the test service sub-process, setting development equipment information for each process node of the development service sub-process, developing scripts based on the development equipment information, and performing requirement test on the developed scripts based on the test equipment information.
On the basis of the above device, optionally, the script development instruction sending module 320 includes a script development instruction sending unit and a to-be-detected subtask generating unit.
The script development instruction sending unit is used for sending a script development instruction to the terminal equipment of the highest-level flow node according to the level information of the flow node in the development service sub-flow; or, the system is used for sending script development instructions to the terminal equipment of each process node in the development service sub-process;
and the to-be-detected subtask generating unit is used for receiving the script development instruction based on the terminal equipment and generating a corresponding to-be-detected subtask according to task information carried in the script development instruction.
On the basis of the above device, optionally, the script development instruction sending module 320 further includes an automation detection unit.
And the automatic detection unit is used for automatically detecting the subtasks to be detected based on a preset program detection code in the process of generating the subtasks to be detected based on the terminal equipment so as to determine whether error information exists in the subtasks to be detected.
On the basis of the above device, optionally, the device further includes: and a compliance detection module. The compliance detection module comprises a compliance determination unit and a subtask testing unit to be detected.
The compliance determining unit is used for sending the subtasks to be detected to auditing equipment so that an auditing user corresponding to the auditing equipment can determine the compliance of the subtasks to be detected;
and the subtask testing unit to be tested is used for testing the subtask to be tested based on the testing equipment when the compliance meets a preset condition.
On the basis of the above device, optionally, the compliance detection module further includes an error prompt sending unit.
An error prompt sending unit, configured to send an error prompt to development equipment corresponding to the subtask to be detected when the compliance does not meet the preset condition, so that the development user processes the subtask to be detected based on the error prompt to obtain the subtask to be detected meeting the preset condition;
wherein the error prompt includes an error code line.
The script generation device provided by the embodiment of the invention can execute the script generation method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
It should be noted that, the units and modules included in the apparatus are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the embodiment of the invention.
Example four
Fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention. FIG. 4 illustrates a block diagram of an exemplary electronic device 40 suitable for use in implementing embodiments of the present invention. The electronic device 40 shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 4, electronic device 40 is 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, a system memory 402, and a bus 403 that couples the various system components (including the system memory 402 and the processing unit 401).
Bus 403 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 40 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by electronic device 40 and includes both volatile and nonvolatile media, removable and non-removable media.
The 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. The electronic device 40 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 406 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, and commonly referred to as a "hard drive"). Although not shown in FIG. 4, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile 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 the bus 403 by 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 that are configured to carry out the functions of embodiments of the invention.
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 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 407 generally perform the functions and/or methods of the described embodiments of the invention.
The electronic device 40 may also communicate with one or more external devices 409 (e.g., keyboard, pointing device, display 410, etc.), with one or more devices that enable a user to interact with the electronic device 40, and/or with any devices (e.g., network card, modem, etc.) that enable the electronic device 40 to communicate with one or more other computing devices. Such communication may be through input/output (I/O) interface 411. Also, the electronic device 40 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 412. As shown, the network adapter 412 communicates with the other modules of the electronic device 40 over the bus 403. It should be appreciated that although not shown in FIG. 4, other hardware and/or software modules may be used in conjunction with electronic device 40, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 401 executes various functional applications and data processing, for example, implementing a script generation method provided by an embodiment of the present invention, by running a program stored in the system memory 402.
EXAMPLE five
A fifth embodiment of the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a script generation method. The method comprises the following steps:
generating a service flow to be processed according to at least one preset service configuration item; wherein the at least one business configuration item corresponds to a target project;
sending a script development instruction to terminal equipment of a corresponding development user based on at least one process node in the to-be-processed business process so that the development user can execute the to-be-detected subtasks corresponding to the process node;
acquiring a subtask to be detected carried in a received task detection instruction, and determining whether the subtask to be detected meets a preset requirement;
and if each subtask to be detected meets the preset requirement, generating a target script corresponding to the target project.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: 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 foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for embodiments of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may 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 case of a remote computer, the remote computer may 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 may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A script generation method, comprising:
generating a service flow to be processed according to at least one preset service configuration item; wherein the at least one business configuration item corresponds to a target project;
sending a script development instruction to terminal equipment of a corresponding development user based on at least one process node in the to-be-processed business process so that the development user can execute the to-be-detected subtasks corresponding to the process node;
acquiring a subtask to be detected carried in a received task detection instruction, and determining whether the subtask to be detected meets a preset requirement;
and if each subtask to be detected meets the preset requirement, generating a target script corresponding to the target project.
2. The method according to claim 1, wherein the generating a to-be-processed business process according to at least one preset business configuration item includes:
generating a testing service sub-process and a developing service sub-process in the service process to be processed according to the at least one service configuration item;
setting testing equipment information for each process node of the testing service sub-process, setting development equipment information for each process node of the development service sub-process, developing scripts based on the development equipment information, and performing requirement testing on the developed scripts based on the testing equipment information.
3. The method according to claim 2, wherein the 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 service process, so that the development user executes the to-be-detected subtask corresponding to the process node, includes:
sending a script development instruction to the terminal equipment of the highest-level flow node according to the level information of the flow node in the development service sub-flow; or the like, or, alternatively,
sending a script development instruction to terminal equipment of each process node in a development service sub-process;
and receiving the script development instruction based on the terminal equipment, and generating a corresponding subtask to be detected according to task information carried in the script development instruction.
4. The method of claim 3, further comprising:
and in the process of generating the subtasks to be detected based on the terminal equipment, automatically detecting the subtasks to be detected based on a preset program detection code so as to determine whether error information exists in the subtasks to be detected.
5. The method according to claim 2, wherein before the obtaining the to-be-detected subtasks carried in the received task detection instruction and determining whether the to-be-detected subtasks meet preset requirements, the method further comprises:
sending the subtasks to be detected to auditing equipment so that an auditing user corresponding to the auditing equipment can determine the compliance of the subtasks to be detected;
and when the compliance meets a preset condition, testing the subtasks to be detected based on the testing equipment.
6. The method of claim 5, further comprising:
when the compliance does not meet the preset condition, sending an error prompt to development equipment corresponding to the subtasks to be detected, so that the development user can process the subtasks to be detected based on the error prompt to obtain the subtasks to be detected meeting the preset condition;
wherein the error prompt includes an error code line.
7. A script generation apparatus, comprising:
the system comprises a to-be-processed business process determining module, a to-be-processed business process determining module and a processing module, wherein the to-be-processed business process determining module is used for generating a to-be-processed business process according to at least one preset business configuration item; wherein the at least one business configuration item corresponds to a target project;
the script development instruction sending module is used for sending a script development instruction to the terminal equipment of a corresponding development user based on at least one process node in the to-be-processed business process so as to enable the development user to execute the to-be-detected subtasks corresponding to the process node;
the task detection module is used for receiving a task detection instruction sent by a user, and sending the task detection instruction to a task detection module;
and the target script generation module is used for generating a target script corresponding to the target project if each subtask to be detected meets the preset requirement.
8. The apparatus of claim 7, wherein the pending business process determining module comprises:
a service sub-process generating unit, configured to generate a test service sub-process and a development service sub-process in the to-be-processed service process according to the at least one service configuration item;
and the equipment information setting unit is used for setting test equipment information for each process node of the test service sub-process, setting development equipment information for each process node of the development service sub-process, developing scripts based on the development equipment information, and performing requirement test on the developed scripts based on the test equipment information.
9. An electronic device, characterized in that the device comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the script generation method of any one of claims 1-6.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the script generation method according to any one of claims 1 to 6.
CN202111653742.0A 2021-12-30 2021-12-30 Script generation method and device, electronic equipment and storage medium Pending CN114489667A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111653742.0A CN114489667A (en) 2021-12-30 2021-12-30 Script generation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111653742.0A CN114489667A (en) 2021-12-30 2021-12-30 Script generation method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114489667A true CN114489667A (en) 2022-05-13

Family

ID=81497202

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111653742.0A Pending CN114489667A (en) 2021-12-30 2021-12-30 Script generation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114489667A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115826980A (en) * 2022-10-10 2023-03-21 中科三清科技有限公司 Data processing method, data processing device, storage medium and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115826980A (en) * 2022-10-10 2023-03-21 中科三清科技有限公司 Data processing method, data processing device, storage medium and electronic equipment
CN115826980B (en) * 2022-10-10 2023-07-21 中科三清科技有限公司 Data processing method and device, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
US9665465B1 (en) Automated determination of application permissions
US9497096B2 (en) Dynamic control over tracing of messages received by a message broker
CN111290806A (en) Calling method and device of application program interface, computer equipment and storage medium
CN112346794A (en) Interface calling method, device, equipment and medium
CN112685029A (en) Visual template generation method, device, equipment and storage medium
CN113344523A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN114253864A (en) Service testing method and device, electronic equipment and storage medium
CN109299124B (en) Method and apparatus for updating a model
CN114489667A (en) Script generation method and device, electronic equipment and storage medium
CN113191889A (en) Wind control configuration method, configuration system, electronic device and readable storage medium
US11544218B2 (en) JSON to BPMN conversion system
US20210208872A1 (en) Automated test authorization management
CN113238940B (en) Interface test result comparison method, device, equipment and storage medium
CN115760013A (en) Operation and maintenance model construction method and device, electronic equipment and storage medium
CN111865726B (en) Service message testing method, device, computer system and storage medium
CN114090021A (en) System deployment method, device, electronic equipment and storage medium
CN113392002A (en) Test system construction method, device, equipment and storage medium
CN113656301A (en) Interface testing method, device, equipment and storage medium
CN113515271A (en) Service code generation method and device, electronic equipment and readable storage medium
CN112084114A (en) Method and apparatus for testing an interface
CN112948269B (en) Information processing method, information processing apparatus, electronic device, and readable storage medium
CN111176718A (en) Script online method and device, storage medium and electronic equipment
CN112463635B (en) Software acceptance testing method and device
CN112783753B (en) Testing method and device for stream data processing system
CN113485770B (en) Method and device for determining service configuration data, electronic equipment and storage medium

Legal Events

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