CN110399307A - A kind of test method, test platform and destination server - Google Patents

A kind of test method, test platform and destination server Download PDF

Info

Publication number
CN110399307A
CN110399307A CN201910704619.3A CN201910704619A CN110399307A CN 110399307 A CN110399307 A CN 110399307A CN 201910704619 A CN201910704619 A CN 201910704619A CN 110399307 A CN110399307 A CN 110399307A
Authority
CN
China
Prior art keywords
test
tested
task
mirror image
platform
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
CN201910704619.3A
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.)
Wangsu Science and Technology Co Ltd
Original Assignee
Wangsu Science and 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 Wangsu Science and Technology Co Ltd filed Critical Wangsu Science and Technology Co Ltd
Priority to CN201910704619.3A priority Critical patent/CN110399307A/en
Publication of CN110399307A publication Critical patent/CN110399307A/en
Pending legal-status Critical Current

Links

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
    • 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5022Mechanisms to release resources
    • 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

Abstract

The embodiment of the invention provides a kind of test method, test platform and destination servers, it is related to automatization testing technique field, this method comprises: test platform constructs the test mirror image of task to be tested according to the test resource file of task to be tested and saves test mirror image to mirror image warehouse.Test platform determines destination server according to load balancing from server cluster, and task to be tested is sent to destination server.Destination server calls the test mirror image of task to be tested to generate test container from mirror image warehouse, and task to be tested is executed in test container.Performing environment due to building test container as task to be tested, therefore do not need to dispose test wrapper border in test machine in advance, to improve the execution speed of task to be tested.After task execution to be tested, eliminates test container and discharge the resource of test container occupancy, not only realized the recycle without damage of hardware resource in test machine, but also improve the utilization rate of test resource.

Description

A kind of test method, test platform and destination server
Technical field
The present embodiments relate to automatization testing technique field more particularly to a kind of test methods, test platform and mesh Mark server.
Background technique
In software development process, the development process of use is first demand analysis mostly, then designs and encode, finally again Test.The mode of continuous integrating is mostly used to carry out software development at present, i.e. developer's work for often integrating them collects every time Chengdu carries out automatic test, to find the problems in development process as soon as possible.And existing test platform is being tested Before, need to dispose test wrapper border in test machine in advance according to test item, it is low so as to cause test speed.
Summary of the invention
Since existing test platform needs to dispose test environment in advance before test, lead to the problem that test speed is low, The embodiment of the invention provides a kind of test method, test platform and destination servers.
On the one hand, the embodiment of the invention provides a kind of test methods, comprising:
Test platform obtains the test resource file of task to be tested;
The test platform constructs the test of the task to be tested according to the test resource file of the task to be tested Mirror image;
The task to be tested is sent to destination server by the test platform, so that the destination server calls institute The test mirror image for stating task to be tested generates test container, and the task to be tested is executed in the test container.
Performing environment due to building test container as task to be tested, therefore do not need to dispose in test machine in advance Environment is tested, to improve the execution speed of task to be tested.
Optionally, further includes:
The test platform receives the test report that the destination server is sent, and the test report is the target clothes Business device terminates in the task execution to be tested, eliminates the test container and discharges after the resource that the test container occupies It generates.
Since test container is after having executed task to be tested, the resource of automatic release busy is artificial clear compared to existing For the test environment in test machine, the recycle without damage of hardware resource in test machine had not only been realized, but also has improved test The utilization rate of resource.
Optionally, before the test resource file that the test platform obtains task to be tested, further includes:
The test platform generates the foundation image of each test item, and test item and foundation image are corresponded to and saved In mirror image warehouse, the mirror image warehouse is located at the test platform;
The test platform constructs the test of the task to be tested according to the test resource file of the task to be tested Mirror image, comprising:
Test platform test item according to belonging to the task to be tested, from the mirror image warehouse described in acquisition The corresponding foundation image of task to be tested;
The test platform is according to the test resource file and the corresponding base of the task to be tested of the task to be tested Plinth mirror image constructs the test mirror image of the task to be tested;
The test mirror image of the task to be tested is stored in the described to be tested of the mirror image warehouse by the test platform In test item belonging to task.
Due to establishing the different corresponding foundation images of test item and test item in mirror image warehouse in advance, therefore When generating the test mirror image of task to be tested, the foundation image of task to be tested can be obtained by inquiring test item, then According to the test mirror image of foundation image and test resource file generated task to be tested, to improve the effect for generating test mirror image Rate, while convenient for management.Secondly the test mirror image of generation is also stored in corresponding test item, convenient for subsequent from mirror image storehouse Test mirror image is called to generate test container in library.
Optionally, further includes:
The test platform receives the test mode inquiry request that user terminal is sent;
The test platform detects the operating status of test container described in the destination server;
The test platform returns to status inquiry result to the user terminal according to the operating status of the test container.
Test platform provides test mode query function for user, obtains the execution shape of task to be tested in real time convenient for user State.
On the one hand, the embodiment of the invention provides a kind of test methods, comprising:
Destination server receives the test assignment that test platform is sent;
The destination server calls the survey of the task to be tested according to the test assignment from the test platform It shows on trial as and generates test container, the test mirrors of the task to be tested seem the test platform according to the task to be tested Test resource file building;
The destination server executes the task to be tested in the test container.
Optionally, further includes:
The destination server eliminates the test container and discharges the survey after task execution to be tested Try the resource that container occupies;
The destination server generates test report, and the test report is sent to the test platform.
Optionally, the destination server calls the trial to be measured according to the test assignment from the test platform The test mirror image of business simultaneously generates test container, comprising:
Destination server test item according to belonging to the task to be tested, from the mirror image storehouse of the test platform The test mirror image of the task to be tested is called in library and generates test container, and correspondence saves each survey in the mirror image warehouse The test mirror image of task to be tested under examination project.
On the one hand, the embodiment of the invention provides a kind of test platforms, comprising:
First receiving module, for obtaining the test resource file of task to be tested;
First processing module, for constructing the task to be tested according to the test resource file of the task to be tested Test mirror image;
First sending module, for the task to be tested to be sent to destination server, so that the destination server It calls the test mirror image of the task to be tested to generate test container, and executes the trial to be measured in the test container Business.
Optionally, first receiving module is also used to:
Receive the test report that the destination server is sent, the test report be the destination server it is described to Test assignment, which executes, to be terminated, eliminate the test container and discharges what the resource that the test container occupies generated later.
Optionally, the first processing module is also used to:
Before the test resource file for obtaining task to be tested, the foundation image of each test item is generated, and will survey Examination project and foundation image correspondence are stored in mirror image warehouse, and the mirror image warehouse is located at test platform;
The first processing module is also used to:
According to test item belonging to the task to be tested, the task pair to be tested is obtained from the mirror image warehouse The foundation image answered;
Institute is constructed according to the test resource file of the task to be tested and the corresponding foundation image of the task to be tested State the test mirror image of task to be tested;
The test mirror image of the task to be tested is stored in survey belonging to the task to be tested in the mirror image warehouse In examination project.
Optionally, first receiving module is also used to:
Receive the test mode inquiry request that user terminal is sent;
The first processing module is also used to:
Detect the operating status of test container described in the destination server;
First sending module is also used to:
Status inquiry result is returned to the user terminal according to the operating status of the test container.
On the one hand, the embodiment of the invention provides a kind of destination servers, comprising:
Second receiving module, for receiving the test assignment of test platform transmission;
Second processing module, for calling the task to be tested from the test platform according to the test assignment Test mirror image simultaneously generates test container, and the test mirrors of the task to be tested seem the test platform according to the trial to be measured The test resource file building of business;The task to be tested is executed in the test container.
It optionally, further include the second sending module;
The Second processing module is also used to:
After the task execution to be tested, the test container is eliminated, discharges the money that the test container occupies Source generates test report;
Second sending module is also used to:
The test report is sent to the test platform.
Optionally, the Second processing module is also used to:
According to test item belonging to the task to be tested, called from the mirror image warehouse of the test platform it is described to The test mirror image of test assignment simultaneously generates test container, and correspondence saves to be measured under each test item in the mirror image warehouse The test mirror image of trial business.
On the one hand, the embodiment of the invention provides a kind of computer equipment, including memory, processor and it is stored in storage On device and the computer program that can run on a processor, the processor realize the step of test method when executing described program Suddenly.
On the one hand, the embodiment of the invention provides a kind of computer readable storage medium ,=it is stored with can be by computer The computer program that equipment executes, when described program is run on a computing device, so that the computer equipment executes survey The step of method for testing.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly introduced, it should be apparent that, drawings in the following description are only some embodiments of the invention, for this For the those of ordinary skill in field, without any creative labor, it can also be obtained according to these attached drawings His attached drawing.
Fig. 1 is a kind of structural schematic diagram of system architecture provided in an embodiment of the present invention;
Fig. 2 is a kind of structural schematic diagram of test platform provided in an embodiment of the present invention;
Fig. 3 is a kind of flow diagram of test method provided in an embodiment of the present invention;
Fig. 4 is a kind of flow diagram of test method provided in an embodiment of the present invention;
Fig. 5 is a kind of structural schematic diagram of test platform provided in an embodiment of the present invention;
Fig. 6 is a kind of structural schematic diagram of destination server provided in an embodiment of the present invention;
Fig. 7 is a kind of structural schematic diagram of computer equipment provided in an embodiment of the present invention.
Specific embodiment
In order to which the purpose of the present invention, technical solution and beneficial effect is more clearly understood, below in conjunction with attached drawing and implementation Example, the present invention will be described in further detail.It should be appreciated that specific embodiment described herein is only used to explain this hair It is bright, it is not intended to limit the present invention.
In order to facilitate understanding, noun involved in the embodiment of the present invention is explained below.
Docker: being the application container engine of an open source, allows developer that can be packaged their application and relies on packet Into a transplantable container, then it is published on the Linux machine of any prevalence, also may be implemented to virtualize, container is Sandbox mechanism is used completely, does not have any interface between each other.
Test method in the embodiment of the present invention can be applied to independently test application software, can also dock original Some continuous integration systems provide unified test environmental management for exploitation, test, O&M.In specific implementation, the embodiment of the present invention In the applicable system architecture of test method as shown in Figure 1, include in the system architecture user terminal 101, test platform 102 and Server cluster 103, user terminal 101 can be continuous integrating platform, smart phone, tablet computer or portable personal computer Deng.User can access test platform 102 by the browser on user terminal 101, can also be directly by calling application program Interface (Application Programming Interface, abbreviation API) accesses test platform 102.Test platform 102 is logical It crosses wireless network to connect with server cluster 103, server cluster 103 is made of multiple servers.User terminal 101 uploads to be measured The test resource file of trial business to test platform 102, test platform 102 is constructed according to the test resource file of task to be tested The test mirror image of task to be tested simultaneously saves test mirror image to mirror image warehouse.Test platform 102 is according to load balancing from service Destination server is determined in device cluster 103, and task to be tested is sent to destination server.Destination server is from mirror image warehouse The middle test mirror image for calling task to be tested generates test container, and task to be tested is executed in test container.Destination service Device eliminates test container and discharges the resource of test container occupancy after task execution to be tested.
Further, in system architecture diagram shown in Fig. 1, the structural schematic diagram of test platform 102 is as shown in Fig. 2, survey Trying platform 102 includes: interface administration module 1021, mirror image storehouse management module 1022, Container Management module 1023, log management Module 1024, load balancing module 1025.
Interface administration module 1021 is used to receive the API Calls request of user terminal 101, and user terminal 101 can pass through calling Interface uploads test resource file, building test mirror image, inquiry test run state, termination test, downloading test report etc..
Mirror image storehouse management module 1022 is used to be managed the mirror image warehouse in test platform, for example generates test mirrors It saves as and by test mirror image to mirror image warehouse, test mirror image is pulled from mirror image warehouse.In addition web page access is provided to user Interface, user can be managed the mirror image in mirror image warehouse by webpage, for example, in mirror image warehouse test mirror image and Foundation image progress additions and deletions, which change, looks into.
Container Management module 1023 is used to manage the life cycle of container and mirror image.In addition web page access circle is provided to user Face, user can be managed by life cycle of the webpage to container and mirror image.
Log is divided into not at the same level by log management module 1024 for being standardized management to the log of test platform Other log information is simultaneously recorded in corresponding journal file.
Load balancing module 1025 is for using load-balancing algorithm to distribute destination server for task to be tested.
Structural schematic diagram based on system shown in Figure 1 architecture diagram and test platform shown in Fig. 2, the embodiment of the present invention provide The process of a kind of process of test method, this method can be executed by test platform and destination server interaction, such as Fig. 3 institute Show, comprising the following steps:
Step S301, test platform obtain the test resource file of task to be tested.
Specifically, user terminal can call the API that test resource file is uploaded in test platform, uploaded and tested by API Resource file, user terminal can also upload test resource file using webpage.
Step S302, test platform construct the test mirrors of task to be tested according to the test resource file of task to be tested Picture.
Test platform establishes different test items previously according to user's request, and different test items can correspond to difference Application program, then generate the foundation image of each test item, and test item and foundation image correspondence are stored in mirror As in warehouse, mirror image warehouse is located at test platform.Specifically, foundation image includes the basis relied in test application program Environment, by each test item and the corresponding foundation image of each test item is corresponding saves in mirror image warehouse.
In a kind of possible embodiment, test platform when constructing the test mirror image of task to be tested, first according to Test item belonging to test assignment obtains the corresponding foundation image of task to be tested from mirror image warehouse.Then according to be measured The test resource file and the corresponding foundation image of task to be tested of trial business construct the test mirror image of task to be tested.Later again The test mirror image of task to be tested is stored in test item belonging to the task to be tested in mirror image warehouse by test platform.
Illustratively, set mirror image warehouse in include three test items, respectively test item A, test item B and Test item C, test item A correspond to foundation image a, and test item B corresponds to foundation image b, and test item C corresponds to foundation image c.Test item belonging to task to be tested is set as test item A, then from the basis under inquiry test item A in mirror image warehouse Then mirror image a constructs DOCKERFILE (container file) using foundation image a and the test resource file of task to be tested, so Call DOCKER Software Development Kit (Software Development Kit, abbreviation SDK) according to DOCKERFILE structure afterwards The test mirror image of task to be tested is built, and the test mirror image of task to be tested is stored in the test item A in mirror image warehouse. Since the different corresponding foundation images of test item and test item is established in mirror image warehouse in advance, thus it is to be measured generating When the test mirror image of trial business, the foundation image of task to be tested can be obtained by inquiring test item, then according to basis The test mirror image of mirror image and test resource file generated task to be tested, to improve the efficiency for generating test mirror image, while just In management.Secondly the test mirror image of generation is also stored in corresponding test item, is called from mirror image warehouse convenient for subsequent It tests mirror image and generates test container.
Task to be tested is sent to destination server by step S303, test platform.
In a kind of possible embodiment, destination server can be an independent server.
In a kind of possible embodiment, destination server can be a server in server cluster, target Server is that test platform is determined from server cluster according to load balancing.It is true from server cluster using load balancing Set the goal server, and executes task to be tested using destination server, both ensure that the testing efficiency of task to be tested, simultaneously Resource in server cluster is set to obtain Optimum utilization.
Specifically, load-balancing algorithm includes poll (Round Robin) method, randomized, random polling method, source address Kazakhstan Uncommon method, weighted polling (Weight Round Robin) method etc..
Polling method specifically: request is assigned on server in turn in order, it is balanced to treat each server, and It is not related to the actual connection number of central server and current system load.
Randomized specifically: by system random function, wherein one is randomly selected according to the sizes values of server list Platform accesses.
Random polling method specifically: randomized and polling method are combined, in poll node, randomly choose a section Point hereafter selects next node to handle request every time as starting position index (index).
Source address Hash method specifically: according to the IP address of Service Consumer request's client, calculated by hash function A cryptographic Hash is obtained, the size of this cryptographic Hash and server list is subjected to modulo operation, obtained result is to access Server address serial number.
Weighted polling method specifically: the server high to configuration, load is low distributes higher weight, can handle more Request then give its to distribute lower weight, reduce its system load and with setting low, load high server, will request according to Sequence and weight distribution are to server.
Destination server is determined from server cluster using load balancing, and trial to be measured is executed using destination server Business, both ensure that the testing efficiency of task to be tested, while resource in server cluster being made to obtain Optimum utilization.
Step S304, destination server call the test mirror image of task to be tested to generate test container.
Specifically, destination server test item according to belonging to task to be tested, from the mirror image warehouse of test platform Call the test mirror image of task to be tested and generate test container, in mirror image warehouse it is corresponding save under each test item to The test mirror image of test assignment.
Illustratively, set mirror image warehouse in include three test items, respectively test item A, test item B and Test item C, test item A correspond to foundation image a, and test item B corresponds to foundation image b, and test item C corresponds to foundation image c.Test item belonging to task to be tested is set as test item A, then from the test inquired under test item A in mirror image warehouse Mirror image obtains the test mirror image of task to be tested, then generates test container according to the test mirror image of task to be tested.
Step S305, destination server execute task to be tested in test container.
In the embodiment of the present invention, after test platform obtains the test resource file of task to be tested, task to be tested is constructed Test mirror image, task to be tested is then sent to destination server, destination server calls the test mirrors of task to be tested As generating test container, and task to be tested is executed in test container.Since building test container is as task to be tested Performing environment, therefore do not need to dispose test wrapper border in test machine in advance, to improve the execution speed of task to be tested.
Optionally, destination server is after task execution to be tested, eliminates test container and discharges test container and accounts for Resource, destination server generates test report, and test report is sent to test platform.
In specific implementation, after eliminating test container, the hardware in the destination server of test container occupancy can be discharged Resource, therefore destination server can be multiplexed the hardware resource of release when generating the test container of other tasks to be tested.Target Server is after generating test report, the primary server that test report can be sent in server cluster, then by main clothes Test report is sent to test platform by business device.Follow-up test platform is in the test report downloading request for receiving user terminal transmission When, test report is sent to user terminal.
Since test container is after having executed task to be tested, the resource of automatic release busy is artificial clear compared to existing For the test environment in test machine, the recycle without damage of hardware resource in test machine had not only been realized, but also has improved test The utilization rate of resource.
Optionally, after user terminal uploads the test resource file of task to be measured, it is flat to testing that inquiry request can be sent Platform inquires the execution state of test assignment, after test platform receives the test mode inquiry request that user terminal is sent, inspection The operating status of test container in destination server is surveyed, status inquiry result is then returned to extremely according to the operating status of test container User terminal.
Specifically, test platform provides browser access for user, and it is corresponding that user can open test platform in user terminal Web page interrogation test assignment execution state.The operating status of test container includes just building state, operating status, stopping shape State, halted state and deletion state.The not starting operation immediately after creating test container, test container, which enters, just builds state. Starting operation, test container enter operating status immediately after creating test container.When destination server crashes or powers off, Test container enters halted state.When destination server receives container pause instruction, suspend test container, test container into Enter halted state.When destination server, which receives container, deletes instruction, test container is deleted, test container enters deletion shape State.
In addition, user can also be to mirror image warehouse, test item, foundation image, test mirror image, server set by webpage Group is inquired and is managed, for example is changed to test item, foundation image, test mirror image progress additions and deletions and looked into.User passes through webpage Page download test report can also be passed through.Test platform provides browser access for user, facilitates user in test platform Mirror image warehouse, mirror image, container be managed, secondly, test platform is made to be applicable not only to tester, while being suitable for exploitation Personnel, operation maintenance personnel etc. provide unified test environmental management for exploitation, test, O&M, substantially reduce test environmental management dimension The cost of shield.
Optionally, when in test report display test out and stagger the time, user can pass through the test mirror image of webpage selection error Debugging test container used is generated, wrong debugging is then carried out according to the interactive process inside test container, positioning is gone wrong. Test container, the hardware resource that release test container occupies directly are destroyed after the completion of debugging.
Embodiment in order to preferably explain the present invention describes the embodiment of the present invention below with reference to specific implement scene and provides A kind of test method, this method by continuous integrating platform, test platform, destination server interaction execute, as shown in figure 4, should Method the following steps are included:
Step S401, continuous integrating platform call the API of test platform, upload the test resource file of task to be tested.
Step S402, test platform test item according to belonging to task to be tested, obtains to be tested from mirror image warehouse The corresponding foundation image of task.
Test platform pre-generates the foundation image of each test item, and test item and foundation image are corresponded to and saved In mirror image warehouse, mirror image warehouse is located at test platform.
Step S403, test platform is according to the corresponding basic mirror of the test resource file of task to be tested and task to be tested Test mirror image as constructing task to be tested.
The test mirror image of task to be tested is stored in belonging to the task to be tested in mirror image warehouse by step S404, test platform Test item in.
Step S405, test platform determine destination server according to load balancing from server cluster.
The task to be tested is sent to destination server by step S406, test platform.
Step S407, destination server test item according to belonging to task to be tested, from the mirror image warehouse of test platform The middle test mirror image for calling task to be tested.
Step S408, destination server generate test container according to the test mirror image of task to be tested.
Step S409, destination server eliminate test container and discharge test container after task execution to be tested The resource of occupancy.
Step S410, destination server generate test report.
Test report is sent to test platform by step S411, destination server.
In the embodiment of the present invention, due to constructing performing environment of the test container as task to be tested, therefore do not need in advance Test wrapper border is disposed in test machine, to improve the execution speed of task to be tested.Secondly, test container executed to After test assignment, the resource of automatic release busy was both real for the test environment in existing artificial removing test machine Show the recycle without damage of hardware resource in test machine, and improves the utilization rate of test resource.In addition, test platform can be right Continuous integrating platform is connect, to improve the efficiency of automatic operating.
Based on the same technical idea, the embodiment of the invention provides a kind of test platforms, as shown in figure 5, the test is flat Platform 500 includes:
First receiving module 501, for obtaining the test resource file of task to be tested;
First processing module 502, for constructing the trial to be measured according to the test resource file of the task to be tested The test mirror image of business;
First sending module 503, for the task to be tested to be sent to destination server, so that the destination service Device calls the test mirror image of the task to be tested to generate test container, and the trial to be measured is executed in the test container Business.
Optionally, the destination server is that the test platform is determined from server cluster according to load balancing.
Optionally, first receiving module 501 is also used to:
Receive the test report that the destination server is sent, the test report be the destination server it is described to Test assignment, which executes, to be terminated, eliminate the test container and discharges what the resource that the test container occupies generated later.
Optionally, the first processing module 502 is also used to:
Before the test resource file for obtaining task to be tested, the foundation image of each test item is generated, and will survey Examination project and foundation image correspondence are stored in mirror image warehouse, and the mirror image warehouse is located at test platform;
The first processing module 502 is also used to:
According to test item belonging to the task to be tested, the task pair to be tested is obtained from the mirror image warehouse The foundation image answered;
Institute is constructed according to the test resource file of the task to be tested and the corresponding foundation image of the task to be tested State the test mirror image of task to be tested;
The test mirror image of the task to be tested is stored in survey belonging to the task to be tested in the mirror image warehouse In examination project.
Optionally, first receiving module 501 is also used to:
Receive the test mode inquiry request that user terminal is sent;
The first processing module 502 is also used to:
Detect the operating status of test container described in the destination server;
First sending module 503 is also used to:
Status inquiry result is returned to the user terminal according to the operating status of the test container.
Based on the same technical idea, the embodiment of the invention provides a kind of destination servers, as shown in fig. 6, the target Server 600 includes:
Second receiving module 601, for receiving the test assignment of test platform transmission;
Second processing module 602, for calling the trial to be measured from the test platform according to the test assignment The test mirror image of business simultaneously generates test container, and the test mirrors of the task to be tested seem the test platform according to described to be measured The test resource file building of trial business;The task to be tested is executed in the test container.
It optionally, further include the second sending module 603;
The Second processing module 602 is also used to:
After the task execution to be tested, the test container is eliminated, discharges the money that the test container occupies Source generates test report;
Second sending module 603 is also used to:
The test report is sent to the test platform.
Optionally, the Second processing module 602 is specifically used for:
According to test item belonging to the task to be tested, called from the mirror image warehouse of the test platform it is described to The test mirror image of test assignment simultaneously generates test container, and correspondence saves to be measured under each test item in the mirror image warehouse The test mirror image of trial business.
Based on the same technical idea, the embodiment of the invention provides a kind of computer equipments, as shown in fig. 7, comprises extremely Lack a processor 701, and the memory 702 connecting at least one processor, does not limit processing in the embodiment of the present invention Specific connection medium between device 701 and memory 702 passes through bus between processor 701 and memory 702 in Fig. 7 and connects For.Bus can be divided into address bus, data/address bus, control bus etc..
In embodiments of the present invention, memory 702 is stored with the instruction that can be executed by least one processor 701, at least The instruction that one processor 701 is stored by executing memory 702, can execute step included in test method above-mentioned Suddenly.
Wherein, processor 701 is the control centre of computer equipment, can use various interfaces and connection computer The various pieces of equipment are stored in memory 702 by running or executing the instruction being stored in memory 702 and calling Data, to carry out automatic test.Optionally, processor 701 may include one or more processing units, processor 701 Application processor and modem processor can be integrated, wherein the main processing operation system of application processor, user interface and answer With program etc., modem processor mainly handles wireless communication.It is understood that above-mentioned modem processor can also be with It is not integrated into processor 701.In some embodiments, processor 701 and memory 702 can be realized on the same chip, In some embodiments, they can also be realized respectively on independent chip.
Processor 701 can be general processor, such as central processing unit (CPU), digital signal processor, dedicated integrated Circuit (Application Specific Integrated Circuit, ASIC), field programmable gate array or other can Perhaps transistor logic, discrete hardware components may be implemented or execute present invention implementation for programmed logic device, discrete gate Each method, step and logic diagram disclosed in example.General processor can be microprocessor or any conventional processor Deng.The step of method in conjunction with disclosed in the embodiment of the present invention, can be embodied directly in hardware processor and execute completion, Huo Zheyong Hardware and software module combination in processor execute completion.
Memory 702 is used as a kind of non-volatile computer readable storage medium storing program for executing, can be used for storing non-volatile software journey Sequence, non-volatile computer executable program and module.Memory 702 may include the storage medium of at least one type, It such as may include flash memory, hard disk, multimedia card, card-type memory, random access storage device (Random Access Memory, RAM), static random-access memory (Static Random Access Memory, SRAM), may be programmed read-only deposit Reservoir (Programmable Read Only Memory, PROM), read-only memory (Read Only Memory, ROM), band Electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), magnetic storage, disk, CD etc..Memory 702 can be used for carrying or storing have instruction or data The desired program code of structure type and can by any other medium of computer access, but not limited to this.The present invention is real Applying the memory 702 in example can also be circuit or other devices that arbitrarily can be realized store function, for storing program Instruction and/or data.
Based on the same technical idea, it the embodiment of the invention provides a kind of computer readable storage medium, is stored with The computer program that can be executed by computer equipment, when described program is run on a computing device, so that the computer Equipment executes the step of test method.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method or computer program product. Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the present invention Form.It is deposited moreover, the present invention can be used to can be used in the computer that one or more wherein includes computer usable program code The shape for the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) Formula.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
Although preferred embodiments of the present invention have been described, it is created once a person skilled in the art knows basic Property concept, then additional changes and modifications may be made to these embodiments.So it includes excellent that the following claims are intended to be interpreted as It selects embodiment and falls into all change and modification of the scope of the invention.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies Within, then the present invention is also intended to include these modifications and variations.

Claims (16)

1. a kind of test method characterized by comprising
Test platform obtains the test resource file of task to be tested;
The test platform constructs the test mirror image of the task to be tested according to the test resource file of the task to be tested;
The task to be tested is sent to destination server by the test platform so that the destination server call it is described to The test mirror image of test assignment generates test container, and the task to be tested is executed in the test container.
2. the method as described in claim 1, which is characterized in that further include:
The test platform receives the test report that the destination server is sent, and the test report is the destination server It is generated after the task execution to be tested terminates, eliminates the test container and discharge the resource that the test container occupies 's.
3. the method as described in claim 1, which is characterized in that the test platform obtains the test resource text of task to be tested Before part, further includes:
The test platform generates the foundation image of each test item, and test item and foundation image correspondence are stored in mirror As in warehouse, the mirror image warehouse is located at the test platform;
The test platform constructs the test mirror image of the task to be tested according to the test resource file of the task to be tested, Include:
Test platform test item according to belonging to the task to be tested, obtains described to be measured from the mirror image warehouse The corresponding foundation image of trial business;
The test platform is according to the corresponding basic mirror of the test resource file of the task to be tested and the task to be tested Test mirror image as constructing the task to be tested;
The test mirror image of the task to be tested is stored in the task to be tested in the mirror image warehouse by the test platform In affiliated test item.
4. the method as described in claim 1, which is characterized in that further include:
The test platform receives the test mode inquiry request that user terminal is sent;
The test platform detects the operating status of test container described in the destination server;
The test platform returns to status inquiry result to the user terminal according to the operating status of the test container.
5. a kind of test method characterized by comprising
Destination server receives the test assignment that test platform is sent;
The destination server calls the test mirrors of the task to be tested according to the test assignment from the test platform Picture simultaneously generates test container, and the test mirrors of the task to be tested seem survey of the test platform according to the task to be tested Try resource file building;
The destination server executes the task to be tested in the test container.
6. method as claimed in claim 5, which is characterized in that further include:
The destination server eliminates the test container and discharges the test and hold after the task execution to be tested The resource that device occupies;
The destination server generates test report, and the test report is sent to the test platform.
7. method as claimed in claim 5, which is characterized in that the destination server is according to the test assignment from the survey The test mirror image of the task to be tested is called in examination platform and generates test container, comprising:
Destination server test item according to belonging to the task to be tested, from the mirror image warehouse of the test platform It calls the test mirror image of the task to be tested and generates test container, correspondence saves each test item in the mirror image warehouse Now the test mirror image of task to be tested.
8. a kind of test platform characterized by comprising
First receiving module, for obtaining the test resource file of task to be tested;
First processing module, for constructing the test of the task to be tested according to the test resource file of the task to be tested Mirror image;
First sending module, for the task to be tested to be sent to destination server, so that the destination server calls The test mirror image of the task to be tested generates test container, and the task to be tested is executed in the test container.
9. test platform as claimed in claim 8, which is characterized in that first receiving module is also used to:
The test report that the destination server is sent is received, the test report is the destination server described to be tested Task execution terminates, eliminates the test container and discharge what the resource that the test container occupies generated later.
10. test platform as claimed in claim 8, which is characterized in that the first processing module is also used to:
Before the test resource file for obtaining task to be tested, the foundation image of each test item is generated, and by test item Mesh and foundation image correspondence are stored in mirror image warehouse, and the mirror image warehouse is located at test platform;
The first processing module is also used to:
According to test item belonging to the task to be tested, it is corresponding that the task to be tested is obtained from the mirror image warehouse Foundation image;
According to the test resource file of the task to be tested and the task to be tested corresponding foundation image building it is described to The test mirror image of test assignment;
The test mirror image of the task to be tested is stored in test item belonging to the task to be tested in the mirror image warehouse In mesh.
11. test platform as claimed in claim 8, which is characterized in that first receiving module is also used to:
Receive the test mode inquiry request that user terminal is sent;
The first processing module is also used to:
Detect the operating status of test container described in the destination server;
First sending module is also used to:
Status inquiry result is returned to the user terminal according to the operating status of the test container.
12. a kind of destination server characterized by comprising
Second receiving module, for receiving the test assignment of test platform transmission;
Second processing module, for calling the test of the task to be tested from the test platform according to the test assignment Mirror image simultaneously generates test container, and the test mirrors of the task to be tested seem the test platform according to the task to be tested The building of test resource file;The task to be tested is executed in the test container.
13. destination server as claimed in claim 12, which is characterized in that further include the second sending module;
The Second processing module is also used to:
After the task execution to be tested, the test container is eliminated, discharges the resource that the test container occupies, it is raw At test report;
Second sending module is also used to:
The test report is sent to the test platform.
14. destination server as claimed in claim 12, which is characterized in that the Second processing module is also used to:
According to test item belonging to the task to be tested, called from the mirror image warehouse of the test platform described to be tested The test mirror image of task simultaneously generates test container, the corresponding trial to be measured saved under each test item in the mirror image warehouse The test mirror image of business.
15. a kind of computer equipment including memory, processor and stores the meter that can be run on a memory and on a processor Calculation machine program, which is characterized in that the processor realizes Claims 1 to 4 any claim or power when executing described program Benefit requires the step of 5~7 any claim the method.
16. a kind of computer readable storage medium, which is characterized in that it is stored with the computer journey that can be executed by computer equipment Sequence, when described program is run on a computing device, so that the computer equipment perform claim requires 1~4 any right It is required that or the step of claim 5~7 any claim the method.
CN201910704619.3A 2019-07-31 2019-07-31 A kind of test method, test platform and destination server Pending CN110399307A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910704619.3A CN110399307A (en) 2019-07-31 2019-07-31 A kind of test method, test platform and destination server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910704619.3A CN110399307A (en) 2019-07-31 2019-07-31 A kind of test method, test platform and destination server

Publications (1)

Publication Number Publication Date
CN110399307A true CN110399307A (en) 2019-11-01

Family

ID=68327015

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910704619.3A Pending CN110399307A (en) 2019-07-31 2019-07-31 A kind of test method, test platform and destination server

Country Status (1)

Country Link
CN (1) CN110399307A (en)

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111078553A (en) * 2019-12-16 2020-04-28 南方电网数字电网研究院有限公司 Data development task testing method and device, computer equipment and storage medium
CN111414234A (en) * 2020-03-20 2020-07-14 深圳市网心科技有限公司 Mirror image container creation method and device, computer device and storage medium
CN111708690A (en) * 2020-05-22 2020-09-25 苏州浪潮智能科技有限公司 Container-based simulation interface testing method and device
CN111767178A (en) * 2020-05-20 2020-10-13 北京奇艺世纪科技有限公司 Physical machine performance testing method and device
CN111930361A (en) * 2020-07-16 2020-11-13 东云睿连(武汉)计算技术有限公司 Artificial intelligence operation mirror image templating construction method and device
CN112052070A (en) * 2020-08-27 2020-12-08 亚信科技(南京)有限公司 Application containerization evaluation method and device, electronic equipment and storage medium
CN112269738A (en) * 2020-10-26 2021-01-26 杭州光通天下网络科技有限公司 CTF target range debugging method, device, electronic equipment and medium
CN112395363A (en) * 2020-12-04 2021-02-23 北京有竹居网络技术有限公司 Data synchronization method, device, equipment and readable storage medium
CN112596750A (en) * 2020-12-28 2021-04-02 上海安畅网络科技股份有限公司 Application testing method and device, electronic equipment and computer readable storage medium
CN112882710A (en) * 2021-03-10 2021-06-01 百度在线网络技术(北京)有限公司 Rendering method, device and equipment based on client and storage medium
CN112965817A (en) * 2021-02-22 2021-06-15 网易(杭州)网络有限公司 Resource management method and device and electronic equipment
CN113094266A (en) * 2021-04-06 2021-07-09 中国工商银行股份有限公司 Fault testing method, platform and equipment for container database
WO2021169114A1 (en) * 2020-02-26 2021-09-02 平安科技(深圳)有限公司 Mirror image test method and apparatus, computer device and storage medium
CN113377665A (en) * 2021-06-25 2021-09-10 北京百度网讯科技有限公司 Container technology-based testing method and device, electronic equipment and storage medium
CN113542379A (en) * 2021-07-02 2021-10-22 Oppo广东移动通信有限公司 Application program management method and device, electronic equipment and storage medium
CN113535555A (en) * 2021-07-12 2021-10-22 中国科学院软件研究所 Containerization testing method and system for reinforcement learning model
CN114116133A (en) * 2021-11-30 2022-03-01 北京字节跳动网络技术有限公司 Container recycling method, device, equipment and storage medium
CN114116487A (en) * 2021-11-29 2022-03-01 北京百度网讯科技有限公司 Pressure testing method and device, electronic equipment and storage medium
CN114661362A (en) * 2022-03-01 2022-06-24 深圳开源互联网安全技术有限公司 DevSecOps-based pipeline implementation method and system
CN117435510A (en) * 2023-12-20 2024-01-23 深圳市智慧城市科技发展集团有限公司 Automatic test method, terminal equipment and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106502905A (en) * 2016-10-26 2017-03-15 腾讯科技(深圳)有限公司 A kind of method of testing of application program, apparatus and system
CN106886455A (en) * 2017-02-23 2017-06-23 北京图森未来科技有限公司 A kind of method and system for realizing user isolation
CN108038051A (en) * 2017-11-03 2018-05-15 深圳市牛鼎丰科技有限公司 Dissemination method, device, computer equipment and the storage medium of micro services
CN108132878A (en) * 2017-12-21 2018-06-08 税友软件集团股份有限公司 The dispatching method and system of a kind of test environment
CN109871328A (en) * 2019-02-26 2019-06-11 网宿科技股份有限公司 A kind of method for testing software and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106502905A (en) * 2016-10-26 2017-03-15 腾讯科技(深圳)有限公司 A kind of method of testing of application program, apparatus and system
CN106886455A (en) * 2017-02-23 2017-06-23 北京图森未来科技有限公司 A kind of method and system for realizing user isolation
CN108038051A (en) * 2017-11-03 2018-05-15 深圳市牛鼎丰科技有限公司 Dissemination method, device, computer equipment and the storage medium of micro services
CN108132878A (en) * 2017-12-21 2018-06-08 税友软件集团股份有限公司 The dispatching method and system of a kind of test environment
CN109871328A (en) * 2019-02-26 2019-06-11 网宿科技股份有限公司 A kind of method for testing software and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
青岛英谷教育科技股份有限公司, 西安电子科技大学出版社 *

Cited By (29)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111078553A (en) * 2019-12-16 2020-04-28 南方电网数字电网研究院有限公司 Data development task testing method and device, computer equipment and storage medium
WO2021169114A1 (en) * 2020-02-26 2021-09-02 平安科技(深圳)有限公司 Mirror image test method and apparatus, computer device and storage medium
CN111414234A (en) * 2020-03-20 2020-07-14 深圳市网心科技有限公司 Mirror image container creation method and device, computer device and storage medium
CN111767178A (en) * 2020-05-20 2020-10-13 北京奇艺世纪科技有限公司 Physical machine performance testing method and device
CN111767178B (en) * 2020-05-20 2023-09-01 北京奇艺世纪科技有限公司 Physical machine performance test method and device
CN111708690A (en) * 2020-05-22 2020-09-25 苏州浪潮智能科技有限公司 Container-based simulation interface testing method and device
CN111708690B (en) * 2020-05-22 2022-07-26 苏州浪潮智能科技有限公司 Container-based simulation interface test method and device
CN111930361A (en) * 2020-07-16 2020-11-13 东云睿连(武汉)计算技术有限公司 Artificial intelligence operation mirror image templating construction method and device
CN112052070A (en) * 2020-08-27 2020-12-08 亚信科技(南京)有限公司 Application containerization evaluation method and device, electronic equipment and storage medium
CN112269738A (en) * 2020-10-26 2021-01-26 杭州光通天下网络科技有限公司 CTF target range debugging method, device, electronic equipment and medium
CN112269738B (en) * 2020-10-26 2023-04-07 杭州光通天下网络科技有限公司 CTF target range debugging method, device, electronic equipment and medium
CN112395363A (en) * 2020-12-04 2021-02-23 北京有竹居网络技术有限公司 Data synchronization method, device, equipment and readable storage medium
CN112395363B (en) * 2020-12-04 2024-03-26 北京有竹居网络技术有限公司 Data synchronization method, device, equipment and readable storage medium
CN112596750A (en) * 2020-12-28 2021-04-02 上海安畅网络科技股份有限公司 Application testing method and device, electronic equipment and computer readable storage medium
CN112965817A (en) * 2021-02-22 2021-06-15 网易(杭州)网络有限公司 Resource management method and device and electronic equipment
CN112965817B (en) * 2021-02-22 2023-08-11 网易(杭州)网络有限公司 Resource management method and device and electronic equipment
CN112882710A (en) * 2021-03-10 2021-06-01 百度在线网络技术(北京)有限公司 Rendering method, device and equipment based on client and storage medium
CN113094266A (en) * 2021-04-06 2021-07-09 中国工商银行股份有限公司 Fault testing method, platform and equipment for container database
CN113377665A (en) * 2021-06-25 2021-09-10 北京百度网讯科技有限公司 Container technology-based testing method and device, electronic equipment and storage medium
CN113542379A (en) * 2021-07-02 2021-10-22 Oppo广东移动通信有限公司 Application program management method and device, electronic equipment and storage medium
CN113535555B (en) * 2021-07-12 2023-06-27 中国科学院软件研究所 Reinforced learning model-oriented containerization test method and system
CN113535555A (en) * 2021-07-12 2021-10-22 中国科学院软件研究所 Containerization testing method and system for reinforcement learning model
CN114116487A (en) * 2021-11-29 2022-03-01 北京百度网讯科技有限公司 Pressure testing method and device, electronic equipment and storage medium
CN114116487B (en) * 2021-11-29 2024-03-15 北京百度网讯科技有限公司 Pressure testing method and device, electronic equipment and storage medium
CN114116133A (en) * 2021-11-30 2022-03-01 北京字节跳动网络技术有限公司 Container recycling method, device, equipment and storage medium
CN114661362A (en) * 2022-03-01 2022-06-24 深圳开源互联网安全技术有限公司 DevSecOps-based pipeline implementation method and system
CN114661362B (en) * 2022-03-01 2023-11-03 深圳开源互联网安全技术有限公司 Pipeline implementation method and system based on DevSecOps
CN117435510A (en) * 2023-12-20 2024-01-23 深圳市智慧城市科技发展集团有限公司 Automatic test method, terminal equipment and computer readable storage medium
CN117435510B (en) * 2023-12-20 2024-04-02 深圳市智慧城市科技发展集团有限公司 Automatic test method, terminal equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN110399307A (en) A kind of test method, test platform and destination server
CN105979007A (en) Acceleration resource processing method and device and network function virtualization system
CN111163130B (en) Network service system and data transmission method thereof
CN112767133B (en) Service decision method and device, storage medium and computer equipment
CN112767135B (en) Configuration method and device of rule engine, storage medium and computer equipment
CN108829588B (en) Processing method, deployment system and device for testing application program
CN109413147B (en) Service node management method, device, equipment and computer readable storage medium
CN110310007A (en) Risk Identification Method, device, equipment and storage medium
US20190268405A1 (en) Load balancing with power of random choices
CN117278434A (en) Flow playback method and device and electronic equipment
KR20180038515A (en) Graphical processing virtualization on the provider network
CN109995787A (en) A kind of data processing method and relevant device
CN106250202A (en) A kind of cloud platform automatization opens the device and method of virtual machine
CN106549827A (en) The detection method and device of network state
CN113467931A (en) Computing task processing method, device and system
CN102929693B (en) Performance evaluation method and device for servers of whole equipment cabinet
CN110232195A (en) A kind of method and device for simulating delivery process
CN115237455B (en) Application management method and related equipment
CN116955148A (en) Service system testing method, device, equipment, storage medium and product
CN110222019A (en) The method of adjustment and device that file system is taken up space
Souidi et al. An adaptive real time mechanism for IaaS cloud provider selection based on QoE aspects
CN114237902A (en) Service deployment method and device, electronic equipment and computer readable medium
CN110119300A (en) The load-balancing method and device of dummy unit cluster
CN108206838B (en) A kind of SiteServer LBS, method and device
CN114826994B (en) User environment playback method, system, electronic device 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20191101

RJ01 Rejection of invention patent application after publication