CN113064827A - Test platform deployment method, device, equipment and storage medium - Google Patents

Test platform deployment method, device, equipment and storage medium Download PDF

Info

Publication number
CN113064827A
CN113064827A CN202110391174.5A CN202110391174A CN113064827A CN 113064827 A CN113064827 A CN 113064827A CN 202110391174 A CN202110391174 A CN 202110391174A CN 113064827 A CN113064827 A CN 113064827A
Authority
CN
China
Prior art keywords
platform
deployment
container
test
script program
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
CN202110391174.5A
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.)
Jingdong Shuke Haiyi Information Technology Co Ltd
Original Assignee
Jingdong Shuke Haiyi Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jingdong Shuke Haiyi Information Technology Co Ltd filed Critical Jingdong Shuke Haiyi Information Technology Co Ltd
Priority to CN202110391174.5A priority Critical patent/CN113064827A/en
Publication of CN113064827A publication Critical patent/CN113064827A/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/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/76Adapting program code to run in a different environment; Porting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances

Landscapes

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

Abstract

The application relates to a deployment method, a device, equipment and a storage medium of a test platform, wherein the method comprises the following steps: acquiring a platform deployment instruction, wherein the platform deployment instruction is used for indicating to call a platform deployment script program; calling the platform deployment script program according to the platform deployment instruction; and acquiring platform related data for supporting the test platform to run through the platform deployment script program, creating a virtualization mirror image of the platform related data, and completing the deployment of the test platform. The method and the device are used for solving the problem that the deployment process of the existing open source test platform is complex.

Description

Test platform deployment method, device, equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for deploying a test platform.
Background
The application of the interface test platform is rapidly increased in the large environment of the internet, but the open-source interface test platform is infinite and has various advantages, for example, the Python uses a request library package to execute a request interface, and the Java uses an httpparent library package to execute the request interface. The deployment mode of most open-source interface test platforms is source code deployment, when a user needs to use the interface test platforms, the source codes need to be downloaded, and the downloaded source codes are transmitted to a server to perform step-by-step deployment. The existing deployment mode has many problems, for example, the deployment time is long, a plurality of middleware needs to be downloaded and installed, and the whole deployment process is very complicated.
Disclosure of Invention
The application provides a test platform deployment method, a test platform deployment device, test platform equipment and a storage medium, which are used for solving the problem that the existing open source test platform deployment process is complicated.
In a first aspect, an embodiment of the present application provides a method for deploying a test platform, including:
acquiring a platform deployment instruction, wherein the platform deployment instruction is used for indicating to call a platform deployment script program;
calling the platform deployment script program according to the platform deployment instruction;
and acquiring platform related data for supporting the test platform to run through the platform deployment script program, creating a virtualization mirror image of the platform related data, and completing the deployment of the test platform.
Optionally, the creating a virtualized image of the platform related data to complete the deployment of the test platform includes:
and creating a virtualized image of the platform related data through the platform deployment script program, and transplanting the virtualized image to at least one container to complete the deployment of the test platform.
Optionally, the platform-related data comprises: the system comprises a server program for supporting the operation of the test platform, a first operation environment corresponding to the server program, an application program for supporting the operation of the test platform, a second operation environment corresponding to the application program, a database for storing test cases, message middleware for transmitting test case requests and a routing protocol for routing and forwarding;
the creating of the virtualized image of the platform related data by the platform deployment script program includes:
deploying a script program through the platform, and creating a first virtualization mirror image of the server program and the first operating environment;
deploying a script program through the platform, and creating a second virtualization mirror image corresponding to the application program and the second operating environment;
a script program is deployed through the platform, and a third virtualization mirror image corresponding to the database is created;
a fourth virtualization mirror image corresponding to the message middleware is created through the platform deployment script program;
and creating a fifth virtualization mirror image corresponding to the routing protocol through the platform deployment script program.
Optionally, the migrating the virtualized image to at least one container comprises:
migrating the first virtualized image to a first container through the platform deployment script program;
migrating the second virtualized image to a second container through the platform deployment script program;
migrating the third virtualized image to a third container through the platform deployment script program;
migrating the fourth virtualized image to a fourth container through the platform deployment script program;
migrating the fifth virtualized image to a fifth container through the platform deployment script program;
establishing communication connections among the first container, the second container, the third container, the fourth container and the fifth container through the platform deployment script program.
Optionally, the deploying a script program through the platform to establish a communication connection between the first container, the second container, the third container, the fourth container, and the fifth container includes:
establishing a communication connection between the first container and the third container and establishing a communication connection between the first container and the fourth container through the platform deployment script program;
establishing communication connection between the second container and the first container through the platform deployment script program;
and establishing communication connection between the fifth container and the second container through the platform deployment script program.
Optionally, the third container stores the test case;
after the deployment of the test platform is completed, the method includes:
obtaining at least two test case requests, wherein each test case request carries a unique case identifier;
calling a test case corresponding to each unique identification of the use case from the third container according to the test case request;
and executing the test case corresponding to each unique identifier of each case in an asynchronous execution mode.
Optionally, the executing the test case corresponding to each unique identifier of the use case in an asynchronous execution manner includes:
dividing at least two test cases into N groups of tasks to be processed, wherein N is an integer greater than 1;
sending each task to be processed to a corresponding thread, wherein each thread corresponds to at least one task to be processed, the number of the threads is M, and M is an integer greater than 1;
and executing the tasks to be processed in each thread in the asynchronous execution mode.
In a second aspect, the present application provides a deployment apparatus for a test platform, including:
the system comprises an acquisition module, a deployment module and a deployment module, wherein the acquisition module is used for acquiring a platform deployment instruction which is used for indicating to call a platform deployment script program;
the calling module is used for calling the platform deployment script program according to the platform deployment instruction;
and the deployment module is used for acquiring platform related data for supporting the test platform to run through the platform deployment script program, creating a virtualized mirror image of the platform related data and finishing the deployment of the test platform.
In a third aspect, the present application provides an electronic device, comprising: the system comprises a processor, a memory and a communication bus, wherein the processor and the memory are communicated with each other through the communication bus;
the memory for storing a computer program;
the processor is configured to execute the program stored in the memory, and implement the deployment method of the test platform according to the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program, which when executed by a processor implements the deployment method of the test platform according to the first aspect.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages: according to the method provided by the embodiment of the application, the platform deployment instruction is obtained and used for indicating the calling of the platform deployment script program, the platform deployment script program is called according to the platform deployment instruction, the platform related data used for supporting the operation of the test platform are obtained through the platform deployment script program, and the virtual mirror image of the platform related data is created to complete the deployment of the test platform.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
FIG. 1 is a schematic flowchart of a deployment method of a test platform according to an embodiment of the present application;
FIG. 2 is a schematic front end page view of Vue in an embodiment of the present application;
FIG. 3 is a schematic diagram illustrating a specific operation flow when executing a platform deployment script program according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a system framework according to an embodiment of the present application;
FIG. 5 is a schematic structural diagram of a deployment apparatus of a test platform according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device in an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application provides a deployment method of a test platform, which can be applied to a server and terminal equipment. The method is applied to a server as an example, and it is needless to say that the method is only an example here and is not intended to limit the scope of protection of the present application. The specific implementation of the method is shown in fig. 1:
step 101, a platform deployment instruction is obtained.
The platform deployment instruction is used for indicating to call a platform deployment script program, and the platform deployment script program comprises: a shell script program. The shell script program can be downloaded by one key through curl, wget and the like, and then the shell script program is executed to complete the deployment of the test platform.
The shell script is a program file which is put into a file in advance by various commands and is convenient to execute at one time. curl is a file transfer tool that works under the command line using URL syntax, supporting the uploading and downloading of files. wget is a free tool for automatically downloading files from a network.
Specifically, the server includes platform deployment script programs corresponding to most open-source interface test platforms that can be used by the user.
When a user needs to deploy an open-source interface test platform to perform use case testing, a platform deployment instruction can be sent to the server, wherein the platform deployment instruction comprises a unique identifier of the interface test platform to be deployed and a script program for indicating and calling platform deployment. And the server calls the platform deployment script program corresponding to the unique identifier according to the unique identifier.
The unique identifier may be an IP address of the interface test platform.
And step 102, calling a platform deployment script program according to the platform deployment instruction.
Specifically, the forming process of the platform deployment script program is as follows:
wherein, the platform deployment script program comprises: a first executable file (Dockerfile) and a second executable file (docker-composition. yaml).
A first executable file that constructs a virtualized image and a second executable file that deploys a container are pre-written. Wherein, the first executable file comprises: instructions and specifications required to construct the virtualized image, the second executable file comprising: instructions and descriptions required to build the container. And the virtual mirror image of the object to be deployed is constructed by executing the first executable file, and the container is constructed by executing the second executable file, wherein the object to be deployed is determined according to the interface test platform.
And 103, acquiring platform related data for supporting the test platform to run through the platform deployment script program, and creating a virtualized mirror image of the platform related data to complete the deployment of the test platform.
In a specific embodiment, a platform deployment script program is used for creating a virtualized image of platform-related data, and the virtualized image is transplanted to at least one container to complete the deployment of the test platform.
The container can be a container which is already established in advance, and the virtualized mirror image is transplanted to the established container through a platform deployment script program; the container can also be a container created according to the virtualization mirror image by deploying a script program through the platform, and then transplanting the virtualization mirror image into the created container.
The application container engine mentioned in the present application may be an application container engine, the application container engine may be a container (Docker) or a system container (systematic-nsprivate), and the following description will be given by taking the Docker as an example, but it should be noted that the description is only an example and is not intended to limit the protection scope, and other examples in the present application document are not intended to limit the protection scope, and will not be described any more.
Specifically, a Shell front-end software package manager (Yum) is downloaded locally in advance, and a Docker and a container deployment software (Docker-complex) are installed by using Yum.
The Docker is an open-source application container engine, so that users can package their applications and dependency packages into a portable image, and then distribute the image to any popular Linux or Windows machine, and virtualization can be realized.
In particular, the container is started on the basis of an image, and one or more processes can run in the container. We can consider the mirror to be the build or packing phase in the Docker lifecycle, while the container is the launch or execution phase. The container is started based on mirror image, and once the container is started, software or services required by the container can be installed from the container.
In one embodiment, the platform related data comprises: the system comprises a server program for supporting the operation of the test platform, a first operation environment corresponding to the server program, an application program for supporting the operation of the test platform, a second operation environment corresponding to the application program, a database for storing test cases, message middleware for transmitting test case requests and a routing protocol for routing and forwarding.
Wherein, the server program for supporting the operation of the test platform comprises: python background service program, Java background service program, etc., the first operating environment and the second operating environment respectively include: windows operating environment, Linux operating environment, etc., the application program supporting the test platform to run includes Vue front end service program, the database includes: MySQL database, DB database, etc., and the message middleware includes: remote Dictionary service (Redis), the routing protocol includes Nginx.
The MySQL database is a relational database management system. A DB database is a collection of data organized according to some data model and stored in secondary storage. Nginx is a lightweight proxy server that performs load balancing services in the present application. Vue is a set of progressive frameworks for building user interfaces.
In the following, a description is given by taking as an example a server program Python background service program supporting the operation of the test platform, where the first operation environment is a Linux operation environment, the application program supporting the operation of the test platform is Vue front-end service program, the second operation environment is a Linux operation environment, the database is a MySQL database, the message middleware is Redis, and the routing protocol is Nginx.
In one embodiment, a script program is deployed through a platform, and a first virtualization mirror image of a server program and a first running environment is created; deploying a script program through the platform, and creating a second virtualization mirror image corresponding to the application program and a second operating environment; deploying a script program through a platform, and creating a third virtualization mirror image corresponding to the database; a script program is deployed through the platform, and a fourth virtualization mirror image corresponding to the message middleware is created; and creating a fifth virtualization mirror image corresponding to the routing protocol through the platform deployment script program.
For example, a script program is deployed through a platform, and a first virtualization mirror image of a Python background service program and a Linux operating environment is created; deploying a script program through the platform, and creating Vue a second virtualized mirror image of the front-end service program and the Linux operating environment; a script program is deployed through the platform, and a third virtualized mirror image corresponding to the MySQL database is created; a script program is deployed through the platform, and a fourth virtualization mirror image corresponding to Redis is created; and creating a fifth virtualization mirror image corresponding to the Nginx through the platform deployment script program.
When the first virtualization mirror image is created, the alpine system is adopted to create a basic mirror image for a Python background service program and a Linux operation environment, so that the capacity of a mirror image package is reduced, and transmission, downloading and installation are facilitated. Similarly, when the second virtualization mirror image is created, alpine is adopted to create a basic mirror image for the Vue front-end service program and the Linux running environment, so that the capacity of a mirror image package is reduced, and transmission, downloading and installation are facilitated. After the base image is created, the base image is not updated and adjusted often except for the fact that the base image needs to be updated due to a serious potential safety hazard or a new expansion module is added.
The alpine system is a safe light Linux distribution version, the mirror image created by the alpine system is small, the downloading time is short, and the migration is easy. Python is a computer programming language. Linux is an open source operating system.
In one embodiment, a first virtualized image is migrated to a first container via a platform deployment script; transplanting the second virtualization mirror image to a second container through the platform deployment script program; transplanting the third virtual mirror image to a third container through the platform deployment script program; transplanting the fourth virtualized mirror image to a fourth container through the platform deployment script program; transplanting the fifth virtual mirror image to a fifth container through the platform deployment script program; and establishing communication connection among the first container, the second container, the third container, the fourth container and the fifth container through the platform deployment script program.
Specifically, the method and the system adopt a mode of correspondingly transplanting one virtual mirror image to one container, and establish communication connection among all the containers so as to ensure that the whole interface test platform can normally operate. Of course, a plurality of virtualized images may be transplanted into one container, and only information interaction of each virtualized image is required to be completed.
In one embodiment, the interface test platform needs to be dependent on each other to complete information interaction when operating normally. The dependency relationship among the containers of the interface test platform is as follows: python backend services rely on the MySQL database and Redis, Vue front-end services rely on Python backend services, and Nginx relies on Vue front-end services. Of course, the dependency relationships between the containers are written in the platform deployment script program in advance.
Specifically, a script program is deployed through a platform, communication connection between a first container and a third container is established, and communication connection between the first container and a fourth container is established; establishing communication connection between a second container and a first container through a platform deployment script program; and establishing communication connection between the fifth container and the second container through the platform deployment script program.
In addition, in the prior art, even after the interface test platform is successfully deployed, a lot of problems exist, such as low execution efficiency. Moreover, after the interface test platform is deployed in the existing mode, most of the interface test platform is executed in series, so that the execution time is long; for another example, the use case is difficult to generate, and after the interface test platform is deployed in the existing manner, the manner of generating the use case is usually manually input in an input box of the platform interface, which takes a lot of time to manually input the test case, resulting in long time consumption in the whole test process. In order to solve all or part of the problems, the test case is created in advance, and the created test case is stored in the third container.
Specifically, the created test cases may be derived from other platforms, and the derived test cases are stored in a third container of the interface test platform; or, acquiring a test case on the network by using a packet capturing tool, and storing the test case into a third container, wherein the packet capturing tool comprises: charles, Fiddler, etc. Wherein, Charles is a powerful network data package capturing software, and Fiddler is a Hypertext Transfer Protocol (HTTP) debugging package capturing tool.
In one embodiment, after the interface test platform is successfully deployed, the user may search for a pre-created test case for testing at the front end of Vue. The front page of Vue is shown in detail in fig. 2.
The created test case can be seen through the front end page of Vue, the required test case can be found through [ search box ], and a test case request is initiated by clicking the test button under the [ test or not ] menu. In addition, all test cases can be selected by selecting the box on the left side of the case number, and a plurality of test case requests are initiated at the same time. Of course, the user can add any test case required by the user through the [ add test case ] button.
Vue, generating at least two test case requests by the front end, and sending the at least two test case requests to Python background service through the interface.
The Python background service acquires at least two test case requests, wherein each test case request carries a case unique identifier; calling a test case corresponding to each unique case identifier from MySQL in a third container according to the test case request; and executing the test case which is uniquely identified by each case in an asynchronous execution mode.
After the Python background service acquires at least two test case requests, the request header, the request content, the request address and the like of the test case requests are analyzed and integrated into a dictionary format required by the request.
In a specific embodiment, at least two test case requests are queued in a queue in Redis, waiting for execution. Dividing at least two test cases into N groups of tasks to be processed through Redis, wherein N is an integer greater than 1; sending each task to be processed to a corresponding thread, wherein each thread corresponds to at least one task to be processed, the number of the threads is M, and M is an integer greater than 1; and executing the tasks to be processed in each thread in an asynchronous execution mode.
For example, 100 test case requests are obtained, 10 test case requests can be combined into one to-be-processed task, and 10 to-be-processed tasks can be obtained. The application discloses 5 threads, and in order to quickly complete the processing of the 100 test case requests, 2 tasks to be processed can be allocated to each thread.
In addition, when each task to be processed is executed, the processing progress of each task to be processed is monitored in real time by adopting a monitoring module, and the monitoring module comprises: the flower plug-in components are reaction type micro-service frames, can timely respond to the processing progress of each task to be processed, and can effectively avoid the situation of task blockage.
Specifically, in the asynchronous execution mode, the order in which the statements end execution is not necessarily the same as the order in which the statements start execution in the asynchronous execution mode. The method adopts Celery (Celery) to execute the tasks to be processed, wherein the Celery is a simple, flexible and reliable distributed system which is used for processing a large number of messages, is concentrated on real-time processing and simultaneously executes task scheduling.
Next, the execution operation when executing the platform deployment script program is explained with reference to fig. 3:
step 301, constructing a virtualized image and deploying a container program.
And step 302, mounting the MySQL database and the Redis so as to make the data corresponding to the MySQL database and the Redis persistent.
Specifically, the MySQL database and Redis are mounted with volume mount (volume).
And step 303, downloading the constructed virtual mirror image, and transplanting the virtual mirror image into a corresponding container.
And step 304, creating communication connection among the containers according to the dependency relationship among the containers.
Step 305, run the container, start all services.
Specifically, the container is run by executing a docker-composition up-d statement.
According to the method provided by the embodiment of the application, the platform deployment instruction is obtained and used for indicating the calling of the platform deployment script program, the platform deployment script program is called according to the platform deployment instruction, the platform related data used for supporting the operation of the test platform are obtained through the platform deployment script program, and the virtual mirror image of the platform related data is created to complete the deployment of the test platform.
In the embodiment of the present application, a deployment system of a test platform is provided, as shown in fig. 4, and specific details in fig. 4 may refer to an embodiment of the method. The deployment system of the test platform comprises: a user layer and a deployment layer.
The user layer comprises: one-key installation and recording/importing of test cases. The one-key installation function is displayed in a front page of Vue, and a [ install ] button is displayed, so that a user can use the [ install ] button to deploy an interface test platform. After a user clicks an (installation) button, the deployment layer executes installation of an application container engine and starts the application container engine; creating a virtualized image of platform-related data supporting the operation of the test platform, transplanting the virtualized image to at least one container, and executing the at least one container.
The function of recording/importing test cases is also shown in the front end page of Vue, a [ create case ] button is displayed, and a user can import or record test cases by using the [ create case ] button and store the created test cases in the database of the third container.
After the interface test platform is deployed, the user initiates at least one test case request from the Vue front-end page and responds to the at least one test case request in an asynchronous execution mode.
Based on the same concept, an embodiment of the present application provides a deployment apparatus for a test platform, and specific implementation of the apparatus may refer to the description of the method embodiment, and repeated details are not repeated, as shown in fig. 5, the apparatus mainly includes:
an obtaining module 501, configured to obtain a platform deployment instruction, where the platform deployment instruction is used to instruct to call a platform deployment script program;
a calling module 502, configured to call a platform deployment script according to a platform deployment instruction;
the deployment module 503 is configured to obtain platform-related data used for supporting the operation of the test platform through the platform deployment script program, create a virtualized image of the platform-related data, and complete the deployment of the test platform.
Specifically, the deployment module 503 includes: an acquisition submodule and a creation submodule.
In a specific embodiment, the creating submodule is configured to create a virtualized image of platform-related data through a platform deployment script program, and transplant the virtualized image to at least one container to complete deployment of the test platform.
In one embodiment, the platform related data comprises: the system comprises a server program for supporting the operation of a test platform, a first operation environment corresponding to the server program, an application program for supporting the operation of the test platform, a second operation environment corresponding to the application program, a database for storing test cases, message middleware for transmitting test case requests and a routing protocol for routing and forwarding;
the creating submodule is specifically used for creating a first virtualization mirror image of the server program and the first operating environment through the platform deployment script program; deploying a script program through the platform, and creating a second virtualization mirror image corresponding to the application program and a second operating environment; deploying a script program through a platform, and creating a third virtualization mirror image corresponding to the database; a script program is deployed through the platform, and a fourth virtualization mirror image corresponding to the message middleware is created; and creating a fifth virtualization mirror image corresponding to the routing protocol through the platform deployment script program.
In one embodiment, creating the sub-module comprises: the migration module is used for deploying a script program through the platform and migrating the first virtualization mirror image to the first container; transplanting the second virtualization mirror image to a second container through the platform deployment script program; transplanting the third virtual mirror image to a third container through the platform deployment script program; transplanting the fourth virtualized mirror image to a fourth container through the platform deployment script program; transplanting the fifth virtual mirror image to a fifth container through the platform deployment script program; and establishing communication connection among the first container, the second container, the third container, the fourth container and the fifth container through the platform deployment script program.
In one embodiment, the migration module comprises: establishing a communication module, wherein the communication module is used for establishing communication connection between the first container and the third container through a platform deployment script program, and establishing communication connection between the first container and the fourth container; establishing communication connection between a second container and a first container through a platform deployment script program; and establishing communication connection between the fifth container and the second container through the platform deployment script program.
In a specific embodiment, the third container stores test cases; the device also includes: the test module is used for acquiring at least two test case requests, wherein each test case request carries a case unique identifier; calling the test case corresponding to each unique case identifier from the third container according to the test case request; and executing the test case which is uniquely identified by each case in an asynchronous execution mode.
In one embodiment, the test module comprises: the asynchronous execution module is used for dividing at least two test cases into N groups of tasks to be processed, wherein N is an integer greater than 1; sending each task to be processed to a corresponding thread, wherein each thread corresponds to at least one task to be processed, the number of the threads is M, and M is an integer greater than 1; and executing the tasks to be processed in each thread in an asynchronous execution mode.
Based on the same concept, an embodiment of the present application further provides an electronic device, as shown in fig. 6, the electronic device mainly includes: a processor 601, a memory 602, and a communication bus 603, wherein the processor 601 and the memory 602 communicate with each other via the communication bus 603. The memory 602 stores a program executable by the processor 601, and the processor 601 executes the program stored in the memory 602 to implement the following steps: acquiring a platform deployment instruction, wherein the platform deployment instruction is used for indicating to call a platform deployment script program; calling a platform deployment script program according to the platform deployment instruction; and acquiring platform related data for supporting the operation of the test platform through the platform deployment script program, and creating a virtualized mirror image of the platform related data to complete the deployment of the test platform.
The communication bus 603 mentioned in the above electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus 603 may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 6, but this is not intended to represent only one bus or type of bus.
The Memory 602 may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Alternatively, the memory may be at least one storage device located remotely from the processor 601.
The Processor 601 may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like, and may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic devices, discrete gates or transistor logic devices, and discrete hardware components.
In yet another embodiment of the present application, a computer-readable storage medium is further provided, in which a computer program is stored, and when the computer program runs on a computer, the computer program causes the computer to execute the deployment method of the test platform described in the above embodiment.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wirelessly (e.g., infrared, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that includes one or more of the available media. The available media may be magnetic media (e.g., floppy disks, hard disks, tapes, etc.), optical media (e.g., DVDs), or semiconductor media (e.g., solid state drives), among others.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present invention, which enable those skilled in the art to understand or practice the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A deployment method of a test platform is characterized by comprising the following steps:
acquiring a platform deployment instruction, wherein the platform deployment instruction is used for indicating to call a platform deployment script program;
calling the platform deployment script program according to the platform deployment instruction;
and acquiring platform related data for supporting the test platform to run through the platform deployment script program, creating a virtualization mirror image of the platform related data, and completing the deployment of the test platform.
2. The test platform deployment method according to claim 1, wherein the creating of the virtualized image of the platform-related data to complete the deployment of the test platform comprises:
and creating a virtualized image of the platform related data through the platform deployment script program, and transplanting the virtualized image to at least one container to complete the deployment of the test platform.
3. The deployment method of the test platform according to claim 2, wherein the platform-related data comprises: the system comprises a server program for supporting the operation of the test platform, a first operation environment corresponding to the server program, an application program for supporting the operation of the test platform, a second operation environment corresponding to the application program, a database for storing test cases, message middleware for transmitting test case requests and a routing protocol for routing and forwarding;
the creating of the virtualized image of the platform related data by the platform deployment script program includes:
deploying a script program through the platform, and creating a first virtualization mirror image of the server program and the first operating environment;
deploying a script program through the platform, and creating a second virtualization mirror image corresponding to the application program and the second operating environment;
a script program is deployed through the platform, and a third virtualization mirror image corresponding to the database is created;
a fourth virtualization mirror image corresponding to the message middleware is created through the platform deployment script program;
and creating a fifth virtualization mirror image corresponding to the routing protocol through the platform deployment script program.
4. The deployment method of the test platform according to claim 3, wherein the migrating the virtualized image to at least one container comprises:
migrating the first virtualized image to a first container through the platform deployment script program;
migrating the second virtualized image to a second container through the platform deployment script program;
migrating the third virtualized image to a third container through the platform deployment script program;
migrating the fourth virtualized image to a fourth container through the platform deployment script program;
migrating the fifth virtualized image to a fifth container through the platform deployment script program;
establishing communication connections among the first container, the second container, the third container, the fourth container and the fifth container through the platform deployment script program.
5. The deployment method of the test platform according to claim 4, wherein the establishing communication connection among the first container, the second container, the third container, the fourth container and the fifth container by the platform deployment script program comprises:
establishing a communication connection between the first container and the third container and establishing a communication connection between the first container and the fourth container through the platform deployment script program;
establishing communication connection between the second container and the first container through the platform deployment script program;
and establishing communication connection between the fifth container and the second container through the platform deployment script program.
6. The deployment method of the test platform according to claim 4 or 5, wherein the third container stores the test case;
after the deployment of the test platform is completed, the method includes:
obtaining at least two test case requests, wherein each test case request carries a unique case identifier;
calling a test case corresponding to each unique identification of the use case from the third container according to the test case request;
and executing the test case corresponding to each unique identifier of each case in an asynchronous execution mode.
7. The deployment method of the test platform according to claim 6, wherein the executing each test case uniquely identifying the corresponding test case by using an asynchronous execution mode comprises:
dividing at least two test cases into N groups of tasks to be processed, wherein N is an integer greater than 1;
sending each task to be processed to a corresponding thread, wherein each thread corresponds to at least one task to be processed, the number of the threads is M, and M is an integer greater than 1;
and executing the tasks to be processed in each thread in the asynchronous execution mode.
8. A test platform deployment apparatus, comprising:
the system comprises an acquisition module, a deployment module and a deployment module, wherein the acquisition module is used for acquiring a platform deployment instruction which is used for indicating to call a platform deployment script program;
the calling module is used for calling the platform deployment script program according to the platform deployment instruction;
and the deployment module is used for acquiring platform related data for supporting the test platform to run through the platform deployment script program, creating a virtualized mirror image of the platform related data and finishing the deployment of the test platform.
9. An electronic device, comprising: the system comprises a processor, a memory and a communication bus, wherein the processor and the memory are communicated with each other through the communication bus;
the memory for storing a computer program;
the processor, configured to execute the program stored in the memory, and implement the deployment method of the test platform according to any one of claims 1 to 7.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out a method for deploying a test platform according to any one of claims 1 to 7.
CN202110391174.5A 2021-04-12 2021-04-12 Test platform deployment method, device, equipment and storage medium Pending CN113064827A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110391174.5A CN113064827A (en) 2021-04-12 2021-04-12 Test platform deployment method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110391174.5A CN113064827A (en) 2021-04-12 2021-04-12 Test platform deployment method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113064827A true CN113064827A (en) 2021-07-02

Family

ID=76566435

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110391174.5A Pending CN113064827A (en) 2021-04-12 2021-04-12 Test platform deployment method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113064827A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113992452A (en) * 2021-12-29 2022-01-28 南京赛宁信息技术有限公司 Vulnerability repair detection method and system for network security race platform

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106936636A (en) * 2017-03-15 2017-07-07 无锡华云数据技术服务有限公司 A kind of implementation method of the cloud computing test platform of rapid deployment containerization
CN108763090A (en) * 2018-05-31 2018-11-06 上海陆家嘴国际金融资产交易市场股份有限公司 Test environment dispositions method, device, computer equipment and storage medium
CN109697159A (en) * 2017-10-23 2019-04-30 上海仪电(集团)有限公司中央研究院 A kind of development of automation operational system based on mixing cloud platform
CN109710524A (en) * 2018-12-19 2019-05-03 上海华兴数字科技有限公司 A kind of automatic test approach, system and computer storage medium
CN109766269A (en) * 2018-12-18 2019-05-17 微梦创科网络科技(中国)有限公司 Continuous integrating automated testing method, device, equipment and medium
CN109783348A (en) * 2018-12-06 2019-05-21 中国电力科学研究院有限公司 Testing tool method for managing resource based on cloud platform, system
CN111124850A (en) * 2019-11-12 2020-05-08 上海移远通信科技有限公司 MQTT server performance testing method, system, computer equipment and storage medium
CN111679965A (en) * 2020-04-23 2020-09-18 平安国际智慧城市科技股份有限公司 Automatic testing method and device, computer equipment and storage medium
US20200341876A1 (en) * 2019-04-23 2020-10-29 Avanade Holdings Llc Cross-jurisdictional microservice-based cloud platform deployment

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106936636A (en) * 2017-03-15 2017-07-07 无锡华云数据技术服务有限公司 A kind of implementation method of the cloud computing test platform of rapid deployment containerization
CN109697159A (en) * 2017-10-23 2019-04-30 上海仪电(集团)有限公司中央研究院 A kind of development of automation operational system based on mixing cloud platform
CN108763090A (en) * 2018-05-31 2018-11-06 上海陆家嘴国际金融资产交易市场股份有限公司 Test environment dispositions method, device, computer equipment and storage medium
CN109783348A (en) * 2018-12-06 2019-05-21 中国电力科学研究院有限公司 Testing tool method for managing resource based on cloud platform, system
CN109766269A (en) * 2018-12-18 2019-05-17 微梦创科网络科技(中国)有限公司 Continuous integrating automated testing method, device, equipment and medium
CN109710524A (en) * 2018-12-19 2019-05-03 上海华兴数字科技有限公司 A kind of automatic test approach, system and computer storage medium
US20200341876A1 (en) * 2019-04-23 2020-10-29 Avanade Holdings Llc Cross-jurisdictional microservice-based cloud platform deployment
CN111124850A (en) * 2019-11-12 2020-05-08 上海移远通信科技有限公司 MQTT server performance testing method, system, computer equipment and storage medium
CN111679965A (en) * 2020-04-23 2020-09-18 平安国际智慧城市科技股份有限公司 Automatic testing method and device, computer equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113992452A (en) * 2021-12-29 2022-01-28 南京赛宁信息技术有限公司 Vulnerability repair detection method and system for network security race platform

Similar Documents

Publication Publication Date Title
US20150186129A1 (en) Method and system for deploying a program module
US10810049B2 (en) Using scripts to bootstrap applications with metadata from a template
EP3128416B1 (en) Sdn application integration, management and control method, system and device
US20150242200A1 (en) Re-configuration in cloud computing environments
CN104765678A (en) Method and device for testing applications on mobile terminal
CN111090423B (en) Webhook framework system and method for realizing active calling and event triggering
CN111427594B (en) Application program running method and device
US10776081B2 (en) Systems and methods for utilizing webhooks integrated in platform-as-a-service supported application development and deployment
US20170033980A1 (en) Agent manager for distributed transaction monitoring system
CN112583898A (en) Business process arranging method and device and readable medium
CN112121411A (en) Vibration control method, device, electronic equipment and computer readable storage medium
CN117112122A (en) Cluster deployment method and device
CN113064827A (en) Test platform deployment method, device, equipment and storage medium
US11243755B1 (en) Resource aware patching service
CN111782231B (en) Service deployment method and device
CN115857955A (en) Method, device and equipment for offline deployment of K8S cluster and storage medium
CN112910956B (en) Resource creation method and device and electronic equipment
CN112650662A (en) Test environment deployment method and device
CN103067507A (en) Internet cloud computing resource virtualization packaging system and method
CN115758334A (en) Cloud application access method and device, electronic equipment and storage medium
CN110445628B (en) NGINX-based server and deployment and monitoring methods and devices thereof
CN116820663A (en) Mirror image construction method, device, storage medium and apparatus
CN112416698B (en) Expansion method and device of monitoring system, storage medium and electronic equipment
CN111026502B (en) Business debugging architecture creating method and device, electronic equipment and storage medium
CN111142846B (en) Component development method, device and system, mobile terminal and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 601, 6 / F, building 2, No. 18, Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant after: Jingdong Technology Information Technology Co.,Ltd.

Address before: 601, 6 / F, building 2, No. 18, Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant before: Jingdong Shuke Haiyi Information Technology Co., Ltd