Test method, device and electronic equipment

By configuring the test environment identifier and registry in the integrated development environment to obtain address information, the problem of rapid testing in the microservice architecture is solved, and rapid testing and resource saving of the microservice version is achieved.

CN111782520BActive Publication Date: 2024-11-12INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010603180.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-29
Publication Date
2024-11-12
Estimated Expiration
2040-06-29

AI Technical Summary

Technical Problem

In the microservice architecture, how to quickly conduct tests to ensure that the updated microservices are used normally with other microservices is a technical problem that needs to be solved urgently.

Method used

Configure the test environment identifier in the integrated development environment, build and deploy the test request, register the test environment identifier, and obtain address information through the registration center to call the test version of the microservice for testing. If it does not exist in the test environment, it will be from the public environment Call the public version.

Benefits of technology

It realizes rapid testing of the test version of microservices, avoiding isolation between the public environment and the test environment, saving computer resources, and improving testing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111782520B_ABST
    Figure CN111782520B_ABST
Patent Text Reader

Abstract

The embodiments of this specification disclose a testing method, device and electronic device. The method includes: configuring a test environment identifier in an integrated development environment; constructing a test request in the integrated development environment, the test request including the test environment identifier; deploying a test version of a microservice developed in the integrated development environment; registering the test environment identifier; sending the test request so as to test the test version of the microservice according to the test environment identifier. The embodiments of this specification can quickly test microservices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present specification relate to the field of computer technology, and more particularly to a testing method, device and electronic equipment. Background Art

[0002] With the rapid development of information technology, the application software architecture has undergone tremendous changes, and the traditional monolithic architecture has been transformed into a new microservice architecture. According to the microservice architecture, an application is split into one or more microservices that can be independently developed, run, and maintained. Each microservice is loosely coupled. As a small application, each microservice only focuses on completing a task and completing it well. In addition, when technicians update the microservice, they often need to test the microservice to ensure that the updated microservice can work properly with other microservices.

[0003] How to quickly test microservices is a technical problem that needs to be solved urgently. Summary of the invention

[0004] The embodiments of this specification provide a testing method, device and electronic device. The technical solution of the embodiments of this specification is as follows.

[0005] A first aspect of an embodiment of the present specification provides a testing method, including: configuring a test environment identifier in an integrated development environment; constructing a test request in the integrated development environment, the test request including the test environment identifier; deploying a test version of a microservice developed in the integrated development environment; registering the test environment identifier; and sending the test request to test the test version of the microservice according to the test environment identifier.

[0006] A second aspect of an embodiment of the present specification provides a testing method, including: obtaining a call request, the call request including a test environment identifier; testing a deployed microservice in response to the call request; sending the test environment identifier and a microservice identifier of a microservice to be called to a registration center; receiving address information fed back by the registration center; and calling the microservice to be called according to the address information to test the microservice to be called.

[0007] A third aspect of an embodiment of this specification provides a testing method, including: receiving a test environment identifier and a microservice identifier; searching whether there is address information corresponding to both the test environment identifier and the microservice identifier; if so, feeding back address information corresponding to both the test environment identifier and the microservice identifier, so as to test the test version of the microservice.

[0008] In a fourth aspect of an embodiment of the present specification, a testing device is provided, including: a configuration unit, used to configure a test environment identifier in an integrated development environment; a construction unit, used to construct a test request in the integrated development environment, the test request including the test environment identifier; a deployment unit, used to deploy a test version of a microservice developed in the integrated development environment; a registration unit, used to register the test environment identifier; and a sending unit, used to send a test request so as to test the test version of the microservice according to the test environment identifier.

[0009] In a fifth aspect of the embodiments of this specification, a testing device is provided, including: an obtaining unit, used to obtain a call request, the call request including a test environment identifier; a testing unit, used to test the deployed microservice in response to the call request; a sending unit, used to send the test environment identifier and the microservice identifier of the microservice to be called to a registration center; a receiving unit, used to receive address information fed back by the registration center; and a calling unit, used to call the microservice to be called according to the address information to test the microservice to be called.

[0010] In a sixth aspect of an embodiment of the present specification, a testing device is provided, including: a receiving unit, configured to receive a test environment identifier and a microservice identifier; a searching unit, configured to search for address information corresponding to both the test environment identifier and the microservice identifier; and a feedback unit, configured to feedback address information corresponding to both the test environment identifier and the microservice identifier, if such address information exists, so as to test the test version of the microservice.

[0011] In the seventh aspect of the embodiments of this specification, an electronic device is provided, comprising: at least one processor; a memory storing program instructions; wherein the program instructions are configured to be suitable for execution by the at least one processor, and the program instructions include instructions for executing the method described in the first aspect, the second aspect, or the third aspect.

[0012] The technical solution provided in the embodiments of this specification can quickly test the test version of the microservice by configuring a test environment identifier in an integrated development environment and then sending a test request containing the test environment identifier. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. The drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0014] Figure 1 It is a flow chart of the test method in the embodiment of this specification;

[0015] Figure 2 It is a flow chart of the test method in the embodiment of this specification;

[0016] Figure 3 A schematic diagram of a scenario example in an embodiment of this specification;

[0017] Figure 4 It is a flow chart of the test method in the embodiment of this specification;

[0018] Figure 5 This is a functional structure diagram of the test device in the embodiment of this specification;

[0019] Figure 6 This is a functional structure diagram of the test device in the embodiment of this specification;

[0020] Figure 7 This is a functional structure diagram of the test device in the embodiment of this specification;

[0021] Figure 8 Schematic diagram of the functional structure of an electronic device in an embodiment of this specification. DETAILED DESCRIPTION

[0022] The following will be combined with the drawings in the embodiments of this specification to clearly and completely describe the technical solutions in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.

[0023] Microservice architecture is a software architecture that can split applications into one or more microservices with finer granularity according to their functions. The granularity of these microservices is small enough that they can be independently deployed, developed and maintained to implement an independent function (such as order management, user management, etc.). The microservices of the application are loosely coupled and can communicate through some lightweight communication mechanisms, such as REST API (Representational State Transfer Application Programming Interface) or RPC (Remote Procedure Call).

[0024] The embodiment of this specification provides a test system based on a microservice architecture. The test system may include one or more development devices, one or more microservice devices, and a registration center. The development device, the microservice device, and the registration center may all be a server, or a server cluster including multiple servers. The development device may communicate with the storage device, the microservice device, and the registration center respectively. The microservice device may communicate with the registration center.

[0025] The development device can be a device for developers, used for developers to develop microservices. Microservices developed by developers can be deployed on microservice devices. Different microservices can be deployed on different microservice devices, and different versions of the same microservice (such as a public version, a test version) can be deployed on the same or different microservice devices. The registration center is used to store the address information of the microservices so that each microservice can communicate based on the address information. The address information may include the communication address (such as an IP address) of the microservice device, the calling interface (such as an interface name, interface request parameter information, interface return result information) of the microservice, etc.

[0026] The test system of the embodiment of this specification is described in detail above. Figure 1 , describes in detail the test method of the embodiment of this specification. The test method is executed by the development device and can include the following steps.

[0027] Step S11: configuring a test environment identifier in the integrated development environment.

[0028] In some embodiments, the IDE (Integrated Development Environment) is an application program for providing a program development environment, generally including tools such as a code editor, a compiler, a debugger, and a graphical user interface. It is an integrated development software service suite that integrates code writing, analysis, compilation, and debugging functions. All software or software suites (groups) with this feature can be called an IDE. For example, Microsoft's Visual Studio series, Delphi series, etc.

[0029] In some embodiments, each microservice of the application may correspond to a microservice identifier, and the microservice identifier may be used to identify the microservice. It is worth noting that different versions of a microservice may correspond to the same microservice identifier.

[0030] In addition, a full set of microservices of an application can be deployed in a public environment. The public environment can be understood as the basic environment of the application, and the public environment can correspond to a public environment identifier. For ease of description, the microservice version deployed in the public environment is referred to as the public version below, and the public version of the microservice can correspond to the public environment identifier. For example, an application may include 5 microservices, A, B, C, D, and E. The public environment identifier can be V0. The public version A_V0 of microservice A can correspond to the public environment identifier V0, the public version B_V0 of microservice B can correspond to the public environment identifier V0, the public version C_V0 of microservice C can correspond to the public environment identifier V0, the public version D_V0 of microservice D can correspond to the public environment identifier V0, and the public version E_V0 of microservice E can correspond to the public environment identifier V0.

[0031] In some embodiments, the test environment identifier can be used to identify the test environment. The test environment can be understood as an environment established to test a new version of a microservice. Microservices of part or all of an application can be deployed in the test environment. For ease of description, the microservice version deployed in the test environment is referred to as the test version below. The test version of the microservice can correspond to the test environment identifier. Specifically, the developer can enter the test environment identifier on the development device. The development device can receive the test environment identifier; the test environment identifier can be configured in an integrated development environment. Continuing with the previous example, the test environment identifier can be V1. Developers can develop a test version B_V1 of microservice B in the integrated development environment. The test version B_V1 of microservice B can correspond to the test environment identifier V1.

[0032] Step S13: constructing a test request in the integrated development environment, wherein the test request includes the test environment identifier.

[0033] In some embodiments, a developer may input a test requirement on a development device. The development device may receive the test requirement and construct a test request according to the test requirement. The test request may include the test environment identifier.

[0034] Of course, the test request may also include other information, such as the microservice identifier of the microservice to be tested. The test requirement may include test parameters, such as parameter values ​​of interface request parameters. Of course, the test requirement may also include other information, such as test cases.

[0035] Step S15: deploying the test version of the microservice developed in the integrated development environment.

[0036] In some embodiments, a developer may input the source code of the test version of the microservice in the integrated development environment. A development device may receive the source code; may compile the source code to obtain an executable file of the test version of the microservice; and may deploy the executable file on the microservice device.

[0037] In actual applications, developers can configure the communication address of the microservice device in the integrated development environment, so that the development device can deploy the executable file on the microservice device according to the communication address.

[0038] Step S17: registering the test environment identifier.

[0039] In some embodiments, the development device may register the test environment identifier with a registration center. Specifically, the development device may register the address information of the test version of the microservice and the test environment identifier with the registration center so that the address information can be found according to the test environment identifier. The address information may include, for example, the communication address of the microservice device and the calling interface of the test version of the microservice.

[0040] Step S19: Send the test request.

[0041] In some embodiments, the test request can be used to preferentially call a test version of the microservice from the test environment; if the test version of the microservice does not exist in the test environment, then call the public version of the microservice from the public environment.

[0042] In some embodiments, the development device can initiate a test call locally based on the test request. Specifically, the development device can know the entry microservice of the application; and can send the microservice identifier of the entry microservice and the test environment identifier to the registration center. The registration center can receive the microservice identifier and the test environment identifier; and can search whether there is address information corresponding to both the microservice identifier and the test environment identifier; if so, the address information corresponding to both the microservice identifier and the test environment identifier is fed back to the development device; if not, the address information corresponding to both the microservice identifier and the public environment identifier is fed back to the development device. The development device can receive the address information sent by the registration center; and can call the entry microservice based on the address information.

[0043] Here, calling the entry microservice may specifically include sending a call request to a microservice device (hereinafter referred to as the entry microservice device) on which the entry microservice is deployed, so that the entry microservice device runs the entry microservice.

[0044] In this way, the development device can preferentially determine whether there is a test version of the entry microservice in the test environment; if there is a test version of the entry microservice in the test environment, the test version of the entry microservice can be called from the test environment; if there is no test version of the entry microservice in the test environment, the public version of the entry microservice can be called from the public environment.

[0045] In some embodiments, if you want to test a test version of a microservice, you need to call other microservices associated with the microservice in the application to test the test version of the microservice. To this end, the entry microservice device can communicate with other microservice devices to call microservices deployed in other microservice devices. The final test results are returned to the entry microservice device by other microservice devices in the original path according to the calling order.

[0046] For example, an application may include five microservices, A, B, C, D, and E. A microservice device deployed with microservice A can communicate with a microservice device deployed with microservice B to call microservice B. A microservice device deployed with microservice B can communicate with a microservice device deployed with microservice C to call microservice C. A microservice device deployed with microservice C can communicate with a microservice device deployed with microservice D to call microservice D. A microservice device deployed with microservice D can communicate with a microservice device deployed with microservice E to call microservice E. Then, the final test result can be returned in the order of a microservice device deployed with microservice E, a microservice device deployed with microservice D, a microservice device deployed with microservice C, a microservice device deployed with microservice B, and a microservice device deployed with microservice A. This allows the microservice device deployed with microservice A to obtain the final test result.

[0047] After obtaining the test result, the entry microservice device may send the test result to the development device. The development device may receive the test result; and may display the test result in the integrated development environment. The test result may be a normal test result or an abnormal test result, etc.

[0048] The test method of the embodiment of this specification can quickly test the test version of the microservice by configuring the test environment identifier in the integrated development environment and then sending a test request containing the test environment identifier. In addition, using the test environment identifier, the embodiment of this specification can preferentially call the test version of the microservice from the test environment; if the test version of the microservice does not exist in the test environment, the public version of the microservice is called from the public environment. This avoids the isolation of the public environment and the test environment, and thus avoids deploying the full amount of microservices to the test environment, saving computer resources.

[0049] The test system of the embodiment of this specification is described in detail above. Figure 2 , describes in detail a test method of another embodiment of the present specification. The test method is executed by a caller. The caller may be a microservice device. The test method may include the following steps.

[0050] Step S21: Obtain a call request, wherein the call request includes a test environment identifier.

[0051] In some embodiments, the call request may further include a microservice identifier. The microservice identifier is used to identify a microservice deployed in the caller. The microservice deployed in the caller may be a test version of the microservice, or may be a public version of the microservice.

[0052] In some embodiments, the caller may be an entry microservice device. Accordingly, the call request may be sent from a development device. Alternatively, the caller may be a microservice device other than the entry microservice device. Accordingly, the call request may also be sent from a microservice device.

[0053] Step S23: In response to the call request, the deployed microservice is tested.

[0054] In some embodiments, the caller may run a microservice deployed locally to test the microservice deployed locally. Specifically, the caller may run a test version of the microservice to test the test version of the microservice. Alternatively, the caller may also run a public version of the microservice to test the public version of the microservice.

[0055] Step S25: Send the test environment identifier and the microservice identifier of the microservice to be called to the registration center.

[0056] In some embodiments, the microservice deployed in the caller can know which microservice it needs to call. Therefore, the caller can send the test environment identifier and the microservice identifier of the microservice to be called to the registration center.

[0057] Step S27: Receive the address information fed back by the registration center.

[0058] Step S29: calling the microservice to be called according to the address information to test the microservice to be called.

[0059] In some embodiments, the registration center may receive a microservice identifier and a test environment identifier; and may search whether there is address information corresponding to both the microservice identifier and the test environment identifier.

[0060] If it exists, the registration center can feedback the address information corresponding to both the microservice identifier and the test environment identifier to the caller. The address information can correspond to the test version of the microservice to be called. In this way, the caller can receive the address information; the test version of the microservice to be called can be called according to the address information to test the test version of the microservice to be called. Calling the test version of the microservice to be called here can specifically include sending a call request to the microservice device on which the test version is deployed, so that the microservice device on which the test version is deployed runs the test version.

[0061] If it does not exist, the registration center can feedback to the caller the address information corresponding to both the microservice identifier and the public environment identifier. The address information can correspond to the public version of the microservice to be called. In this way, the caller can receive the address information; the public version of the microservice to be called can be called according to the address information to test the public version of the microservice to be called. Calling the public version of the microservice to be called here can specifically be sending a call request to the microservice device on which the public version is deployed, so that the microservice device on which the public version is deployed runs the public version.

[0062] In this way, after obtaining the call request, the caller can first determine whether there is a test version of the microservice to be called in the test environment; if there is a test version of the microservice to be called in the test environment, the test version of the microservice to be called is called from the test environment to test the test version of the microservice to be called; if there is no test version of the microservice to be called in the test environment, the public version of the microservice to be called is called from the public environment to test the public version of the microservice to be called.

[0063] For some example scenarios, see Figure 3. The application may include five microservices, namely A, B, C, D, and E. A full set of microservices are deployed in the public environment. Specifically, the public environment identifier of the public environment may be V0. In the public environment, the public version A_V0 of microservice A, the public version B_V0 of microservice B, the public version C_V0 of microservice C, the public version D_V0 of microservice D, and the public version E_V0 of microservice E are deployed. For the public environment V0, the calling relationship between microservices is: A_V0→B_V0→C_V0→D_V0→E_V0.

[0064] In some cases, microservice A and microservice C need to be changed, so test environment 1 can be built. The test environment identifier of test environment 1 can be V1. In test environment 1, the test version A_V1 of microservice A and the test version C_V1 of microservice C are deployed. For test environment 1, the calling relationship between microservices is: A_V1→B_V0→C_V1→D_V0→E_V0.

[0065] In other cases, microservice A, microservice B, and microservice E need to be changed, so test environment 2 can be built. The test environment identifier of test environment 2 can be V2. In test environment 2, test version A_V2 of microservice A, test version V2 of microservice B, and test version E_V2 of microservice E are deployed. For test environment 2, the calling relationship between microservices is: A_V2→B_V2→C_V0→D_V0→E_V2.

[0066] The test method of the embodiment of this specification can quickly test the test version of the microservice by configuring the test environment identifier in the integrated development environment and then sending a test request containing the test environment identifier. In addition, using the test environment identifier, the embodiment of this specification can preferentially call the test version of the microservice from the test environment; if the test version of the microservice does not exist in the test environment, the public version of the microservice is called from the public environment. This avoids the isolation of the public environment and the test environment, and thus avoids deploying the full amount of microservices to the test environment, saving computer resources.

[0067] The test system of the embodiment of this specification is described in detail above. Figure 4 , describes in detail a test method of another embodiment of this specification. The test method is executed by a registration center. The registration center stores the correspondence between the environment identifier and the address information. Further, the registration center may store the correspondence between the environment identifier, the microservice identifier, and the address information. The test method may include the following steps.

[0068] Step S41: Receive the test environment identifier and the microservice identifier.

[0069] In some embodiments, the test environment identifier and the microservice identifier may be sent from a development device; or, may be sent from a microservice device.

[0070] Step S43: Find whether there is address information corresponding to both the test environment identifier and the microservice identifier.

[0071] Step S45: If so, feedback is given of address information corresponding to both the test environment identifier and the microservice identifier.

[0072] In some embodiments, the registration center can search whether there is address information corresponding to both the test environment identifier and the microservice identifier. If so, the registration center can feedback address information corresponding to both the test environment identifier and the microservice identifier. The test version of the microservice corresponds to both the microservice identifier and the test environment identifier. In this way, the test version of the microservice can be tested. If not, the registration center can feedback address information corresponding to both the public environment identifier and the microservice identifier. The public version of the microservice corresponds to both the microservice identifier and the public environment identifier. In this way, the public version of the microservice can be tested.

[0073] The test method of the embodiment of this specification can quickly test the test version of the microservice by configuring the test environment identifier in the integrated development environment and then sending a test request containing the test environment identifier. In addition, using the test environment identifier, the embodiment of this specification can preferentially call the test version of the microservice from the test environment; if the test version of the microservice does not exist in the test environment, the public version of the microservice is called from the public environment. This avoids the isolation of the public environment and the test environment, and thus avoids deploying the full amount of microservices to the test environment, saving computer resources.

[0074] The following will be combined Figure 5 , Figure 6 and Figure 7 , describes in detail the testing device in the embodiments of this specification.

[0075] See also Figure 5 This specification provides an embodiment of a test device. The test device can be applied to a development end. The test device can specifically include the following module units.

[0076] A configuration unit 51, used to configure a test environment identifier in an integrated development environment;

[0077] A construction unit 53, configured to construct a test request in an integrated development environment, wherein the test request includes the test environment identifier;

[0078] A deployment unit 55, used to deploy a test version of a microservice developed in an integrated development environment;

[0079] A registration unit 57, used to register the test environment identifier;

[0080] The sending unit 59 is used to send the test request so as to test the test version of the microservice according to the test environment identifier.

[0081] See also Figure 6 This specification provides an embodiment of a test device. The test device can be applied to a microservice device. The test device can specifically include the following module units.

[0082] An obtaining unit 61 is used to obtain a call request, wherein the call request includes a test environment identifier;

[0083] A testing unit 63, configured to test the deployed microservice in response to the call request;

[0084] A sending unit 65 is used to send the test environment identifier and the microservice identifier of the microservice to be called to the registration center;

[0085] The receiving unit 67 is used to receive the address information fed back by the registration center;

[0086] The calling unit 69 is used to call the microservice to be called according to the address information to test the microservice to be called.

[0087] See also Figure 7 This specification provides an embodiment of a test device. The test device can be applied to a registration center. The test device can specifically include the following module units.

[0088] A receiving unit 71 is used to receive a test environment identifier and a microservice identifier;

[0089] A searching unit 73, used to search whether there is address information corresponding to both the test environment identifier and the microservice identifier;

[0090] The feedback unit 75 is used to feedback address information corresponding to both the test environment identifier and the microservice identifier, if any, so as to test the test version of the microservice.

[0091] An embodiment of the electronic device of the present specification is introduced below. Figure 8 FIG. 1 is a schematic diagram of the hardware structure of the electronic device in this embodiment. Figure 8 As shown, the electronic device may include one or more (only one is shown in the figure) processors, memories and transmission modules. Of course, those skilled in the art will understand that Figure 8 The hardware structure shown is for illustration only and does not limit the hardware structure of the electronic device. Figure 8 More or fewer component units as shown; or, Figure 8 Different configurations are shown.

[0092] The memory may include a high-speed random access memory; or, it may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory or other non-volatile solid-state memory. Of course, the memory may also include a remotely set network memory. The memory may be used to store program instructions or modules of an application, such as the instructions in this manual. Figure 1 , Figure 2 ,or Figure 4 The program instructions or modules of the corresponding embodiment.

[0093] The processor may be implemented in any suitable manner. For example, the processor may take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, a logic gate, a switch, an application specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, etc. The processor may read and execute program instructions or modules in the memory.

[0094] The transmission module can be used for transmitting data via a network, for example, via a network such as the Internet, an intranet, a local area network, a mobile communication network, etc.

[0095] This specification also provides an embodiment of a computer storage medium. The computer storage medium includes but is not limited to a random access memory (RAM), a read-only memory (ROM), a cache, a hard disk (HDD), a memory card, etc. The computer storage medium stores computer program instructions. When the computer program instructions are executed, the following are achieved: Figure 1 , Figure 2 ,or Figure 4 The program instructions or modules of the corresponding embodiment.

[0096] It should be noted that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. Figure 1 , Figure 2 ,or Figure 4 As for the corresponding embodiments), device embodiments, electronic device embodiments, and computer storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiments. In addition, it can be understood that after reading this specification document, those skilled in the art can think of any combination of some or all of the embodiments listed in this specification without creative work, and these combinations are also within the scope of disclosure and protection of this specification.

[0097] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0098] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0099] It can be known from the above description of the implementation mode that the technicians in this field can clearly understand that the present specification can be implemented by means of software plus the necessary general hardware platform. Based on such an understanding, the technical solution of the present specification can be essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present specification or some parts of the embodiments.

[0100] This specification can be used in many general or special computer system environments or configurations, such as personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, and distributed computing environments that include any of the above systems or devices.

[0101] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0102] Although the present specification is described through embodiments, those skilled in the art will appreciate that there are many modifications and changes to the present specification without departing from the spirit of the present specification, and it is intended that the appended claims include these modifications and changes without departing from the spirit of the present specification.

Claims

1. A testing method, applied to a development device, comprising: Configure the test environment identifier in the integrated development environment; Constructing a test request in the integrated development environment, wherein the test request includes the test environment identifier; Deploy a test version of the microservice developed in the integrated development environment; Registering the test environment identifier includes: registering the test environment identifier and the address information of the test version of the microservice to a registration center; the registration center is used to store the address information of the microservice so that each microservice can communicate with each other based on the address information; Sending the test request so as to test the test version of the microservice according to the test environment identifier; including: sending the microservice identifier and the test environment identifier of the entry microservice to the registration center, so that the registration center searches for address information corresponding to both the test environment identifier and the microservice identifier of the entry microservice; if so, feeding back to the development device the address information corresponding to both the test environment identifier and the microservice identifier of the entry microservice; if not, feeding back to the development device the address information corresponding to both the public environment identifier and the microservice identifier of the entry microservice; receiving the address information sent by the registration center; sending a call request to the entry microservice device according to the address information; The entry microservice device tests the deployed entry microservice in response to the call request; the entry microservice device also sends the test environment identifier and the microservice identifier of the microservice to be called to the registration center, so that the registration center can find out whether there is address information corresponding to both the test environment identifier and the microservice identifier of the microservice to be called. If so, the address information corresponding to both the test environment identifier and the microservice identifier of the microservice to be called is fed back to the entry microservice device to test the test version of the microservice to be called; if not, the address information corresponding to both the public environment identifier and the microservice identifier of the microservice to be called is fed back to the entry microservice device to test the public version of the microservice to be called; the entry microservice device also receives the test results returned by other microservice devices in the original path according to the calling order; Receive the test result sent by the ingress microservice device; The test results are presented in the integrated development environment.

2. The method of claim 1, wherein deploying a test version of a microservice developed in the integrated development environment comprises: Get the source code of the test version of the microservice; Compile the source code to obtain an executable file of the test version of the microservice; The executable file is deployed on the microservice device.

3. A test method, applied to a caller, comprising: Obtaining a call request, the call request including a test environment identifier; wherein the caller is an entry microservice device, and the call request is sent from a development device; or, the caller is a microservice device other than the entry microservice device, and the call request is sent from a microservice device; In response to the call request, testing the deployed microservice; Send the test environment identifier and the microservice identifier of the microservice to be called to the registration center; so that the registration center can find out whether there is address information corresponding to both the test environment identifier and the microservice identifier. If so, the address information corresponding to both the test environment identifier and the microservice identifier is fed back to the microservice device; if not, the address information corresponding to both the public environment identifier and the microservice identifier is fed back to the microservice device; the registration center is used to store the address information of the microservices so that each microservice can communicate based on the address information; Receive the address information fed back by the registration center; The microservice to be called is called according to the address information to test the microservice to be called.

4. The method according to claim 3, wherein the address information corresponds to a test version of the microservice to be called; The calling the microservice to be called according to the address information includes: calling a test version of the microservice to be called according to the address information to test the test version of the microservice to be called; Alternatively, the address information corresponds to a public version of the microservice to be called; and calling the microservice to be called according to the address information includes: calling the public version of the microservice to be called according to the address information to test the public version of the microservice to be called.

5. A testing device, used for developing equipment, comprising: A configuration unit, used to configure a test environment identifier in an integrated development environment; A construction unit, configured to construct a test request in an integrated development environment, wherein the test request includes the test environment identifier; The deployment unit is used to deploy the test version of the microservice developed in the integrated development environment; A registration unit, used to register the test environment identifier, including: registering the test environment identifier and the address information of the test version of the microservice to a registration center; the registration center is used to store the address information of the microservice so that each microservice can communicate with each other based on the address information; A sending unit is used to send a test request so as to test the test version of the microservice according to the test environment identifier; the sending unit includes: sending the microservice identifier and the test environment identifier of the entry microservice to the registration center so that the registration center can find out whether there is address information corresponding to both the test environment identifier and the microservice identifier of the entry microservice; if so, the address information corresponding to both the test environment identifier and the microservice identifier of the entry microservice is fed back to the development device; if not, the address information corresponding to both the public environment identifier and the microservice identifier of the entry microservice is fed back to the development device; receiving the address information sent by the registration center; sending a call request to the entry microservice device according to the address information; The entry microservice device tests the deployed entry microservice in response to the call request; the entry microservice device also sends the test environment identifier and the microservice identifier of the microservice to be called to the registration center, so that the registration center can find out whether there is address information corresponding to both the test environment identifier and the microservice identifier of the microservice to be called. If so, the address information corresponding to both the test environment identifier and the microservice identifier of the microservice to be called is fed back to the entry microservice device to test the test version of the microservice to be called; if not, the address information corresponding to both the public environment identifier and the microservice identifier of the microservice to be called is fed back to the entry microservice device to test the public version of the microservice to be called; the entry microservice device also receives the test results returned by other microservice devices in the original path according to the calling order; A receiving unit, configured to receive the test result sent by the ingress microservice device; A display unit is used to display the test result in the integrated development environment.

6. A test device, applied to a caller, comprising: An obtaining unit, used to obtain a call request, wherein the call request includes a test environment identifier; wherein the caller is an entry microservice device, and the call request is sent from a development device; or, the caller is a microservice device other than the entry microservice device, and the call request is sent from the microservice device; A testing unit, used to test the deployed microservice in response to the call request; A sending unit is used to send the test environment identifier and the microservice identifier of the microservice to be called to the registration center; so that the registration center can find out whether there is address information corresponding to both the test environment identifier and the microservice identifier. If so, the address information corresponding to both the test environment identifier and the microservice identifier is fed back to the microservice device; if not, the address information corresponding to both the public environment identifier and the microservice identifier is fed back to the microservice device; the registration center is used to store the address information of the microservices so that each microservice can communicate with each other based on the address information; A receiving unit, used for receiving the address information fed back by the registration center; A calling unit is used to call the microservice to be called according to the address information to test the microservice to be called.

7. An electronic device comprising: at least one processor; A memory storing program instructions; wherein the program instructions are configured to be suitable for being executed by the at least one processor, and the program instructions include instructions for executing the method according to any one of claims 1 to 4.