CN109828901A - Build method and device, Linux server and readable storage medium storing program for executing that pressure surveys environment - Google Patents

Build method and device, Linux server and readable storage medium storing program for executing that pressure surveys environment Download PDF

Info

Publication number
CN109828901A
CN109828901A CN201811536794.8A CN201811536794A CN109828901A CN 109828901 A CN109828901 A CN 109828901A CN 201811536794 A CN201811536794 A CN 201811536794A CN 109828901 A CN109828901 A CN 109828901A
Authority
CN
China
Prior art keywords
container
pressure test
pressure
jmeter
docker
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
CN201811536794.8A
Other languages
Chinese (zh)
Inventor
姚黎明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
OneConnect Smart Technology Co Ltd
Original Assignee
OneConnect Smart 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 OneConnect Smart Technology Co Ltd filed Critical OneConnect Smart Technology Co Ltd
Priority to CN201811536794.8A priority Critical patent/CN109828901A/en
Publication of CN109828901A publication Critical patent/CN109828901A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The present invention provides a kind of method built pressure and survey environment, comprising: Docker Compose software editing docker-compose.yaml document creation is called to go out N number of container;When having created N number of container, start N number of container;After successfully starting up N number of container, the attribute of JMeter pressure test tool is modified;After having modified the attribute of JMeter pressure test tool, start JMeter pressure test tool;It is each container one GUI control of creation in N number of container in the gui interface of JMeter pressure test tool;And specified signal is received from the GUI control, the selected container of user is determined according to the specified signal, and test instruction is issued to goal systems by selected container, pressure test is carried out to the goal systems.The present invention also provides the Linux server for the method for building pressure survey environment described in realization, builds and press the device and storage medium of surveying environment.Present invention optimizes the data processing functions of Linux server, solve software and make technical problem at high cost when pressure is surveyed.

Description

Build method and device, Linux server and readable storage medium storing program for executing that pressure surveys environment
Technical field
The present invention relates to field of computer technology, and in particular to a kind of build presses the method and device for surveying environment, Linux clothes Business device and readable storage medium storing program for executing.
Background technique
GUI (Graphical User Interface, graphic user interface) as a pure JAVA is applied, JMeter It is still very surprising for the consumption of CPU and memory, so using separate unit machine when needing to simulate thousands of concurrent users Device simulates all concurrent users will be unable to do what one wishes, or even the mistake that can also cause JAVA memory to overflow.JMeter can also be with So-called agency is run by using more machines as LoadRunner and carrys out the pressure of load sharing generator itself, and is borrowed This obtains bigger concurrent user number.However it is done when distributed pressure is surveyed using JMeter and needs to run JMeter in all expectations JMeter is installed on the machine as load generator, and determines that wherein a machine is as controller, other machine conducts Agency, this results in that O&M is needed to open up a large amount of server, at high cost.
Summary of the invention
In view of the foregoing, it is necessary to propose that a kind of pressure of building surveys the method and device of environment, Linux server and can Storage medium is read, makees technical problem at high cost when pressure is surveyed to solve software.
The first aspect of the present invention provides a kind of method built pressure and survey environment, which comprises
Docker Compose software editing docker-compose.yaml document creation is called to go out N number of container, wherein N For the positive integer more than or equal to 1;
When having created N number of container, start N number of container;
After successfully starting up N number of container, the attribute of JMeter pressure test tool is modified;
After having modified the attribute of JMeter pressure test tool, start JMeter pressure test tool;
It is one GUI control of each container creation in N number of container in the gui interface of JMeter pressure test tool Part;And
Specified signal is received from the GUI control, the selected container of user is determined according to the specified signal, and lead to It crosses selected container and issues test instruction to goal systems, pressure test is carried out to the goal systems.
Preferably, described N number of out using Docker Compose software editing docker-compose.yaml document creation Container includes:
The value of the quantity N of container to be created is determined according to the input of user;And
N number of container is created, and the relevant information of each container is configured, wherein the relevant information includes each The port of container and the title of container.
Preferably, this method is after starting N number of container further include: the starting result of display N number of container;
Wherein, when one or more containers start failure, container log is inquired, and will be one with starting failure Or log content corresponding to multiple containers is shown to user;And
The docker-compose.yaml file is modified according to the input of user to delete the container of starting failure and lay equal stress on Newly create new container.
Preferably, the attribute of the modification JMeter pressure test tool includes:
Under the catalogue of JMeter pressure test tool, the remote_hosts item in jmeter.properties is write Enter the corresponding IP address of each container and the port numbers in N number of container.
Preferably, the gui interface in JMeter pressure test tool is each container creation in N number of container One GUI control includes:
It applies preset GUI control template and creates N number of GUI control;
It is associated with for each GUI control with one of container foundation in N number of container;And
By N number of GUI control according to the specified displaying that puts in order in the gui interface.
Preferably, this method further include:
The related data that the goal systems carries out pressure test is collected, the mesh is assessed according to collected related data Whether mark system passes through pressure test.
Preferably, the related data includes length of testing speech, institute needed for the goal systems responds each test instruction It states goal systems and responds the returned response results of each test instruction;
Wherein, the related data collected by come assess the goal systems whether by pressure test include:
An average duration is calculated according to collected all length of testing speech;And
When the average duration is less than preset duration, and collected each response results are consistent with preset data, Determine that the goal systems passes through pressure test.
Second aspect of the present invention provides a kind of Linux server, and the Linux server includes processor and memory, The memory is built described at least one described instruction realization for storing at least one instruction, the processor for executing The method that pressure surveys environment.
Third aspect present invention provides a kind of computer readable storage medium, and the computer-readable recording medium storage has At least one instruction builds the method that pressure surveys environment described in realization when at least one described instruction is executed by processor.
Fourth aspect present invention provides a kind of device built pressure and survey environment, and described device includes:
Creation module, for going out N using Docker Compose software editing docker-compose.yaml document creation A container, wherein N is the positive integer more than or equal to 1;
Starting module, for starting N number of container when having created N number of container;
Setup module, for modifying the attribute of JMeter pressure test tool after successfully starting up N number of container;
The starting module is also used to after having modified the attribute of JMeter pressure test tool, starts JMeter pressure Testing tool;
Creation module is each container wound in N number of container for the gui interface in JMeter pressure test tool Build a GUI control;And
Execution module determines selected by user for receiving specified signal from the GUI control according to the specified signal The container selected, and test instruction is issued to goal systems by selected container, to carry out pressure survey to the goal systems Examination.
Method and device, Linux server and readable storage medium that pressure surveys environment are built described in the embodiment of the present invention Matter is that each container is corresponding aobvious in the gui interface of JMeter pressure test tool by layout YAML document creation multiple containers Show a GUI control, the signal according to received by from the GUI control determines the selected container of user, and selected by transmission The container selected issues test instruction to goal systems to carry out pressure test to the goal systems.The present invention can fast construction pressure Environment is tested, maintenance work amoun is saved, it is at low cost.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The embodiment of invention for those of ordinary skill in the art without creative efforts, can also basis The attached drawing of offer obtains other attached drawings.
Fig. 1 is the flow chart built pressure and survey the method for environment that the embodiment of the present invention one provides.
Fig. 2 is the structure chart provided by Embodiment 2 of the present invention built pressure and survey the device of environment.
Fig. 3 is the schematic diagram for the Linux server that the embodiment of the present invention three provides.
The present invention that the following detailed description will be further explained with reference to the above drawings.
Specific embodiment
To better understand the objects, features and advantages of the present invention, with reference to the accompanying drawing and specific real Applying example, the present invention will be described in detail.It should be noted that in the absence of conflict, the embodiment of the present invention and embodiment In feature can be combined with each other.
In the following description, numerous specific details are set forth in order to facilitate a full understanding of the present invention, described embodiment is only It is only a part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill Personnel's every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
Unless otherwise defined, all technical and scientific terms used herein and belong to technical field of the invention The normally understood meaning of technical staff is identical.Term as used herein in the specification of the present invention is intended merely to description tool The purpose of the embodiment of body, it is not intended that in the limitation present invention.
Embodiment one
Fig. 1 is the flow chart built pressure and survey the method for environment that the embodiment of the present invention one provides.
In the present embodiment, it is described build pressure survey environment method can be applied in Linux server, for need into Row builds the Linux server that pressure surveys environment, can directly integrate in Linux server and use provided by method of the invention In the function of building pressure survey environment, or in the form of Software Development Kit (Software Development Kit, SDK) It operates in Linux server.
It builds the method that pressure surveys environment as shown in Figure 1, described and specifically includes following steps, the stream according to different requirements, The sequence of step can change in journey figure, and certain steps can be omitted.
Step S11, Linux server calls Docker Compose software editing docker-compose.yaml file It is created that N number of container (Container).Wherein, N is the positive integer more than or equal to 1.
In the present embodiment, Linux server is mounted with Docker software and Docker Compose software in advance.
It should be noted that Docker is the application container engine of an open source, so that user such as software developer can To be packaged application and rely on packet into a transplantable container, then it is published on the Linux machine of any prevalence, it can also To realize virtualization.
Docker Compose is a definition and the tool for running more container Docker application programs.Pass through Docker Configuration file can be used to configure service required for application program in Compose.
In the present embodiment, JMeter pressure test tool (such as Apache JMeter is also mounted in Linux server 3.1)。
It should be noted that JMeter pressure test tool is the pressure test work based on Java of Apache organization development Tool, for doing pressure test to software.JMeter pressure test tool is originally designed for Web application test but extension later To other testing fields.JMeter pressure test tool can be used for testing static and dynamic resource such as static file, Java Servlet, CGI scripting, Java object, database, ftp server, etc..JMeter pressure test tool can be used for It is whole with intensity and the analysis of testing them under different pressures classification to server, network or the huge load of simulating Performance.
It should be noted that docker-compose.yaml file is Docker Compose configuration file.
In the present embodiment, container is one of core component of Docker, is for running mirror image sandbox (Sandboxie) environment, is the running example of applying from mirror image creation, and mirror image is packaged, finally can all transport after the completion of building Row is in container.Container has good isolation, is mutually isolated between container, is mutually invisible.
In the present embodiment, Linux server calls Docker Compose software according to the input editing docker- of user The N number of container of compose.yaml document creation.
In the present embodiment, the N number of container packet of input editing docker-compose.yaml document creation according to user It includes:
(1) value of the quantity N of container to be created is determined according to the input of user;And
(2) N number of container is created, and the relevant information of each container is configured, wherein the relevant information includes, But it is limited to, the port of each container and the title of container.
Step S12, when having created N number of container, Linux server starts N number of container.
In the present embodiment, Linux server is by executing order docker-compose-fdocker-compose- Jmeter.yaml up-d starts created container.
In one embodiment, Linux server also shows the starting result of N number of container.In one embodiment, Linux server can prompt N number of container described in user to start as a result, the display in a manner of text information over the display Device can be the display screen connecting with the wired perhaps wireless telecommunications of the Linux server or the display itself is to match It is placed in a display screen of the Linux server.
Specifically, when N number of container starts successfully, Linux server issues corresponding first prompt.For example, Linux server can prompt N number of container described in user to start success in a manner of text information over the display.When described When one or more containers in N number of container start failure, Linux server issues corresponding second prompt.For example, Linux Server can show the title of one or more of containers of starting failure on the display.
In one embodiment, when there is the case where one or more container starting failures, the Linux server is also Inquire container log (docker logs), and by with starting failure one or more of containers corresponding to log content It is shown to user.User can make corresponding modification, such as the Linux according to the log content obtained is inquired as a result, Server can modify the docker-compose.yaml file according to the input of user to delete an appearance of starting failure Device simultaneously re-creates a new container.
In other embodiments, when there is the case where one or more container starting failures, the Linux server is mentioned Show whether user will inquire log content corresponding to one or more of containers of starting failure.When user's determination will be inquired When starting log content corresponding to one or more of containers of failure, the Linux server then inquires container log, The i.e. described Linux server responds the input of user to inquire container log.
For example, Linux server can use docker logs-f-t--since=" 2018-10-15 " -- Tail=100 container_name order obtains some container from the log after 2018-10-15.
Wherein, -- since: this parameter specifies output journal Start Date, i.e., only exports the log after the scheduled date.
- f: real-time logs are checked.
- t: the date that log generates is checked.
- tail=100: 100 last logs are checked.
Container_name: Container Name.
Step S13, when Linux server successfully starts up N number of container, Linux server modifies JMeter pressure The attribute of testing tool.
In the present embodiment, the attribute of the modification JMeter pressure test tool includes: in JMeter pressure test tool Catalogue under, it is corresponding that each container in N number of container is written to the remote_hosts item in jmeter.properties IP address and port numbers.
In the present embodiment, the corresponding IP address of each container is identical.The corresponding IP address of each container is Linux clothes The IP address of business device.
Step S14, after having modified the attribute of JMeter pressure test tool, Linux server starts JMeter pressure Testing tool, in the gui interface (Graphical User Interface, graphic user interface) of JMeter pressure test tool A GUI control is created for each container in N number of container.
For example, if the quantity of the container created is N, N number of GUI control is created, described in each GUI control association One of container in N number of container.
In one embodiment, Linux server is N number of container in the gui interface of JMeter pressure test tool In each container create a GUI control include:
(1) it applies preset GUI control template and creates N number of GUI control;
(2) it is associated with for each GUI control with one of container foundation in N number of container;And
(3) N number of GUI control is shown according to specified putting in order in the gui interface.
In the present embodiment, the GUI control template can be stored in advance in the Linux server.The GUI control Template can be the button with specified size and shape.In the present embodiment, specified the putting in order can refer to institute It states N number of GUI and transversely or longitudinally arranges and be shown in the gui interface.
Step S15, Linux server receives specified signal from the GUI control, is determined and is used according to the specified signal The selected container in family, and test instruction is issued to goal systems by selected container, to be carried out to the goal systems Pressure test.
In the present embodiment, the specified signal can refer to signal caused by user click/double-click GUI control. For example, it is assumed that some GUI control of user click, then the Linux server can be received from some GUI control Signal is clicked, thus the Linux server determines that user has selected container corresponding with some GUI control.
In the present embodiment, the goal systems is the system that need to carry out pressure test.The goal systems may operate in institute It states Linux server or operates in the other equipment for being in same local area network with the Linux server.
Step S16, Linux server collects the related data that the goal systems carries out pressure test, according to collected Related data assess whether the goal systems passes through pressure test.
In one embodiment, the related data includes, but is not limited to, and the goal systems responds each test instruction Required duration (for convenience of describing, hereinafter referred to as " length of testing speech "), the goal systems, which respond each test and instruct, to be returned The response results (for convenience of describing, hereinafter referred to as " response results ") returned.
In the present embodiment, the length of testing speech, which can refer to from Linux server, penetrates selected container to the target System issues a test instruction, receives the goal systems to Linux server and responds what the test instruction was returned The duration spent between response results.
By taking test instruction is Http request as an example, the length of testing speech can refer to from Linux server through institute The container of some of selection issues a Http request to the goal systems, receives the goal systems to Linux server It responds the Http and requests the duration spent between returned response results.
In one embodiment, Linux server is calculated one averagely also according to collected all length of testing speech Duration.For example, it is assumed that Linux server issues 40 test instructions by created container in total, then Linux is serviced Device can be collected into 40 length of testing speech, and the average duration is the average value of 40 length of testing speech.
In one embodiment, if the average duration is less than preset duration, and collected each response results with Preset data are consistent, and the Linux server then determines that the goal systems passes through pressure test.
In conclusion building the method that pressure surveys environment described in the embodiment of the present invention, pass through layout YAML document creation Multiple containers are each container one GUI control of corresponding display in the gui interface of JMeter pressure test tool, according to from institute It states signal received by GUI control and determines the selected container of user, and issued through selected container to goal systems Test instruction is to carry out pressure test to the goal systems.The present invention can fast construction pressure test environment, save maintenance work Amount, it is at low cost.
Above-mentioned Fig. 1 describes the method built pressure and survey environment of the invention in detail, below with reference to the 2nd~3 figure, to realization institute It states to build and builds the hardware that pressure surveys the method for environment described in the functional module and realization of the software service for the method that pressure surveys environment Device architecture is introduced.
It should be appreciated that the embodiment is only purposes of discussion, do not limited by this structure in patent claim.
Embodiment two
As shown in fig.2, being the structure chart provided by Embodiment 2 of the present invention built pressure and survey the device of environment.
In some embodiments, the device 30 for building pressure survey environment is run in Linux server.It is described to build pressure The device 30 for surveying environment may include multiple functional modules as composed by program code segments.The device built pressure and survey environment The program code of each program segment in 30 can store in the memory of Linux server, and by it is described at least one It manages performed by device, the function that pressure surveys environment is built with realization (being detailed in Fig. 2 description).
In the present embodiment, the pressure of building surveys function of the device 30 of environment according to performed by it, can be divided into more A functional module.The functional module may include: creation module 301, starting module 302, setup module 303, execution module 304.The so-called module of the present invention, which refers to, a kind of performed by least one processor and can complete fixed function Series of computation machine program segment, storage is in memory.It in the present embodiment, will be in subsequent reality about the function of each module It applies in example and is described in detail.
Creation module 301 calls Docker Compose software editing docker-compose.yaml document creation N number of out Container (Container).Wherein, N is the positive integer more than or equal to 1.
In the present embodiment, Linux server is mounted with Docker software and Docker Compose software in advance.
It should be noted that Docker is the application container engine of an open source, so that user such as software developer can To be packaged application and rely on packet into a transplantable container, then it is published on the Linux machine of any prevalence, it can also To realize virtualization.
Docker Compose is a definition and the tool for running more container Docker application programs.Pass through Docker Configuration file can be used to configure service required for application program in Compose.
In the present embodiment, JMeter pressure test tool (such as Apache JMeter is also mounted in Linux server 3.1)。
It should be noted that JMeter pressure test tool is the pressure test work based on Java of Apache organization development Tool, for doing pressure test to software.JMeter pressure test tool is originally designed for Web application test but extension later To other testing fields.JMeter pressure test tool can be used for testing static and dynamic resource such as static file, Java Servlet, CGI scripting, Java object, database, ftp server, etc..JMeter pressure test tool can be used for It is whole with intensity and the analysis of testing them under different pressures classification to server, network or the huge load of simulating Performance.
It should be noted that docker-compose.yaml file is Docker Compose configuration file.
In the present embodiment, container is one of core component of Docker, is for running mirror image sandbox (Sandboxie) environment, is the running example of applying from mirror image creation, and mirror image is packaged, finally can all transport after the completion of building Row is in container.Container has good isolation, is mutually isolated between container, is mutually invisible.
In the present embodiment, creation module 301 calls Docker Compose software according to the input editing docker- of user The N number of container of compose.yaml document creation.
In the present embodiment, the N number of container packet of input editing docker-compose.yaml document creation according to user It includes:
(1) value of the quantity N of container to be created is determined according to the input of user;And
(2) N number of container is created, and the relevant information of each container is configured, wherein the relevant information includes, But it is limited to, the port of each container and the title of container.
When having created N number of container, starting module 302 starts N number of container.
In the present embodiment, starting module 302 is by executing order docker-compose-fdocker-compose- Jmeter.yaml up-d starts the N number of container created.
In one embodiment, starting module 302 also shows the starting result of N number of container.In one embodiment, Starting module 302 can prompt N number of container described in user to start as a result, the display in a manner of text information over the display Device can be the display screen connecting with the wired perhaps wireless telecommunications of the Linux server or the display itself is to match It is placed in a display screen of the Linux server.
Specifically, when N number of container starts successfully, starting module 302 issues corresponding first prompt.For example, Starting module 302 can prompt N number of container described in user to start success in a manner of text information over the display.When described When one or more containers in N number of container start failure, starting module 302 issues corresponding second prompt.For example, starting mould Block 302 can show the title of one or more of containers of starting failure on the display.
In one embodiment, when there is the case where one or more container starting failures, starting module 302 is also inquired Container log (docker logs), and will be shown with log content corresponding to one or more of containers of starting failure To user.User can make corresponding modification, such as the creation module according to the log content obtained is inquired as a result, 301 can modify the docker-compose.yaml file according to the input of user to delete a container of starting failure And re-create a new container.
In other embodiments, when there is the case where one or more container starting failures, the starting module 302 is mentioned Show whether user will inquire log content corresponding to one or more of containers of starting failure.When user's determination will be inquired When starting log content corresponding to one or more of containers of failure, the starting module 302 then inquires container log, The i.e. described starting module 302 responds the input of user to inquire container log.
For example, starting module 302 can use docker logs-f-t--since=" 2018-10-15 " -- Tail=100 container_name order obtains some container from the log after 2018-10-15.
Wherein, -- since: this parameter specifies output journal Start Date, i.e., only exports the log after the scheduled date.
- f: real-time logs are checked.
- t: the date that log generates is checked.
- tail=100: 100 last logs are checked.
Container_name: Container Name.
After starting module 302 successfully starts up N number of container, setup module 303 modifies JMeter pressure test tool Attribute.
In the present embodiment, the attribute of the modification JMeter pressure test tool includes: in JMeter pressure test tool Catalogue under, it is corresponding that each container in N number of container is written to the remote_hosts item in jmeter.properties IP address and port numbers.
In the present embodiment, the corresponding IP address of each container is identical.The corresponding IP address of each container is Linux clothes The IP address of business device.
After having modified the attribute of JMeter pressure test tool, starting module 302 starts JMeter pressure test tool. The creation module 301 in the gui interface of JMeter pressure test tool, (use by Graphical User Interface, figure Family interface) be N number of container in each container create a GUI control.
For example, if the quantity of the container created is N, the creation module 301 creates N number of GUI control, each GUI control is associated with one of container in N number of container.
In one embodiment, the creation module 301 is described N number of in the gui interface of JMeter pressure test tool Each container in container creates a GUI control
(1) it applies preset GUI control template and creates N number of GUI control;
(2) it is associated with for each GUI control with one of container foundation in N number of container;And
(3) N number of GUI control is shown according to specified putting in order in the gui interface.
In the present embodiment, the GUI control template can be stored in advance in the memory of the Linux server.Institute Stating GUI control template can be the button with specified size and shape.In the present embodiment, specified put in order can be with Refer to and N number of GUI is transversely or longitudinally arranged to display in the gui interface.
Execution module 304 receives specified signal from the GUI control, is determined selected by user according to the specified signal Container, and by selected container to goal systems issue test instruction, with to the goal systems carry out pressure test.
In the present embodiment, the specified signal can refer to signal caused by user click/double-click GUI control. For example, it is assumed that some GUI control of user click, then the execution module 304 can be received from some GUI control Signal is clicked, thus the execution module 304 determines that user has selected container corresponding with some GUI control.
In the present embodiment, the goal systems is the system that need to carry out pressure test.The goal systems may operate in institute It states Linux server or operates in the other equipment for being in same local area network with the Linux server.
The execution module 304 collects the related data that the goal systems carries out pressure test, according to collected phase Data are closed to assess whether the goal systems passes through pressure test.
In one embodiment, the related data includes, but is not limited to, and the goal systems responds each test instruction Required duration (for convenience of describing, hereinafter referred to as " length of testing speech "), the goal systems, which respond each test and instruct, to be returned The response results (for convenience of describing, hereinafter referred to as " response results ") returned.
In the present embodiment, the length of testing speech, which can refer to from execution module 304, penetrates selected container to the target System issues a test instruction, receives the goal systems response test instruction to the Linux server and is returned The duration spent between the response results returned.
By taking test instruction is Http request as an example, the length of testing speech can refer to from the execution module 304 thoroughly It crosses some selected container and issues a Http request to the goal systems, receive the target system to Linux server System responds the Http and requests the duration spent between returned response results.
In one embodiment, execution module 304 is calculated one averagely also according to collected all length of testing speech Duration.For example, it is assumed that execution module 304 issues 40 test instructions by created container in total, then execution module 304 can be collected into 40 length of testing speech, and the average duration is the average value of 40 length of testing speech.
In one embodiment, if the average duration is less than preset duration, and collected each response results with Preset data are consistent, and the execution module 304 then determines that the goal systems passes through pressure test.
In conclusion building the device that pressure surveys environment described in the embodiment of the present invention, pass through layout YAML document creation Multiple containers are each container one GUI control of corresponding display in the gui interface of JMeter pressure test tool, according to from institute It states signal received by GUI control and determines the selected container of user, and issued through selected container to goal systems Test instruction is to carry out pressure test to the goal systems.The present invention can fast construction pressure test environment, save maintenance work Amount, it is at low cost.
Embodiment three
As shown in fig.3, the structural schematic diagram of the Linux server provided for the embodiment of the present invention three.The present invention compared with In good embodiment, the Linux server 3 includes memory 31, at least one processor 32, at least one communication bus 33. It will be understood by a person skilled in the art that the structure of the Linux server shown in Fig. 3 does not constitute the restriction of the embodiment of the present invention, Either bus topology, it is also possible to star structure, the Linux server 3 can also include more or more than illustrating Other few hardware perhaps software or different component layouts.
In some embodiments, the Linux server 3 include it is a kind of can according to the instruction for being previously set or storing, The automatic terminal for carrying out numerical value calculating and/or information processing, hardware include but is not limited to microprocessor, specific integrated circuit, Programmable gate array, digital processing unit and embedded device etc..
It should be noted that the Linux server 3 is only for example, other electronics that are existing or being likely to occur from now on Product is such as adaptable to the present invention, should also be included within protection scope of the present invention, and is incorporated herein by reference.
In some embodiments, the memory 31 is used to store program code and various data, such as is mounted on described The device 30 built pressure and survey environment in Linux server 3, and realized at a high speed, certainly in the operational process of Linux server 3 The access of program or data is completed dynamicly.The memory 31 include read-only memory (Read-Only Memory, ROM), with Machine memory (Random Access Memory, RAM), programmable read only memory (Programmable Read-Only Memory, PROM), Erasable Programmable Read Only Memory EPROM (Erasable Programmable Read-Only Memory, EPROM), disposable programmable read-only memory (One-time Programmable Read-Only Memory, OTPROM), electricity Sub- erasing type can make carbon copies read-only memory (Electrically-Erasable Programmable Read-Only Memory, EEPROM), CD-ROM (Compact Disc Read-Only Memory, CD-ROM) or other disc memories, disk are deposited Reservoir, magnetic tape storage or any other the computer-readable medium that can be used in carrying or storing data.
In some embodiments, at least one described processor 32 can be made of integrated circuit, such as can be by single The integrated circuit of encapsulation is formed, and is also possible to be made of the integrated circuit that multiple identical functions or different function encapsulate, be wrapped Include one or more central processing unit (Central Processing unit, CPU), microprocessor, digital processing chip, The combination etc. of graphics processor and various control chips.At least one described processor 32 is the control of the Linux server 3 Core (Control Unit) passes through operation using all parts of various interfaces and the entire Linux server 3 of connection Or the program or module being stored in the memory 31 are executed, and call the data being stored in the memory 31, To execute the various functions and processing data of Linux server 3, such as executes and build the function that pressure surveys environment.
In some embodiments, at least one communication bus 33 is arranged to realize the memory 31 and described Connection communication between at least one processor 32 etc..
Although being not shown, the Linux server 3 can also include the power supply (such as battery) powered to all parts, Preferably, power supply can be logically contiguous by electric power controller and at least one described processor 32, to pass through power supply pipe It manages device and realizes the functions such as management charging, electric discharge and power managed.Power supply can also include one or more direct current Or AC power source, recharging device, power failure detection circuit, power adapter or inverter, power supply status indicator etc. Random component.The Linux server 3 can also include multiple sensors, bluetooth module, Wi-Fi module etc., no longer go to live in the household of one's in-laws on getting married herein It states.
It should be appreciated that the embodiment is only purposes of discussion, do not limited by this structure in patent claim.
The above-mentioned integrated unit realized in the form of software function module, can store and computer-readable deposit at one In storage media.Above-mentioned software function module is stored in a storage medium, including some instructions are used so that a Linux clothes Business device (can be server, PC etc.) or processor (processor) execute each embodiment the method for the present invention Part.
In a further embodiment, in conjunction with Fig. 2, the Linux server 3 is can be performed at least one described processor 32 Operating device and the types of applications program (building the device 30 that pressure surveys environment as mentioned) of installation, program code etc., example Such as, above-mentioned modules.
Program code is stored in the memory 31, and at least one described processor 32 can call the memory 31 The program code of middle storage is to execute relevant function.For example, modules described in Fig. 2 are stored in the memory 31 In program code, and as performed by least one described processor 32, to realize the function of the modules to reach The purpose that pressure surveys environment is built to Linux server 3.
In one embodiment of the invention, the memory 31 stores multiple instruction, the multiple instruction by it is described extremely A few processor 32 is performed to build the purpose that pressure surveys environment to Linux server 3 to realize.
Specifically, at least one described processor 32 can refer to the corresponding implementation of Fig. 1 to the concrete methods of realizing of above-metioned instruction The description of correlation step in example, this will not be repeated here.
In several embodiments provided by the present invention, it should be understood that disclosed device, device and method can be with It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the module It divides, only a kind of logical function partition, there may be another division manner in actual implementation.
The module as illustrated by the separation member may or may not be physically separated, aobvious as module The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.Some or all of the modules therein can be selected to realize the mesh of this embodiment scheme according to the actual needs 's.
It, can also be in addition, each functional module in each embodiment of the present invention can integrate in one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of hardware adds software function module.
It is obvious to a person skilled in the art that invention is not limited to the details of the above exemplary embodiments, Er Qie In the case where without departing substantially from spirit or essential attributes of the invention, the present invention can be realized in other specific forms.Therefore, no matter From the point of view of which point, the present embodiments are to be considered as illustrative and not restrictive, and the scope of the present invention is by appended power Benefit requires rather than above description limits, it is intended that all by what is fallen within the meaning and scope of the equivalent elements of the claims Variation is included in the present invention.Any reference signs in the claims should not be construed as limiting the involved claims.This Outside, it is clear that one word of " comprising " is not excluded for other units or, odd number is not excluded for plural number.The multiple units stated in device claim Or device can also be implemented through software or hardware by a unit or device.The first, the second equal words are used to indicate name Claim, and does not indicate any particular order.
Finally it should be noted that the above examples are only used to illustrate the technical scheme of the present invention and are not limiting, although reference Preferred embodiment describes the invention in detail, those skilled in the art should understand that, it can be to of the invention Technical solution is modified or equivalent replacement, without departing from the spirit and scope of the technical solution of the present invention.

Claims (10)

1. a kind of method built pressure and survey environment, which is characterized in that the described method includes:
Docker Compose software editing docker-compose.yaml document creation is called to go out N number of container, wherein N is big In or equal to 1 positive integer;
When having created N number of container, start N number of container;
After successfully starting up N number of container, the attribute of JMeter pressure test tool is modified;
After having modified the attribute of JMeter pressure test tool, start JMeter pressure test tool;
It is each container one GUI control of creation in N number of container in the gui interface of JMeter pressure test tool;And
Specified signal is received from the GUI control, the selected container of user is determined according to the specified signal, and pass through institute The container of selection issues test instruction to goal systems, carries out pressure test to the goal systems.
2. building the method that pressure surveys environment as described in claim 1, which is characterized in that the calling Docker Compose is soft Part editor's docker-compose.yaml document creation goes out N number of container and includes:
The value of the quantity N of container to be created is determined according to the input of user;And
N number of container is created, and the relevant information of each container is configured, wherein the relevant information includes each container Port and container title.
3. building the method that pressure surveys environment as described in claim 1, which is characterized in that this method is starting N number of container Later further include: the starting result of display N number of container;
Wherein, when one or more containers start failure, container log is inquired, and will be one or more with starting failure Log content corresponding to a container is shown to user;And
The docker-compose.yaml file is modified according to the input of user to delete the container of starting failure and create again Build new container.
4. building the method that pressure surveys environment as described in claim 1, which is characterized in that the modification JMeter pressure test work The attribute of tool includes:
Under the catalogue of JMeter pressure test tool, institute is written to the remote_hosts item in jmeter.properties State the corresponding IP address of each container and the port numbers in N number of container.
5. building the method that pressure surveys environment as described in claim 1, which is characterized in that described in JMeter pressure test tool Gui interface be N number of container in each container create a GUI control include:
It applies preset GUI control template and creates N number of GUI control;
It is associated with for each GUI control with one of container foundation in N number of container;And
By N number of GUI control according to the specified displaying that puts in order in the gui interface.
6. building the method that pressure surveys environment as described in claim 1, which is characterized in that this method further include:
The related data that the goal systems carries out pressure test is collected, the target system is assessed according to collected related data Whether system passes through pressure test.
7. building the method that pressure surveys environment as claimed in claim 6, which is characterized in that the related data includes the target Length of testing speech needed for system responds each test instruction, the goal systems respond each test and instruct returned response knot Fruit;
Wherein, the related data collected by come assess the goal systems whether by pressure test include:
An average duration is calculated according to collected all length of testing speech;And
When the average duration is less than preset duration, and collected each response results are consistent with preset data, determination The goal systems passes through pressure test.
8. a kind of Linux server, which is characterized in that the Linux server includes processor and memory, the memory For storing at least one instruction, the processor is realized for executing at least one described instruction as appointed in claim 1 to 7 The method that pressure surveys environment is built described in meaning one.
9. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has at least one Instruction, at least one described instruction realize that pressure is built as described in any one of claim 1 to 7 surveys ring when being executed by processor The method in border.
10. a kind of device built pressure and survey environment, which is characterized in that described device includes:
Creation module, for calling Docker Compose software editing docker-compose.yaml document creation to go out N number of appearance Device, wherein N is the positive integer more than or equal to 1;
Starting module, for starting N number of container when having created N number of container;
Setup module, for modifying the attribute of JMeter pressure test tool after successfully starting up N number of container;
The starting module is also used to after having modified the attribute of JMeter pressure test tool, starts JMeter pressure test Tool;
Creation module is each container creation one in N number of container for the gui interface in JMeter pressure test tool A GUI control;And
Execution module determines that user is selected according to the specified signal for receiving specified signal from the GUI control Container, and test instruction is issued to goal systems by selected container, pressure test is carried out to the goal systems.
CN201811536794.8A 2018-12-15 2018-12-15 Build method and device, Linux server and readable storage medium storing program for executing that pressure surveys environment Pending CN109828901A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811536794.8A CN109828901A (en) 2018-12-15 2018-12-15 Build method and device, Linux server and readable storage medium storing program for executing that pressure surveys environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811536794.8A CN109828901A (en) 2018-12-15 2018-12-15 Build method and device, Linux server and readable storage medium storing program for executing that pressure surveys environment

Publications (1)

Publication Number Publication Date
CN109828901A true CN109828901A (en) 2019-05-31

Family

ID=66858842

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811536794.8A Pending CN109828901A (en) 2018-12-15 2018-12-15 Build method and device, Linux server and readable storage medium storing program for executing that pressure surveys environment

Country Status (1)

Country Link
CN (1) CN109828901A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112328374A (en) * 2019-12-30 2021-02-05 江苏省未来网络创新研究院 Comprehensive evaluation system and method based on virtualized real-operation environment
CN112486807A (en) * 2020-11-18 2021-03-12 中信银行股份有限公司 Pressure testing method and device, electronic equipment and readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070026374A1 (en) * 2005-07-26 2007-02-01 Sanregret Robert A System and method for the delivery of education solutions via handheld devices
CN106383786A (en) * 2016-09-27 2017-02-08 北京金山安全软件有限公司 Interface pressure performance testing method and device and electronic equipment
CN107908535A (en) * 2017-11-13 2018-04-13 珠海金山网络游戏科技有限公司 Distributed clients analogy method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070026374A1 (en) * 2005-07-26 2007-02-01 Sanregret Robert A System and method for the delivery of education solutions via handheld devices
CN106383786A (en) * 2016-09-27 2017-02-08 北京金山安全软件有限公司 Interface pressure performance testing method and device and electronic equipment
CN107908535A (en) * 2017-11-13 2018-04-13 珠海金山网络游戏科技有限公司 Distributed clients analogy method and device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112328374A (en) * 2019-12-30 2021-02-05 江苏省未来网络创新研究院 Comprehensive evaluation system and method based on virtualized real-operation environment
CN112328374B (en) * 2019-12-30 2024-04-30 江苏省未来网络创新研究院 Comprehensive evaluation system and method based on virtualized real operation environment
CN112486807A (en) * 2020-11-18 2021-03-12 中信银行股份有限公司 Pressure testing method and device, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
US10671368B2 (en) Automatic creation of delivery pipelines
CN110688142B (en) Method, device and storage medium for publishing application programming interface
US10210074B1 (en) Performance testing platform that enables reuse of automation scripts and performance testing scalability
CN104541247B (en) System and method for adjusting cloud computing system
CN108964968B (en) Service access management method and system in container cloud environment
CN110162471A (en) A kind of method for testing pressure and system based on container cloud
CN104461856A (en) Performance test method, device and system based on cloud computing platform
US10977167B2 (en) Application monitoring with a decoupled monitoring tool
CN109471789A (en) For the multi-apparatus management method of test, device, server and storage medium
CN108304250A (en) Method and apparatus for the node for determining operation machine learning task
CN109739762A (en) A kind of performance test methods and device of application program
CN106933729A (en) A kind of method of testing and system based on cloud platform
CN104423961B (en) A kind of method and system for generating test script
CN109933519A (en) Automated testing method, device, system, medium and electronic equipment
CN111309734B (en) Method and system for automatically generating table data
CN111600760B (en) Quality detection system, method and equipment of power grid operation monitoring system
EP3268905A1 (en) Hybrid cloud management
CN109901985B (en) Distributed test apparatus and method, storage medium, and electronic device
CN112131208A (en) Full data migration method, device and equipment and computer readable storage medium
CN109828901A (en) Build method and device, Linux server and readable storage medium storing program for executing that pressure surveys environment
CN106844201A (en) Test environment dispositions method and system
CN114185874A (en) Big data based modeling method and device, development framework and equipment
US10200271B2 (en) Building and testing composite virtual services using debug automation
CN114610597A (en) Pressure testing method, device, equipment and storage medium
US11640281B2 (en) Tool for introspection in object-oriented source code

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
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20190531

WD01 Invention patent application deemed withdrawn after publication