CN111193634A - Pressure testing method and device and computer readable storage medium - Google Patents

Pressure testing method and device and computer readable storage medium Download PDF

Info

Publication number
CN111193634A
CN111193634A CN201910864872.5A CN201910864872A CN111193634A CN 111193634 A CN111193634 A CN 111193634A CN 201910864872 A CN201910864872 A CN 201910864872A CN 111193634 A CN111193634 A CN 111193634A
Authority
CN
China
Prior art keywords
test
target machine
information
machine
transmission
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.)
Granted
Application number
CN201910864872.5A
Other languages
Chinese (zh)
Other versions
CN111193634B (en
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910864872.5A priority Critical patent/CN111193634B/en
Publication of CN111193634A publication Critical patent/CN111193634A/en
Application granted granted Critical
Publication of CN111193634B publication Critical patent/CN111193634B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the application discloses a pressure testing method, a pressure testing device and a computer readable storage medium, wherein a configuration instruction is obtained, and the configuration instruction carries basic configuration information of a machine required by testing; selecting a first target machine from a first network according to basic configuration information of a machine required by testing to obtain a target machine testing cluster, wherein the first network comprises a plurality of preset candidate machines; acquiring a transmission link for transmitting test information between first target machines; determining a transmission condition for allowing the first target machine to transmit the test information according to the transmission link; configuring machines in the target machine test cluster based on the transmission link and the transmission condition to obtain a configured target machine test cluster; and when the test information meets the transmission condition, transmitting in the configured target machine test cluster based on the transmission link to obtain a test result. Therefore, the pressure test is safely and efficiently carried out.

Description

Pressure testing method and device and computer readable storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a pressure testing method, apparatus, and computer-readable storage medium.
Background
In recent years, due to the increase of network users, pressure tests are increasingly necessary to ensure normal use of users, and the requirements of pressure tests are increasing, but most of machines used in the current pressure test method are selected from the existing network, and machines actually used for providing services for users are used for testing, so that the actual use of users is threatened, the network safety is affected, and after a test request is made, manual review and configuration of the machines are required, a lot of time is consumed, and the efficiency is low.
Disclosure of Invention
In view of this, embodiments of the present application provide a pressure testing method, apparatus, and computer-readable storage medium, which can perform a pressure test safely and efficiently.
In a first aspect, an embodiment of the present application provides a pressure testing method, including:
in some embodiments, the pressure testing method comprises:
acquiring a configuration instruction, wherein the configuration instruction carries basic configuration information of a machine required by testing;
selecting a first target machine from a first network according to the basic configuration information of the machine required by the test to obtain a target machine test cluster, wherein the first network comprises a plurality of preset candidate machines;
acquiring a transmission link for transmitting test information between first target machines in the target machine test cluster;
determining a transmission condition for allowing the first target machine to transmit the test information according to the transmission link;
configuring a first target machine in the target machine test cluster based on the transmission link and the transmission condition to obtain a configured target machine test cluster;
and when the test information meets the transmission condition, transmitting in the configured target machine test cluster based on the transmission link to obtain a test result.
In some embodiments, determining the transmission condition for allowing the first target machine to perform the test information transmission according to the transmission sequence includes:
determining target transmission information of the first target machine according to the transmission link, wherein the target transmission information comprises a transmission interface identifier and a network protocol address of the first target machine;
determining the transmission condition based on the target transmission information.
In some embodiments, the first target machine includes a pressing machine and a pressed machine, and when the transmission condition is satisfied, the test information is transmitted in the configured target machine test cluster based on the transmission link, so as to obtain a test result, where the method includes:
generating test information based on the generator;
determining a target address of the test information transmission according to the transmission link;
when the target address meets the transmission condition, transmitting the test information to a pressed machine corresponding to the target address;
counting the time and the number of the pressed machine generating response information based on the test information to obtain statistical parameters;
and obtaining the test result based on the statistical parameters.
In some embodiments, the configuration instruction further carries test scenario information; the pressure testing method further comprises the following steps:
when the idle machines in the first network do not meet the requirement of the basic configuration information of the machines required by the test, generating capacity expansion configuration application information, wherein the capacity expansion configuration application information comprises the basic configuration information of the machines required by the test and the test scene information;
based on the basic configuration information of the machine required by the test and the test scene information of the test purpose, performing safety audit on the expansion configuration application information;
and when the security audit is passed, selecting a second target machine in an idle state in a second network to join the configured target machine test cluster to obtain the target machine test cluster after capacity expansion configuration.
In some embodiments, when the security audit is passed, adding a second target machine in an idle state in an existing network to the configured target machine test cluster to obtain a target machine test cluster after capacity expansion configuration, where the method includes:
when the auditing is passed, selecting a second target machine in an idle state from the current network;
acquiring a transmission interface identifier and a network protocol address of the second target machine;
and adding the second target machine into the configured target machine test cluster based on the transmission interface identifier and the network protocol address of the second target machine to obtain the capacity-expanded configured target machine test cluster.
In some embodiments, configuring a first target machine in the target machine test cluster based on the transmission link and the transmission condition to obtain a configured target machine test cluster includes:
acquiring a preset test algorithm and a preset monitoring algorithm;
adjusting the preset test algorithm based on the transmission condition and the transmission link to obtain an adjusted test algorithm;
and configuring a first target machine in the target machine test cluster based on the adjusted test algorithm and the preset monitoring algorithm to obtain a configured target machine test cluster.
In some embodiments, the pressure testing method further comprises:
performing safety monitoring on the first target machine based on the monitoring algorithm;
when the first target machine is monitored to be abnormal in operation, acquiring alarm information, wherein the alarm information comprises a machine identifier;
and performing safety recovery on the first target machine based on the alarm information.
In a second aspect, an embodiment of the present application provides a pressure testing apparatus, including:
the instruction acquisition unit is used for acquiring a test instruction, and the test instruction carries basic configuration information of a machine required by the test;
the selecting unit is used for selecting a first target machine from a first network according to the basic configuration information of the machine required by the test to obtain a target machine test cluster, and the first network comprises a plurality of preset candidate machines;
a transmission link acquisition unit, configured to acquire a transmission link for transmitting test information between first target machines in the target machine test cluster;
a transmission condition determining unit, configured to determine, according to the transmission link, a transmission condition that allows the first target machine to perform transmission of the test information;
the configuration unit is used for configuring a first target machine in the target machine test cluster based on the transmission condition and the transmission link to obtain a configured target machine test cluster;
and the test unit is used for transmitting the test information in the configured target machine test cluster based on the transmission link to obtain a test result when the test information meets the transmission condition.
In a third aspect, embodiments of the present application provide a computer-readable storage medium having stored thereon a computer program, which, when run on a computer, causes the computer to perform a pressure testing method as provided in any of the embodiments of the present application.
The method comprises the steps that a configuration instruction can be obtained, and the configuration instruction carries basic configuration information of a machine required by testing; selecting a first target machine from a first network according to the basic configuration information of the machine required by the test to obtain a target machine test cluster, wherein the first network comprises a plurality of preset candidate machines; acquiring a transmission link for transmitting test information between first target machines in the target machine test cluster; determining a transmission condition for allowing the first target machine to transmit the test information according to the transmission link; configuring a first target machine in the target machine test cluster based on the transmission link and the transmission condition to obtain a configured target machine test cluster; and when the test information meets the transmission condition, transmitting in the configured target machine test cluster based on the transmission link to obtain a test result. According to the method and the device, the first target machine is selected from the preset candidate machines, and the transmission conditions are set, so that the test information can be transmitted only in the configured target machine test cluster, the first target machine and the machine which is actually used for providing service for the user are enabled, normal use of the user is avoided being influenced, in addition, the device is automatically configured according to the transmission link and the transmission conditions, the operation is simpler and faster, and the application can safely and efficiently carry out pressure test.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic view of a scenario of a pressure testing method according to an embodiment of the present invention;
FIG. 2a is a schematic flow chart of a pressure testing method according to an embodiment of the present invention;
FIG. 2b is a schematic flow chart of a pressure testing method according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a pressure testing apparatus according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a pressure test terminal provided in an embodiment of the present invention;
FIG. 5a is a schematic diagram of a result display interface of the pressure testing terminal according to the embodiment of the present invention;
FIG. 5b is a functional schematic diagram of a pressure testing system provided by an embodiment of the present invention;
fig. 5c is a schematic view illustrating a configuration flow of a test cluster of the pressure test system according to an embodiment of the present invention;
fig. 5d is a task management diagram of the stress testing system according to the embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a pressure testing method, a pressure testing device and a storage medium.
The pressure test is to send a request of an expected number, efficiency conditions of the testing machine under different pressure conditions and pressure conditions that the pressed machine can bear by the pressing machine to the pressed machine within the same time or a certain period of time by building a test environment (namely a configured target machine test cluster) similar to an actual environment. And then, carrying out targeted test and analysis, finding out bottlenecks affecting the performance of the machine, and evaluating the efficiency condition of the machine in an actual use environment.
An embodiment of the present invention provides a pressure testing system, including any one of the pressure testing apparatuses provided in the embodiments of the present invention, where the pressure testing apparatus may be specifically integrated in a terminal, and the terminal may include: a mobile phone, a tablet Computer, a notebook Computer, or a Personal Computer (PC).
In addition, the stress testing system may also include other devices, such as servers and the like.
For example, referring to fig. 1, a stress testing system includes a terminal and a server, the terminal and the server being linked via a network. The network includes network entities such as routers and gateways.
For example, referring to fig. 1, when a user needs to perform a stress test, a configuration instruction may be triggered through an instruction interface on a terminal interface, and meanwhile, the terminal may obtain the configuration instruction, where the configuration instruction carries basic configuration information of a machine required for the test; selecting a first target machine from a first network according to the basic configuration information of the machine required by the test to obtain a target machine test cluster, wherein the first network comprises a plurality of preset candidate machines; acquiring a transmission link for transmitting test information between first target machines in the target machine test cluster; determining a transmission condition for allowing the first target machine to transmit the test information according to the transmission link; configuring a first target machine in the target machine test cluster based on the transmission link and the transmission condition to obtain a configured target machine test cluster; and when the test information meets the transmission condition, transmitting in the configured target machine test cluster based on the transmission link to obtain a test result. Thereby safely and efficiently performing the pressure test.
The above example of fig. 1 is only an example of a system architecture for implementing the embodiment of the present invention, and the embodiment of the present invention is not limited to the system architecture shown in fig. 1, and various embodiments of the present invention are proposed based on the system architecture.
The following are detailed below. The numbers in the following examples are not intended to limit the order of preference of the examples.
The present embodiment will be described from the perspective of a pressure testing apparatus, which may be specifically integrated in a terminal device, which may be a mobile phone, a tablet computer, a notebook computer, or a Personal Computer (PC), etc.
As shown in fig. 2a, a stress testing method is provided, which may be executed by a processor of a terminal device, and the specific flow of the stress testing method is as follows:
101. and acquiring a configuration instruction, wherein the configuration instruction carries basic configuration information of a machine required by testing.
In one embodiment, an instruction interface may be provided on the terminal interface to facilitate testing of user-triggered configuration instructions. The command interface may be in various forms such as an input box, a selection box, a button, an icon, and the like.
In an embodiment, before a test user clicks an instruction interface on a terminal interface, a test task scenario and basic configuration information required by a test task need to be determined, where the basic configuration information is information used for configuring a first target machine, and may specifically include basic configuration information of a machine required by the test, information of quantity of test information transmitted in unit time, and information of the test scenario.
In an embodiment, an input box may be set on a test interface of a terminal, and based on an input operation of a test user in the input box, basic configuration information and test scenario information of a test task are acquired. When a test user clicks an instruction interface (such as a task issuing button) on a terminal interface, a configuration instruction can be triggered to issue a test task, and the configuration instruction carries the basic configuration information and the test scenario information. After the configuration instruction is triggered, the terminal can acquire the configuration instruction, acquire basic configuration information and test scenario information carried by the configuration instruction, and start to configure a target machine cluster required by the pressure test according to the acquired information.
In one embodiment, a test user may input a network protocol address sequence chart of the first target machine in an input box of a terminal interface, and the terminal may determine, based on an input operation of the user, an order in which to invoke the first target machine during the stress test.
In an embodiment, referring to fig. 5c, the terminal may determine whether the test task issued by the test user can be executed according to the basic configuration information and the test scenario information, for example, if the number of machines required for the test is too large, the task may not be executed.
In an embodiment, when the terminal determines that the test task issued by the user can be executed, the terminal skips to display the machine call sequence setting interface, and the user inputs the network protocol address sequence diagram of the first target machine to perform setting. Therefore, the terminal can be prevented from determining that the test task cannot be executed, and the user wastes time and energy to set a useless machine calling sequence.
The basic configuration information of the machine required by the test comprises the number information and the model information of the machine required by the test.
102. And selecting a first target machine from a first network according to the basic configuration information of the machine required by the test to obtain a target machine test cluster, wherein the first network comprises a plurality of preset candidate machines.
The first network is a machine cluster which is prepared in advance and is specially used for pressure testing, the first network comprises a plurality of preset candidate machines, and the preset candidate machines in the first network are not used for providing services for users in the existing network under the general condition.
And selecting a corresponding number of first target machines from the first network according to basic configuration information of the machines required by the test set by the user.
In an embodiment, the terminal may initialize the first target machine by issuing an initialization instruction to the first target machine, and eliminate original configuration information in the first target machine, so as to facilitate subsequent configuration of the first target machine.
103. And acquiring a transmission link for transmitting the test information between the first target machines in the target machine test cluster.
The test information is sent by the pressing machine, and is received and processed by the pressing machine.
In one embodiment, the pressure-bearing capacity of the pressed machine may be determined by counting the efficiency of the pressed machine's receipt and processing of test information.
The transmission link is information indicating a transmission sequence in which the test information is transmitted between the first target machines in the target machine test cluster, and may be represented as a network protocol address sequence diagram of the first target machine or a network protocol address sequence table of the first target machine.
In an embodiment, after the first target machine is selected, the transmission interface identifier and the network protocol address of the first target machine may be obtained, and then the transmission interface identifier and the network protocol address of the first target machine are returned to the test user, and the test user may determine a transmission link for transmitting the test information between the first target machines according to the transmission interface identifier and the network protocol address of the first target machine.
In an embodiment, the test user may input the network protocol address sequence chart of the first target machine on the terminal interface, and the terminal may acquire the transmission link based on the input operation of the user. Therefore, the test user determines the transmission link, the accuracy of the transmission sequence of the test information can be improved, and the test result which is more in line with the test scene can be obtained.
In another embodiment, after the first target machine is selected, the terminal may obtain the transmission interface identifier and the network protocol address of the first target machine, obtain the historical transmission link from the local storage according to the test scenario input by the user, select the target historical transmission link with higher similarity to the test scenario of the current test task, and adjust the target historical transmission link according to the number of the first target machines, the transmission interface identifier, and the network protocol address to generate the transmission link of the current test scenario. Therefore, automatic configuration of the first target machine can be realized, the test threshold is reduced, time consumption is reduced, and the pressure test efficiency is improved. The historical transmission link is a transmission link applied in the historical test task and can be from a transmission link record which is locally stored and summarized and set by a user.
104. And determining transmission conditions for allowing the first target machine to transmit the test information according to the transmission link.
The transmission condition is a condition for allowing the test information to be transmitted between the first target machines, and the test information can be transmitted only when the condition is met.
In an embodiment, determining, according to the transmission link, a transmission condition that allows the first target machine to transmit the test information specifically includes the following steps:
determining target transmission information of the first target machine according to the transmission link, wherein the target transmission information comprises a transmission interface identifier and a network protocol address of the first target machine;
determining the transmission condition based on the target transmission information.
In an embodiment, the target address of the test information transmission may be a transmission interface identifier or a network protocol address of the first target machine as the transmission condition.
105. And configuring a first target machine in the target machine test cluster based on the transmission link and the transmission condition to obtain a configured target machine test cluster.
In some embodiments, configuring a first target machine in the target machine test cluster based on the transmission link and the transmission condition to obtain a configured target machine test cluster includes:
acquiring a preset test algorithm and a preset monitoring algorithm;
adjusting the preset test algorithm based on the transmission condition and the transmission link to obtain an adjusted test algorithm;
and configuring a first target machine in the target machine test cluster based on the adjusted test algorithm and a preset monitoring algorithm to obtain a configured target machine test cluster.
The preset test algorithm and the preset monitoring algorithm are test programs written in advance and can be obtained from a memory of the terminal equipment.
In an embodiment, the preset test algorithm may include a voltage sending algorithm of a voltage sending machine and a voltage receiving algorithm of a voltage receiving machine, and the target address of the test information transmission in the voltage sending algorithm and the voltage receiving algorithm may be set according to the transmission link.
In an embodiment, the preset test algorithm further includes a network security isolation program, and the security rule in the network security isolation program can be adjusted through the transmission condition.
In one embodiment, network security isolation may be achieved using an iptables component that may process test information using rules defined methods, such as clear, reject, and discard. Wherein, the iptables component is an IP information filtering component.
In one embodiment, the iptables component, in deciding whether to filter the test information, has a set of rules followed and composed, stored in a dedicated data filter table, and these tables are integrated into the memory of the first target machine. In the data filter table, rules are stored in groups in a linked list (chain). These rules specify the source address, destination address, transport protocol, type of service, etc. of the information transfer, respectively. While the iptables component can be used to add, edit, and remove rules.
In one embodiment, the terminal may set and adjust rules using the iptables component according to transmission conditions. When the source address, the target address, the transmission protocol, the service type, and the like of the test information satisfy the rules, the iptables component may pass through the test information, and the test information may be transmitted between the first target machines. When the source address, the target address, the transmission protocol and the service type of the test information do not meet the rules, the iptables component rejects the test information, and the test information cannot be transmitted between the first target machines.
In some embodiments, the pressure testing method further comprises:
performing safety monitoring on the first target machine based on the monitoring algorithm;
when the first target machine is monitored to be abnormal in operation, acquiring alarm information, wherein the alarm information comprises a machine identifier;
and performing safety recovery on the first target machine based on the alarm information.
In an embodiment, a preset monitoring algorithm may be used to monitor the operation condition of the iptables component, when it is monitored that the operation of the iptables component is abnormal, alarm information may be generated in the first target machine and sent to the terminal through a network link, or the alarm information may be sent to other terminals used by the test user through a short message, a mail, or other communication methods.
Among other things, a running exception includes situations, such as the iptables component being not enabled, or the iptables component being altered.
The alarm information is generated by the first target machine based on the preset monitoring algorithm, the machine identifier is a machine identity information identifier of the first target machine sending the alarm information, and the machine identifier may include multiple forms such as a machine code and a network protocol address of the machine.
In one embodiment, the alarm information may include an abnormal operation condition.
In one embodiment, performing security recovery on the first target machine based on the alarm information includes:
restarting a first target machine corresponding to the machine identifier based on the alarm information;
or adjusting a test algorithm in the first target machine corresponding to the machine identifier based on the alarm information;
or stopping the pressure test based on the alarm information.
In an embodiment, the terminal may restart the first target machine corresponding to the machine identifier based on the alarm information. For example, when the iptables component is not started, the terminal may restart the instruction to the first target with abnormal operation, restart the preset program in the first target machine, and start the iptables component.
In an embodiment, the terminal may adjust a test algorithm in the first target machine corresponding to the machine identifier based on the alarm information. Specifically, the transmission link and transmission condition information in the test algorithm may be adjusted, for example, the network protocol address of the first target machine with abnormal operation in the transmission link and transmission condition may be deleted, so as to avoid using the first target machine with operation problem.
In an embodiment, the terminal may stop the pressure test based on the alarm information. When the number of the first target machines with abnormal operation exceeds the preset value, the terminal may send a test stopping instruction to all the first target machines in the configured target machine test cluster, and stop generation, transmission, reception and response of test information in all the first target machines. Wherein the presettable value may be adjusted according to the total number of the first target machines.
In an embodiment, the tester may further perform manual repair on the program in the first target machine according to the alarm information.
In an embodiment, after the configuration of the first target machine is completed according to a preset monitoring algorithm, a transmission link and transmission conditions, the terminal may further tune operation parameters of machines of different models according to a historical tuning record, so as to obtain a configured target machine test cluster. The historical tuning records can be collected from tuning records in a local memory, and the tuning records are always collected to the collected results of tuning parameters set by a user before the current time point.
In another embodiment, the configuration instruction further carries test scenario information; the pressure testing method further comprises the following steps:
when the idle machines in the first network do not meet the requirement of the basic configuration information of the machines required by the test, generating capacity expansion configuration application information, wherein the capacity expansion configuration application information comprises the basic configuration information of the machines required by the test and the test scene information;
based on the basic configuration information of the machine required by the test and the test scene information, performing safety audit on the expansion configuration application information;
and when the security audit is passed, selecting a second target machine in an idle state in a second network to join the configured target machine test cluster to obtain the target machine test cluster after capacity expansion configuration.
The first network and the second network are heterogeneous networks, the first network and the second network are isolated through iptables components, a plurality of preset candidate machines are arranged in the first network and used for performing pressure tests but not used for actually providing services for users, and a plurality of machines which are actually used for providing services for users are arranged in the second network.
When the idle machines of the first network are insufficient or the models of the idle machines of the first network do not meet the test requirements, the machines in the second network can be selected for testing.
In an embodiment, in order to avoid that the normal service of the machine in the second network is affected by the pressure test, when the machine in the second network is used for performing the pressure test, security audit needs to be performed according to the test scenario and the basic configuration information of the machine required by the test. For example, when the test scenario requires that a critical machine in the second network be used, the security audit cannot pass. For another example, when the number of machines required for a test exceeds a predetermined value, the security audit cannot pass.
The security audit can be implemented manually, for example, the volume expansion configuration application information can be sent to a terminal for audit in the pressure test system through a network link, and audit is performed by an auditor.
In another embodiment, the security audit may be automatically performed according to a preset audit algorithm in the terminal.
In an embodiment, when the security audit is passed, selecting a second target machine in an idle state in a second network to join the configured target machine test cluster to obtain a target machine test cluster after capacity expansion configuration, including:
when the audit is passed, selecting a second target machine in an idle state from a second network;
acquiring a transmission interface identifier and a network protocol address of the second target machine;
and adding the second target machine into the configured target machine test cluster based on the transmission interface identifier and the network protocol address of the second target machine to obtain the capacity-expanded configured target machine test cluster.
In an embodiment, the second target machine may be added to the configured target machine test cluster by modifying a rule of the iptables component.
In an embodiment, adding the second target machine to the configured target machine test cluster based on the transmission interface identifier and the network protocol address of the second target machine, to obtain a capacity-expanded configured target machine test cluster, includes:
acquiring a capacity expansion configuration post-transmission link for transmitting test information between the second target machine and the first target machine based on the transmission interface identifier and the network protocol address of the second target machine;
acquiring a transmission condition after capacity expansion configuration for allowing test information transmission between the second target machine and the first target machine based on the transmission interface identifier and the network protocol address of the second target machine;
and obtaining the target machine test cluster after the capacity expansion configuration based on the transmission link after the capacity expansion configuration, the transmission condition after the capacity expansion configuration and the configured target machine test cluster.
For the specific configuration steps, reference is made to the configuration of the first target machine, and details are not repeated.
106. And when the test information meets the transmission condition, transmitting in the configured target machine test cluster based on the transmission link to obtain a test result.
In some embodiments, the first target machine comprises a pressing machine and a pressed machine; when the transmission condition is met, the test information is transmitted in the configured target machine test cluster based on the transmission link to obtain a test result, which may specifically include the following steps:
generating test information based on the generator;
determining a target address of the test information transmission according to the transmission link;
when the target address meets the transmission condition, transmitting the test information to a pressed machine corresponding to the target address;
counting the time and the number of the pressed machine generating response information based on the test information to obtain statistical parameters;
and obtaining the test result based on the statistical parameters.
The pressing machine is a machine used for sending out test information, and the pressed machine is a machine which receives the test information and responds based on the test information.
The statistical parameters are parameters for indicating the response capability of the pressed machine to the test information, and specifically may include a response success rate of each pressed machine for generating response information based on the test information, an average response time of each pressed machine, a total response success number of each pressed machine, and a response success rate, a response time, and a total response success number of all pressed machines.
In order to facilitate the test user to analyze the performance and efficiency of each target machine according to the pressure test result and make adjustments, a machine load schematic diagram can be generated according to the test result, and the test result and the machine load schematic diagram are displayed in a result display interface of the terminal.
Referring to fig. 5a, the machine load diagram includes first target machine test result controls, and the first target machine test result controls may be connected to each other to indicate a test information transmission sequence between the first target machines. The first target machine test result control can mark a first target machine number and a first target machine network protocol address. The first target machine test result control can be set to be different in color or shape according to the load size grade of the first target machine.
And when the test user clicks the first target machine test result control, skipping to display a first target machine test result interface, wherein the interface at least comprises information such as response success rate, average response time, total response success amount and the like of the first target machine.
In an embodiment, referring to fig. 5a, in order to facilitate the test of the machine in the test scenario adjusted by the user according to the test result, an adjustment suggestion may be generated based on the test result and displayed in the test result display interface.
As can be seen from the above, the embodiment of the present application may obtain a configuration instruction, where the configuration instruction carries basic configuration information of a machine required for testing; selecting a first target machine from a first network according to the basic configuration information of the machine required by the test to obtain a target machine test cluster, wherein the first network comprises a plurality of preset candidate machines; acquiring a transmission link for transmitting test information between first target machines in the target machine test cluster; determining a transmission condition for allowing the first target machine to transmit the test information according to the transmission link; configuring a first target machine in the target machine test cluster based on the transmission link and the transmission condition to obtain a configured target machine test cluster; and when the test information meets the transmission condition, transmitting in the configured target machine test cluster based on the transmission link to obtain a test result. According to the method and the device, the first target machine is selected from the preset candidate machines, and the transmission conditions are set, so that the test information can be transmitted only in the configured target machine test cluster, the first target machine and the machine which is actually used for providing service for the user are enabled, normal use of the user is avoided being influenced, in addition, the device is automatically configured according to the transmission link and the transmission conditions, the operation is simpler and faster, and the application can safely and efficiently carry out pressure test.
According to the method described in the previous embodiment, the pressure testing device is specifically integrated in the terminal device for further details.
Referring to fig. 2b, a specific process of the pressure testing method according to the embodiment of the present invention is as follows:
201. the terminal obtains a configuration instruction, and the configuration instruction carries basic configuration information of a machine required by testing.
Referring to fig. 5b, the terminal device includes a display layer, a logic layer, and a storage layer, where the display layer, the logic layer, and the storage layer may interact with each other to cooperatively complete a stress test task, where the display layer is configured to interact with a tester, for example, to obtain a configuration instruction based on an input operation of the tester on a display interface, and obtain basic configuration information of a machine required for a test, where the configuration instruction is carried by the configuration instruction.
Specifically, a display interface of the terminal is provided with a plurality of input boxes, for example, information input boxes such as basic configuration information of a machine required for testing, quantity information of test information transmitted in unit time, and test scenes. The test user can input basic configuration information set by the user in the input box, then a task issuing button on a display interface of the terminal is clicked to trigger a configuration instruction, the terminal can acquire the basic configuration information carried by the configuration instruction while acquiring the configuration instruction, and the basic configuration information of the machine required by the test comprises the information of the number and the model of the machine required by the test.
In one embodiment, the display layer may also be used for task management and result presentation, for example, multiple test tasks may be performed in a pressure testing device. Wherein, a plurality of test tasks can be carried out simultaneously, and the plurality of test tasks sometimes need to be queued for execution.
For example, referring to fig. 5d, the display layer includes a task management module, and when the machines in the first network can allow the pressure test task a and the pressure test task B to be executed simultaneously, the terminal may select the machines from the first network to form a target machine test cluster 1 and a target cluster test cluster 2, configure the target machine test cluster and the target cluster test cluster, and then perform the pressure test task a and the pressure test task B in the two configured test clusters simultaneously. The results of the testing may be stored in a database in the storage layer.
For example, if there is no idle machine in the first network, or the restricted machine does not meet the requirement of the basic configuration information of the machine required for the test, and the capacity expansion configuration application information does not pass the security audit, the stress test task needs to be queued for execution.
When the pressure test task is queued for execution, a pressure test task list can be displayed in a display interface of the terminal, the name of the pressure test task and the corresponding state (such as queuing, in progress or completed) of the pressure test task can be displayed in the list, a test result viewing control can be set in the list, and when a test user clicks the test result viewing control, the test result display interface is skipped to be displayed, and the pressure test result is viewed.
Referring to fig. 5b, the logic layer of the terminal may select the first target machine from the first network based on the configuration instruction trigger, and specifically, may select the first target machine according to the basic configuration information of the machine required for the test.
202. And the terminal selects a first target machine from the first network according to the basic configuration information of the machine required by the test to obtain a target machine test cluster.
The terminal can select machines meeting the requirements of the number and the type of the machines required by the test as first target machines according to the basic configuration information of the machines required by the test.
In an embodiment, referring to fig. 5b, the storage layer of the terminal may be used to store a machine table, where information such as a number, a network protocol address, and a model number of a machine in the first network is stored in the machine table, and the logic layer of the terminal may select the first target machine according to the machine table. And the logic layer of the terminal is linked with the first network and the second network through the network, and the adjusted test algorithm is sent to the first target machine.
In another embodiment, a logic layer of a terminal is linked with a first network and a second network through a network, acquires a transmission interface identifier and a network protocol address of a first target machine from the network, and determines a target machine test cluster according to the transmission interface identifier and the network protocol address of the first target machine.
In an embodiment, when the idle machine in the first network does not meet the requirement of the basic configuration information of the machine required for the test, a second target machine in an idle state may be further selected from a second network to join the configured target machine test cluster, so as to obtain a target machine test cluster after capacity expansion configuration, specifically, the method includes the following steps:
when the idle machine in the first network does not meet the requirement of the basic configuration information of the machine required by the test, the terminal generates capacity expansion configuration application information according to the basic configuration information of the machine required by the test and the test scene information;
the terminal can perform safety audit on the expansion configuration application information according to a preset audit algorithm, and when the safety audit is passed, a second target machine in an idle state in a second network is selected to be added into the configured target machine test cluster, so that the expanded and configured target machine test cluster is obtained.
The preset auditing algorithm can safely audit the expansion configuration application information according to the basic configuration information and the test scene information of the machine required by the test, specifically, whether the number and the model of the machine required by the test meet preset safety conditions or not can be judged, and when the preset safety conditions are met, the safety audit is passed.
In an embodiment, selecting a second target machine in an idle state in a second network to join the configured target machine test cluster includes the following steps:
when the audit is passed, selecting a second target machine in an idle state from a second network;
acquiring a transmission interface identifier and a network protocol address of the second target machine;
and adding the second target machine into the configured target machine test cluster based on the transmission interface identifier and the network protocol address of the second target machine to obtain the capacity-expanded configured target machine test cluster.
The transmission interface identifier and the network protocol address of the second target machine may be obtained according to the network connection.
Referring to fig. 5b, the display layer of the terminal may also be used for machine management, for example, when the logic layer selects the first target machine or the second target machine, the number and the network protocol address of the selected machine may be displayed on the terminal display page.
203. And the terminal acquires a transmission link for transmitting the test information between the first target machines in the target machine test cluster.
Referring to fig. 5b, in an embodiment, the logic layer of the terminal may obtain the transmission interface identifier and the network protocol address of the first target machine from the storage layer, obtain a transmission link applied in a historical test scenario in the local storage according to a test scenario input by a user, select a transmission link applied in the test scenario with higher similarity to the test scenario input by the user, and generate a transmission link of a current test scenario according to the number of the first target machines, the transmission interface identifier, and the network protocol address.
In another embodiment, the terminal may obtain the transmission link according to the test information transmission sequence scheme input by the user on the display interface.
In an embodiment, when the idle machine in the first network does not meet the requirement of the basic configuration information of the machine required for the test, and passes the security audit, an idle second target machine may be selected from a second network, and a post-capacity-expansion-configuration transmission link for performing test information transmission between the second target machine and the first target machine is obtained based on a transmission interface identifier and a network protocol address of the second target machine.
204. And the terminal determines the transmission condition for allowing the first target machine to transmit the test information according to the transmission link.
Referring to fig. 5b, in an embodiment, a logic layer of a terminal may determine a security isolation procedure or a rule in a security isolation component according to a transmission condition, and a determination method of the transmission condition and a determination method of the security isolation component, which are described in the above embodiments and are not described again.
In an embodiment, when the idle machine in the first network does not meet the requirement of the basic configuration information of the machine required for the test, and passes the security audit, an idle second target machine may be selected from a second network, and based on a transmission link after the capacity expansion configuration for the test information transmission between the second target machine and the first target machine, a transmission condition after the capacity expansion configuration is obtained.
205. And the terminal configures a first target machine in the target machine test cluster based on the transmission link and the transmission condition to obtain the configured target machine test cluster.
Referring to fig. 5b, the logic layer of the terminal may adjust a preset test algorithm according to the transmission link and the transmission condition, and send the adjusted test algorithm to the machines in the target machine test cluster through the network, where the adjusted test algorithm includes a plurality of instructions, and the first target machine may read the instructions, send test information according to the instructions, receive the test information, and make a response.
In an embodiment, the adjusted testing algorithm and the preset monitoring algorithm may be sent to the first target machine through a Docker. The Docker is an open-source application container engine, and can allocate the data packet of the algorithm to the first target machine.
In an embodiment, when the idle machine in the first network does not meet the requirement of the basic configuration information of the machine required for the test and passes the security audit, the logic layer of the terminal may adjust the preset test algorithm according to the transmission condition after the capacity expansion configuration and the transmission link after the capacity expansion configuration, and configure the adjusted test algorithm to the first target machine and the second target machine through the network.
Referring to fig. 5b, in an embodiment, before starting the configuration, the logic layer of the terminal further initializes the first target machine in the target machine test cluster, for example, deletes the test algorithm stored in the first target machine, and adjusts the operating parameter of the first target machine to the initial parameter.
Referring to fig. 5b, in an embodiment, after the configuration is completed and before the pressure test is performed, the logic layer of the terminal further needs to adjust the operation parameters of the first target machine according to the adjusted test algorithm.
Before and after configuring the second target machine, initialization and parameter tuning are also required, and reference is made to the above embodiments, which are not described herein again.
206. And the terminal acquires the test result in the configured target machine test cluster.
Referring to fig. 5b, in an embodiment, the logic layer of the terminal may collect a test result from the configured target machine test cluster through network link.
Referring to fig. 5b, in an embodiment, the storage layer of the terminal may store the test results in the memory of the terminal.
In an embodiment, the terminal may show the test result to the test user through the display interface, and may also send the test result to other terminals through a network or other communication means (e.g., mail, short message, etc.).
After obtaining the adjusted test algorithm, the first target machine may read the instruction in the adjusted test algorithm and perform a pressure test according to the instruction. The adjusted test algorithms configured for each first target machine are not completely the same, and the first target machines need to be configured according to the role of the first target machines in the pressure test task.
Referring to fig. 5b, when performing the pressure test of the payment scenario, the target machine cluster should include a pressing machine, a pressed machine, and a virtual machine, where the pressing machine is a machine that initiates payment, the pressed machine is a machine that provides payment service for the pressing machine, and the virtual machine is a machine that provides service for the pressing machine. The pressing machine may further include a pressing host and a plurality of pressing extension machines that send payment requests in parallel, the pressed machine needs to execute a plurality of payment service programs, for example, receive a payment request, generate a payment order, send the payment order to a virtual machine, and the like, the pressed machine needs to send the payment order to the virtual machine (for example, a banking server) for payment, and the terminal may collect payment results and send test results to a testing user. The machines in the configured target machine test cluster can transmit test information such as payment requests and payment orders according to the adjusted test algorithm. The adjusted test algorithm comprises a safety isolation program, so that test information can be prevented from being transmitted to machines in the current network.
In addition, referring to fig. 5b, after passing the security audit, the security isolation procedure may be adjusted, so as to perform a pressure test using a payment client, a payment server, a bank server, etc. in the current network.
As can be seen from the above, the embodiment of the present application may obtain a configuration instruction, where the configuration instruction carries basic configuration information of a machine required for testing; selecting a first target machine from a first network according to the basic configuration information of the machine required by the test to obtain a target machine test cluster, wherein the first network comprises a plurality of preset candidate machines; acquiring a transmission link for transmitting test information between first target machines in the target machine test cluster; determining a transmission condition for allowing the first target machine to transmit the test information according to the transmission link; configuring a first target machine in the target machine test cluster based on the transmission link and the transmission condition to obtain a configured target machine test cluster; and when the test information meets the transmission condition, transmitting in the configured target machine test cluster based on the transmission link to obtain a test result. According to the method and the device, the first target machine is selected from the preset candidate machines, the transmission condition is set, the test information can be transmitted only in the target machine test cluster after configuration, the first target machine and the machine which is actually used for providing service for the user are enabled, normal use of the user is avoided being influenced, in addition, the method and the device automatically perform configuration of the machine according to the transmission link and the transmission condition, operation is simpler and quicker, and therefore the scheme can safely and efficiently perform pressure test.
In order to better implement the method, an embodiment of the present invention further provides a pressure testing apparatus, which may be specifically integrated in an electronic device, where the electronic device may be a terminal device, a server, a personal computer, or the like.
For example, in the present embodiment, a pressure testing apparatus is integrated in a terminal device as an example, and the method of the embodiment of the present invention is described in detail.
For example, as shown in fig. 3, the pressure testing apparatus may include an instruction acquisition unit 301, a selection unit 302, a transmission link acquisition unit 303, a transmission condition unit 304, a configuration unit 305, and a testing unit 306. The following were used:
(1) the instruction obtaining unit 301 is configured to obtain a test instruction, where the test instruction carries basic configuration information of a machine required for testing.
(2) A selecting unit 302, configured to select a first target machine from a first network according to the basic configuration information of the machine required for testing, so as to obtain a target machine test cluster, where the first network includes a plurality of preset candidate machines.
In some embodiments, the selecting unit 302 may further be configured to select, when the security audit passes, a second target machine in an idle state in the second network to join the configured target machine test cluster, so as to obtain a target machine test cluster after capacity expansion configuration.
(3) A transmission link obtaining unit 303, configured to obtain a transmission link for transmitting test information between first target machines in the target machine test cluster.
In some embodiments, the transmission link obtaining unit 303 may further be configured to obtain, based on the transmission interface identifier and the network protocol address of the second target machine, a transmission link after capacity expansion configuration for test information transmission between the second target machine and the first target machine.
(4) A transmission condition determining unit 304, configured to determine, according to the transmission link, a transmission condition that allows the first target machine to perform transmission of the test information.
In some embodiments, the transmission condition determining unit 304 may specifically be configured to:
determining target transmission information of the first target machine according to the transmission link, wherein the target transmission information comprises a transmission interface identifier and a network protocol address of the first target machine;
determining the transmission condition based on the target transmission information.
In some embodiments, the transmission condition determining unit 304 may further be configured to obtain, based on the transmission interface identifier and the network protocol address of the second target machine, a post-expansion configured transmission condition that allows test information transmission between the second target machine and the first target machine.
(5) A configuring unit 305, configured to configure a first target machine in the target machine test cluster based on the transmission condition and the transmission link, so as to obtain a configured target machine test cluster.
In some embodiments, the configuration unit 305 may specifically be configured to:
acquiring a preset test algorithm and a preset monitoring algorithm;
adjusting the preset test algorithm based on the transmission condition and the transmission link to obtain an adjusted test algorithm;
and configuring a first target machine in the target machine test cluster based on the adjusted test algorithm and the preset monitoring algorithm to obtain a configured target machine test cluster.
In some embodiments, the configuration unit 305 may be further configured to obtain the target machine test cluster after capacity expansion configuration based on the transmission condition after capacity expansion configuration, and the target machine test cluster after configuration.
(6) And the test unit 306 is configured to, when the test information meets the transmission condition, transmit the test information in the configured target machine test cluster based on the transmission link to obtain a test result.
In some embodiments, the first target machine includes a pressing machine and a pressed machine, and the testing unit 306 may be specifically configured to:
generating test information based on the generator;
determining a target address of the test information transmission according to the transmission link;
when the target address meets the transmission condition, transmitting the test information to a pressed machine corresponding to the target address;
counting the time and the number of the pressed machine generating response information based on the test information to obtain statistical parameters;
and obtaining the test result based on the statistical parameters.
In one implementation, the test unit 306 may also be configured to:
performing safety monitoring on the first target machine based on the monitoring algorithm;
when the first target machine is monitored to be abnormal in operation, acquiring alarm information, wherein the alarm information comprises a machine identifier;
and performing safety recovery on the first target machine based on the alarm information.
As can be seen from the above, in the embodiment of the present invention, the instruction obtaining unit obtains the test instruction, where the test instruction carries basic configuration information of the machine required for the test; selecting a first target machine from a first network by a selection unit according to the basic configuration information of the machine required by the test to obtain a target machine test cluster, wherein the first network comprises a plurality of preset candidate machines; a transmission link acquisition unit acquires a transmission link for transmitting test information between first target machines in the target machine test cluster; determining, by a transmission condition determining unit, a transmission condition that allows the first target machine to perform transmission of the test information according to the transmission link; configuring, by a configuration unit, a first target machine in the target machine test cluster based on the transmission condition and the transmission link to obtain a configured target machine test cluster; and when the test information meets the transmission condition, the test unit transmits the test information in the configured target machine test cluster based on the transmission link to obtain a test result.
The embodiment of the invention also provides a terminal device, which can be integrated with any pressure testing device provided by the embodiment of the invention, and the terminal device can be a mobile phone, a tablet computer, a micro processing box, an unmanned aerial vehicle, an image acquisition device or the like.
For example, as shown in fig. 4, it shows a schematic structural diagram of a terminal device according to an embodiment of the present invention, specifically:
the terminal device may include components such as a processor 401 of one or more processing cores, memory 402 of one or more computer-readable storage media, a power supply 403, an input module 404, and a communication module 405. Those skilled in the art will appreciate that the terminal device configuration shown in fig. 4 does not constitute a limitation of the terminal device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the processor 401 is a control center of the terminal device, connects various parts of the entire terminal device by various interfaces and lines, and performs various functions of the terminal device and processes data by running or executing software programs and/or modules stored in the memory 402 and calling data stored in the memory 402, thereby performing overall monitoring of the terminal device. In some embodiments, processor 401 may include one or more processing cores; in some embodiments, processor 401 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 401.
The memory 402 may be used to store software programs and modules, and the processor 401 executes various functional applications and data processing by operating the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to the use of the terminal device, and the like. Further, the memory 402 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 access to the memory 402.
The terminal device further includes a power supply 403 for supplying power to the various components, and in some embodiments, the power supply 403 may be logically connected to the processor 401 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system. The power supply 403 may also include one or more dc or ac power sources, recharging systems, power failure monitoring circuitry, power converters or inverters, power status indicators, or any other component.
The terminal device may also include an input module 404, the input module 404 being operable to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
The terminal device may also include a communication module 405. in some embodiments, the communication module 405 may include a wireless sub-module through which the terminal device may wirelessly transmit over short distances to provide wireless broadband internet access. For example, the communication module 405 may be used to assist a user in sending and receiving e-mails, browsing web pages, accessing streaming media, and the like.
Although not shown, the terminal device may further include a display unit and the like, which are not described in detail herein. Specifically, in this embodiment, the processor 401 in the terminal device loads the executable file corresponding to the process of one or more application programs into the memory 402 according to the following instructions, and the processor 401 runs the application program stored in the memory 402, thereby implementing various functions as follows:
acquiring a configuration instruction, wherein the configuration instruction carries basic configuration information of a machine required by testing;
selecting a first target machine in an idle state from a first network according to the basic configuration information of the machine required by the test to obtain a target machine test cluster, wherein the first network comprises a plurality of preset candidate machines;
acquiring a transmission link for transmitting test information between first target machines in the target machine test cluster;
determining a transmission condition for allowing the first target machine to transmit the test information according to the transmission link;
configuring a first target machine in the target machine test cluster based on the transmission link and the transmission condition to obtain a configured target machine test cluster;
when the test information meets the transmission condition, the configured target machine test cluster is transmitted based on the transmission link, and the specific implementation of each operation to obtain the test result can be referred to the foregoing embodiment, which is not described herein again.
As can be seen from the above, the terminal device according to the embodiment of the present invention may obtain a configuration instruction, where the configuration instruction carries basic configuration information of a machine required for testing; selecting a first target machine in an idle state from a first network according to the basic configuration information of the machine required by the test to obtain a target machine test cluster, wherein the first network comprises a plurality of preset candidate machines; acquiring a transmission link for transmitting test information between first target machines in the target machine test cluster; determining a transmission condition for allowing the first target machine to transmit the test information according to the transmission link; configuring a first target machine in the target machine test cluster based on the transmission link and the transmission condition to obtain a configured target machine test cluster; and when the test information meets the transmission condition, transmitting in the configured target machine test cluster based on the transmission link to obtain a test result. According to the method and the device, the first target machine is selected from the preset candidate machines, and the transmission conditions are set, so that the test information can be transmitted only in the configured target machine test cluster, the first target machine and the machine which is actually used for providing service for the user are enabled, normal use of the user is avoided being influenced, in addition, the device is automatically configured according to the transmission link and the transmission conditions, the operation is simpler and faster, and the application can safely and efficiently carry out pressure test.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, the present application provides a storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any one of the pressure testing methods provided by the embodiments of the present application. For example, the instructions may perform the steps of:
acquiring a configuration instruction, wherein the configuration instruction carries basic configuration information of a machine required by testing;
selecting a first target machine from a first network according to the basic configuration information of the machine required by the test to obtain a target machine test cluster, wherein the first network comprises a plurality of preset candidate machines;
acquiring a transmission link for transmitting test information between first target machines in the target machine test cluster;
determining a transmission condition for allowing the first target machine to transmit the test information according to the transmission link;
configuring a first target machine in the target machine test cluster based on the transmission link and the transmission condition to obtain a configured target machine test cluster;
and when the test information meets the transmission condition, transmitting in the configured target machine test cluster based on the transmission link to obtain a test result.
Wherein the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the storage medium can execute the steps in any pressure testing method provided in the embodiments of the present application, the beneficial effects that can be achieved by any pressure testing method provided in the embodiments of the present application can be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
The foregoing detailed description is directed to a pressure testing method, apparatus, and storage medium provided in the embodiments of the present application, and specific examples are used herein to explain the principles and implementations of the present application, and the descriptions of the foregoing embodiments are only used to help understand the methods and core ideas of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A pressure testing method, comprising:
acquiring a configuration instruction, wherein the configuration instruction carries basic configuration information of a machine required by testing;
selecting a first target machine in an idle state from a first network according to the basic configuration information of the machine required by the test to obtain a target machine test cluster, wherein the first network comprises a plurality of preset candidate machines;
acquiring a transmission link for transmitting test information between first target machines in the target machine test cluster;
determining a transmission condition for allowing the first target machine to transmit the test information according to the transmission link;
configuring a first target machine in the target machine test cluster based on the transmission link and the transmission condition to obtain a configured target machine test cluster;
and when the test information meets the transmission condition, transmitting in the configured target machine test cluster based on the transmission link to obtain a test result.
2. The stress testing method of claim 1, wherein determining transmission conditions that allow transmission of test information by the first target machine based on the transmission link comprises:
determining target transmission information of the first target machine according to the transmission link, wherein the target transmission information comprises a transmission interface identifier and a network protocol address of the first target machine;
determining the transmission condition based on the target transmission information.
3. The pressure testing method of claim 1, wherein the first target machine comprises a press machine and a pressed machine;
when the transmission condition is met, the test information is transmitted in the configured target machine test cluster based on the transmission link to obtain a test result, and the method comprises the following steps:
generating test information based on the generator;
determining a target address of the test information transmission according to the transmission link;
when the target address meets the transmission condition, transmitting the test information to a pressed machine corresponding to the target address;
counting the time and the number of the pressed machine generating response information based on the test information to obtain statistical parameters;
and obtaining the test result based on the statistical parameters.
4. The pressure testing method of claim 1, wherein the configuration instruction further carries test scenario information;
the pressure testing method further comprises the following steps:
when the idle machines in the first network do not meet the requirement of the basic configuration information of the machines required by the test, generating capacity expansion configuration application information, wherein the capacity expansion configuration application information comprises the basic configuration information of the machines required by the test and the test scene information;
based on the basic configuration information of the machine required by the test and the test scene information of the test purpose, performing safety audit on the expansion configuration application information;
and when the security audit is passed, selecting a second target machine in an idle state in a second network to join the configured target machine test cluster to obtain the target machine test cluster after capacity expansion configuration.
5. The pressure testing method of claim 4, wherein when the security audit passes, selecting a second target machine in an idle state in a second network to join the configured target machine test cluster to obtain a capacity-expanded configured target machine test cluster, comprising:
when the audit is passed, selecting a second target machine in an idle state from a second network;
acquiring a transmission interface identifier and a network protocol address of the second target machine;
and adding the second target machine into the configured target machine test cluster based on the transmission interface identifier and the network protocol address of the second target machine to obtain the capacity-expanded configured target machine test cluster.
6. The pressure testing method of claim 5, wherein adding the second target machine to the configured target machine test cluster based on the transport interface identifier and the network protocol address of the second target machine to obtain a capacity-expanded configured target machine test cluster, comprises:
acquiring a capacity expansion configuration post-transmission link for transmitting test information between the second target machine and the first target machine based on the transmission interface identifier and the network protocol address of the second target machine;
acquiring a transmission condition after capacity expansion configuration for allowing test information transmission between the second target machine and the first target machine based on the transmission interface identifier and the network protocol address of the second target machine;
and obtaining the target machine test cluster after the capacity expansion configuration based on the transmission link after the capacity expansion configuration, the transmission condition after the capacity expansion configuration and the configured target machine test cluster.
7. The stress testing method of claim 1, wherein configuring a first target machine within the target machine test cluster based on the transmission link and the transmission condition to obtain a configured target machine test cluster comprises:
acquiring a preset test algorithm and a preset monitoring algorithm;
adjusting the preset test algorithm based on the transmission condition and the transmission link to obtain an adjusted test algorithm;
and configuring a first target machine in the target machine test cluster based on the adjusted test algorithm and the preset monitoring algorithm to obtain a configured target machine test cluster.
8. The pressure testing method of claim 7, further comprising:
performing safety monitoring on the first target machine based on the monitoring algorithm;
when the first target machine is monitored to be abnormal in operation, acquiring alarm information, wherein the alarm information comprises a machine identifier;
and performing safety recovery on the first target machine based on the alarm information.
9. A pressure testing device, comprising:
the instruction acquisition unit is used for acquiring a test instruction, and the test instruction carries basic configuration information of a machine required by the test;
the selecting unit is used for selecting a first target machine from a first network according to the basic configuration information of the machine required by the test to obtain a target machine test cluster, and the first network comprises a plurality of preset candidate machines;
a transmission link acquisition unit, configured to acquire a transmission link for transmitting test information between first target machines in the target machine test cluster;
a transmission condition determining unit, configured to determine, according to the transmission link, a transmission condition that allows the first target machine to perform transmission of the test information;
the configuration unit is used for configuring a first target machine in the target machine test cluster based on the transmission condition and the transmission link to obtain a configured target machine test cluster;
and the test unit is used for transmitting the test information in the configured target machine test cluster based on the transmission link to obtain a test result when the test information meets the transmission condition.
10. A computer-readable storage medium, on which a computer program is stored, which, when the computer program is run on a computer, causes the computer to carry out the pressure testing method according to any one of claims 1 to 8.
CN201910864872.5A 2019-09-12 2019-09-12 Pressure testing method and device and computer readable storage medium Active CN111193634B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910864872.5A CN111193634B (en) 2019-09-12 2019-09-12 Pressure testing method and device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910864872.5A CN111193634B (en) 2019-09-12 2019-09-12 Pressure testing method and device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN111193634A true CN111193634A (en) 2020-05-22
CN111193634B CN111193634B (en) 2021-08-31

Family

ID=70709023

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910864872.5A Active CN111193634B (en) 2019-09-12 2019-09-12 Pressure testing method and device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111193634B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112765035A (en) * 2021-01-27 2021-05-07 北京百家科技集团有限公司 Distributed pressure test system, method, device, electronic equipment and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6418544B1 (en) * 1999-06-22 2002-07-09 International Business Machines Corporation Use of a client meta-cache for realistic high-level web server stress testing with minimal client footprint
US20130019242A1 (en) * 2011-07-13 2013-01-17 Institute For Information Industry Cloud-Based Test System and Method and Computer-Readable Storage Medium with Computer Program to Execute the Method
CN104461856A (en) * 2013-09-22 2015-03-25 阿里巴巴集团控股有限公司 Performance test method, device and system based on cloud computing platform
US20170091079A1 (en) * 2014-05-18 2017-03-30 Kai Zhou Performance testing system and method
CN107015892A (en) * 2017-03-30 2017-08-04 腾讯科技(深圳)有限公司 A kind of method for testing pressure, device and system
CN107566214A (en) * 2017-08-29 2018-01-09 微梦创科网络科技(中国)有限公司 A kind of performance test methods and device
CN109284229A (en) * 2018-10-17 2019-01-29 武汉斗鱼网络科技有限公司 A kind of dynamic adjusting method and relevant device based on QPS
CN109359033A (en) * 2018-09-05 2019-02-19 广州神马移动信息科技有限公司 Method for testing pressure, testing service device, management server and system
US20190258517A1 (en) * 2016-11-01 2019-08-22 Alibaba Group Holding Limited Application Link Scaling Method, Apparatus, and System
CN110175130A (en) * 2019-06-11 2019-08-27 深圳前海微众银行股份有限公司 Test method, device, equipment and the readable storage medium storing program for executing of group system performance

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6418544B1 (en) * 1999-06-22 2002-07-09 International Business Machines Corporation Use of a client meta-cache for realistic high-level web server stress testing with minimal client footprint
US20130019242A1 (en) * 2011-07-13 2013-01-17 Institute For Information Industry Cloud-Based Test System and Method and Computer-Readable Storage Medium with Computer Program to Execute the Method
CN104461856A (en) * 2013-09-22 2015-03-25 阿里巴巴集团控股有限公司 Performance test method, device and system based on cloud computing platform
US20170091079A1 (en) * 2014-05-18 2017-03-30 Kai Zhou Performance testing system and method
US20190258517A1 (en) * 2016-11-01 2019-08-22 Alibaba Group Holding Limited Application Link Scaling Method, Apparatus, and System
CN107015892A (en) * 2017-03-30 2017-08-04 腾讯科技(深圳)有限公司 A kind of method for testing pressure, device and system
CN107566214A (en) * 2017-08-29 2018-01-09 微梦创科网络科技(中国)有限公司 A kind of performance test methods and device
CN109359033A (en) * 2018-09-05 2019-02-19 广州神马移动信息科技有限公司 Method for testing pressure, testing service device, management server and system
CN109284229A (en) * 2018-10-17 2019-01-29 武汉斗鱼网络科技有限公司 A kind of dynamic adjusting method and relevant device based on QPS
CN110175130A (en) * 2019-06-11 2019-08-27 深圳前海微众银行股份有限公司 Test method, device, equipment and the readable storage medium storing program for executing of group system performance

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李正寅: "《服务创新平台中基于Docker的弹性负载均衡功能的设计与实现》", 《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112765035A (en) * 2021-01-27 2021-05-07 北京百家科技集团有限公司 Distributed pressure test system, method, device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN111193634B (en) 2021-08-31

Similar Documents

Publication Publication Date Title
CN108370341B (en) Resource allocation method, virtual network function manager and network element management system
CN108322345A (en) A kind of dissemination method and server of fault restoration data packet
CN111083722A (en) Model pushing method, model requesting method, model pushing device, model requesting device and storage medium
CN109495306B (en) Method and equipment for expanding capacity of service network
CN108256118B (en) Data processing method, device, system, computing equipment and storage medium
CN109152095A (en) Wireless network connecting method for terminal
CN105005521A (en) Test method and apparatus
CN110311812B (en) Network analysis method, device and storage medium
CN104834602B (en) A kind of program dissemination method, device and program delivery system
CN108600034B (en) Service pressure management method, device, equipment, system and storage medium
CN108200180B (en) Method and device for limiting request frequency and computer equipment
CN108632063B (en) Method, device and system for managing network slice instances
WO2022127504A1 (en) Network element management method and apparatus, and storage medium
CN112350854B (en) Flow fault positioning method, device, equipment and storage medium
CN110933178B (en) Method for adjusting node configuration in cluster system and server
CN108427619B (en) Log management method and device, computing equipment and storage medium
US11863419B2 (en) Network service management system and network service management method
CN110677475A (en) Micro-service processing method, device, equipment and storage medium
CN115052041B (en) Channel identifier allocation method, device, equipment and storage medium
CN113297031A (en) Container group protection method and device in container cluster
CN111193634B (en) Pressure testing method and device and computer readable storage medium
CN109714208A (en) A kind of equipment is included in method, storage medium and the electronic equipment of network management
US20230040842A1 (en) Network service management system and network service management method
CN111698281B (en) Resource downloading method and device, electronic equipment and storage medium
CN112527618A (en) Log collection method and log collection system

Legal Events

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