CN111782520A - Test method and device and electronic equipment - Google Patents

Test method and device and electronic equipment Download PDF

Info

Publication number
CN111782520A
CN111782520A CN202010603180.8A CN202010603180A CN111782520A CN 111782520 A CN111782520 A CN 111782520A CN 202010603180 A CN202010603180 A CN 202010603180A CN 111782520 A CN111782520 A CN 111782520A
Authority
CN
China
Prior art keywords
test
micro
service
identifier
microservice
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010603180.8A
Other languages
Chinese (zh)
Inventor
叶鸿浩
程相
张冰宇
黄群
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202010603180.8A priority Critical patent/CN111782520A/en
Publication of CN111782520A publication Critical patent/CN111782520A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/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/368Test management for test version control, e.g. updating test cases to a new software version
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

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

Abstract

The embodiment of the specification discloses a test method, a test device and electronic equipment. The method comprises the following steps: configuring a test environment identifier in an integrated development environment; constructing a test request in the integrated development environment, wherein the test request comprises the test environment identification; deploying a test version of a microservice developed in the integrated development environment; registering the test environment identifier; and sending the test request so as to test the test version of the microservice according to the test environment identification. The embodiment of the specification can test the micro service quickly.

Description

Test method and device and electronic equipment
Technical Field
The embodiment of the specification relates to the technical field of computers, in particular to a testing method, a testing device and electronic equipment.
Background
With the rapid development of information technology, the application software architecture has changed greatly, and the traditional integral architecture is changed into a novel micro-service architecture. According to the microservice architecture, an application is split into one or more microservices that can be independently developed, run, and maintained. The individual microservices are loosely coupled. Each microservice, as a small application, is only concerned with completing one task and doing it well. Moreover, when the technician updates the microservice, the microservice often needs to be tested to ensure that the updated microservice can be used in normal cooperation with other microservices.
How to rapidly test the micro-service is a technical problem which needs to be solved urgently at present.
Disclosure of Invention
The embodiment of the specification provides a test method, a test device and electronic equipment. The technical scheme of the embodiment of the specification is as follows.
In a first aspect of embodiments of the present specification, there is provided a test method, including: configuring a test environment identifier in an integrated development environment; constructing a test request in the integrated development environment, wherein the test request comprises the test environment identification; deploying a test version of a microservice developed in the integrated development environment; registering the test environment identifier; and sending the test request so as to test the test version of the microservice according to the test environment identification.
In a second aspect of embodiments of the present specification, there is provided a test method, including: obtaining a call request, wherein the call request comprises a test environment identifier; responding to the calling request, and testing the deployed micro-service; sending the test environment identifier and the micro-service identifier of the micro-service to be called to a registration center; receiving address information fed back by a registration center; and calling the micro service to be called according to the address information so as to test the micro service to be called.
In a third aspect of embodiments of the present specification, there is provided a test method, including: receiving a test environment identifier and a micro-service identifier; searching whether address information corresponding to the test environment identifier and the micro-service identifier exists at the same time; if the micro service exists, feeding back the address information corresponding to the test environment identifier and the micro service identifier at the same time so as to test the test version of the micro service.
In a fourth aspect of embodiments herein, there is provided a test apparatus comprising: the configuration unit is used for configuring the test environment identifier in the integrated development environment; the building unit is used for building a test request in the integrated development environment, wherein the test request comprises the test environment identifier; the deployment unit is used for deploying the test version of the microservice developed in the integrated development environment; the registration unit is used for registering the test environment identifier; and the sending unit is used for sending the test request so as to test the test version of the microservice according to the test environment identifier.
In a fifth aspect of embodiments herein, there is provided a test apparatus comprising: the device comprises an obtaining unit, a processing unit and a processing unit, wherein the obtaining unit is used for obtaining a calling request which comprises a test environment identifier; the test unit is used for responding to the calling request and testing the deployed micro-service; the sending unit is used for sending the test environment identifier and the micro-service identifier of the micro-service to be called to a registration center; the receiving unit is used for receiving the address information fed back by the registration center; and the calling unit is used for calling the micro service to be called according to the address information so as to test the micro service to be called.
In a sixth aspect of embodiments herein, there is provided a test apparatus comprising: the receiving unit is used for receiving the test environment identifier and the micro-service identifier; the searching unit is used for searching whether address information corresponding to the test environment identifier and the micro-service identifier exists at the same time; and the feedback unit is used for feeding back address information simultaneously corresponding to the test environment identifier and the micro-service identifier if the micro-service identifier exists so as to test the test version of the micro-service.
A seventh aspect of the embodiments of the present specification provides an electronic device, including: at least one processor; a memory storing program instructions; wherein the program instructions are configured to be adapted to be executed by the at least one processor, the program instructions comprising instructions for performing the method of the first, second or third aspect.
According to the technical scheme provided by the embodiment of the specification, the test environment identifier is configured in the integrated development environment, and then the test request containing the test environment identifier is sent, so that the test version of the microservice can be quickly tested.
Drawings
In order to more clearly illustrate the embodiments of the present specification or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, the drawings in the following description are only some embodiments described in the present specification, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic flow chart of a test method in an embodiment of the present disclosure;
FIG. 2 is a schematic flow chart of a testing method in an embodiment of the present disclosure;
FIG. 3 is a diagram illustrating an example of a scenario in an embodiment of the present specification;
FIG. 4 is a schematic flow chart of a testing method in an embodiment of the present disclosure;
FIG. 5 is a functional block diagram of a testing apparatus according to an embodiment of the present disclosure;
FIG. 6 is a functional block diagram of a testing apparatus according to an embodiment of the present disclosure;
FIG. 7 is a functional block diagram of a testing apparatus according to an embodiment of the present disclosure;
fig. 8 is a functional structure diagram of an electronic device in an embodiment of the present specification.
Detailed Description
The technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, and not all of the embodiments. All other embodiments obtained by a person skilled in the art based on the embodiments in the present specification without any inventive step should fall within the scope of protection of the present specification.
The micro-service architecture is a software architecture capable of splitting an application program into one or more micro-services with finer granularity according to functions. The granularity of the micro-services is small enough to independently run, deploy, develop and maintain, and realize an independent function (such as order management, user management and the like). The microservices of an application are loosely coupled and may communicate via some lightweight communication mechanism, such as a REST API (Representational State transfer Programming Interface) or RPC (remote procedure Call).
The embodiment of the specification provides a test system based on a micro-service architecture. The test system may include one or more development devices, one or more microservice devices, and a registry. The development device, the microservice device, and the registry may each be one server, or a server cluster comprising a plurality of servers. The development device may communicate with the storage device, the microservice device, and the registry, respectively. The microservice device may communicate with the registry.
The development device may be a developer-oriented device for developers to develop microservices. Microservices developed via developers may be deployed on microservice devices. Different microservices may be deployed on different microservice devices, and different versions of the same microservice (e.g., public versions, test versions) may be deployed on the same or different microservice devices. The registry is used for storing address information of the micro-services, so that communication can be carried out among the micro-services based on the address information. The address information may include a communication address (e.g., an IP address) of the microservice device, a calling interface (e.g., an interface name, interface request parameter information, interface return result information) of the microservice, and the like.
The test system of the embodiments of the present specification is described above in detail. The test method of the embodiment of the present specification will be described in detail below with reference to fig. 1. The test method takes development equipment as an execution subject and can comprise the following steps.
Step S11: configuring a test environment identification in an integrated development environment.
In some embodiments, the Integrated Development Environment (IDE) is an application program for providing a program development environment, and generally includes tools such as a code editor, a compiler, a debugger, and a graphical user interface. The integrated development software service set integrates a code compiling function, an analyzing function, a compiling function, a debugging function and the like. All software or software suite (group) with the characteristic can be called an integrated development environment. Such as Microsoft Visual Studio series, Borland's C + + Builder, Delphi series, etc.
In some embodiments, each microservice of an application may correspond to a microservice identification, which may be used to identify the microservice. It is worth noting that different versions of the micro-service may correspond to the same micro-service identity.
In addition, the full amount of microservices for an application may be deployed in a public environment. The public environment can be understood as the basic environment of the application program, and the public environment can be corresponding to the public environment identification. For convenience of description, a version of the micro-service deployed in the public environment will be referred to as a public version, and the public version of the micro-service may correspond to the public environment identity. For example, an application may include 5 microservices such as A, B, C, D, E. The public environment identity may be V0. Public version a _ V0 of microservice a may correspond to said public context identity V0, public version B _ V0 of microservice B may correspond to said public context identity V0, public version C _ V0 of microservice C may correspond to said public context identity V0, public version D _ V0 of microservice D may correspond to said public context identity V0, and public version E _ V0 of microservice E may correspond to said public context identity V0.
In some embodiments, the test environment identification may be used to identify a test environment. The test environment may be understood as an environment established for testing new versions of microservices. Part or all of the microservices of an application may be deployed in a test environment. For convenience of description, a version of the microservice deployed in a test environment will be referred to as a test version hereinafter. A test version of a microservice may correspond to the test environment identification. Specifically, a developer may input a test environment identification at a development device. The development device may receive the test environment identification; the test environment identification may be configured in an integrated development environment. Continuing with the previous example, the test environment identification may be V1. A developer may develop a test version B _ V1 of microservice B in the integrated development environment. The test version B _ V1 of microservice B may correspond to the test environment identification V1.
Step S13: constructing a test request in the integrated development environment, wherein the test request comprises the test environment identification.
In some embodiments, a developer may input test requirements at a development device. The development device may receive the test requirements; a test request may be constructed according to the test requirements. The test request may include the test environment identification.
Of course, the test request may also include other information, such as a micro-service identifier of the micro-service to be tested. The test requirements may include test parameters, such as parameter values for interface request parameters. Of course, the test requirements may also include other information, such as test cases.
Step S15: deploying a test version of a microservice developed in the integrated development environment.
In some embodiments, a developer may enter source code for a test version of a microservice in the integrated development environment. The development device may receive the source code; compiling the source code to obtain an executable file of a test version of the microservice; the executable file may be deployed on a microservice device.
In practical applications, a developer may configure the communication address of the microservice device in the integrated development environment. The development device may then deploy the executable file on the microservice device based on the communication address.
Step S17: and registering the test environment identifier.
In some embodiments, the development device may register the test environment identification with a registry. Specifically, the development device may register address information of a test version of the microservice and a test environment identifier to the registry, so that the address information can be searched according to the test environment identifier. The address information may include, for example, a communication address of the microservice device and a calling interface of the test version of the microservice.
Step S19: and sending the test request.
In some embodiments, the test request may be used to preferentially invoke a test version of a microservice from a test environment; if the test version of the microservice does not exist in the test environment, then the public version of the microservice is called from the public environment.
In some embodiments, the development device may initiate a test call locally according to the test request. In particular, the development device may be aware of the portal microservice of the application; a micro-service identification of the portal micro-service and the test environment identification may be sent to a registry. The registry can receive the micro-service identifier and the test environment identifier; whether address information corresponding to the micro-service identifier and the test environment identifier exists or not can be searched; if the micro service identifier exists, feeding back address information corresponding to the micro service identifier and the test environment identifier to the development equipment; and if the address information does not exist, feeding back address information simultaneously corresponding to the micro-service identifier and the public environment identifier to the development equipment. The development equipment can receive address information sent by a registry; the portal microservice may be invoked based on the address information.
Here, the invoking of the portal micro service may specifically be sending an invocation request to a micro service device (hereinafter referred to as a portal micro service device) in which the portal micro service is deployed, so that the portal micro service device runs the portal micro service.
Thus, the development device can preferentially judge whether the test version of the portal microservice exists in the test environment; if a test version of the portal microservice exists in the test environment, the test version of the portal microservice may be invoked from the test environment; if a test version of the portal microservice does not exist in the test environment, a common version of the portal microservice may be invoked from the common environment.
In some embodiments, if a test version of a micro service is desired to be tested, other micro services associated with the micro service in the application program need to be called to test the test version of the micro service. To this end, the portal microservice device may communicate with other microservice devices to invoke microservices deployed in the other microservice devices. And returning the final test result to the entrance micro-service equipment by other micro-service equipment in an original path according to the calling sequence.
For example, an application may include 5 microservices such as A, B, C, D, E. The microservice device deployed with microservice a may communicate with the microservice device deployed with microservice B to invoke microservice B. The microservice device deployed with microservice B may communicate with the microservice device deployed with microservice C to invoke microservice C. The microservice device deployed with microservice C may communicate with the microservice device deployed with microservice D to invoke microservice D. The microservice device deployed with microservice D may communicate with the microservice device deployed with microservice E to invoke microservice E. Then, the final test result may be returned in the order of the microservice device deployed with microservice E, the microservice device deployed with microservice D, the microservice device deployed with microservice C, the microservice device deployed with microservice B, and the microservice device deployed with microservice a. So that the micro-service device deployed with the micro-service a can obtain the final test result.
After obtaining the test results, the portal microservice device may send the test results to the development device. The development device may receive the test results; the test results may be presented in the integrated development environment. The test result may be a normal test result or an abnormal test result, etc.
In the testing method of the embodiment of the specification, the testing environment identifier is configured in the integrated development environment, and then the testing request containing the testing environment identifier is sent, so that the testing version of the microservice can be quickly tested. In addition, by using the test environment identifier, the embodiment of the present specification may preferentially invoke 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 the public version of the microservice is called from the public environment. Therefore, the isolation of a public environment and a test environment is avoided, the deployment of a full amount of micro services to the test environment is further avoided, and computer resources are saved.
The test system of the embodiments of the present specification is described above in detail. The testing method of another embodiment of the present specification will be described in detail below with reference to fig. 2. The test method takes a calling party as an execution subject. The caller may be a microservice device. The test method may include the following steps.
Step S21: obtaining a call request, wherein the call request comprises a test environment identifier.
In some embodiments, the invocation request may also include a microservice identification. The micro-service identification is used for identifying the micro-service deployed in the caller. The microservice deployed in the caller may specifically be a test version of the microservice, or may also be a common version of the microservice.
In some embodiments, the caller may be an entry microservice device. Accordingly, the call request may be sent from the development device. Alternatively, the caller may be a micro-service device other than the portal micro-service device. Accordingly, the call request can also be sent by the micro service device.
Step S23: and responding to the calling request, and testing the deployed micro-service.
In some embodiments, the caller may run the locally deployed microservice to test the locally deployed microservice. 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 common version of the microservice to test the common version of the microservice.
Step S25: and sending the test environment identifier and the micro-service identifier of the micro-service to be called to a registry.
In some embodiments, the microservice deployed in the caller may know which microservice itself needs to be invoked. The caller can then send the test environment identification and the microservice identification of the microservice to be called to the registry.
Step S27: and receiving address information fed back by the registration center.
Step S29: and calling the micro service to be called according to the address information so as to test the micro service to be called.
In some embodiments, the registry may receive a microservice identification and a test environment identification; it may be found whether there is address information corresponding to both the micro-service identification and the test environment identification.
If the address information exists, the registry can feed back address information corresponding to the micro-service identifier and the test environment identifier to the caller. The address information may correspond to a test version of the microservice to be invoked. So that the caller can receive the address information; and calling the test version of the micro service to be called according to the address information so as to test the test version of the micro service to be called. Here, the invoking of the test version of the microservice to be invoked may specifically be sending an invocation request to the microservice device deployed with the test version, so that the microservice device deployed with the test version runs the test version.
If not, the registration center can feed back address information corresponding to the micro-service identifier and the public environment identifier to the caller. The address information may correspond to a common version of the microservice to be invoked. So that the caller can receive the address information; the public version of the micro service to be called can be called according to the address information so as to test the public version of the micro service to be called. Here, the invoking of the public version of the microservice to be invoked may specifically be sending an invocation request to the microservice device deployed with the public version, so that the microservice device deployed with the public version runs the public version.
Therefore, after the calling party obtains the calling request, whether a test version of the micro service to be called exists or not can be judged in the test environment preferentially; if the test version of the micro service to be called exists in the test environment, calling the test version of the micro service to be called from the test environment to test the test version of the micro service to be called; and if the test version of the micro service to be called does not exist in the test environment, calling the public version of the micro service to be called from the public environment to test the public version of the micro service to be called.
In some example scenarios, please refer to fig. 3. The application may include A, B, C, D, E, etc. of 5 microservices. The full amount of microservices are deployed in a public environment. Specifically, the public environment identifier of the public environment may be V0. In the public environment, a public version a _ V0 of micro service a, a public version B _ V0 of micro service B, a public version C _ V0 of micro service C, a public version D _ V0 of micro service D, and a public version E _ V0 of micro service E are deployed. For the open environment V0, the call relationship between microservices is: a _ V0 → B _ V0 → C _ V0 → D _ V0 → E _ V0.
In some cases, microservice a and microservice C need to be changed, and thus test environment 1 may be constructed. The test environment identification for test environment 1 may be V1. In the test environment 1, a test version a _ V1 of the microservice a and a test version C _ V1 of the microservice C are deployed. For test environment 1, the calling relationship between the microservices is as follows: a _ V1 → B _ V0 → C _ V1 → D _ V0 → E _ V0.
In other cases, microservice a, microservice B, and microservice E need to be changed, and thus test environment 2 may be constructed. The test environment identification of test environment 2 may be V2. In test environment 2, a test version a _ V2 of microservice a, a test version V2 of microservice B, and a 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.
In the testing method of the embodiment of the specification, the testing environment identifier is configured in the integrated development environment, and then the testing request containing the testing environment identifier is sent, so that the testing version of the microservice can be quickly tested. In addition, by using the test environment identifier, the embodiment of the present specification may preferentially invoke 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 the public version of the microservice is called from the public environment. Therefore, the isolation of a public environment and a test environment is avoided, the deployment of a full amount of micro services to the test environment is further avoided, and computer resources are saved.
The test system of the embodiments of the present specification is described above in detail. The testing method of another embodiment of the present specification will be described in detail below with reference to fig. 4. The testing method takes a registration center as an execution subject. The registry stores the corresponding relation between the environment identification and the address information. Further, the registry may store a correspondence between environment identifiers, micro-service identifiers, and address information. The test method may include the following steps.
Step S41: and receiving a test environment identifier and a micro-service identifier.
In some embodiments, the test environment identification and the microservice identification may be sent by a development device; or the data can be sent by the micro-service equipment.
Step S43: and searching whether address information corresponding to the test environment identifier and the micro-service identifier exists at the same time.
Step S45: and if the address information exists, feeding back the address information corresponding to the test environment identifier and the micro-service identifier at the same time.
In some embodiments, the registry may look up whether there is address information corresponding to both the test environment identification and the microservice identification. If the address information exists, the registration center can feed back address information simultaneously corresponding to the test environment identifier and the micro-service identifier. The test version of the micro service corresponds to the micro service identification and the test environment identification at the same time. This allows testing of a test version of the microservice. If not, the registration center can feed back address information corresponding to the public environment identifier and the micro-service identifier at the same time. The public version of the microservice corresponds to both the microservice identity and the public environment identity. This allows testing of public versions of microservices.
In the testing method of the embodiment of the specification, the testing environment identifier is configured in the integrated development environment, and then the testing request containing the testing environment identifier is sent, so that the testing version of the microservice can be quickly tested. In addition, by using the test environment identifier, the embodiment of the present specification may preferentially invoke 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 the public version of the microservice is called from the public environment. Therefore, the isolation of a public environment and a test environment is avoided, the deployment of a full amount of micro services to the test environment is further avoided, and computer resources are saved.
The test apparatus in the embodiment of the present specification will be described in detail below with reference to fig. 5, 6, and 7.
Please refer to fig. 5. The present description provides one embodiment of a test apparatus. The test device may be applied to the development end. The test device may specifically include the following modular units.
A configuration unit 51, configured to configure a test environment identifier in the integrated development environment;
a constructing unit 53, configured to construct a test request in an integrated development environment, where the test request includes the test environment identifier;
a deployment unit 55, configured to deploy a test version of a microservice developed in an integrated development environment;
a registering unit 57, configured to register the test environment identifier;
a sending unit 59, configured to send the test request, so as to test the test version of the microservice according to the test environment identifier.
Please refer to fig. 6. The present description provides one embodiment of a test apparatus. The test device can be applied to micro-service equipment. The test device may specifically include the following modular units.
An obtaining unit 61, configured to obtain a call request, where the call request includes a test environment identifier;
the testing unit 63 is configured to respond to the call request and test the deployed microservice;
a sending unit 65, configured to send the test environment identifier and the microservice identifier of the microservice to be called to a registry;
a receiving unit 67, configured to receive address information fed back by the registration center;
and the invoking unit 69 is configured to invoke the micro service to be invoked according to the address information, so as to test the micro service to be invoked.
Please refer to fig. 7. The present description provides one embodiment of a test apparatus. The test device can be applied to a registry. The test device may specifically include the following modular units.
A receiving unit 71, configured to receive the test environment identifier and the micro service identifier;
a searching unit 73, configured to search whether there is address information corresponding to both the test environment identifier and the micro service identifier;
and a feedback unit 75, configured to feed back address information corresponding to both the test environment identifier and the micro service identifier, if any, so as to test a test version of the micro service.
An embodiment of an electronic device of the present description is described below. Fig. 8 is a schematic diagram of a hardware configuration of the electronic apparatus in this embodiment. As shown in fig. 8, the electronic device may include one or more processors (only one of which is shown), memory, and a transmission module. Of course, it is understood by those skilled in the art that the hardware structure shown in fig. 8 is only an illustration, and does not limit the hardware structure of the electronic device. In practice the electronic device may also comprise more or fewer component elements than those shown in fig. 8; or have a different configuration than that shown in fig. 8.
The memory may comprise high speed random access memory; alternatively, non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory may also be included. Of course, the memory may also comprise a remotely located network memory. The memory may be used to store program instructions or modules of an application program, such as the program instructions or modules of the embodiments corresponding to fig. 1, fig. 2, or fig. 4 of this specification.
The processor may be implemented in any suitable way. For example, the processor may take the form of, for example, a microprocessor or processor and a computer-readable medium that stores computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, an embedded microcontroller, and so forth. The processor may read and execute the program instructions or modules in the memory.
The transmission module may be used for data transmission via a network, for example via a network such as the internet, an intranet, a local area network, a mobile communication network, etc.
This specification also provides one 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 (Cache), a Hard Disk (HDD), a Memory Card (Memory Card), and the like. The computer storage medium stores computer program instructions. The computer program instructions when executed implement: the program instructions or modules of the embodiments corresponding to fig. 1, fig. 2, or fig. 4 in this specification.
It should be noted that, in the present specification, each embodiment is described in a progressive manner, and the same or similar parts in each embodiment may be referred to each other, and each embodiment focuses on differences from other embodiments. In particular, as for the method embodiment (for example, the embodiment corresponding to fig. 1, fig. 2, or fig. 4), the apparatus embodiment, the electronic device embodiment, and the computer storage medium embodiment which are implemented on a single side, since they are substantially similar to the method embodiment, the description is relatively simple, and the relevant points can be referred to the partial description of the method embodiment. In addition, it is understood that one skilled in the art, after reading this specification document, may conceive of any combination of some or all of the embodiments listed in this specification without the need for inventive faculty, which combinations are also within the scope of the disclosure and protection of this specification.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Language Description Language), traffic, pl (core universal Programming Language), HDCal (jhdware Description Language), lang, Lola, HDL, laspam, hardward Description Language (vhr Language), and vhigh-Language (Hardware Description Language, which is currently used most commonly). It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, 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.
From the above description of the embodiments, it is clear to those skilled in the art that the present specification can be implemented by software plus a necessary general hardware platform. Based on such understanding, the technical solutions of the present specification may be essentially or partially implemented in the form of software products, which may be stored in a storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and include instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments of the present specification.
The description is operational with numerous general purpose or special purpose computing system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like.
This description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
While the specification has been described with examples, those skilled in the art will appreciate that there are numerous variations and permutations of the specification that do not depart from the spirit of the specification, and it is intended that the appended claims include such variations and modifications that do not depart from the spirit of the specification.

Claims (12)

1. A method of testing, comprising:
configuring a test environment identifier in an integrated development environment;
constructing a test request in the integrated development environment, wherein the test request comprises the test environment identification;
deploying a test version of a microservice developed in the integrated development environment;
registering the test environment identifier;
and sending the test request so as to test the test version of the microservice according to the test environment identification.
2. The method of claim 1, the deploying a test version of a microservice developed in the integrated development environment, comprising:
obtaining a source code of a test version of the microservice;
compiling the source code to obtain an executable file of a test version of the microservice;
and deploying the executable file on the micro service equipment.
3. The method of claim 1, said registering said test environment identification, comprising:
and correspondingly registering the test environment identifier and the address information of the test version of the microservice to a registration center.
4. The method of claim 1, further comprising:
receiving a test result;
and displaying the test result in the integrated development environment.
5. A method of testing, comprising:
obtaining a call request, wherein the call request comprises a test environment identifier;
responding to the calling request, and testing the deployed micro-service;
sending the test environment identifier and the micro-service identifier of the micro-service to be called to a registration center;
receiving address information fed back by a registration center;
and calling the micro service to be called according to the address information so as to test the micro service to be called.
6. The method of claim 5, the address information corresponding to a test version of the microservice to be invoked; the calling the micro service to be called according to the address information comprises the following steps: calling the test version of the micro service to be called according to the address information so as to test the test version of the micro service to be called;
or the address information corresponds to the public version of the micro service to be called; the calling the micro service to be called according to the address information comprises the following steps: and calling the public version of the micro service to be called according to the address information so as to test the public version of the micro service to be called.
7. A method of testing, comprising:
receiving a test environment identifier and a micro-service identifier;
searching whether address information corresponding to the test environment identifier and the micro-service identifier exists at the same time;
if the micro service exists, feeding back the address information corresponding to the test environment identifier and the micro service identifier at the same time so as to test the test version of the micro service.
8. The method of claim 7, further comprising:
if not, feeding back address information corresponding to the public environment identifier and the micro-service identifier at the same time so as to test the public version of the micro-service.
9. A test apparatus, comprising:
the configuration unit is used for configuring the test environment identifier in the integrated development environment;
the building unit is used for building a test request in the integrated development environment, wherein the test request comprises the test environment identifier;
the deployment unit is used for deploying the test version of the microservice developed in the integrated development environment;
the registration unit is used for registering the test environment identifier;
and the sending unit is used for sending the test request so as to test the test version of the microservice according to the test environment identifier.
10. A test apparatus, comprising:
the device comprises an obtaining unit, a processing unit and a processing unit, wherein the obtaining unit is used for obtaining a calling request which comprises a test environment identifier;
the test unit is used for responding to the calling request and testing the deployed micro-service;
the sending unit is used for sending the test environment identifier and the micro-service identifier of the micro-service to be called to a registration center;
the receiving unit is used for receiving the address information fed back by the registration center;
and the calling unit is used for calling the micro service to be called according to the address information so as to test the micro service to be called.
11. A test apparatus, comprising:
the receiving unit is used for receiving the test environment identifier and the micro-service identifier;
the searching unit is used for searching whether address information corresponding to the test environment identifier and the micro-service identifier exists at the same time;
and the feedback unit is used for feeding back address information simultaneously corresponding to the test environment identifier and the micro-service identifier if the micro-service identifier exists so as to test the test version of the micro-service.
12. An electronic device, comprising:
at least one processor;
a memory storing program instructions; wherein the program instructions are configured to be adapted to be executed by the at least one processor, the program instructions comprising instructions for performing the method of any one of claims 1-8.
CN202010603180.8A 2020-06-29 2020-06-29 Test method and device and electronic equipment Pending CN111782520A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010603180.8A CN111782520A (en) 2020-06-29 2020-06-29 Test method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010603180.8A CN111782520A (en) 2020-06-29 2020-06-29 Test method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN111782520A true CN111782520A (en) 2020-10-16

Family

ID=72760162

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010603180.8A Pending CN111782520A (en) 2020-06-29 2020-06-29 Test method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN111782520A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113360379A (en) * 2021-06-04 2021-09-07 上海哔哩哔哩科技有限公司 Program testing method and program testing device
CN113900925A (en) * 2021-09-06 2022-01-07 特赞(上海)信息科技有限公司 Test environment building and utilizing method, device, equipment and storage medium
CN115086412A (en) * 2021-03-16 2022-09-20 易保网络技术(上海)有限公司 Micro-service development method, system, computer equipment and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104731566A (en) * 2013-12-19 2015-06-24 华为软件技术有限公司 Testing device, method and system for IDE (Integrated Development Environment)
CN107438107A (en) * 2017-09-05 2017-12-05 深圳乐信软件技术有限公司 The call method and device of background service in a kind of micro services framework
CN108763090A (en) * 2018-05-31 2018-11-06 上海陆家嘴国际金融资产交易市场股份有限公司 Test environment dispositions method, device, computer equipment and storage medium
CN109828927A (en) * 2019-01-31 2019-05-31 北京三快在线科技有限公司 A kind of method, apparatus of integration testing, equipment and storage medium
CN111324538A (en) * 2020-02-20 2020-06-23 上海赛可出行科技服务有限公司 Micro-service parallel test environment management method based on dynamic routing

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104731566A (en) * 2013-12-19 2015-06-24 华为软件技术有限公司 Testing device, method and system for IDE (Integrated Development Environment)
CN107438107A (en) * 2017-09-05 2017-12-05 深圳乐信软件技术有限公司 The call method and device of background service in a kind of micro services framework
CN108763090A (en) * 2018-05-31 2018-11-06 上海陆家嘴国际金融资产交易市场股份有限公司 Test environment dispositions method, device, computer equipment and storage medium
CN109828927A (en) * 2019-01-31 2019-05-31 北京三快在线科技有限公司 A kind of method, apparatus of integration testing, equipment and storage medium
CN111324538A (en) * 2020-02-20 2020-06-23 上海赛可出行科技服务有限公司 Micro-service parallel test environment management method based on dynamic routing

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115086412A (en) * 2021-03-16 2022-09-20 易保网络技术(上海)有限公司 Micro-service development method, system, computer equipment and medium
WO2022193979A1 (en) * 2021-03-16 2022-09-22 易保网络技术(上海)有限公司 Microservice development method and system, and computer device and medium
CN113360379A (en) * 2021-06-04 2021-09-07 上海哔哩哔哩科技有限公司 Program testing method and program testing device
CN113900925A (en) * 2021-09-06 2022-01-07 特赞(上海)信息科技有限公司 Test environment building and utilizing method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN107979508B (en) Micro-service test method and device
CN111782519A (en) Test method and device and electronic equipment
CN107438107B (en) Method and device for calling background service in micro-service architecture
CN111782520A (en) Test method and device and electronic equipment
CN111090536B (en) Method, device, medium and electronic equipment for acquiring memory leakage information
CN109643252B (en) Middleware interface and middleware interface generator
CN110365724B (en) Task processing method and device and electronic equipment
CN107644075B (en) Method and device for collecting page information
CN111782518A (en) Test method and device and electronic equipment
CN108255509B (en) Application deployment method, device, equipment and readable storage medium
CN116257438A (en) Updating method of interface test case and related equipment
CN114328097A (en) File monitoring method and device, electronic equipment and storage medium
CN113987337A (en) Search method, system, equipment and storage medium based on componentized dynamic arrangement
CN113821249A (en) Project development configuration method and device, electronic equipment and readable storage medium
CN111158777A (en) Component calling method and device and computer readable storage medium
CN111414154A (en) Method and device for front-end development, electronic equipment and storage medium
US11669316B2 (en) Web-based customer service via single-class rebuild
CN113535544A (en) Running method of sub-application to be debugged, computer equipment and device
CN114510334A (en) Class instance calling method and device, electronic equipment and automatic driving vehicle
CN113704079A (en) Interface testing method and device based on Protobuf
Bisignano et al. An" intent-oriented" approach for multi-device user interface design
CN114245890A (en) Method and apparatus for providing function as a service platform
CN113032004A (en) Method, apparatus and program product for managing development jobs in a development environment
CN113297088B (en) Test method, test device, electronic equipment and storage medium
CN110704295A (en) Data calling method, device, equipment and system

Legal Events

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