WO2022095412A1 - Microservice development method and apparatus, storage medium, and electronic device - Google Patents

Microservice development method and apparatus, storage medium, and electronic device Download PDF

Info

Publication number
WO2022095412A1
WO2022095412A1 PCT/CN2021/094960 CN2021094960W WO2022095412A1 WO 2022095412 A1 WO2022095412 A1 WO 2022095412A1 CN 2021094960 W CN2021094960 W CN 2021094960W WO 2022095412 A1 WO2022095412 A1 WO 2022095412A1
Authority
WO
WIPO (PCT)
Prior art keywords
target
microservice
test
user
component
Prior art date
Application number
PCT/CN2021/094960
Other languages
French (fr)
Chinese (zh)
Inventor
陈定玮
Original Assignee
前海飞算云智软件科技(深圳)有限公司
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 前海飞算云智软件科技(深圳)有限公司 filed Critical 前海飞算云智软件科技(深圳)有限公司
Publication of WO2022095412A1 publication Critical patent/WO2022095412A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Definitions

  • the present disclosure relates to the field of computer technologies, and in particular, to a microservice development method, apparatus, storage medium, and electronic device.
  • microservices are used more and more widely, which can effectively solve the access load problem of the monolithic application architecture.
  • a variety of microservice development frameworks have emerged, such as the distributed agile development system architecture, based on which workers can develop microservices.
  • the staff is usually required to have a deep understanding of the internal code and interfaces of the architecture, and the technical requirements for developers are high, and the development efficiency of microservices is low.
  • the purpose of the present disclosure is to provide a simple and efficient microservice development method, apparatus, storage medium and electronic device.
  • a microservice development method comprising:
  • microservice development interface Displaying a microservice development interface, wherein the microservice development interface carries a plurality of candidate components for the user to select;
  • an apparatus for developing microservices comprising:
  • a first display module used for displaying a micro-service development interface, wherein the micro-service development interface carries a plurality of candidate components for the user to select;
  • the adding module is used for adding a plurality of target components selected by the user to the development and editing area of the microservice development interface in response to the user's selection operation on the microservice development interface;
  • a generating module configured to generate the process information of the target microservice formed by the target component according to the received configuration instruction of the user for the target component, so as to obtain the service package of the target microservice, wherein the service The package does not contain source code information for the target component.
  • a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, implements the steps of any of the methods described in the first aspect above.
  • an electronic device comprising:
  • a processor configured to execute the computer program in the memory, to implement the steps of any one of the methods in the first aspect above.
  • a microservice development interface is displayed, and in response to a user's selection operation on the microservice development interface, multiple target components selected by the user are added to the development and editing area of the microservice development interface, and according to the received The received user generates the process information of the target microservice formed by the target component according to the configuration instruction of the target component, so as to obtain the service package of the target microservice.
  • target components can be selected in a visual way, and the association between target components can be configured to obtain process information, thereby generating corresponding microservices, so that developers do not need to pay attention to the implementation of target components and code writing, reducing the need for The technical requirements of developers are reduced, the workload of developers is reduced, and the development efficiency of microservices is improved.
  • FIG. 1 is a flowchart of a microservice development method provided according to an embodiment of the present disclosure.
  • FIG. 2 is a block diagram of a microservice development apparatus provided according to an embodiment of the present disclosure.
  • Fig. 3 is a block diagram of an electronic device according to an exemplary embodiment.
  • Fig. 4 is a block diagram of an electronic device according to an exemplary embodiment.
  • FIG. 1 is a flowchart of a microservice development method provided according to an embodiment of the present disclosure. As shown in Figure 1, the method may include:
  • step 11 a microservice development interface is displayed, wherein the microservice development interface carries a plurality of candidate components for the user to select.
  • the method can be applied to a development platform, system, etc., and the candidate components can be components developed by different users, which can be uploaded through the development platform, so that the sharing of components among multiple users can be realized, and the utilization of components can be improved. rate and reduce user workload.
  • the components in the development platform can be scanned to display the currently available components on the microservice development interface, so that when the user develops the microservice, he can directly download the Select the required components in the service development interface.
  • step 12 in response to the user's selection operation on the microservice development interface, multiple target components selected by the user are added to the development and editing area of the microservice development interface.
  • the selection operation may be a drag and drop operation, that is, the user may select an alternative component in the microservice development interface, thereby dragging the selected alternative component to the development and editing area, and in response to the drag and drop operation, The target component corresponding to the drag and drop operation can be added to the development and editing area.
  • the selection operation may be a double-click operation, that is, the user may double-click the desired target component in the microservice development interface, and in response to the double-click operation, the corresponding target component may be added to the development and editing interface.
  • the embodiment of the present invention may also use other selection operations to select the target component, which is not limited in the present disclosure.
  • step 13 according to the received configuration instruction of the user for the target component, the process information of the target microservice formed by the target component is generated to obtain a service package of the target microservice, wherein the service package does not contain the Source code information for the target component.
  • a microservice is usually used to solve a business problem.
  • the relationship between the target components can be determined by configuring each target component, so as to associate the target components together to generate the process information of the target microservice,
  • the process information is used to indicate the processing logic of the target microservice, so as to obtain the service package of the target microservice and realize the development of the target microservice.
  • the service package does not contain the source code information of the target component, and the service package of the target microservice contains the process information and process execution engine of the target microservice, then the service package contains the process information and process execution engine of the target microservice.
  • the process information can be parsed by the process execution engine to start the target microservice, thereby facilitating the publication and deployment of the target microservice.
  • a microservice development interface is displayed, and in response to a user's selection operation on the microservice development interface, multiple target components selected by the user are added to the development and editing area of the microservice development interface, and According to the received configuration instruction of the user for the target component, the process information of the target microservice formed by the target component is generated, so as to obtain the service package of the target microservice.
  • target components can be selected in a visual way, and the association between target components can be configured to obtain process information, thereby generating corresponding microservices, so that developers do not need to pay attention to the implementation of target components and code writing, reducing the need for The technical requirements of developers are reduced, the workload of developers is reduced, and the development efficiency of microservices is improved.
  • step 13 an exemplary implementation manner of generating the process information of the target microservice formed by the target component according to the received configuration instruction of the user for the target component is as follows, and this step may include:
  • the association information with the target component is determined, wherein the association information includes an association component corresponding to the target component and an association parameter corresponding to the target component and the association component.
  • the associated component may be the previous associated component and the next associated component directly associated with the target component
  • the associated parameter is a parameter passed in the target component and the associated component, for example, a parameter output by the target component is used as its associated parameter
  • the input parameter of the next associated component is the associated parameter corresponding to the target component and the associated component.
  • the configuration instruction can be triggered to be generated by a connection line, that is, the user can connect two target components from the target components displayed in the development and editing area through a connection line to trigger the generation of the configuration instruction, for example,
  • the target component corresponding to the starting point of the connecting line is marked as the first component
  • the target component corresponding to the end point of the connecting line is marked as the second component
  • the parameters of the association between the first component and the second component are determined.
  • the configuration instruction is used to indicate that the parameter input by the second component is the parameter A output by the first component, then the second component can be determined as the The next associated component of the first component, the associated parameter corresponding to the two is the parameter A.
  • the configuration instruction is used to instruct the parameter A output by the first component as the parameter input by the second component, then the first component can be determined as the first component.
  • the last associated component of the two components, the associated parameter corresponding to the two is the parameter A.
  • the target component can also be selected first, so that the configuration instruction can be triggered by selecting and inputting the previous associated component and/or the next associated component and the corresponding associated parameters respectively. For example, select the target component, select the target component M in the configuration item corresponding to the previous associated component, and select the parameter N output by the target component M in its corresponding associated parameters, thereby triggering the generation of a target component and The configuration instruction of the previous associated component, and then in response to the configuration instruction, the manner of determining the association relationship of the target component is similar to the above, and will not be repeated here.
  • each of the target components is associated in an association sequence to obtain the process information.
  • the sequence between the various target components can be determined according to the association information, so that the process information formed by each target component can be obtained, that is, the process information used to characterize the Process information of the execution process of the target microservice.
  • the user can determine the association relationship of each target component through the association operation on the target component, thereby determining the sequence between each target component, so that the user can automatically configure the flow chart only by way of
  • no code coding is required, which greatly reduces the skill requirements for developers and improves the scope of application of the microservice development method.
  • the method further includes:
  • the parameter information of the target component is determined according to the received user's parameter setting instruction for the target component.
  • the user can customize the configuration of the parameters of the target component. For example, the user can select the target component, so that the configurable item corresponding to the target component can be displayed in the position corresponding to the target component in the development and editing area, then the user can input the corresponding parameters for the target configurable item that needs to be configured, Therefore, the generation of the parameter setting instruction can be triggered, and then the parameter indicated by the parameter setting instruction can be determined as the parameter corresponding to the target configurable item in the target component, wherein the parameter can be an assignment parameter or a condition comparison parameter, It is determined according to the meta information of a specific configurable item, which is not limited in the present disclosure.
  • step 13 an exemplary implementation manner of generating the process information of the target microservice formed by the target component according to the received configuration instruction of the user for the target component is as follows, and this step may include:
  • the flow information of the target microservice formed by the target component is generated.
  • the process information includes each target component, the association information between the target components, and the parameter information of the target component, so that the accurate execution of the function corresponding to the target microservice can be realized based on the process information, and the generation of The accuracy of the process information, so as to ensure the accuracy and diversity of the target microservices obtained by development, and improve the user experience.
  • the target microservice cannot be executed due to incorrect user parameter configuration or logical association error between target components, or that the target microservice is difficult to achieve the expected function.
  • the present disclosure also provides the following embodiments.
  • the method may further include:
  • test case selection interface When there is a test case corresponding to the target microservice, a test case selection interface is displayed, wherein the test case selection interface carries a test case corresponding to the target microservice for the user to select.
  • the test case can be created and maintained by the user on the platform, and the test case is stored in association with the corresponding microservice, and then the identification information of the target microservice can be used to automatically determine whether there is a test case corresponding to the target microservice. , and the determined test cases are displayed for selection by the user.
  • the test case selected by the user is determined as a target test case, wherein the selection operation may be a single-click operation, a double-click operation, a check operation, etc. for the target test case;
  • Whether the target microservice is abnormal is determined according to a result obtained by executing the target test case, wherein the result includes output parameters corresponding to the one or more target components.
  • the result obtained by executing the target test case is the same as the predicted result of the target test case, it means that there is no abnormality in the target microservice, and if the result obtained by executing the target test case is the same as the prediction result of the target test case If the results are not identical, it can be determined that the target microservice is abnormal.
  • the method further includes:
  • the component corresponding to the abnormality in the target microservice and the abnormality information are determined.
  • the location of the exception can be determined through the execution log information of the test case, so that the component corresponding to the exception and the exception information can be determined, and the exception information can be used to indicate the cause of the exception.
  • the method of analyzing the test log to determine the abnormal location and the abnormal cause is a conventional technique in the art, and details are not described herein again.
  • the process information corresponding to the target microservice is displayed, and the component corresponding to the exception and the exception information are identified in the process information, which can be displayed on the microservice development interface or the test result display interface , the test result display interface is different from the microservice development interface.
  • the process information corresponding to the target microservice can be directly displayed in the microservice development interface used by the user to develop the microservice, so that the abnormal components and abnormal information can be displayed directly based on the process information formed by the target component edited by the user.
  • the display efficiency is improved, and when there are abnormal components in the target microservice, it can be directly modified, which improves the simplicity and flexibility of user operations.
  • another test result display interface can be used to display the results, so as to improve the accuracy of the exception prompt and avoid occupation of the microservice development page.
  • identifying the component corresponding to the exception and the exception information in the process information may be the target component that highlights the exception, or the exception type of the target component may be determined according to the exception information, so that the target component can be identified according to the exception information.
  • Different exception types are displayed differently. For example, components corresponding to logic error exceptions can be displayed in red, and components corresponding to parameter configuration error exceptions can be displayed in yellow. It should be noted that the above is only an exemplary illustration, and does not limit the present disclosure.
  • the method may further include:
  • each node in the graph information corresponds to one of the target components in the target microservice.
  • the graph information or display in other interfaces may be displayed in the microservice development interface, which is not limited in the present disclosure.
  • the test mode of the target component corresponding to the target node is determined, wherein the test mode is to execute the test or skip the test, and the target node is the test mode in the node. one or more of.
  • the user may set the test mode of the target component through the test instruction, wherein the default test mode may be set to execute the test. Therefore, through the above technical solution, the user can selectively test some components in the target microservice, improve the efficiency and diversity of the test, and also improve the accuracy and diversity of the test, without the need for the user to write test code, improve the User experience.
  • the method further includes:
  • the target microservice In response to receiving the user's test configuration instruction for the target node, the target microservice is executed according to the test parameters indicated by the test configuration instruction to test the target microservice.
  • the test configuration area of the target node can be displayed, and the test configuration item of the target component corresponding to the target node can be displayed in the test configuration area, and then the user can test the corresponding test configuration in the test configuration area.
  • Input test parameters in the configuration item thereby triggering the generation of the test configuration instruction.
  • the testing process described above is similar and will not be repeated here.
  • the test configuration instruction can be triggered directly by inputting test parameters in the test configuration area, and the test configuration instruction can simultaneously instruct to set the test mode of the target component to execute the test, so that there is no need to trigger the test instruction, saving energy. User action.
  • the user can set the corresponding simulation test parameters for the target component, so as to achieve more fine-grained testing, which can not only provide the accuracy of the test, but also improve the accuracy and efficiency of the test.
  • Stability provides data support.
  • the apparatus 10 includes:
  • the first display module 100 is used to display a micro-service development interface, wherein the micro-service development interface carries a plurality of candidate components for the user to select;
  • the adding module 200 is used to add multiple target components selected by the user to the development editing area of the microservice development interface in response to the user's selection operation on the microservice development interface;
  • the generating module 300 is configured to generate the process information of the target microservice formed by the target component according to the received configuration instruction of the user for the target component, so as to obtain the service package of the target microservice, wherein the The service pack does not contain source code information for the target component.
  • the generation module includes:
  • a determination submodule configured to determine association information with the target component according to a configuration instruction of the target component, wherein the association information includes an association component corresponding to the target component and the target component and the associated component Corresponding associated parameters;
  • the association sub-module is configured to associate each of the target components in an association sequence according to the association information of each of the target components, so as to obtain the process information.
  • the device further includes:
  • a first determining module configured to determine parameter information of the target component according to a received user parameter setting instruction for the target component
  • the generation module is used to:
  • the flow information of the target microservice formed by the target component is generated.
  • the device further includes:
  • a first display module configured to display a test case selection interface when there is a test case corresponding to the target microservice, wherein the test case selection interface carries the test case corresponding to the target microservice for users to choose;
  • a second determining module configured to determine the test case selected by the user as a target test case in response to the user's selection operation on the test case selection interface
  • a first execution module configured to execute the target test case
  • the third determining module is configured to determine whether the target microservice is abnormal according to the result obtained by executing the target test case.
  • the device further includes:
  • a fourth determination module configured to determine the component corresponding to the exception and the exception information in the target microservice when it is determined that the target microservice is abnormal
  • the second display module is configured to display the process information corresponding to the target microservice, and identify the component corresponding to the exception and the exception information in the process information.
  • the device further includes:
  • a third display module configured to display graph information corresponding to the process information corresponding to the target microservice, wherein each node in the graph information corresponds to one of the target components in the target microservice;
  • the fifth determination module is configured to, in response to receiving the test instruction input by the user for the target node, determine the test mode of the target component corresponding to the target node, wherein the test mode is to execute the test or skip the test, and the The target node is one or more of the nodes.
  • the device further includes:
  • the second execution module is configured to, in response to receiving a user's test configuration instruction for the target node, under the condition that the test mode of the target component corresponding to the target node is the execution test, perform the test according to the test configuration instruction instructed by the test configuration instruction. parameter, execute the target microservice to test the target microservice.
  • FIG. 3 is a block diagram of an electronic device 700 according to an exemplary embodiment.
  • the electronic device 700 may include: a processor 701 and a memory 702 .
  • the electronic device 700 may also include one or more of a multimedia component 703 , an input/output (I/O) interface 704 , and a communication component 705 .
  • I/O input/output
  • the processor 701 is configured to control the overall operation of the electronic device 700 to complete all or part of the steps in the above-mentioned microservice development method.
  • the memory 702 is used to store various types of data to support operations on the electronic device 700, such data may include, for example, instructions for any application or method operating on the electronic device 700, and application-related data, Such as contact data, messages sent and received, pictures, audio, video, and so on.
  • the memory 702 can be implemented by any type of volatile or non-volatile storage device or their combination, such as static random access memory (Static Random Access Memory, SRAM for short), electrically erasable programmable read-only memory ( Electrically Erasable Programmable Read-Only Memory (EEPROM for short), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (Read-Only Memory, ROM for short), magnetic memory, flash memory, magnetic disk or optical disk.
  • Multimedia components 703 may include screen and audio components. Wherein the screen can be, for example, a touch screen, and the audio component is used for outputting and/or inputting audio signals.
  • the audio component may include a microphone for receiving external audio signals.
  • the received audio signal may be further stored in memory 702 or transmitted through communication component 705 .
  • the audio assembly also includes at least one speaker for outputting audio signals.
  • the I/O interface 704 provides an interface between the processor 701 and other interface modules, and the above-mentioned other interface modules may be a keyboard, a mouse, a button, and the like. These buttons can be virtual buttons or physical buttons.
  • the communication component 705 is used for wired or wireless communication between the electronic device 700 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IOT, eMTC, or other 5G, etc., or one or more of them The combination is not limited here. Therefore, the corresponding communication component 705 may include: Wi-Fi module, Bluetooth module, NFC module and so on.
  • the electronic device 700 may be implemented by one or more application-specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), digital signal processors (Digital Signal Processor, DSP for short), digital signal processing devices (Digital Signal Processing Device, referred to as DSPD), Programmable Logic Device (Programmable Logic Device, referred to as PLD), Field Programmable Gate Array (Field Programmable Gate Array, referred to as FPGA), controller, microcontroller, microprocessor or other electronic components Implementation is used to execute the microservice development method described above.
  • ASIC Application Specific Integrated Circuit
  • DSP Digital Signal Processor
  • DSPD Digital Signal Processing Device
  • PLD Programmable Logic Device
  • FPGA Field Programmable Gate Array
  • controller microcontroller
  • microprocessor or other electronic components Implementation is used to execute the microservice development method described above.
  • a computer-readable storage medium including program instructions is also provided, and when the program instructions are executed by a processor, the steps of the above-mentioned microservice development method are implemented.
  • the computer-readable storage medium can be the above-mentioned memory 702 including program instructions, and the above-mentioned program instructions can be executed by the processor 701 of the electronic device 700 to complete the above-mentioned microservice development method.
  • FIG. 4 is a block diagram of an electronic device 1900 according to an exemplary embodiment.
  • the electronic device 1900 may be provided as a server. 4
  • the electronic device 1900 includes a processor 1922 , which may be one or more in number, and a memory 1932 for storing computer programs executable by the processor 1922 .
  • a computer program stored in memory 1932 may include one or more modules, each corresponding to a set of instructions.
  • the processor 1922 may be configured to execute the computer program to perform the microservice development method described above.
  • the electronic device 1900 may also include a power supply assembly 1926, which may be configured to perform power management of the electronic device 1900, and a communication component 1950, which may be configured to enable communication of the electronic device 1900, eg, wired or wireless communication. Additionally, the electronic device 1900 may also include an input/output (I/O) interface 1958 . Electronic device 1900 may operate based on an operating system stored in memory 1932, such as Windows Server TM , Mac OS X TM , Unix TM , Linux TM , and the like.
  • an operating system stored in memory 1932, such as Windows Server TM , Mac OS X TM , Unix TM , Linux TM , and the like.
  • a computer-readable storage medium including program instructions is also provided, and when the program instructions are executed by a processor, the steps of the above-mentioned microservice development method are implemented.
  • the computer-readable storage medium can be the above-mentioned memory 1932 including program instructions, and the above-mentioned program instructions can be executed by the processor 1922 of the electronic device 1900 to complete the above-mentioned microservice development method.
  • a computer program product comprising a computer program executable by a programmable apparatus, the computer program having, when executed by the programmable apparatus, for performing the above The code portion of the microservices development approach.

Landscapes

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

Abstract

The present disclosure relates to a microservice development method and apparatus, a storage medium, and an electronic device. The method comprises: displaying a microservice development interface, wherein the service development interface carries a plurality of alternative components for a user to select; adding a plurality of target components selected by the user to a development editing area of the microservice development interface in response to a selection operation of the user on the microservice development interface; generating, according to a received configuration instruction of the user for the target components, process information of a target microservice formed by the target components, so as to obtain a service package of the target microservice, wherein the service packet does not comprise source code information of the target components. Therefore, micro-service development can be performed in a visual mode, such that a developer does not need to pay attention to implementation of the target components and code writing, the technical requirements for the developer are reduced, the workload of the developer is reduced, and the development efficiency of microservices is improved.

Description

微服务开发方法、装置、存储介质及电子设备Microservice development method, device, storage medium and electronic device 技术领域technical field
本公开涉及计算机技术领域,具体地,涉及一种微服务开发方法、装置、存储介质及电子设备。The present disclosure relates to the field of computer technologies, and in particular, to a microservice development method, apparatus, storage medium, and electronic device.
背景技术Background technique
现有技术中,微服务的使用越来越广泛,可以有效解决单体应用架构的访问负载问题。为了提高微服务的开发效率,出现了多种微服务开发框架,如分布式敏捷开发系统架构,工作人员可以基于该架构进行微服务的开发。然而在上述开发过程中,通常要求工作人员对于架构内部的代码、接口等深程度的了解,对开发人员的技术要求较高,微服务开发效率较低。In the prior art, microservices are used more and more widely, which can effectively solve the access load problem of the monolithic application architecture. In order to improve the development efficiency of microservices, a variety of microservice development frameworks have emerged, such as the distributed agile development system architecture, based on which workers can develop microservices. However, in the above development process, the staff is usually required to have a deep understanding of the internal code and interfaces of the architecture, and the technical requirements for developers are high, and the development efficiency of microservices is low.
目前并没有很好的解决方案能够解决上述问题。At present, there is no good solution to solve the above problems.
发明内容SUMMARY OF THE INVENTION
本公开的目的是提供一种简捷、高效的微服务开发方法、装置、存储介质及电子设备。The purpose of the present disclosure is to provide a simple and efficient microservice development method, apparatus, storage medium and electronic device.
为了实现上述目的,根据本公开的第一方面,提供一种微服务开发方法,所述方法包括:In order to achieve the above object, according to the first aspect of the present disclosure, a microservice development method is provided, the method comprising:
显示微服务开发界面,其中,所述微服务开发界面上承载有多个备选组件供用户选择;Displaying a microservice development interface, wherein the microservice development interface carries a plurality of candidate components for the user to select;
响应于用户在所述微服务开发界面的选择操作,将用户选择的多个目标组件添加至所述微服务开发界面的开发编辑区域;In response to the user's selection operation on the microservice development interface, adding a plurality of target components selected by the user to the development and editing area of the microservice development interface;
根据接收到的用户针对所述目标组件的配置指令,生成由所述目标组件 形成的目标微服务的流程信息,以获得所述目标微服务的服务包,其中,所述服务包中不包含所述目标组件的源代码信息。Generate process information of the target microservice formed by the target component according to the received configuration instruction of the user for the target component, so as to obtain the service package of the target microservice, wherein the service package does not contain all Describe the source code information of the target component.
根据本公开的第二方面,提供一种微服务开发装置,所述装置包括:According to a second aspect of the present disclosure, there is provided an apparatus for developing microservices, the apparatus comprising:
第一显示模块,用于显示微服务开发界面,其中,所述微服务开发界面上承载有多个备选组件供用户选择;a first display module, used for displaying a micro-service development interface, wherein the micro-service development interface carries a plurality of candidate components for the user to select;
添加模块,用于响应于用户在所述微服务开发界面的选择操作,将用户选择的多个目标组件添加至所述微服务开发界面的开发编辑区域;The adding module is used for adding a plurality of target components selected by the user to the development and editing area of the microservice development interface in response to the user's selection operation on the microservice development interface;
生成模块,用于根据接收到的用户针对所述目标组件的配置指令,生成由所述目标组件形成的目标微服务的流程信息,以获得所述目标微服务的服务包,其中,所述服务包中不包含所述目标组件的源代码信息。A generating module, configured to generate the process information of the target microservice formed by the target component according to the received configuration instruction of the user for the target component, so as to obtain the service package of the target microservice, wherein the service The package does not contain source code information for the target component.
根据本公开的第三方面,提供一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现上述第一方面任一所述方法的步骤。According to a third aspect of the present disclosure, there is provided a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, implements the steps of any of the methods described in the first aspect above.
根据本公开的第四方面,提供一种电子设备,包括:According to a fourth aspect of the present disclosure, there is provided an electronic device, comprising:
存储器,其上存储有计算机程序;a memory on which a computer program is stored;
处理器,用于执行所述存储器中的所述计算机程序,以实现上述第一方面任一所述方法的步骤。A processor, configured to execute the computer program in the memory, to implement the steps of any one of the methods in the first aspect above.
在上述技术方案中,显示微服务开发界面,响应于用户在所述微服务开发界面的选择操作,将用户选择的多个目标组件添加至所述微服务开发界面的开发编辑区域,并根据接收到的用户针对所述目标组件的配置指令,生成由所述目标组件形成的目标微服务的流程信息,以获得所述目标微服务的服务包。通过上述技术方案,可以通过可视化的方式,选择目标组件,并配置目标组件之间的关联以获得流程信息,从而生成对应的微服务,使得开发人员无需关注目标组件的实现及代码编写,降低对开发人员的技术要求,降低开发人员的工作量,同时提高微服务的开发效率。同时,开发人员无需进行代码编写,也可以一定程度上降低人为因素导致的服务包差异,便于后续对 微服务的维护,提高微服务的运行稳定性。并且,可以避免基于对服务包的反编译解析出源代码,从而可以保护信息的安全性,避免代码信息泄露。In the above technical solution, a microservice development interface is displayed, and in response to a user's selection operation on the microservice development interface, multiple target components selected by the user are added to the development and editing area of the microservice development interface, and according to the received The received user generates the process information of the target microservice formed by the target component according to the configuration instruction of the target component, so as to obtain the service package of the target microservice. Through the above technical solutions, target components can be selected in a visual way, and the association between target components can be configured to obtain process information, thereby generating corresponding microservices, so that developers do not need to pay attention to the implementation of target components and code writing, reducing the need for The technical requirements of developers are reduced, the workload of developers is reduced, and the development efficiency of microservices is improved. At the same time, developers do not need to write code, and to a certain extent, the differences in service packages caused by human factors can be reduced, which is convenient for the subsequent maintenance of microservices and improves the operation stability of microservices. In addition, it is possible to avoid parsing out the source code based on the decompilation of the service package, thereby protecting the security of information and avoiding code information leakage.
本公开的其他特征和优点将在随后的具体实施方式部分予以详细说明。Other features and advantages of the present disclosure will be described in detail in the detailed description that follows.
附图说明Description of drawings
附图是用来提供对本公开的进一步理解,并且构成说明书的一部分,与下面的具体实施方式一起用于解释本公开,但并不构成对本公开的限制。在附图中:The accompanying drawings are used to provide a further understanding of the present disclosure, and constitute a part of the specification, and together with the following detailed description, are used to explain the present disclosure, but not to limit the present disclosure. In the attached image:
图1是根据本公开的一种实施方式提供的微服务开发方法的流程图。FIG. 1 is a flowchart of a microservice development method provided according to an embodiment of the present disclosure.
图2是根据本公开的一种实施方式提供的微服务开发装置的框图。FIG. 2 is a block diagram of a microservice development apparatus provided according to an embodiment of the present disclosure.
图3是根据一示例性实施例示出的一种电子设备的框图。Fig. 3 is a block diagram of an electronic device according to an exemplary embodiment.
图4是根据一示例性实施例示出的一种电子设备的框图。Fig. 4 is a block diagram of an electronic device according to an exemplary embodiment.
具体实施方式Detailed ways
以下结合附图对本公开的具体实施方式进行详细说明。应当理解的是,此处所描述的具体实施方式仅用于说明和解释本公开,并不用于限制本公开。The specific embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only used to illustrate and explain the present disclosure, but not to limit the present disclosure.
图1所示,为根据本公开的一种实施方式提供的微服务开发方法的流程图。如图1所示,所述方法可以包括:FIG. 1 is a flowchart of a microservice development method provided according to an embodiment of the present disclosure. As shown in Figure 1, the method may include:
在步骤11中,显示微服务开发界面,其中,所述微服务开发界面上承载有多个备选组件供用户选择。In step 11, a microservice development interface is displayed, wherein the microservice development interface carries a plurality of candidate components for the user to select.
其中,该方法可以应用于一开发平台、系统等,所述备选组件可以是不同的用户开发的组件,其可以通过开发平台进行上传,从而可以实现多用户之间组件的共享,提高组件利用率,降低用户工作量。在该步骤中,可以通过对开发平台中的组件进行扫描从而可以通过微服务开发界面当前可获得的组件进行显示,从而使得用户在进行微服务开发时,可以根据具体的服务 需求直接从该微服务开发界面中选择其需要的组件。Wherein, the method can be applied to a development platform, system, etc., and the candidate components can be components developed by different users, which can be uploaded through the development platform, so that the sharing of components among multiple users can be realized, and the utilization of components can be improved. rate and reduce user workload. In this step, the components in the development platform can be scanned to display the currently available components on the microservice development interface, so that when the user develops the microservice, he can directly download the Select the required components in the service development interface.
在步骤12中,响应于用户在微服务开发界面的选择操作,将用户选择的多个目标组件添加至微服务开发界面的开发编辑区域。In step 12, in response to the user's selection operation on the microservice development interface, multiple target components selected by the user are added to the development and editing area of the microservice development interface.
作为示例,该选择操作可以是拖拽操作,即用户可以在微服务开发界面中选中一备选组件,从而将该选中的备选组件拖拽至开发编辑区域,则响应于该拖拽操作,可以将拖拽操作对应的目标组件添加至开发编辑区域。作为另一示例,该选择操作可以是双击操作,即用户可以在微服务开发界面中双击其所需要的目标组件,可以响应于该双击操作,将对应的目标组件添加至开发编辑界面。另外,上述只是举例说明,本发明实施例还可以采用其他选择操作将对目标组件进行选择,本公开对此不做限定。As an example, the selection operation may be a drag and drop operation, that is, the user may select an alternative component in the microservice development interface, thereby dragging the selected alternative component to the development and editing area, and in response to the drag and drop operation, The target component corresponding to the drag and drop operation can be added to the development and editing area. As another example, the selection operation may be a double-click operation, that is, the user may double-click the desired target component in the microservice development interface, and in response to the double-click operation, the corresponding target component may be added to the development and editing interface. In addition, the above is only an example, the embodiment of the present invention may also use other selection operations to select the target component, which is not limited in the present disclosure.
在步骤13中,根据接收到的用户针对目标组件的配置指令,生成由目标组件形成的目标微服务的流程信息,以获得目标微服务的服务包,其中,所述服务包中不包含所述目标组件的源代码信息。In step 13, according to the received configuration instruction of the user for the target component, the process information of the target microservice formed by the target component is generated to obtain a service package of the target microservice, wherein the service package does not contain the Source code information for the target component.
示例地,一个微服务通常是用于解决一个业务问题。在该实施例中,在确定出目标组件之后,则可以通过对每一目标组件进行配置,从而确定目标组件之间的联系,以将各个目标组件关联到一起,生成目标微服务的流程信息,该流程信息用于指示所述目标微服务的处理逻辑,从而获得目标微服务的服务包,实现目标微服务的开发。For example, a microservice is usually used to solve a business problem. In this embodiment, after the target components are determined, the relationship between the target components can be determined by configuring each target component, so as to associate the target components together to generate the process information of the target microservice, The process information is used to indicate the processing logic of the target microservice, so as to obtain the service package of the target microservice and realize the development of the target microservice.
在一种可能的实施例中,所述服务包中不包含所述目标组件的源代码信息,该目标微服务的服务包中包含该目标微服务的流程信息和流程执行引擎,则该服务包可以通过该流程执行引擎解析该流程信息以启动该目标微服务,从而便于目标微服务的发布和部署。In a possible embodiment, the service package does not contain the source code information of the target component, and the service package of the target microservice contains the process information and process execution engine of the target microservice, then the service package contains the process information and process execution engine of the target microservice. The process information can be parsed by the process execution engine to start the target microservice, thereby facilitating the publication and deployment of the target microservice.
因此,在上述技术方案中,显示微服务开发界面,响应于用户在所述微服务开发界面的选择操作,将用户选择的多个目标组件添加至所述微服务开发界面的开发编辑区域,并根据接收到的用户针对所述目标组件的配置指令, 生成由所述目标组件形成的目标微服务的流程信息,以获得所述目标微服务的服务包。通过上述技术方案,可以通过可视化的方式,选择目标组件,并配置目标组件之间的关联以获得流程信息,从而生成对应的微服务,使得开发人员无需关注目标组件的实现及代码编写,降低对开发人员的技术要求,降低开发人员的工作量,同时提高微服务的开发效率。同时,开发人员无需进行代码编写,也可以一定程度上降低人为因素导致的服务包差异,便于后续对微服务的维护,提高微服务的运行稳定性。并且,可以避免基于对服务包的反编译解析出源代码,从而可以保护信息的安全性,避免代码信息泄露。Therefore, in the above technical solution, a microservice development interface is displayed, and in response to a user's selection operation on the microservice development interface, multiple target components selected by the user are added to the development and editing area of the microservice development interface, and According to the received configuration instruction of the user for the target component, the process information of the target microservice formed by the target component is generated, so as to obtain the service package of the target microservice. Through the above technical solutions, target components can be selected in a visual way, and the association between target components can be configured to obtain process information, thereby generating corresponding microservices, so that developers do not need to pay attention to the implementation of target components and code writing, reducing the need for The technical requirements of developers are reduced, the workload of developers is reduced, and the development efficiency of microservices is improved. At the same time, developers do not need to write code, and to a certain extent, the differences in service packages caused by human factors can be reduced, which is convenient for subsequent maintenance of microservices and improves the operation stability of microservices. In addition, it is possible to avoid parsing out the source code based on the decompilation of the service package, thereby protecting the security of information and avoiding code information leakage.
为了使本领域技术人员更加理解本公开实施例提供的技术方案,下面对上述步骤进行详细的说明。In order to make those skilled in the art better understand the technical solutions provided by the embodiments of the present disclosure, the above steps are described in detail below.
在步骤13中,根据接收到的用户针对目标组件的配置指令,生成由目标组件形成的目标微服务的流程信息的示例性实现方式如下,该步骤可以包括:In step 13, an exemplary implementation manner of generating the process information of the target microservice formed by the target component according to the received configuration instruction of the user for the target component is as follows, and this step may include:
根据所述目标组件的配置指令,确定与所述目标组件的关联信息,其中,所述关联信息包括所述目标组件对应的关联组件以及所述目标组件和所述关联组件对应的关联参数。其中,该关联组件可以是与该目标组件直接关联的上一关联组件和下一关联组件,该关联参数该目标组件和关联组件中传递的参数,例如,目标组件输出的一参数作为其关联的下一关联组件的输入参数,则该参数即为该目标组件和所述关联组件对应的关联参数。According to the configuration instruction of the target component, the association information with the target component is determined, wherein the association information includes an association component corresponding to the target component and an association parameter corresponding to the target component and the association component. Wherein, the associated component may be the previous associated component and the next associated component directly associated with the target component, the associated parameter is a parameter passed in the target component and the associated component, for example, a parameter output by the target component is used as its associated parameter The input parameter of the next associated component is the associated parameter corresponding to the target component and the associated component.
在一种可能的实施例中,该配置指令可以由连接线触发生成,即用户可以从该开发编辑区域中显示的目标组件中通过连接线连接两个目标组件以触发生成配置指令,示例地,连接线的起点对应的目标组件记为第一组件,连接线的终点对应的目标组件记为第二组件,并确定第一组件和第二组件进行关联的参数,由此,可以通过连接线触发对第一组件和第二组件的配置指令。In a possible embodiment, the configuration instruction can be triggered to be generated by a connection line, that is, the user can connect two target components from the target components displayed in the development and editing area through a connection line to trigger the generation of the configuration instruction, for example, The target component corresponding to the starting point of the connecting line is marked as the first component, and the target component corresponding to the end point of the connecting line is marked as the second component, and the parameters of the association between the first component and the second component are determined. Configuration instructions for the first and second components.
之后,针对第一组件而言,根据该第一组件对应的配置指令,该配置指令用于指示第二组件输入的参数是第一组件输出的参数A,则可以将该第二组件确定为该第一组件的下一关联组件,两者对应的关联参数即为该参数A。针对第二组件而言,根据该第二组件对应的配置指令,该配置指令用于指示第一组件输出的参数A作为该第二组件输入的参数,则可以将该第一组件确定为该第二组件的上一关联组件,两者对应的关联参数即为该参数A。Then, for the first component, according to the configuration instruction corresponding to the first component, the configuration instruction is used to indicate that the parameter input by the second component is the parameter A output by the first component, then the second component can be determined as the The next associated component of the first component, the associated parameter corresponding to the two is the parameter A. For the second component, according to the configuration instruction corresponding to the second component, the configuration instruction is used to instruct the parameter A output by the first component as the parameter input by the second component, then the first component can be determined as the first component. The last associated component of the two components, the associated parameter corresponding to the two is the parameter A.
在另一实施例中,也可以通过先选中目标组件,从而可以通过对其上一关联组件和/或下一关联组件以及分别对应的关联参数进行选择输入以触发配置指令。例如,选中目标组件,在其上一关联组件对应的配置项中选择目标组件M,并在其对应的关联参数中选择目标组件M输出的参数N,由此可以触发生成一针对该目标组件以及其上一关联组件的配置指令,之后响应于配置指令,确定目标组件的关联关系的方式与上文相似,在此不再赘述。In another embodiment, the target component can also be selected first, so that the configuration instruction can be triggered by selecting and inputting the previous associated component and/or the next associated component and the corresponding associated parameters respectively. For example, select the target component, select the target component M in the configuration item corresponding to the previous associated component, and select the parameter N output by the target component M in its corresponding associated parameters, thereby triggering the generation of a target component and The configuration instruction of the previous associated component, and then in response to the configuration instruction, the manner of determining the association relationship of the target component is similar to the above, and will not be repeated here.
根据每一所述目标组件的关联信息,将每一所述目标组件按照关联顺序进行关联,以获得所述流程信息。According to the association information of each of the target components, each of the target components is associated in an association sequence to obtain the process information.
示例地,在确定出每一目标组件的关联信息后,在则可以根据该关联信息确定各个目标组件之间的顺序,从而可以获得由各个目标组件形成的流程信息,即获得用于表征所述目标微服务的执行流程的流程信息。For example, after the association information of each target component is determined, the sequence between the various target components can be determined according to the association information, so that the process information formed by each target component can be obtained, that is, the process information used to characterize the Process information of the execution process of the target microservice.
由此,通过上述技术方案,用户可以通过对目标组件的关联操作确定各个目标组件的关联关系,从而确定出每一目标组件之间的先后顺序,使得用户可以只通过配置流程图的方式,自动实现目标微服务的开发,无需代码编码,极大地降低对开发人员的技能要求,提高该微服务开发方法的适用范围。Therefore, through the above technical solution, the user can determine the association relationship of each target component through the association operation on the target component, thereby determining the sequence between each target component, so that the user can automatically configure the flow chart only by way of To achieve the development of target microservices, no code coding is required, which greatly reduces the skill requirements for developers and improves the scope of application of the microservice development method.
可选地,所述方法还包括:Optionally, the method further includes:
根据接收到的用户针对所述目标组件的参数设置指令,确定所述目标组件的参数信息。The parameter information of the target component is determined according to the received user's parameter setting instruction for the target component.
其中,用户可以对目标组件的参数进行自定义配置。示例地,用户可以 通过选中目标组件,从而可以在开发编辑区域中该目标组件对应的位置显示该目标组件对应的可配置项,则用户可以针对需要进行配置的目标可配置项输入对应的参数,从而可以触发生成该参数设置指令,之后可以将该参数设置指令指示的参数确定为该目标组件中该目标可配置项对应的参数,其中,该参数可以是赋值参数,也可以是条件比较参数,根据具体的可配置项的元信息确定,本公开对此不进行限定。Among them, the user can customize the configuration of the parameters of the target component. For example, the user can select the target component, so that the configurable item corresponding to the target component can be displayed in the position corresponding to the target component in the development and editing area, then the user can input the corresponding parameters for the target configurable item that needs to be configured, Therefore, the generation of the parameter setting instruction can be triggered, and then the parameter indicated by the parameter setting instruction can be determined as the parameter corresponding to the target configurable item in the target component, wherein the parameter can be an assignment parameter or a condition comparison parameter, It is determined according to the meta information of a specific configurable item, which is not limited in the present disclosure.
相应地,在步骤13中,根据接收到的用户针对目标组件的配置指令,生成由目标组件形成的目标微服务的流程信息示例性实现方式如下,该步骤可以包括:Correspondingly, in step 13, an exemplary implementation manner of generating the process information of the target microservice formed by the target component according to the received configuration instruction of the user for the target component is as follows, and this step may include:
根据接收到的用户针对所述目标组件的配置指令和目标组件的参数信息,生成由所述目标组件形成的目标微服务的流程信息。According to the received configuration instruction of the target component from the user and parameter information of the target component, the flow information of the target microservice formed by the target component is generated.
在该实施例中,该流程信息中包含各个目标组件、以及目标组件之间的关联信息,以及目标组件的参数信息,从而可以基于该流程信息实现目标微服务对应的功能的准确执行,保证生成的流程信息的准确性,从而保证开发获得的目标微服务的准确性和多样性,提升用户使用体验。In this embodiment, the process information includes each target component, the association information between the target components, and the parameter information of the target component, so that the accurate execution of the function corresponding to the target microservice can be realized based on the process information, and the generation of The accuracy of the process information, so as to ensure the accuracy and diversity of the target microservices obtained by development, and improve the user experience.
可选地,在实际使用场景中,可能会出现由于用户的参数配置错误或者目标组件之间的逻辑关联错误导致该目标微服务无法执行,或者该目标微服务难以实现预期的功能的问题。基于此,本公开还提供以下实施例。Optionally, in an actual usage scenario, there may be a problem that the target microservice cannot be executed due to incorrect user parameter configuration or logical association error between target components, or that the target microservice is difficult to achieve the expected function. Based on this, the present disclosure also provides the following embodiments.
在一种可能的实施例中,所述方法还可以包括:In a possible embodiment, the method may further include:
在存在与所述目标微服务对应的测试用例的情况下,显示测试用例选择界面,其中,所述测试用例选择界面上承载有与所述目标微服务对应的测试用例供用户选择。When there is a test case corresponding to the target microservice, a test case selection interface is displayed, wherein the test case selection interface carries a test case corresponding to the target microservice for the user to select.
其中,测试用例可以由用户自行在平台上创建及维护,并将测试用例与对应的微服务进行关联存储,则可以通过目标微服务的标识信息自动确定是否存在与该目标微服务对应的测试用例,并将确定出的测试用例进行显示, 以由用户进行选择。Among them, the test case can be created and maintained by the user on the platform, and the test case is stored in association with the corresponding microservice, and then the identification information of the target microservice can be used to automatically determine whether there is a test case corresponding to the target microservice. , and the determined test cases are displayed for selection by the user.
响应于用户在所述测试用例选择界面的选择操作,将用户选择的测试用例确定目标测试用例,其中,该选择操作可以是针对目标测试用例的单击操作、双击操作或勾选操作等;In response to the user's selection operation on the test case selection interface, the test case selected by the user is determined as a target test case, wherein the selection operation may be a single-click operation, a double-click operation, a check operation, etc. for the target test case;
执行所述目标测试用例;execute the target test case;
根据执行所述目标测试用例所得的结果确定所述目标微服务是否存在异常,其中,所述结果中包含所述一个或多个目标组件对应的输出参数。Whether the target microservice is abnormal is determined according to a result obtained by executing the target test case, wherein the result includes output parameters corresponding to the one or more target components.
其中,若执行所述目标测试用例所得的结果与该目标测试用例的预测结果相同,则表示所述目标微服务不存在异常,若行所述目标测试用例所得的结果与该目标测试用例的预测结果不完全相同,则可以确定所述目标微服务存在异常。Among them, if the result obtained by executing the target test case is the same as the predicted result of the target test case, it means that there is no abnormality in the target microservice, and if the result obtained by executing the target test case is the same as the prediction result of the target test case If the results are not identical, it can be determined that the target microservice is abnormal.
由此,通过上述技术方案,可以通过选择测试用例以对开发的目标微服务进行自动测试,从而可以及时准确地确定目标微服务是否存在异常,从而可以在一定程度上保证开发出的目标微服务的准确性和有效性,为后续提供准确的服务提供保证。Therefore, through the above technical solutions, it is possible to automatically test the developed target microservices by selecting test cases, so as to timely and accurately determine whether the target microservices are abnormal, so as to ensure the developed target microservices to a certain extent. The accuracy and validity of the service are guaranteed for the subsequent provision of accurate services.
可选地,所述方法还包括:Optionally, the method further includes:
在确定所述目标微服务存在异常的情况下,确定所述目标微服务中所述异常对应的组件以及异常信息。When it is determined that the target microservice is abnormal, the component corresponding to the abnormality in the target microservice and the abnormality information are determined.
其中,可以通过测试用例的执行日志信息确定异常的位置,从而可以确定出异常对应的组件以及异常信息,该异常信息可以用于指示发生异常的原因。其中,对测试日志进行分析,确定异常位置和异常原因的方式为本领域中的常规技术,在此不再赘述。The location of the exception can be determined through the execution log information of the test case, so that the component corresponding to the exception and the exception information can be determined, and the exception information can be used to indicate the cause of the exception. The method of analyzing the test log to determine the abnormal location and the abnormal cause is a conventional technique in the art, and details are not described herein again.
之后,显示所述目标微服务对应的流程信息,并在所述流程信息中标识所述异常对应的组件和所述异常信息,其中,可以在所述微服务开发界面或测试结果显示界面进行显示,所述测试结果显示界面与所述微服务开发界面 不同。After that, the process information corresponding to the target microservice is displayed, and the component corresponding to the exception and the exception information are identified in the process information, which can be displayed on the microservice development interface or the test result display interface , the test result display interface is different from the microservice development interface.
作为示例,可以直接在用户用于开发微服务的微服务开发界面中显示目标微服务对应的流程信息,从而可以直接基于用户编辑的目标组件形成的流程信息对异常的组件和异常信息进行显示,提高显示效率,并且可以便于在该目标微服务中存在异常的组件时,能够直接进行修改,提高用户操作简便性和灵活性。作为另一示例,可以通过另一测试结果显示界面进行显示,便于提高异常提示的精度,同时可以避免对微服务开发页面的占用。As an example, the process information corresponding to the target microservice can be directly displayed in the microservice development interface used by the user to develop the microservice, so that the abnormal components and abnormal information can be displayed directly based on the process information formed by the target component edited by the user. The display efficiency is improved, and when there are abnormal components in the target microservice, it can be directly modified, which improves the simplicity and flexibility of user operations. As another example, another test result display interface can be used to display the results, so as to improve the accuracy of the exception prompt and avoid occupation of the microservice development page.
作为示例,在所述流程信息中标识所述异常对应的组件和所述异常信息,可以是高亮显示该异常的目标组件,或者可以根据异常信息确定该目标组件的异常的类型,从而可以针对不同的异常类型进行不同的显示,例如逻辑错误异常对应的组件可以显示为红色,参数配置错误异常对应的组件可以显示为黄色等。需要进行说明的是,上述仅为示例性说明,不对本公开进行限定。As an example, identifying the component corresponding to the exception and the exception information in the process information may be the target component that highlights the exception, or the exception type of the target component may be determined according to the exception information, so that the target component can be identified according to the exception information. Different exception types are displayed differently. For example, components corresponding to logic error exceptions can be displayed in red, and components corresponding to parameter configuration error exceptions can be displayed in yellow. It should be noted that the above is only an exemplary illustration, and does not limit the present disclosure.
由此,通过上述技术方案,可以及时并准确性发现目标微服务中可能存在的问题或风险。并且,通过在流程信息中标识异常的组件,可以便于用户及时定位异常位置,以便于用户及时作出修改,提升用户使用体验。Therefore, through the above technical solutions, possible problems or risks in the target microservice can be discovered in a timely and accurate manner. In addition, by identifying abnormal components in the process information, it is convenient for the user to locate the abnormal position in time, so that the user can make changes in time and improve the user experience.
在一种可能的实施例中,所述方法还可以包括:In a possible embodiment, the method may further include:
显示所述目标微服务对应的流程信息对应的图信息,其中,所述图信息中每一节点对应所述目标微服务中的一个所述目标组件。其中,可以在微服务开发界面中显示所述图信息或者其他的界面中的显示,本公开对此不进行限定。Display the graph information corresponding to the process information corresponding to the target microservice, wherein each node in the graph information corresponds to one of the target components in the target microservice. The graph information or display in other interfaces may be displayed in the microservice development interface, which is not limited in the present disclosure.
响应于接收到用户针对目标节点输入的测试指令,确定与所述目标节点对应的目标组件的测试模式,其中,所述测试模式为执行测试或跳过测试,所述目标节点为所述节点中的一个或多个。In response to receiving the test instruction input by the user for the target node, the test mode of the target component corresponding to the target node is determined, wherein the test mode is to execute the test or skip the test, and the target node is the test mode in the node. one or more of.
示例地,在本公开实施例中,用户可以通过测试指令设置目标组件的测试模式,其中,可以设置默认的测试模型为执行测试。由此通过上述技术方 案,用户可以选择性的对该目标微服务中的部分组件进行测试,提高测试的效率和多样性,同时也可以提高测试的精度和多样性,无需用户编写测试代码,提升用户使用体验。For example, in the embodiment of the present disclosure, the user may set the test mode of the target component through the test instruction, wherein the default test mode may be set to execute the test. Therefore, through the above technical solution, the user can selectively test some components in the target microservice, improve the efficiency and diversity of the test, and also improve the accuracy and diversity of the test, without the need for the user to write test code, improve the User experience.
可选地,在所述目标节点对应的目标组件的测试模式为执行测试的情况下,所述方法还包括:Optionally, when the test mode of the target component corresponding to the target node is the execution test, the method further includes:
响应于接收到用户针对所述目标节点的测试配置指令,根据所述测试配置指令指示的测试参数,执行所述目标微服务,以对所述目标微服务进行测试。In response to receiving the user's test configuration instruction for the target node, the target microservice is executed according to the test parameters indicated by the test configuration instruction to test the target microservice.
示例地,可以通过选中目标节点,从而显示该目标节点的测试配置区域,在该测试配置区域中可以显示目标节点对应的目标组件的测试配置项,之后用户可以在该测试配置区域中对应的测试配置项中输入测试参数,从而触发生成该测试配置指令。之后,则可以响应于该测试配置指令,根据测试配置指令指示的测试参数为该目标节点对应的目标组件的测试配置项进行赋值,通过执行目标微服务实现测试,其中,确定测试结果的过程与上文所述测试过程相似,在此不再赘述。示例地,在一种实施例中,可以直接通过在测试配置区域中输入测试参数触发测试配置指令,该测试配置指令可以同时指示设置目标组件的测试模式为执行测试,从而无需触发测试指令,节省用户操作。For example, by selecting the target node, the test configuration area of the target node can be displayed, and the test configuration item of the target component corresponding to the target node can be displayed in the test configuration area, and then the user can test the corresponding test configuration in the test configuration area. Input test parameters in the configuration item, thereby triggering the generation of the test configuration instruction. Then, in response to the test configuration instruction, assign values to the test configuration item of the target component corresponding to the target node according to the test parameters indicated by the test configuration instruction, and implement the test by executing the target microservice, wherein the process of determining the test result is the same as The testing process described above is similar and will not be repeated here. Exemplarily, in one embodiment, the test configuration instruction can be triggered directly by inputting test parameters in the test configuration area, and the test configuration instruction can simultaneously instruct to set the test mode of the target component to execute the test, so that there is no need to trigger the test instruction, saving energy. User action.
在该技术方案中,用户可以针对于目标组件设置对应的仿真测试参数,从而实现更加细粒度的测试,既可以提供测试的精度,又可以提高测试的准确率和效率,为提高目标微服务的稳定性提供数据支持。In this technical solution, the user can set the corresponding simulation test parameters for the target component, so as to achieve more fine-grained testing, which can not only provide the accuracy of the test, but also improve the accuracy and efficiency of the test. Stability provides data support.
本公开还提供一种微服务开发装置,如图2所示,所述装置10包括:The present disclosure also provides an apparatus for developing microservices. As shown in FIG. 2 , the apparatus 10 includes:
第一显示模块100,用于显示微服务开发界面,其中,所述微服务开发界面上承载有多个备选组件供用户选择;The first display module 100 is used to display a micro-service development interface, wherein the micro-service development interface carries a plurality of candidate components for the user to select;
添加模块200,用于响应于用户在所述微服务开发界面的选择操作,将 用户选择的多个目标组件添加至所述微服务开发界面的开发编辑区域;The adding module 200 is used to add multiple target components selected by the user to the development editing area of the microservice development interface in response to the user's selection operation on the microservice development interface;
生成模块300,用于根据接收到的用户针对所述目标组件的配置指令,生成由所述目标组件形成的目标微服务的流程信息,以获得所述目标微服务的服务包,其中,所述服务包中不包含所述目标组件的源代码信息。The generating module 300 is configured to generate the process information of the target microservice formed by the target component according to the received configuration instruction of the user for the target component, so as to obtain the service package of the target microservice, wherein the The service pack does not contain source code information for the target component.
可选地,所述生成模块包括:Optionally, the generation module includes:
确定子模块,用于根据所述目标组件的配置指令,确定与所述目标组件的关联信息,其中,所述关联信息包括所述目标组件对应的关联组件以及所述目标组件和所述关联组件对应的关联参数;A determination submodule, configured to determine association information with the target component according to a configuration instruction of the target component, wherein the association information includes an association component corresponding to the target component and the target component and the associated component Corresponding associated parameters;
关联子模块,用于根据每一所述目标组件的关联信息,将每一所述目标组件按照关联顺序进行关联,以获得所述流程信息。The association sub-module is configured to associate each of the target components in an association sequence according to the association information of each of the target components, so as to obtain the process information.
可选地,所述装置还包括:Optionally, the device further includes:
第一确定模块,用于根据接收到的用户针对所述目标组件的参数设置指令,确定所述目标组件的参数信息;a first determining module, configured to determine parameter information of the target component according to a received user parameter setting instruction for the target component;
所述生成模块用于:The generation module is used to:
根据接收到的用户针对所述目标组件的配置指令和目标组件的参数信息,生成由所述目标组件形成的目标微服务的流程信息。According to the received configuration instruction of the target component from the user and parameter information of the target component, the flow information of the target microservice formed by the target component is generated.
可选地,所述装置还包括:Optionally, the device further includes:
第一显示模块,用于在存在与所述目标微服务对应的测试用例的情况下,显示测试用例选择界面,其中,所述测试用例选择界面上承载有与所述目标微服务对应的测试用例供用户选择;a first display module, configured to display a test case selection interface when there is a test case corresponding to the target microservice, wherein the test case selection interface carries the test case corresponding to the target microservice for users to choose;
第二确定模块,用于响应于用户在所述测试用例选择界面的选择操作,将用户选择的测试用例确定目标测试用例;a second determining module, configured to determine the test case selected by the user as a target test case in response to the user's selection operation on the test case selection interface;
第一执行模块,用于执行所述目标测试用例;a first execution module, configured to execute the target test case;
第三确定模块,用于根据执行所述目标测试用例所得的结果确定所述目标微服务是否存在异常。The third determining module is configured to determine whether the target microservice is abnormal according to the result obtained by executing the target test case.
可选地,所述装置还包括:Optionally, the device further includes:
第四确定模块,用于在确定所述目标微服务存在异常的情况下,确定所述目标微服务中所述异常对应的组件以及异常信息;a fourth determination module, configured to determine the component corresponding to the exception and the exception information in the target microservice when it is determined that the target microservice is abnormal;
第二显示模块,用于显示所述目标微服务对应的流程信息,并在所述流程信息中标识所述异常对应的组件和所述异常信息。The second display module is configured to display the process information corresponding to the target microservice, and identify the component corresponding to the exception and the exception information in the process information.
可选地,所述装置还包括:Optionally, the device further includes:
第三显示模块,用于显示所述目标微服务对应的流程信息对应的图信息,其中,所述图信息中每一节点对应所述目标微服务中的一个所述目标组件;a third display module, configured to display graph information corresponding to the process information corresponding to the target microservice, wherein each node in the graph information corresponds to one of the target components in the target microservice;
第五确定模块,用于响应于接收到用户针对目标节点输入的测试指令,确定与所述目标节点对应的目标组件的测试模式,其中,所述测试模式为执行测试或跳过测试,所述目标节点为所述节点中的一个或多个。The fifth determination module is configured to, in response to receiving the test instruction input by the user for the target node, determine the test mode of the target component corresponding to the target node, wherein the test mode is to execute the test or skip the test, and the The target node is one or more of the nodes.
可选地,所述装置还包括:Optionally, the device further includes:
第二执行模块,用于在所述目标节点对应的目标组件的测试模式为执行测试的情况下,响应于接收到用户针对所述目标节点的测试配置指令,根据所述测试配置指令指示的测试参数,执行所述目标微服务,以对所述目标微服务进行测试。The second execution module is configured to, in response to receiving a user's test configuration instruction for the target node, under the condition that the test mode of the target component corresponding to the target node is the execution test, perform the test according to the test configuration instruction instructed by the test configuration instruction. parameter, execute the target microservice to test the target microservice.
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the apparatus in the above-mentioned embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be described in detail here.
图3是根据一示例性实施例示出的一种电子设备700的框图。如图3所示,该电子设备700可以包括:处理器701,存储器702。该电子设备700还可以包括多媒体组件703,输入/输出(I/O)接口704,以及通信组件705中的一者或多者。FIG. 3 is a block diagram of an electronic device 700 according to an exemplary embodiment. As shown in FIG. 3 , the electronic device 700 may include: a processor 701 and a memory 702 . The electronic device 700 may also include one or more of a multimedia component 703 , an input/output (I/O) interface 704 , and a communication component 705 .
其中,处理器701用于控制该电子设备700的整体操作,以完成上述的微服务开发方法中的全部或部分步骤。存储器702用于存储各种类型的数据以支持在该电子设备700的操作,这些数据例如可以包括用于在该电子设备 700上操作的任何应用程序或方法的指令,以及应用程序相关的数据,例如联系人数据、收发的消息、图片、音频、视频等等。该存储器702可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,例如静态随机存取存储器(Static Random Access Memory,简称SRAM),电可擦除可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,简称EEPROM),可擦除可编程只读存储器(Erasable Programmable Read-Only Memory,简称EPROM),可编程只读存储器(Programmable Read-Only Memory,简称PROM),只读存储器(Read-Only Memory,简称ROM),磁存储器,快闪存储器,磁盘或光盘。多媒体组件703可以包括屏幕和音频组件。其中屏幕例如可以是触摸屏,音频组件用于输出和/或输入音频信号。例如,音频组件可以包括一个麦克风,麦克风用于接收外部音频信号。所接收的音频信号可以被进一步存储在存储器702或通过通信组件705发送。音频组件还包括至少一个扬声器,用于输出音频信号。I/O接口704为处理器701和其他接口模块之间提供接口,上述其他接口模块可以是键盘,鼠标,按钮等。这些按钮可以是虚拟按钮或者实体按钮。通信组件705用于该电子设备700与其他设备之间进行有线或无线通信。无线通信,例如Wi-Fi,蓝牙,近场通信(Near Field Communication,简称NFC),2G、3G、4G、NB-IOT、eMTC、或其他5G等等,或它们中的一种或几种的组合,在此不做限定。因此相应的该通信组件705可以包括:Wi-Fi模块,蓝牙模块,NFC模块等等。The processor 701 is configured to control the overall operation of the electronic device 700 to complete all or part of the steps in the above-mentioned microservice development method. The memory 702 is used to store various types of data to support operations on the electronic device 700, such data may include, for example, instructions for any application or method operating on the electronic device 700, and application-related data, Such as contact data, messages sent and received, pictures, audio, video, and so on. The memory 702 can be implemented by any type of volatile or non-volatile storage device or their combination, such as static random access memory (Static Random Access Memory, SRAM for short), electrically erasable programmable read-only memory ( Electrically Erasable Programmable Read-Only Memory (EEPROM for short), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (Read-Only Memory, ROM for short), magnetic memory, flash memory, magnetic disk or optical disk. Multimedia components 703 may include screen and audio components. Wherein the screen can be, for example, a touch screen, and the audio component is used for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may be further stored in memory 702 or transmitted through communication component 705 . The audio assembly also includes at least one speaker for outputting audio signals. The I/O interface 704 provides an interface between the processor 701 and other interface modules, and the above-mentioned other interface modules may be a keyboard, a mouse, a button, and the like. These buttons can be virtual buttons or physical buttons. The communication component 705 is used for wired or wireless communication between the electronic device 700 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IOT, eMTC, or other 5G, etc., or one or more of them The combination is not limited here. Therefore, the corresponding communication component 705 may include: Wi-Fi module, Bluetooth module, NFC module and so on.
在一示例性实施例中,电子设备700可以被一个或多个应用专用集成电路(Application Specific Integrated Circuit,简称ASIC)、数字信号处理器(Digital Signal Processor,简称DSP)、数字信号处理设备(Digital Signal Processing Device,简称DSPD)、可编程逻辑器件(Programmable Logic Device,简称PLD)、现场可编程门阵列(Field Programmable Gate Array,简称FPGA)、 控制器、微控制器、微处理器或其他电子元件实现,用于执行上述的微服务开发方法。In an exemplary embodiment, the electronic device 700 may be implemented by one or more application-specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), digital signal processors (Digital Signal Processor, DSP for short), digital signal processing devices (Digital Signal Processing Device, referred to as DSPD), Programmable Logic Device (Programmable Logic Device, referred to as PLD), Field Programmable Gate Array (Field Programmable Gate Array, referred to as FPGA), controller, microcontroller, microprocessor or other electronic components Implementation is used to execute the microservice development method described above.
在另一示例性实施例中,还提供了一种包括程序指令的计算机可读存储介质,该程序指令被处理器执行时实现上述的微服务开发方法的步骤。例如,该计算机可读存储介质可以为上述包括程序指令的存储器702,上述程序指令可由电子设备700的处理器701执行以完成上述的微服务开发方法。In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, and when the program instructions are executed by a processor, the steps of the above-mentioned microservice development method are implemented. For example, the computer-readable storage medium can be the above-mentioned memory 702 including program instructions, and the above-mentioned program instructions can be executed by the processor 701 of the electronic device 700 to complete the above-mentioned microservice development method.
图4是根据一示例性实施例示出的一种电子设备1900的框图。例如,电子设备1900可以被提供为一服务器。参照图4,电子设备1900包括处理器1922,其数量可以为一个或多个,以及存储器1932,用于存储可由处理器1922执行的计算机程序。存储器1932中存储的计算机程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理器1922可以被配置为执行该计算机程序,以执行上述的微服务开发方法。FIG. 4 is a block diagram of an electronic device 1900 according to an exemplary embodiment. For example, the electronic device 1900 may be provided as a server. 4 , the electronic device 1900 includes a processor 1922 , which may be one or more in number, and a memory 1932 for storing computer programs executable by the processor 1922 . A computer program stored in memory 1932 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processor 1922 may be configured to execute the computer program to perform the microservice development method described above.
另外,电子设备1900还可以包括电源组件1926和通信组件1950,该电源组件1926可以被配置为执行电子设备1900的电源管理,该通信组件1950可以被配置为实现电子设备1900的通信,例如,有线或无线通信。此外,该电子设备1900还可以包括输入/输出(I/O)接口1958。电子设备1900可以操作基于存储在存储器1932的操作系统,例如Windows Server TM,Mac OS X TM,Unix TM,Linux TM等等。 In addition, the electronic device 1900 may also include a power supply assembly 1926, which may be configured to perform power management of the electronic device 1900, and a communication component 1950, which may be configured to enable communication of the electronic device 1900, eg, wired or wireless communication. Additionally, the electronic device 1900 may also include an input/output (I/O) interface 1958 . Electronic device 1900 may operate based on an operating system stored in memory 1932, such as Windows Server , Mac OS X , Unix , Linux , and the like.
在另一示例性实施例中,还提供了一种包括程序指令的计算机可读存储介质,该程序指令被处理器执行时实现上述的微服务开发方法的步骤。例如,该计算机可读存储介质可以为上述包括程序指令的存储器1932,上述程序指令可由电子设备1900的处理器1922执行以完成上述的微服务开发方法。In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, and when the program instructions are executed by a processor, the steps of the above-mentioned microservice development method are implemented. For example, the computer-readable storage medium can be the above-mentioned memory 1932 including program instructions, and the above-mentioned program instructions can be executed by the processor 1922 of the electronic device 1900 to complete the above-mentioned microservice development method.
在另一示例性实施例中,还提供一种计算机程序产品,该计算机程序产品包含能够由可编程的装置执行的计算机程序,该计算机程序具有当由该可编程的装置执行时用于执行上述的微服务开发方法的代码部分。In another exemplary embodiment, there is also provided a computer program product comprising a computer program executable by a programmable apparatus, the computer program having, when executed by the programmable apparatus, for performing the above The code portion of the microservices development approach.
以上结合附图详细描述了本公开的优选实施方式,但是,本公开并不限于上述实施方式中的具体细节,在本公开的技术构思范围内,可以对本公开的技术方案进行多种简单变型,这些简单变型均属于本公开的保护范围。The preferred embodiments of the present disclosure have been described above in detail with reference to the accompanying drawings. However, the present disclosure is not limited to the specific details of the above-mentioned embodiments. Various simple modifications can be made to the technical solutions of the present disclosure within the scope of the technical concept of the present disclosure. These simple modifications all fall within the protection scope of the present disclosure.
另外需要说明的是,在上述具体实施方式中所描述的各个具体技术特征,在不矛盾的情况下,可以通过任何合适的方式进行组合。为了避免不必要的重复,本公开对各种可能的组合方式不再另行说明。In addition, it should be noted that each specific technical feature described in the above-mentioned specific implementation manner may be combined in any suitable manner under the circumstance that there is no contradiction. In order to avoid unnecessary repetition, various possible combinations are not described in the present disclosure.
此外,本公开的各种不同的实施方式之间也可以进行任意组合,只要其不违背本公开的思想,其同样应当视为本公开所公开的内容。In addition, the various embodiments of the present disclosure can also be arbitrarily combined, as long as they do not violate the spirit of the present disclosure, they should also be regarded as the contents disclosed in the present disclosure.

Claims (17)

  1. 一种微服务开发方法,其特征在于,所述方法包括:A microservice development method, characterized in that the method includes:
    显示微服务开发界面,其中,所述微服务开发界面上承载有多个备选组件供用户选择;Displaying a microservice development interface, wherein the microservice development interface carries a plurality of candidate components for the user to select;
    响应于用户在所述微服务开发界面的选择操作,将用户选择的多个目标组件添加至所述微服务开发界面的开发编辑区域;In response to the user's selection operation on the microservice development interface, adding a plurality of target components selected by the user to the development and editing area of the microservice development interface;
    根据接收到的用户针对所述目标组件的配置指令,生成由所述目标组件形成的目标微服务的流程信息,以获得所述目标微服务的服务包,其中,所述服务包中不包含所述目标组件的源代码信息。Generate process information of the target microservice formed by the target component according to the received configuration instruction of the user for the target component, so as to obtain the service package of the target microservice, wherein the service package does not contain all Describe the source code information of the target component.
  2. 根据权利要求1所述的方法,其特征在于,所述根据接收到的用户针对所述目标组件的配置指令,生成由所述目标组件形成的目标微服务的流程信息,包括:The method according to claim 1, wherein the generating process information of the target microservice formed by the target component according to the received configuration instruction of the user for the target component comprises:
    根据所述目标组件的配置指令,确定与所述目标组件的关联信息,其中,所述关联信息包括所述目标组件对应的关联组件以及所述目标组件和所述关联组件对应的关联参数;Determine association information with the target component according to the configuration instruction of the target component, wherein the association information includes an association component corresponding to the target component and an association parameter corresponding to the target component and the associated component;
    根据每一所述目标组件的关联信息,将每一所述目标组件按照关联顺序进行关联,以获得所述流程信息。According to the association information of each of the target components, each of the target components is associated in an association sequence to obtain the process information.
  3. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    根据接收到的用户针对所述目标组件的参数设置指令,确定所述目标组件的参数信息;Determine the parameter information of the target component according to the received user's parameter setting instruction for the target component;
    所述根据接收到的用户针对所述目标组件的配置指令,生成由所述目标组件形成的目标微服务的流程信息,包括:The process information of generating the target microservice formed by the target component according to the received configuration instruction of the user for the target component includes:
    根据接收到的用户针对所述目标组件的配置指令和目标组件的参数信 息,生成由所述目标组件形成的目标微服务的流程信息。According to the received user's configuration instruction for the target component and the parameter information of the target component, the process information of the target microservice formed by the target component is generated.
  4. 根据权利要求1-3中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-3, wherein the method further comprises:
    在存在与所述目标微服务对应的测试用例的情况下,显示测试用例选择界面,其中,所述测试用例选择界面上承载有与所述目标微服务对应的测试用例供用户选择;In the case that there is a test case corresponding to the target microservice, a test case selection interface is displayed, wherein the test case selection interface carries a test case corresponding to the target microservice for the user to select;
    响应于用户在所述测试用例选择界面的选择操作,将用户选择的测试用例确定目标测试用例;In response to the user's selection operation on the test case selection interface, determining the test case selected by the user as a target test case;
    执行所述目标测试用例;execute the target test case;
    根据执行所述目标测试用例所得的结果确定所述目标微服务是否存在异常。Determine whether the target microservice is abnormal according to the result obtained by executing the target test case.
  5. 根据权利要求4所述的方法,其特征在于,所述方法还包括:The method according to claim 4, wherein the method further comprises:
    在确定所述目标微服务存在异常的情况下,确定所述目标微服务中所述异常对应的组件以及异常信息;In the case of determining that the target microservice is abnormal, determine the component corresponding to the abnormality in the target microservice and the abnormality information;
    显示所述目标微服务对应的流程信息,并在所述流程信息中标识所述异常对应的组件和所述异常信息。The process information corresponding to the target microservice is displayed, and the component corresponding to the exception and the exception information are identified in the process information.
  6. 根据权利要求1-5中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-5, wherein the method further comprises:
    显示所述目标微服务对应的流程信息对应的图信息,其中,所述图信息中每一节点对应所述目标微服务中的一个所述目标组件;Displaying graph information corresponding to the process information corresponding to the target microservice, wherein each node in the graph information corresponds to one of the target components in the target microservice;
    响应于接收到用户针对目标节点输入的测试指令,确定与所述目标节点对应的目标组件的测试模式,其中,所述测试模式为执行测试或跳过测试, 所述目标节点为所述节点中的一个或多个。In response to receiving the test instruction input by the user for the target node, determine the test mode of the target component corresponding to the target node, wherein the test mode is to execute the test or skip the test, and the target node is the test mode in the node. one or more of.
  7. 根据权利要求6所述的方法,其特征在于,在所述目标节点对应的目标组件的测试模式为执行测试的情况下,所述方法还包括:The method according to claim 6, wherein, when the test mode of the target component corresponding to the target node is the execution test, the method further comprises:
    响应于接收到用户针对所述目标节点的测试配置指令,根据所述测试配置指令指示的测试参数,执行所述目标微服务,以对所述目标微服务进行测试。In response to receiving the user's test configuration instruction for the target node, the target microservice is executed according to the test parameters indicated by the test configuration instruction to test the target microservice.
  8. 一种微服务开发装置,其特征在于,所述装置包括:A microservice development device, characterized in that the device includes:
    第一显示模块,用于显示微服务开发界面,其中,所述微服务开发界面上承载有多个备选组件供用户选择;a first display module, configured to display a microservice development interface, wherein the microservice development interface carries a plurality of candidate components for the user to select;
    添加模块,用于响应于用户在所述微服务开发界面的选择操作,将用户选择的多个目标组件添加至所述微服务开发界面的开发编辑区域;The adding module is used for adding a plurality of target components selected by the user to the development and editing area of the microservice development interface in response to the user's selection operation on the microservice development interface;
    生成模块,用于根据接收到的用户针对所述目标组件的配置指令,生成由所述目标组件形成的目标微服务的流程信息,以获得所述目标微服务的服务包,其中,所述服务包中不包含所述目标组件的源代码信息。A generating module, configured to generate the process information of the target microservice formed by the target component according to the received configuration instruction of the user for the target component, so as to obtain the service package of the target microservice, wherein the service The package does not contain source code information for the target component.
  9. 根据权利要求8所述的装置,其特征在于,所述生成模块包括:The apparatus according to claim 8, wherein the generating module comprises:
    确定子模块,用于根据所述目标组件的配置指令,确定与所述目标组件的关联信息,其中,所述关联信息包括所述目标组件对应的关联组件以及所述目标组件和所述关联组件对应的关联参数;A determination submodule, configured to determine association information with the target component according to a configuration instruction of the target component, wherein the association information includes an association component corresponding to the target component and the target component and the associated component Corresponding associated parameters;
    关联子模块,用于根据每一所述目标组件的关联信息,将每一所述目标组件按照关联顺序进行关联,以获得所述流程信息。The association sub-module is configured to associate each of the target components in an association sequence according to the association information of each of the target components, so as to obtain the process information.
  10. 根据权利要求8所述的装置,其特征在于,所述装置还包括:The device according to claim 8, wherein the device further comprises:
    第一确定模块,用于根据接收到的用户针对所述目标组件的参数设置指令,确定所述目标组件的参数信息;a first determining module, configured to determine parameter information of the target component according to a received user parameter setting instruction for the target component;
    所述生成模块用于:The generation module is used to:
    根据接收到的用户针对所述目标组件的配置指令和目标组件的参数信息,生成由所述目标组件形成的目标微服务的流程信息。According to the received configuration instructions of the user for the target component and parameter information of the target component, process information of the target microservice formed by the target component is generated.
  11. 根据权利要求8-10中任一项所述的装置,其特征在于,所述装置还包括:The device according to any one of claims 8-10, wherein the device further comprises:
    第一显示模块,用于在存在与所述目标微服务对应的测试用例的情况下,显示测试用例选择界面,其中,所述测试用例选择界面上承载有与所述目标微服务对应的测试用例供用户选择;a first display module, configured to display a test case selection interface when there is a test case corresponding to the target microservice, wherein the test case selection interface carries the test case corresponding to the target microservice for users to choose;
    第二确定模块,用于响应于用户在所述测试用例选择界面的选择操作,将用户选择的测试用例确定目标测试用例;a second determination module, configured to determine the test case selected by the user as a target test case in response to the user's selection operation on the test case selection interface;
    第一执行模块,用于执行所述目标测试用例;a first execution module, configured to execute the target test case;
    第三确定模块,用于根据执行所述目标测试用例所得的结果确定所述目标微服务是否存在异常。The third determining module is configured to determine whether the target microservice is abnormal according to the result obtained by executing the target test case.
  12. 根据权利要求11所述的装置,其特征在于,所述装置还包括:The apparatus of claim 11, wherein the apparatus further comprises:
    第四确定模块,用于在确定所述目标微服务存在异常的情况下,确定所述目标微服务中所述异常对应的组件以及异常信息;a fourth determining module, configured to determine the component corresponding to the exception and the exception information in the target microservice when it is determined that the target microservice is abnormal;
    第二显示模块,用于显示所述目标微服务对应的流程信息,并在所述流程信息中标识所述异常对应的组件和所述异常信息。The second display module is configured to display the process information corresponding to the target microservice, and identify the component corresponding to the exception and the exception information in the process information.
  13. 根据权利要求8-12中任一项所述的装置,其特征在于,所述装置还包括:The device according to any one of claims 8-12, wherein the device further comprises:
    第三显示模块,用于显示所述目标微服务对应的流程信息对应的图信息,其中,所述图信息中每一节点对应所述目标微服务中的一个所述目标组件;a third display module, configured to display graph information corresponding to the process information corresponding to the target microservice, wherein each node in the graph information corresponds to one of the target components in the target microservice;
    第五确定模块,用于响应于接收到用户针对目标节点输入的测试指令,确定与所述目标节点对应的目标组件的测试模式,其中,所述测试模式为执行测试或跳过测试,所述目标节点为所述节点中的一个或多个。The fifth determination module is configured to, in response to receiving the test instruction input by the user for the target node, determine the test mode of the target component corresponding to the target node, wherein the test mode is to execute the test or skip the test, and the The target node is one or more of the nodes.
  14. 根据权利要求13所述的装置,其特征在于,所述装置还包括:The apparatus of claim 13, wherein the apparatus further comprises:
    第二执行模块,用于在所述目标节点对应的目标组件的测试模式为执行测试的情况下,响应于接收到用户针对所述目标节点的测试配置指令,根据所述测试配置指令指示的测试参数,执行所述目标微服务,以对所述目标微服务进行测试。The second execution module is configured to, in response to receiving a user's test configuration instruction for the target node, under the condition that the test mode of the target component corresponding to the target node is the execution test, perform the test according to the test configuration instruction instructed by the test configuration instruction. parameter, execute the target microservice to test the target microservice.
  15. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现权利要求1-7中任一项所述方法的步骤。A computer-readable storage medium on which a computer program is stored, characterized in that, when the program is executed by a processor, the steps of the method according to any one of claims 1-7 are implemented.
  16. 一种电子设备,其特征在于,包括:An electronic device, comprising:
    存储器,其上存储有计算机程序;a memory on which a computer program is stored;
    处理器,用于执行所述存储器中的所述计算机程序,以实现权利要求1-7中任一项所述方法的步骤。A processor for executing the computer program in the memory to implement the steps of the method of any one of claims 1-7.
  17. 一种计算机程序产品,其特征在于,该计算机程序产品包含能够由可编程的装置执行的计算机程序,该计算机程序具有当由该可编程的装置执行时用于执行权利要求1-7中任一项所述微服务开发方法的代码部分。A computer program product, characterized in that the computer program product comprises a computer program executable by a programmable device, the computer program having, when executed by the programmable device, for performing any one of claims 1-7 The code part of the microservice development method described in this item.
PCT/CN2021/094960 2020-11-03 2021-05-20 Microservice development method and apparatus, storage medium, and electronic device WO2022095412A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011212465.5A CN112416318B (en) 2020-11-03 2020-11-03 Micro-service development method and device, storage medium and electronic equipment
CN202011212465.5 2020-11-03

Publications (1)

Publication Number Publication Date
WO2022095412A1 true WO2022095412A1 (en) 2022-05-12

Family

ID=74827482

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/094960 WO2022095412A1 (en) 2020-11-03 2021-05-20 Microservice development method and apparatus, storage medium, and electronic device

Country Status (2)

Country Link
CN (1) CN112416318B (en)
WO (1) WO2022095412A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114938332A (en) * 2022-06-29 2022-08-23 上海喜马拉雅科技有限公司 Model parameter configuration method and device, electronic equipment and readable storage medium
CN115408055A (en) * 2022-11-01 2022-11-29 北京领雁科技股份有限公司 Method and system for generating micro-service item based on single body

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112416318B (en) * 2020-11-03 2021-10-08 前海飞算云智软件科技(深圳)有限公司 Micro-service development method and device, storage medium and electronic equipment
CN113238733A (en) * 2021-04-25 2021-08-10 天津易和信息科技有限公司 Method, device and system for generating microservice
CN115756450A (en) * 2022-12-05 2023-03-07 广州玖晔网络科技有限公司 Micro-service development method and system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104461895A (en) * 2014-12-17 2015-03-25 广东欧珀移动通信有限公司 Editing method and system of testing sequence and automatic testing system
CN106897207A (en) * 2015-12-17 2017-06-27 北京奇虎科技有限公司 Ui testing method and apparatus
CN108681451A (en) * 2018-05-14 2018-10-19 浪潮软件集团有限公司 Visual kubernets micro-service arrangement implementation method
CN108804113A (en) * 2018-06-07 2018-11-13 东软集团股份有限公司 Dispose the method, apparatus and storage medium and electronic equipment that micro services are applied
CN110286884A (en) * 2019-06-21 2019-09-27 北京百度网讯科技有限公司 Micro services method of combination, device, equipment and computer readable storage medium
US10628290B2 (en) * 2018-01-30 2020-04-21 Red Hat, Inc. Generating an inner cloud environment within an outer cloud environment for testing a microservice application
CN112416318A (en) * 2020-11-03 2021-02-26 前海飞算云智软件科技(深圳)有限公司 Micro-service development method and device, storage medium and electronic equipment

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10623406B2 (en) * 2016-07-22 2020-04-14 Box, Inc. Access authentication for cloud-based shared content
US11138030B2 (en) * 2016-11-17 2021-10-05 Red Hat, Inc. Executing code referenced from a microservice registry
CN107888681A (en) * 2017-11-09 2018-04-06 北京中电普华信息技术有限公司 A kind of business flow processing method and device
CN108322351B (en) * 2018-03-05 2021-09-10 北京奇艺世纪科技有限公司 Method and device for generating topological graph and method and device for determining faults
KR101909420B1 (en) * 2018-04-17 2018-12-19 부산대학교 산학협력단 Device and method for constructing monolithic application as microservice based unit
CN108628746A (en) * 2018-05-04 2018-10-09 艺龙网信息技术(北京)有限公司 Automatic interface testing method and system
CN108958714B (en) * 2018-07-02 2021-08-24 平安科技(深圳)有限公司 Business component type development method and device, computer equipment and storage medium
CN109491916B (en) * 2018-11-12 2022-03-25 北京东土科技股份有限公司 Test method, device, equipment, system and medium for operating system
CN110888755B (en) * 2019-11-15 2023-04-11 亚信科技(中国)有限公司 Method and device for searching abnormal root node of micro-service system
CN111708528A (en) * 2020-06-15 2020-09-25 中国建设银行股份有限公司 Method, device and equipment for generating small program and storage medium
CN111831269A (en) * 2020-07-21 2020-10-27 腾讯科技(深圳)有限公司 Application development system, operation method, equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104461895A (en) * 2014-12-17 2015-03-25 广东欧珀移动通信有限公司 Editing method and system of testing sequence and automatic testing system
CN106897207A (en) * 2015-12-17 2017-06-27 北京奇虎科技有限公司 Ui testing method and apparatus
US10628290B2 (en) * 2018-01-30 2020-04-21 Red Hat, Inc. Generating an inner cloud environment within an outer cloud environment for testing a microservice application
CN108681451A (en) * 2018-05-14 2018-10-19 浪潮软件集团有限公司 Visual kubernets micro-service arrangement implementation method
CN108804113A (en) * 2018-06-07 2018-11-13 东软集团股份有限公司 Dispose the method, apparatus and storage medium and electronic equipment that micro services are applied
CN110286884A (en) * 2019-06-21 2019-09-27 北京百度网讯科技有限公司 Micro services method of combination, device, equipment and computer readable storage medium
CN112416318A (en) * 2020-11-03 2021-02-26 前海飞算云智软件科技(深圳)有限公司 Micro-service development method and device, storage medium and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114938332A (en) * 2022-06-29 2022-08-23 上海喜马拉雅科技有限公司 Model parameter configuration method and device, electronic equipment and readable storage medium
CN115408055A (en) * 2022-11-01 2022-11-29 北京领雁科技股份有限公司 Method and system for generating micro-service item based on single body

Also Published As

Publication number Publication date
CN112416318B (en) 2021-10-08
CN112416318A (en) 2021-02-26

Similar Documents

Publication Publication Date Title
WO2022095412A1 (en) Microservice development method and apparatus, storage medium, and electronic device
US8769553B2 (en) Deploy anywhere framework for heterogeneous mobile application development
US9268672B1 (en) Automated test case generation for applications
US10482001B2 (en) Automated dynamic test case generation
EP3712764B1 (en) Fpga cloud host development method and system
US10728136B2 (en) MCellblock for parallel testing of multiple devices
US20240054366A1 (en) AI Application Deployment Method and Related Platform, Cluster, Medium, and Program Product
US11138645B2 (en) Virtualized services discovery and recommendation engine
US20170168784A1 (en) Method and device for visually implementing software code
CN110597564A (en) Installation package construction and service component loading method, device and terminal equipment
WO2019075845A1 (en) Construction method and device for link call relationship, computer device and storage medium
WO2022095410A1 (en) Component development method, apparatus, storage medium, and electronic device
CN112486492A (en) Page generation method and device, storage medium and electronic equipment
CN115599618B (en) Register dynamic change-allocation verification method and device, storage medium and processor
CN112631949B (en) Debugging method and device, computer equipment and storage medium
CN113032004B (en) Method, apparatus and program product for managing development jobs in a development environment
US11086696B2 (en) Parallel cloned workflow execution
CN110737426A (en) Program block creating method, program block creating device, computer equipment and storage medium
CN111026650B (en) Method and device for testing software, storage medium and electronic equipment
CN113326184B (en) Interface testing method and device, storage medium and electronic equipment
CN111782183B (en) Method and device for judging component dependency, electronic device and medium
WO2024078472A1 (en) Method and apparatus for debugging cloud service application program interface (api) and related device
US20220350731A1 (en) Method and system for test automation of a software system including multiple software services
CN117667082A (en) Operation and maintenance management method, device, computer equipment and storage medium
CN112330306A (en) Business processing method and device based on business process

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21888115

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 09.08.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 21888115

Country of ref document: EP

Kind code of ref document: A1