CN115098359A - Project research and development test method, device, equipment, storage medium and program product - Google Patents

Project research and development test method, device, equipment, storage medium and program product Download PDF

Info

Publication number
CN115098359A
CN115098359A CN202210613614.1A CN202210613614A CN115098359A CN 115098359 A CN115098359 A CN 115098359A CN 202210613614 A CN202210613614 A CN 202210613614A CN 115098359 A CN115098359 A CN 115098359A
Authority
CN
China
Prior art keywords
version
micro
microservice
baseline
environment
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
CN202210613614.1A
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.)
Zhongke Shuguang International Information Industry Co ltd
Original Assignee
Zhongke Shuguang International Information Industry Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhongke Shuguang International Information Industry Co ltd filed Critical Zhongke Shuguang International Information Industry Co ltd
Priority to CN202210613614.1A priority Critical patent/CN115098359A/en
Publication of CN115098359A publication Critical patent/CN115098359A/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

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 application relates to a project research and development testing method, a device, equipment, a storage medium and a program product, and belongs to the technical field of information networks. The method comprises the following steps: in the process of building a test environment of a target software project, a target container is built in a baseline micro-service environment, and micro-services of a first version are deployed in the target container, wherein the baseline micro-service environment comprises a plurality of micro-services of second versions, the micro-services of the second versions are respectively deployed in different containers, and the micro-services of the first version are obtained by changing the micro-services of the second version in the baseline micro-service environment for the target software project; the first version of the microservice is used for being called by the second version of the microservice in the baseline microservice environment when the target software project is tested, and is used for calling the second version of the microservice. By adopting the method, the micro-services can be containerized, the unmodified micro-services achieve high reusability, and the waste of testing environment resources is reduced.

Description

Project research and development test method, device, equipment, storage medium and program product
Technical Field
The present application relates to the field of information network technologies, and in particular, to a method, an apparatus, a device, a storage medium, and a program product for project research and development testing.
Background
Micro-service architectures have become a popular architecture in internet services at present, each micro-service architecture includes a plurality of micro-services, such as micro-services including a payment service, an order service, and a user service, each micro-service implements a function, for example, the payment service implements a payment-related function, the order service implements an order-related function, and the user service manages users. According to the practical requirements of the micro-service architecture, there are situations where part of the micro-services in the micro-service architecture are updated.
In the prior art, when a part of micro services are updated, a whole set of research and development test environment is usually required to be built for research and development tests on the updated part of micro services, wherein the whole set of research and development test environment includes all the micro services in a micro service architecture. For example, if the payment service needs to be updated for 100 micro services including the payment service in the micro service architecture, a whole set of research and development test environment including 100 micro services is set up for research and development test on the updated payment service.
However, only part of the microservices are updated, and a whole set of research and development test environment is set up, which causes great resource waste.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a project development testing method, apparatus, device, storage medium, and program product.
In a first aspect, the present application provides a project development testing method, including: in the process of building a test environment of a target software project, a target container is created in a baseline microservice environment, and microservices of a first version are deployed in the target container, wherein the baseline microservice environment comprises a plurality of microservices of a second version, the microservices of the second version are respectively deployed in different containers, and the microservices of the first version are obtained by changing the microservices of the second version in the baseline microservice environment by the target software project; the first version of the microservice is used for being called by the second version of the microservice in the baseline microservice environment when the target software project is tested, and is used for calling the second version of the microservice in the baseline microservice environment.
In the embodiment, for different software projects, the test environment of the software project can be built together based on the baseline microservice environment and the changed microservices corresponding to the software projects, so that compared with the prior art that a whole set of test environment needs to be built for each software project, in the process of building the test environment of the software project, the microservices are containerized, unmodified microservices achieve high reusability, and waste of test environment resources is reduced.
In one embodiment, the method further comprises: when a target software project is tested, if the micro service of the second version in the baseline micro service environment needs to be called, whether the called micro service has the first version corresponding to the target software project is detected, if yes, the micro service of the first version is called, and if not, the micro service of the second version is called.
In this embodiment, if not, the microservice of the second version is called, so that high reusability of the microservice of the second version is realized.
In one embodiment, detecting whether the called micro-service has a first version corresponding to the target item of software comprises: and inquiring the test configuration file, and determining whether the called micro service has a first version corresponding to the target software project according to the test configuration file.
In this embodiment, determining whether the first version of the invoked microservice exists may be accomplished by querying a configuration file.
In one embodiment, the method further comprises: and writing version change information into the test configuration file in the process of building the test environment of the target software project, wherein the version change information is used for indicating the micro-service changed into the first version.
In this embodiment, the version change information is written to the test configuration file to indicate whether the first version of the microservice exists.
In one embodiment, detecting whether the called micro service has a first version corresponding to the target software project, if so, calling the micro service of the first version, and if not, calling the micro service of the second version, including: if so, generating a first message with a version label, and storing the first message into a message queue, wherein the first message is used for the micro service consumption of the first version; and if not, generating a second message without the version label, and storing the second message into a message queue, wherein the second message is used for the micro service consumption of the second version.
In this embodiment, when the micro service architecture uses the message queue, the message producer and the message consumer are controlled by the framework layer, and the message producer generates a message with or without a version tag, and the corresponding message consumer consumes the corresponding message, thereby realizing isolation between software items and isolation between the software items and the baseline micro service environment, and realizing high reusability of the baseline micro service environment.
In one embodiment, the method further comprises: receiving a test request input by a user on a front-end page, wherein the test request carries an item tag, and the item tag is used for indicating that the test request is a request for testing a target software item; and transmitting the test request to the baseline microservice environment with the target container, so as to carry out microservice calling according to the test request in the baseline microservice environment with the target container.
In the embodiment, the test request of the user is received, so that the micro-service call is performed according to the test request, and the test of the target software item is realized.
In one embodiment, the method further comprises: and creating a first container, deploying a first database corresponding to the micro service of the first version in the first container, wherein the first database is used for performing data adding, deleting, modifying and checking operations on the micro service of the first version.
In the embodiment, a separate container is deployed to carry the first database, so that the operations of adding, deleting, modifying and checking data on the first version of the microservice are realized.
In one embodiment, the method further comprises: and after receiving an instruction for performing online operation on the micro service of the first version, merging the first database into a baseline database of the baseline micro service environment.
In this embodiment, the database corresponding to the online first version of the microservice is merged into the baseline database to implement merging of the database data.
In a second aspect, the present application further provides a project research and development testing apparatus, comprising: the system comprises a first establishing module, a second establishing module and a third establishing module, wherein the first establishing module is used for establishing a target container in a baseline micro-service environment in the process of establishing a test environment of a target software project, and deploying micro-services of a first version in the target container, the baseline micro-service environment comprises a plurality of micro-services of second versions, the micro-services of the second versions are respectively deployed in different containers, and the micro-services of the first version are obtained by changing the micro-services of the second versions in the baseline micro-service environment for the target software project; the first version of the microservice is used for being called by the second version of the microservice in the baseline microservice environment when the target software project is tested, and is used for calling the second version of the microservice in the baseline microservice environment.
In one embodiment, the apparatus further comprises: the calling module is used for detecting whether the called micro service has a first version corresponding to the target software project or not when the micro service of the second version in the baseline micro service environment needs to be called when the target software project is tested, calling the micro service of the first version if the called micro service has the first version corresponding to the target software project, and calling the micro service of the second version if the called micro service does not have the first version.
In one embodiment, the calling module is specifically configured to: and inquiring the test configuration file, and determining whether the called micro service has a first version corresponding to the target software project or not according to the test configuration file.
In one embodiment, the apparatus further comprises: and the information writing module is used for writing the version change information into the test configuration file in the process of building the test environment of the target software project, wherein the version change information is used for indicating the micro service changed into the first version.
In one embodiment, the calling module is specifically configured to: if so, generating a first message with a version label, and storing the first message into a message queue, wherein the first message is used for the micro service consumption of the first version; and if not, generating a second message without the version label, and storing the second message into a message queue, wherein the second message is used for the micro service consumption of the second version.
In one embodiment, the apparatus further comprises: the system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving a test request input by a user on a front-end page, the test request carries an item tag, and the item tag is used for indicating that the test request is a request for testing a target software item; and the sending module is used for transmitting the test request to the baseline microservice environment with the target container, so as to carry out microservice calling according to the test request in the baseline microservice environment with the target container.
In one embodiment, the apparatus further comprises: and the second creating module is used for creating a first container, deploying a first database corresponding to the micro service of the first version in the first container, and enabling the first database to be used for performing data adding, deleting, modifying and checking operations on the micro service of the first version.
In one embodiment, the apparatus further comprises: and the merging module is used for merging the first database into the baseline database of the baseline microservice environment after receiving an instruction for performing online operation on the microservice of the first version.
In a third aspect, the present application further provides a computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the steps of the method according to any one of the first aspect when executing the computer program.
In a fourth aspect, the present application also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of any of the first aspects described above.
In a fifth aspect, the present application further provides a computer program product. The computer program product comprising a computer program which, when executed by a processor, performs the steps of the method of any of the first aspects described above.
The beneficial effects brought by the technical scheme provided by the embodiment of the application at least comprise:
in the embodiment of the application, based on a pre-established baseline microservice environment, the baseline microservice environment comprises a plurality of microservices of second versions, when part of the microservices of the second versions are changed, the microservices of the first versions obtained after the change are deployed in a created target container, the microservices of the first versions and microservices of the baseline microservice environment except the part of the microservices of the second versions are jointly used as a test environment of a target software item, wherein the microservices of the first versions are used for being called by the microservices of the second versions in the baseline microservice environment and for calling the microservices of the second versions in the baseline microservice environment when the target software item is tested, so that for different software items, the test environment of the software item can be jointly established based on the baseline microservice environment and the changed microservices corresponding to the software item, therefore, compared with the prior art that a whole set of test environment needs to be built for each software project, in the process of building the test environment of the software project, the micro-service is containerized, so that the unmodified micro-service achieves high reusability, and the waste of test environment resources is reduced.
Drawings
FIG. 1 is a schematic diagram of an implementation environment provided by an embodiment of the present application;
FIG. 2 is a schematic diagram of a baseline microservice environment provided by an embodiment of the present application;
FIG. 3 is a diagram illustrating consumption of information using a message queue according to an embodiment of the present application;
FIG. 4 is a flowchart of a technical process for performing a micro service invocation according to a test request according to an embodiment of the present application;
fig. 5 is a schematic diagram of test message transmission according to an embodiment of the present application;
FIG. 6 is a block diagram of a project development testing apparatus according to an embodiment of the present disclosure;
fig. 7 is an internal structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
Micro-service architectures have become a popular architecture in internet services at present, each micro-service architecture includes a plurality of micro-services, such as micro-services including a payment service, an order service, and a user service, each micro-service implements a function, for example, the payment service implements a payment-related function, the order service implements an order-related function, and the user service manages users. According to the practical requirements of the micro-service architecture, there are situations where part of the micro-services in the micro-service architecture are updated.
In the prior art, when a part of micro services are updated, a whole set of research and development test environment is usually required to be built for research and development tests on the updated part of micro services, wherein the whole set of research and development test environment includes all the micro services in a micro service architecture. For example, if the payment service needs to be updated for 100 micro services including the payment service in the micro service architecture, a whole set of research and development test environment including 100 micro services is set up for research and development test on the updated payment service.
However, only part of the microservices are updated, and a whole set of research and development test environment is set up, which causes great resource waste.
In view of this, embodiments of the present application provide a method, an apparatus, a device, a storage medium, and a program product for project research and development testing, by which micro services can be containerized, so that unmodified micro services achieve high reusability, and waste of testing environment resources is reduced.
Please refer to fig. 1, which illustrates a schematic diagram of an implementation environment related to a project development test method provided in an embodiment of the present application. As shown in fig. 1, an execution main body of the project research and development test method provided in the embodiment of the present application may be one computer device, or may be a computer device cluster composed of multiple computer devices. Different computer devices can communicate with each other in a wired or wireless manner, and the wireless manner can be realized through WIFI, an operator network, NFC (near field communication) or other technologies.
In one embodiment of the present application, a project development testing method is provided, and the project development testing method may be applied to the computer device in fig. 1. The project development testing method can comprise the following steps:
in the process of building a test environment of a target software project, a target container is built in a baseline microservice environment, and microservices of a first version are deployed in the target container, wherein the baseline microservice environment comprises a plurality of microservices of second versions, the microservices of the second versions are respectively deployed in different containers, and the microservices of the first version are obtained by changing the microservices of the second version in the baseline microservice environment for the target software project. The micro-service of the first version is used for being called by the micro-service of the second version in the baseline micro-service environment when the target software project is tested, and is used for calling the micro-service of the second version in the baseline micro-service environment.
For example, as shown in fig. 2, the baseline microservice environment includes n microservices, the n microservices are deployed in different containers, as shown in fig. 2, the microservice 1 is deployed in the container 1, the microservice n is deployed in the container n, the microservice 3 is changed in the software project 1 to obtain the microservice 3-1, and the microservice 3-1 is deployed in the container 3-1 in the baseline microservice environment, so that the microservice 1, the microservice 2, the microservice 3-1, and the microservice 4 to the microservice n constitute the test environment of the software project 1. Therefore, on the basis of a baseline micro-service environment, the test environment of the software project 1 can be formed by only creating one container 3-1 for deploying the micro-service 3-1, so that the unmodified micro-service achieves high reusability, and the waste of test environment resources is reduced.
In the embodiment of the application, based on a pre-established baseline microservice environment, where the baseline microservice environment includes a plurality of microservices of a second version, when part of the microservices of the second version are modified, the microservices of the first version obtained after modification are deployed in a created target container, and the microservices of the first version and microservices of the baseline microservice environment except the part of the microservices of the second version are used together as a test environment of a target software item, where the microservices of the first version are used for being called by the microservices of the second version in the baseline microservice environment and for calling the microservices of the second version in the baseline microservice environment when the target software item is tested, so that for different software items, a test environment of the software item can be built together based on the baseline microservice environment and the modified microservices corresponding to the software item, therefore, compared with the prior art that a whole set of test environment needs to be built for each software project, in the process of building the test environment of the software project, the micro-service is containerized, so that the unmodified micro-service achieves high reusability, and the waste of test environment resources is reduced.
In one embodiment of the present application, a project development testing method is provided, which can be applied to the computer device in fig. 1. The project development testing method can comprise the following steps:
when a target software project is tested, if the micro service of the second version in the baseline micro service environment needs to be called, whether the called micro service has the first version corresponding to the target software project is detected, if yes, the micro service of the first version is called, and if not, the micro service of the second version is called.
The method for detecting whether the called micro service has the first version corresponding to the target software project includes the following steps: and inquiring the test configuration file, and determining whether the called micro service has a first version corresponding to the target software project according to the test configuration file.
The test configuration file may include information such as an item tag corresponding to the target software item, a version tag of the first version, and a log corresponding to the target software item. Optionally, the item tag and the version tag may be the same or different, and this is not limited in this embodiment of the application.
Optionally, in the process of building a test environment of the target software project, the computer device may write version change information into the test configuration file, where the version change information is used to indicate to change to the first version of the microservice, and optionally, the version change information may include information such as a project tag corresponding to the target software project, a version tag of the first version, and a log corresponding to the target software project.
Examples are test profiles such as: the item label corresponding to the target software item is tag-1, and the version label of the first version of microservice 3-1 corresponding to the target software item is also tag-1. In this case, querying the test configuration file may query that there is a first version of microservice 3-1 with a version tag of tag-1, and at this time, invoke the first version of microservice. And if the test configuration file is inquired and the called micro service is determined to have no first version, calling the micro service of the second version.
As described above, when testing the software item 1, if the second version microservice 2 in the baseline microservice environment needs to call the microservice 3, it is detected whether the microservice 3 has the first version corresponding to the software item 1, where the first version of the microservice 3 is obtained by modifying the second version microservice 3 and performing reverse running, and the first version microservice 3-1 corresponding to the software item 1 is detected to exist in the second version microservice 3, and at this time, the second version microservice 2 calls the first version microservice 3-1 instead of calling the second version microservice 3.
Optionally, the calling between the micro services needs to be processed through a framework layer of a micro service architecture, the framework layer creates an exclusive item tag for each software project through a registration center, correspondingly, a version tag of the micro service of the first version corresponding to the software project is created at the same time, the item tag and the version tag are in a corresponding relationship, and the micro service corresponding to which software project belongs can be identified through the version tag. The registry is a service registration discovery mechanism used in the micro-service architecture.
As for the above example, as shown in fig. 2, when testing the software item 1, if the second version microservice 3 in the baseline microservice environment needs to invoke the microservice 4, it is detected whether the microservice 4 has the first version corresponding to the software item 1, and if it is detected that the first version changed by the microservice 4 does not exist, then the second version microservice 3 needs to invoke the second version microservice 4, so that high reusability of the baseline microservice environment is achieved.
In one embodiment of the present application, in a case that a message queue is used in a microservice architecture, a message producer and a message consumer may be controlled through a framework layer, the message producer generates a message with a version tag or without the version tag, and the corresponding message consumer consumes a corresponding message, optionally, the message queue may be used between invocations of microservices, optionally, whether a first version corresponding to a target software item exists in the invoked microservices is detected, if yes, the microservices of the first version are invoked, and if not, the microservices of a second version are invoked, which may include:
if so, generating a first message with a version label, and storing the first message into a message queue, wherein the first message is used for the micro service consumption of the first version; and if not, generating a second message without the version label, and storing the second message into a message queue, wherein the second message is used for the micro service consumption of the second version.
Optionally, if the called micro service has a first version corresponding to the target software project, a first message with a version tag is generated and stored in a message queue, where the first message is used for the micro service consumption of the first version. As shown in fig. 3, as in the above example, the message producer microserver 2 invokes the message consumer microserver 3, and if the invoked microserver 3 has the first version microserver 3-1 corresponding to the software item 1, a first message with the version tag-1 is generated and stored in the message queue for consumption by the microserver 3-1.
Optionally, if the called micro service does not have the first version corresponding to the target software project, a second message without the version tag is generated and stored in the message queue, where the second message is used for the consumption of the micro service of the second version. As shown in fig. 3, as in the above example, the microservice 3-1 calls the microservice 4, and if the called microservice 4 does not have the first version corresponding to the software item 1, a second message without the version tag is generated and stored in the message queue for consumption by the microservice 4.
In the embodiment of the application, under the condition that the message queue is used in the micro-service architecture, the message producer and the message consumer are controlled through the framework layer, the message producer generates the message with or without the version label, and the corresponding message consumer consumes the corresponding message, so that the isolation between software projects and between the software projects and the baseline micro-service environment is realized, and the high reusability of the baseline micro-service environment is realized.
Please refer to fig. 4, which illustrates a technical process of performing a microservice call according to a test request according to an embodiment of the present application. As shown in fig. 4, the technical process may include the following steps:
step 401, a computer device receives a test request input by a user on a front-end page, where the test request carries an item tag, and the item tag is used to indicate that the test request is a request for testing a target software item.
Optionally, after receiving a test request input by a user on a front-end page, the front-end framework of the micro-service framework may mark an item tag of an item corresponding to the test request, where the test request carries the item tag.
Step 402, the computer device transmits the test request to the baseline microservice environment with the target container, so as to perform microservice calling according to the test request in the baseline microservice environment with the target container.
As shown in fig. 5, a user inputs a test request into a front-end page, after the front-end page receives the test request, a front-end framework of the micro service framework will mark an item tag of an item corresponding to the test request, and then output the test request carrying the item tag into a baseline micro service environment in which a target container is created.
Optionally, a first database may be separately created for the first version of the micro service, and a first container may be created and deployed in the first container, where the first database is used for performing data add-delete-modify-check operations on the first version of the micro service. Optionally, after receiving the instruction for performing online operation on the micro service of the first version, the micro service of the second version corresponding to the micro service of the first version may be replaced by the micro service of the first version, and the first database may be merged into the baseline database of the baseline micro service environment.
As for the above example, after receiving the instruction of performing online operation on the first version of the microservice 3-1, the microservice 3 of the first version is replaced by the microservice 3-1 of the first version, and the database corresponding to the microservice 3-1 is merged into the baseline database.
In the embodiment of the application, by setting up a set of baseline micro-service environment, micro-services after each software project is changed can be independently deployed in a container, calling among the micro-services is realized through a framework layer of a micro-service framework, and isolation among the software projects and the baseline micro-service environment are realized through a message queue, so that high reusability of the baseline micro-service environment is realized, resources required by research and development of the test environment are greatly reduced, and repeatability of setting up the research and development of the test environment is reduced.
It should be understood that, although the steps in the flowcharts related to the embodiments as described above are sequentially displayed as indicated by arrows, the steps are not necessarily performed sequentially as indicated by the arrows. The steps are not performed in a strict order unless explicitly stated herein, and may be performed in other orders. Moreover, at least a part of the steps in the flowcharts according to the embodiments described above may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the steps or stages is not necessarily sequential, but may be performed alternately or alternately with other steps or at least a part of the steps or stages in other steps.
Referring to fig. 6, a block diagram of a project development testing apparatus 600 provided in an embodiment of the present application is shown, where the project development testing apparatus may be configured in the computer device. As shown in fig. 6, the project research and development testing apparatus 600 includes a first creating module 601, a calling module 602, an information writing module 603, a receiving module 604, a sending module 605, a second creating module 606, and a merging module 607.
The first creating module 601 is configured to create a target container in a baseline microservice environment and deploy microservices of a first version in the target container in a process of building a test environment of a target software project, where the baseline microservice environment includes a plurality of microservices of second versions, each microservice of the second versions is respectively deployed in different containers, and the microservices of the first version are obtained by modifying microservices of the second version in the baseline microservice environment for the target software project; the first version of the microservice is used for being called by the second version of the microservice in the baseline microservice environment when the target software project is tested, and is used for calling the second version of the microservice in the baseline microservice environment.
In one embodiment, the invoking module 602 is configured to, when a target software project is tested, detect whether a first version of a invoked microservice corresponding to the target software project exists if the microservice of a second version in the baseline microservice environment needs to be invoked, invoke the microservice of the first version if the first version of the invoked microservice exists, and invoke the microservice of the second version if the first version of the invoked microservice does not exist.
In one embodiment, the invoking module 602 is specifically configured to: and inquiring the test configuration file, and determining whether the called micro service has a first version corresponding to the target software project according to the test configuration file.
In one embodiment, the information writing module 603 is configured to write version change information into the test configuration file during the process of building the test environment of the target software project, where the version change information is used to indicate a microservice changed to a first version.
In one embodiment, the invoking module 602 is specifically configured to: if so, generating a first message with a version label, and storing the first message into a message queue, wherein the first message is used for the micro service consumption of the first version; and if not, generating a second message without the version label, and storing the second message into a message queue, wherein the second message is used for the micro service consumption of the second version.
In one embodiment, the receiving module 604 is configured to receive a test request input by a user on a front-end page, where the test request carries an item tag, and the item tag is used to indicate that the test request is a request for testing a target software item; a sending module 605, configured to transmit the test request to the baseline microservice environment created with the target container, so as to perform microservice call according to the test request in the baseline microservice environment created with the target container.
In one embodiment, the second creating module 606 is configured to create a first container, and deploy a first database corresponding to the first version of the micro service in the first container, where the first database is used for performing data incremental and destructive checking operations on the first version of the micro service.
In one embodiment, the merging module 607 is configured to merge the first database into the baseline database of the baseline microservice environment after receiving the instruction to perform online operation on the first version of the microservice.
The embodiment of the application provides a project research and development testing device, which can realize the method embodiment, and the realization principle and the technical effect are similar, and are not repeated herein.
All or part of each module in the above-mentioned project development test device can be realized by software, hardware and their combination. The modules can be embedded in a hardware form or independent from a processor in the computer device, or can be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, the internal structure of which may be as shown in FIG. 7. The computer device comprises a processor, a memory, a communication interface, a display screen and an input device which are connected through a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program to run in the non-volatile storage medium. The communication interface of the computer device is used for communicating with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a project development testing method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 7 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment of the application, there is provided a computer device comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program implementing the steps of: in the process of building a test environment of a target software project, a target container is built in a baseline micro-service environment, and micro-services of a first version are deployed in the target container, wherein the baseline micro-service environment comprises a plurality of micro-services of second versions, the micro-services of the second versions are respectively deployed in different containers, and the micro-services of the first version are obtained by changing the micro-services of the second version in the baseline micro-service environment for the target software project; the first version of the microservice is used for being called by the second version of the microservice in the baseline microservice environment when the target software project is tested, and is used for calling the second version of the microservice in the baseline microservice environment.
In one embodiment of the application, the processor when executing the computer program further performs the steps of: when a target software project is tested, if the micro service of the second version in the baseline micro service environment needs to be called, whether the called micro service has the first version corresponding to the target software project is detected, if yes, the micro service of the first version is called, and if not, the micro service of the second version is called.
In one embodiment of the application, the processor when executing the computer program further performs the steps of: and inquiring the test configuration file, and determining whether the called micro service has a first version corresponding to the target software project according to the test configuration file.
In one embodiment of the application, the processor when executing the computer program further performs the steps of: and writing version change information into the test configuration file in the process of building the test environment of the target software project, wherein the version change information is used for indicating the micro-service changed into the first version.
In one embodiment of the application, the processor when executing the computer program further performs the steps of: if so, generating a first message with a version label, and storing the first message into a message queue, wherein the first message is used for the micro service consumption of the first version; and if not, generating a second message without the version label, and storing the second message into a message queue, wherein the second message is used for the micro service consumption of the second version.
In one embodiment of the application, the processor when executing the computer program further performs the steps of: receiving a test request input by a user on a front-end page, wherein the test request carries an item tag, and the item tag is used for indicating that the test request is a request for testing a target software item; and transmitting the test request to the baseline microservice environment with the target container, so as to carry out microservice calling according to the test request in the baseline microservice environment with the target container.
In one embodiment of the application, the processor when executing the computer program further performs the steps of: and creating a first container, deploying a first database corresponding to the micro service of the first version in the first container, wherein the first database is used for performing data adding, deleting, modifying and checking operations on the micro service of the first version.
In one embodiment of the application, the processor when executing the computer program further performs the steps of: and after receiving an instruction for performing online operation on the micro service of the first version, merging the first database into a baseline database of the baseline micro service environment.
The implementation principle and technical effect of the computer device provided in the embodiment of the present application are similar to those of the method embodiment described above, and are not described herein again.
In an embodiment of the application, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of: in the process of building a test environment of a target software project, a target container is created in a baseline microservice environment, and microservices of a first version are deployed in the target container, wherein the baseline microservice environment comprises a plurality of microservices of a second version, the microservices of the second version are respectively deployed in different containers, and the microservices of the first version are obtained by changing the microservices of the second version in the baseline microservice environment by the target software project; the micro-service of the first version is used for being called by the micro-service of the second version in the baseline micro-service environment when the target software project is tested, and is used for calling the micro-service of the second version in the baseline micro-service environment.
In one embodiment of the application, the computer program when executed by the processor performs the steps of: when a target software project is tested, if the micro service of the second version in the baseline micro service environment needs to be called, whether the called micro service has the first version corresponding to the target software project is detected, if yes, the micro service of the first version is called, and if not, the micro service of the second version is called.
In one embodiment of the application, the computer program when executed by the processor performs the steps of: and inquiring the test configuration file, and determining whether the called micro service has a first version corresponding to the target software project according to the test configuration file.
In one embodiment of the application, the computer program when executed by the processor performs the steps of: and writing version change information into the test configuration file in the process of building the test environment of the target software project, wherein the version change information is used for indicating the micro-service changed into the first version.
In one embodiment of the application, the computer program when executed by the processor performs the steps of: if so, generating a first message with a version label, and storing the first message into a message queue, wherein the first message is used for the micro service consumption of the first version; and if not, generating a second message without the version label, and storing the second message into a message queue, wherein the second message is used for the micro service consumption of the second version.
In one embodiment of the application, the computer program when executed by the processor performs the steps of: receiving a test request input by a user on a front-end page, wherein the test request carries an item tag, and the item tag is used for indicating that the test request is a request for testing a target software item; and transmitting the test request to the baseline microservice environment with the target container, so as to carry out microservice calling according to the test request in the baseline microservice environment with the target container.
In one embodiment of the application, the computer program when executed by the processor performs the steps of: and creating a first container, deploying a first database corresponding to the micro service of the first version in the first container, wherein the first database is used for performing data adding, deleting, modifying and checking operations on the micro service of the first version.
In one embodiment of the application, the computer program when executed by a processor performs the steps of: and after receiving an instruction for performing online operation on the micro service of the first version, merging the first database into a baseline database of the baseline micro service environment.
The implementation principle and technical effect of the computer-readable storage medium provided by this embodiment are similar to those of the above-described method embodiment, and are not described herein again.
In an embodiment of the application, a computer program product is provided, comprising a computer program which when executed by a processor performs the steps of: in the process of building a test environment of a target software project, a target container is built in a baseline micro-service environment, and micro-services of a first version are deployed in the target container, wherein the baseline micro-service environment comprises a plurality of micro-services of second versions, the micro-services of the second versions are respectively deployed in different containers, and the micro-services of the first version are obtained by changing the micro-services of the second version in the baseline micro-service environment for the target software project; the first version of the microservice is used for being called by the second version of the microservice in the baseline microservice environment when the target software project is tested, and is used for calling the second version of the microservice in the baseline microservice environment.
In one embodiment of the application, the computer program when executed by a processor performs the steps of: when a target software project is tested, if the micro service of the second version in the baseline micro service environment needs to be called, whether the called micro service has the first version corresponding to the target software project is detected, if yes, the micro service of the first version is called, and if not, the micro service of the second version is called.
In one embodiment of the application, the computer program when executed by a processor performs the steps of: and inquiring the test configuration file, and determining whether the called micro service has a first version corresponding to the target software project according to the test configuration file.
In one embodiment of the application, the computer program when executed by the processor performs the steps of: and writing version change information into the test configuration file in the process of building the test environment of the target software project, wherein the version change information is used for indicating the micro-service changed into the first version.
In one embodiment of the application, the computer program when executed by the processor performs the steps of: if so, generating a first message with a version label, and storing the first message into a message queue, wherein the first message is used for the micro service consumption of the first version; and if not, generating a second message without the version label, and storing the second message into a message queue, wherein the second message is used for the micro service consumption of the second version.
In one embodiment of the application, the computer program when executed by the processor performs the steps of: receiving a test request input by a user on a front-end page, wherein the test request carries an item tag, and the item tag is used for indicating that the test request is a request for testing a target software item; and transmitting the test request to the baseline microservice environment with the target container, so as to carry out microservice calling according to the test request in the baseline microservice environment with the target container.
In one embodiment of the application, the computer program when executed by the processor performs the steps of: and creating a first container, deploying a first database corresponding to the micro service of the first version in the first container, wherein the first database is used for carrying out data adding, deleting, modifying and checking operations on the micro service of the first version.
In one embodiment of the application, the computer program when executed by the processor performs the steps of: and after receiving an instruction for performing online operation on the micro service of the first version, merging the first database into a baseline database of the baseline micro service environment.
The implementation principle and technical effect of the computer program product provided by this embodiment are similar to those of the above method embodiments, and are not described herein again.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above may be implemented by hardware instructions of a computer program, which may be stored in a non-volatile computer-readable storage medium, and when executed, may include the processes of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include a Read-Only Memory (ROM), a magnetic tape, a floppy disk, a flash Memory, an optical Memory, a high-density embedded nonvolatile Memory, a resistive Random Access Memory (ReRAM), a Magnetic Random Access Memory (MRAM), a Ferroelectric Random Access Memory (FRAM), a Phase Change Memory (PCM), a graphene Memory, and the like. Volatile Memory can include Random Access Memory (RAM), external cache Memory, and the like. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others. The databases referred to in various embodiments provided herein may include at least one of relational and non-relational databases. The non-relational database may include, but is not limited to, a block chain based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, quantum computing based data processing logic devices, etc., without limitation.
All possible combinations of the technical features in the above embodiments may not be described for the sake of brevity, but should be considered as being within the scope of the present disclosure as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims (10)

1. A project development testing method, the method comprising:
in the process of building a test environment of a target software project, creating a target container in a baseline microservice environment, and deploying microservices of a first version in the target container, wherein the baseline microservice environment comprises a plurality of microservices of a second version, each microservice of the second version is respectively deployed in different containers, and the microservices of the first version are obtained by changing the microservices of the second version in the baseline microservice environment by the target software project;
the first version of the microservice is used for being called by the second version of the microservice in the baseline microservice environment when the target software project is tested, and is used for calling the second version of the microservice in the baseline microservice environment.
2. The method of claim 1, further comprising:
when the target software project is tested, if the micro service of the second version in the baseline micro service environment needs to be called, whether the called micro service has the first version corresponding to the target software project is detected, if yes, the micro service of the first version is called, and if not, the micro service of the second version is called.
3. The method of claim 2, wherein if so, invoking the first version of the microservice, and if not, invoking the second version of the microservice, comprises:
if so, generating a first message with a version label, and storing the first message into a message queue, wherein the first message is used for the micro service consumption of the first version;
if not, generating a second message without the version label, and storing the second message into the message queue, wherein the second message is used for the micro service consumption of a second version.
4. A method according to any of claims 2 to 3, characterized in that the method further comprises:
receiving a test request input by a user on a front-end page, wherein the test request carries an item tag, and the item tag is used for indicating that the test request is a request for testing the target software item;
and transmitting the test request to the baseline micro-service environment created with the target container so as to carry out micro-service calling according to the test request in the baseline micro-service environment created with the target container.
5. The method of any of claims 1 to 3, further comprising:
creating a first container, and deploying a first database corresponding to the micro service of the first version in the first container, wherein the first database is used for performing data adding, deleting, modifying and checking operations on the micro service of the first version.
6. The method of claim 5, further comprising:
and after receiving an instruction for performing online operation on the first version of the microservice, merging the first database into a baseline database of the baseline microservice environment.
7. A project development test apparatus, the apparatus comprising:
the system comprises a first creating module, a second creating module and a third creating module, wherein the first creating module is used for creating a target container in a baseline micro-service environment and deploying micro-services of a first version in the target container in the process of building a test environment of a target software project, the baseline micro-service environment comprises a plurality of micro-services of a second version, the micro-services of the second version are respectively deployed in different containers, and the micro-services of the first version are obtained by changing the micro-services of the second version in the baseline micro-service environment by the target software project;
the first version of the microservice is used for being called by the second version of the microservice in the baseline microservice environment when the target software project is tested, and is used for calling the second version of the microservice in the baseline microservice environment.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 6.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program realizes the steps of the method of any one of claims 1 to 6 when executed by a processor.
CN202210613614.1A 2022-05-31 2022-05-31 Project research and development test method, device, equipment, storage medium and program product Pending CN115098359A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210613614.1A CN115098359A (en) 2022-05-31 2022-05-31 Project research and development test method, device, equipment, storage medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210613614.1A CN115098359A (en) 2022-05-31 2022-05-31 Project research and development test method, device, equipment, storage medium and program product

Publications (1)

Publication Number Publication Date
CN115098359A true CN115098359A (en) 2022-09-23

Family

ID=83289108

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210613614.1A Pending CN115098359A (en) 2022-05-31 2022-05-31 Project research and development test method, device, equipment, storage medium and program product

Country Status (1)

Country Link
CN (1) CN115098359A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115858013A (en) * 2023-02-27 2023-03-28 厦门立林科技有限公司 Resource allocation method, system, device and medium for parallel multiple research and development projects

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115858013A (en) * 2023-02-27 2023-03-28 厦门立林科技有限公司 Resource allocation method, system, device and medium for parallel multiple research and development projects

Similar Documents

Publication Publication Date Title
US7565451B2 (en) Adaptive dispatch of received messages to code using inter-positioned message modification
CN111190586A (en) Software development framework building and using method, computing device and storage medium
CN107203419A (en) Intermodule call method, apparatus and system in application program
JP2017514218A (en) Running third-party applications
CN112787999B (en) Cross-chain calling method, device, system and computer readable storage medium
US20170192805A1 (en) Virtualizing integrated calls to provide access to resources in a virtual namespace
CN109857489B (en) Development system based on Android system, decoupling method and device
CN114401187B (en) Gray scale issuing method, device, computer equipment and storage medium
CN115098359A (en) Project research and development test method, device, equipment, storage medium and program product
CN116541336A (en) Software running method of multi-core chip and coprocessor
US20120137044A1 (en) Method and apparatus for providing persistent computations
CN114756293A (en) Service processing method, device, computer equipment and storage medium
CN112506781B (en) Test monitoring method, device, electronic equipment, storage medium and program product
CN112764729B (en) Application software development method, device, computer equipment and readable storage medium
CN113835790B (en) Paging page display method and device based on Android
Priyankasingh et al. Deployment and Serving ML Models Using Kubeflow and KfServing
US7624141B2 (en) Deterministic rule-based dispatch of objects to code
Gatev et al. Introduction to microservices
US11431823B1 (en) Systems and methods for context-aware event ordering protocol for distributed service systems
US11797316B2 (en) System and method for automatic generation and management of feature level application directory
US20230168949A1 (en) Integration extensions
Bharti et al. A Scalable Design Approach for State Propagation in Serverless Workflow
CN114416214A (en) Cross-network system integration method and device, computer equipment and storage medium
CN115129300A (en) Application development method, apparatus, device, medium, and program product
US20230359440A1 (en) Externally-initiated runtime type extension

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