CN109873732A - Test method and device for proxy server - Google Patents
Test method and device for proxy server Download PDFInfo
- Publication number
- CN109873732A CN109873732A CN201711269651.0A CN201711269651A CN109873732A CN 109873732 A CN109873732 A CN 109873732A CN 201711269651 A CN201711269651 A CN 201711269651A CN 109873732 A CN109873732 A CN 109873732A
- Authority
- CN
- China
- Prior art keywords
- target detection
- service device
- testing service
- test
- detection server
- 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
Links
Abstract
The embodiment of the present application discloses the test method and device of proxy server.One specific embodiment of this method includes: to select linking number testing service device from least one testing service device in response to receiving test request from client according to linking number preset in test request, obtain candidate testing service device set;According to the in-degree of candidate testing service device, select candidate testing service device of the in-degree greater than zero as target detection server from candidate testing service device set, wherein the in-degree of candidate testing service device is the number for the testing service device that received connection request is originated from;The maximum target detection server of weighted value is selected to execute test from selected each target detection server.This embodiment improves testing efficiencies.
Description
Technical field
The invention relates to field of computer technology, and in particular to Internet technical field, more particularly, to generation
Manage the test method and device of server.
Background technique
Test is to guarantee that the necessary program of normal use is capable of in website.Automatic test is a kind of survey taking human as driving
It tries to be converted into the process of machine execution.In general, being described after design test case and by evaluation according in test case
Regulation executes test, obtains actual result compared with expected result.
Existing automatic test is generally divided into setup test environment, executes test script and collection test result three
Stage.Setup test environment includes installation and deployment object to be tested, installation and deployment test run environment, exploitation, compiling and debugging
Test script;Executing test script includes that setup test environment and test frame, downloading test script and triggering execute test
Script;Collecting test result includes collecting and arranging log information.
Summary of the invention
The embodiment of the present application proposes the test method and device for proxy server.
In a first aspect, the embodiment of the present application provides a kind of test method for proxy server, proxy server with
The communication connection of at least one testing service device, which includes: in response to receiving test request from client, according to survey
Preset linking number selects linking number testing service device from least one testing service device in examination request, obtains candidate
Testing service device set;According to the in-degree of candidate testing service device, in-degree is selected to be greater than zero from candidate testing service device set
Candidate testing service device as target detection server, wherein the in-degree of candidate testing service device be received connection request
The number for the testing service device being originated from;The maximum target detection of weighted value is selected from selected each target detection server
Server executes test.
In some embodiments, candidate testing service device of the in-degree greater than zero is selected to make from candidate testing service device set
For target detection server, comprising: select in-degree greater than zero from candidate testing service device set and out-degree is surveyed for zero candidate
Server is tried as target detection server, wherein out-degree is the number of the targeted testing service device of the connection request of sending.
In some embodiments, this method further include: taken for each of each target detection server target detection
Business device, detects in the target detection server whether configure test environment profile;In response to determining the target detection service
Without configuration test environment profile in device, output characterizes the letter without test environment profile in the target detection server
Breath.
In some embodiments, this method further include: taken for each of each target detection server target detection
There is test environment profile in response to detecting in the target detection server, determine test environment profile in business device
The internet protocol address recorded in the internet protocol address and port address of middle record and the configuration file of proxy server with
And whether port address is identical;It is not identical in response to the two, export the information of characterization test environment profile configuration error.
In some embodiments, the maximum target detection of weighted value is selected from selected each target detection server
Server executes test, comprising: using the method for weighted polling, the maximum mesh of weighted value is selected from each target detection server
Mapping examination server executes test.
In some embodiments, the maximum target detection of weighted value is selected from selected each target detection server
Server execute test after, method further include: in response to the maximum target detection server of weighted value in preset time period
Interior connection failure, the target detection server for selecting weighted value to take second place execute test, and reduce the target detection clothes of connection failure
The default weighted value of business device.
Second aspect, the embodiment of the present application provide a kind of test device for proxy server, which includes:
One generation unit is configured in response to receiving test request from client, according to linking number preset in test request
Linking number testing service device is selected from least one testing service device, obtains candidate testing service device set;Second is raw
At unit, it is configured to the in-degree according to candidate testing service device, selects in-degree to be greater than zero from candidate testing service device set
Candidate testing service device as target detection server, wherein the in-degree of candidate testing service device be received connection request
The number for the testing service device being originated from;First selecting unit is configured to select from selected each target detection server
It selects the maximum target detection server of weighted value and executes test.
In some embodiments, the second generation unit is further configured to: being selected from candidate testing service device set
In-degree be greater than zero and out-degree be zero candidate testing service device as target detection server, wherein out-degree be sending connection
Request the number of targeted testing service device.
In some embodiments, test device is further configured to: for each of each target detection server
Target detection server detects in the target detection server whether configure test environment profile;In response to determining the mesh
Mapping is tried without configuration test environment profile in server, and output characterizes in the target detection server matches without test environment
Set the information of file.
In some embodiments, test device is further configured to: for each of each target detection server
There is test environment profile in response to detecting in the target detection server, determine test wrapper in target detection server
The network recorded in the configuration file of the internet protocol address and port address and proxy server that are recorded in the configuration file of border
Whether protocol address and port address are identical;It is not identical in response to the two, it is wrong to export the configuration of characterization test environment profile
Information accidentally.
In some embodiments, first selecting unit is further configured to: using the method for weighted polling, from each target
The maximum target detection server of weighted value is selected to execute test in testing service device.
In some embodiments, test device further includes the second selecting unit, is configured in response to maximum with weighted value
The connection failure within a preset period of time of target detection server, select the target detection server that takes second place of weighted value to execute survey
Examination, and reduce the default weighted value of the target detection server of connection failure.
The third aspect, the embodiment of the present application provide a kind of electronic equipment, which includes: one or more processing
Device;Storage device, for storing one or more programs;When one or more programs are executed by one or more processors, make
Obtain method of the one or more processors realization as described in implementation any in first aspect.
Fourth aspect, the embodiment of the present application provide a kind of computer readable storage medium, are stored thereon with computer journey
Sequence realizes the method as described in implementation any in first aspect when the computer program is executed by processor.
Test method and device provided by the embodiments of the present application for proxy server, by response to being terminated from client
It receives preset linking number in test request and selects linking number testing service device from least one testing service device, obtain
To candidate testing service device set;According to the in-degree and out-degree of candidate testing service device, selected from candidate testing service device set
Candidate testing service device is selected as target detection server, selects weighted value maximum in each target detection server of selection
Target detection server execute test, to improve the efficiency of test.
Detailed description of the invention
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, the application's is other
Feature, objects and advantages will become more apparent upon:
Fig. 1 is that this application can be applied to exemplary system architecture figures therein;
Fig. 2 is the flow chart according to one embodiment of the test method for proxy server of the application;
Fig. 3 is the schematic diagram according to an application scenarios of the test method for proxy server of the application;
Fig. 4 is the flow chart according to another embodiment of the test method for proxy server of the application;
Fig. 5 is the structural schematic diagram according to one embodiment of the test device for proxy server of the application;
Fig. 6 is adapted for the structural representation of the computer system for the terminal device or server of realizing the embodiment of the present application
Figure.
Specific embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to
Convenient for description, part relevant to related invention is illustrated only in attached drawing.
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase
Mutually combination.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 is shown can the test method for proxy server using the application or the survey for proxy server
The exemplary system architecture 100 for the embodiment that trial assembly is set.
As shown in Figure 1, system architecture 100 may include terminal device 101,102,103, network 104,106 and service
Device 105,107,108,109.Network 104,106 is between terminal device 101,102,103 and server 105 and to service
The medium of communication link is provided between device 105 and server 107,108,109.Network 104,106 may include various connection classes
Type, such as wired, wireless communication link or fiber optic cables etc..
User can be used terminal device 101,102,103 and be interacted by network 104 with server 105, to receive or send out
Send message etc..Server 105 can be interacted by network 107 with server 107,108,109, to establish connection etc..Terminal is set
Various client applications, such as the application etc. for sending test request can be installed on standby 101,102,103.
Terminal device 101,102,103 can be with display screen and supported web page browsing, the various electricity for sending information
Sub- equipment, including but not limited to smart phone, tablet computer, E-book reader, pocket computer on knee and desk-top calculating
Machine etc..
Server 105 can be the test request of the transmission of receiving terminal apparatus 101,102,103 and be provided to the request
The proxy server of server 107,108,109.Proxy server can analyze the data such as the test request received
The connection with server 107,108,109 is established Deng processing, and based on processing result, to select server 107,108,109 to hold
Row test.
Server 107,108,109 can be the testing service device for receiving the test request that server 105 transmits.Test clothes
Device be engaged in based on the connection between proxy server, executes the test request that terminal device is sent.
It should be noted that the test method provided by the embodiment of the present application for testing service device is generally by server
105 execute, and correspondingly, the device for proxy server is generally positioned in server 105.
It should be understood that the number of terminal device, network and server in Fig. 1 is only schematical.According to realization need
It wants, can have any number of terminal device, network and server, and above-mentioned server could alternatively be Distributed Services
Device cluster.
With continued reference to Fig. 2, the process of one embodiment of the proxy server test method according to the application is shown
200.The test method, comprising the following steps:
Step 201, in response to receiving test request from client, according to linking number preset in test request to
Linking number testing service device is selected in a few testing service device, obtains candidate testing service device set.
In the present embodiment, proxy server can receive test by wired connection mode or radio connection and ask
It asks.Specifically, including the connection number that request is established in above-mentioned test request, which is pre-set.Proxy server
It can choose testing service device identical with connection number by the connection number to establish the connection between client.When test takes
After business device is connect by proxy server with client, the test request of client can be executed.Proxy server can to
It selects above-mentioned linking number testing service device to be connected on proxy server in a few testing service device, and is based on selecting
Testing service device obtain candidate testing service device set.
Wherein, above-mentioned test request can be the HTTP (Hyper that user sends by being installed on the browser of terminal
Text Transfer Protocol, hypertext transfer protocol) request, it is also possible to user by being installed on the browser of terminal
HTTPS (the Hyper Text Transfer Protocol over Secure Socket Layer, safely for mesh of transmission
The channel target HTTP) request.
As an example, above-mentioned electronic equipment receives the detailed process of the test request from client are as follows: proxy server
Receiving preset in test request and testing service device connection number is 5, and 5 tests are selected from least one testing service device
Server is testing service device " A ", testing service device " B ", testing service device " C ", testing service device " D " and test respectively
Server " E ", while 5 testing service devices " A ", " B ", " C ", " D " and " E " are formed into candidate testing service device set.
Step 202, according to the in-degree of candidate testing service device, in-degree is selected to be greater than zero from candidate testing service device set
Candidate testing service device as target detection server.
In the present embodiment, the in-degree of above-mentioned candidate testing service device refers to the testing service that received connection request is originated from
The number of device, the out-degree of candidate testing service device refer to the number of the targeted testing service device of the connection request of sending.Specifically
, each testing service device is considered as a node, and the connection between above-mentioned each testing service device can regard multiple sections as
The connection of point.For the same node, which can send to other nodes and request, while can receive the transmission of other nodes
Request.Wherein, the number for the node which sends request to other nodes is out-degree, which receives the transmission of other nodes
Request node number be in-degree.In general, the node is to execute section when the node receives the request of other nodes transmission
Point, namely testing service device is executed, meanwhile, test environment profile is installed on the execution testing service device.Test environment
Computer hardware, software, network equipment etc. necessary to referring to complete test job.Test environment profile can be
In order to realize building for test environment, the data etc. configured in execute server.Based on the candidate test determined in step 201
Server set, proxy server can be selected from candidate testing service device set according to the in-degree of candidate testing service device
Candidate testing service device is as target detection server.
In the present embodiment, from above-mentioned candidate testing service device set, in-degree is selected to be greater than zero candidate testing service
Device is target detection server.Herein, whether be greater than 0 according to candidate testing service device in-degree and out-degree, can by in-degree with
Out-degree is divided into four kinds of combinations, the mode that in-degree 0, out-degree are 0, and in-degree is greater than the mode that 0, out-degree is 0, in-degree 0,
Out-degree is greater than 0 mode, and in-degree is greater than the mode that 0, out-degree is greater than 0.Herein, in-degree, which is greater than 0, indicates at least one and its
The server of connection sends to the server and requests, and therefore, which is to execute testing service device.Equally, the test
Test environment profile is installed in server.Out-degree, which is greater than 0, indicates that the testing service device at least Xiang Yitai server is sent
Request.Above-mentioned in-degree is 0, testing service device of the out-degree greater than 0 is root testing service device, which can not install survey
Environment profile is tried, for receiving the test request of coupled test request end transmission, and the test request is sent out
It send to the execution testing service device connected to it for being equipped with test environment profile.In the implementation, select in-degree big
In zero candidate testing service device as target detection server, namely selecting the numerical value of in-degree to be greater than the 0, numerical value of out-degree is 0
Testing service device or the numerical value of in-degree be greater than the testing service device that the 0, numerical value of out-degree is 0 as target detection server.
As an example, the in-degree of candidate testing service device A is 3, out-degree is 0;The in-degree of candidate testing service device B is 0, out
Degree is 0;The in-degree of candidate testing service device C is 0, and out-degree is 4;The in-degree of candidate testing service device D is 2, and out-degree is 0;It is candidate
The in-degree of testing service device E is 3, and out-degree is 0.Therefore, above-mentioned electronic equipment can choose candidate testing service device A, candidate survey
Trying server D and candidate testing service device E is target detection server.
In some optional implementations of the present embodiment, each of each target detection server target is surveyed
Server is tried, there is test environment profile in response to detecting in the target detection server, determine that the test environment is matched
Set the network recorded in the configuration file of the internet protocol address recorded in file and port address and above-mentioned proxy server
Whether protocol address and port address are identical;It is not identical in response to the two, then export the configuration of characterization test environment profile
The information of mistake.In this optional implementation, above-mentioned proxy server passes through the configuration text determined in the proxy server
The net recorded in the internet protocol address and port address of part record and the test environment profile of target detection server
Whether network protocol address and port address identical, so that it is determined that the test environment profile in target detection server whether
Configuration error, it is errorless whether the test environment for being conducive to be quickly detected in target detection server is built, and improves the standard of test
True property.
Step 203, the maximum target detection server of weighted value is selected from selected each target detection server
Execute test.
In the present embodiment, the weighted value of each target detection server, the power are previously stored in above-mentioned proxy server
Weight values indicate the requested number executed of target detection server within a preset period of time, which is according to each testing service
The processing capacity of device is preset.It is more that the number executed is requested in preset time period, the weight of target detection server
Value is bigger, shows that the executive capability of the target detection server is stronger.After above-mentioned each target detection server is initialised, agency
Server can choose the maximum target detection server of above-mentioned weighted value and execute test.
As an example, the weighted value of target detection server " A " is 4, the weighted value of target detection server " B " is 2, mesh
The weighted value that mapping tries server " C " is 1, in above three target detection server, the weighted value of target detection server " A "
Maximum, therefore, above-mentioned proxy server can choose target detection server " A " the Lai Zhihang client that weighted value is 4 and send
Test request.
With continued reference to one that Fig. 3, Fig. 3 are according to the application scenarios of the test method for proxy server of the present embodiment
A schematic diagram.
In the application scenarios of Fig. 3, firstly, proxy server 301 receives the test request of the transmission of client 302,
In in the test request preset linking number be 5.Proxy server 301 according to linking number 5 preset in test request from
5 testing service devices are selected at least one testing service device, are testing service device A, testing service device B, testing service respectively
Device C, testing service device D and testing service E, and the candidate testing service device set based on 5 testing service devices is generated,
In, the in-degree of above-mentioned testing service device A is 0, and the in-degree of testing service device B is 2, and the in-degree of testing service device C is 3, test clothes
The in-degree of business device D is 0, and the in-degree of testing service device E is 2.Then, the entering according to candidate testing service device of proxy server 301
Degree selects candidate testing service device of the in-degree greater than zero as target detection server, i.e., from candidate testing service device set
Candidate testing service device B, candidate testing service device C and candidate testing service device E are as target detection server.Herein,
The weighted value of candidate testing service device B is 2, and the weighted value of candidate testing service device C is 4, the weighted value of candidate testing service device E
It is 1.Finally, selecting maximum target detection server (the i.e. target of weighted value from selected each target detection server
Testing service device C) execute test request.
Test method and device provided in this embodiment for proxy server, by response to being received from client
Preset linking number selects linking number testing service device from least one testing service device in test request, is waited
Select testing service device set;According to the in-degree and out-degree of candidate testing service device, select to wait from candidate testing service device set
It selects testing service device as target detection server, the maximum mesh of weighted value is selected in each target detection server of selection
Mapping examination server executes test, to improve the efficiency of test.
Another implementation of the test method for proxy server according to the application is shown below with reference to Fig. 4, Fig. 4
The process 400 of example.
As shown in figure 4, the data processing method of the present embodiment the following steps are included:
In response to receiving test request from client, surveyed according to linking number preset in test request from least one
It tries to select linking number testing service device in server, obtains candidate testing service device set.
In the present embodiment, proxy server can receive test by wired connection mode or radio connection and ask
Ask, and identical with connection number testing service device selected according to linking number preset in test request come establish with client it
Between connection.Proxy server can select above-mentioned linking number testing service device to connect from least one testing service device
Candidate testing service device set is obtained to proxy server, and based on the testing service device selected.
Step 402, according to the in-degree of candidate testing service device, in-degree is selected to be greater than zero from candidate testing service device set
And the candidate testing service device that out-degree is zero is as target detection server.
In the present embodiment, based on the candidate testing service device set determined in step 401, proxy server can basis
The in-degree and out-degree of candidate testing service device, selected from candidate testing service device set in-degree be greater than zero and out-degree for zero time
Select testing service device as target detection server.Herein, in-degree refers to the testing service device that received connection request is originated from
Number, out-degree refers to the number of the targeted testing service device of the connection request of sending.
In some optional implementations of the present embodiment, each of each target detection server target is surveyed
Server is tried, above-mentioned proxy server can detecte in the target detection server whether configure test environment profile.It rings
It should export and characterize in the target detection server in determining in the target detection server without configuration test environment profile
Information without test environment profile.Herein, computer necessary to test environment refers to complete test job is hard
Part, software, the network equipment, data etc., test environment profile can refer to realize building for test environment, execute clothes
The data etc. configured on business device.
Step 403, using the method for weighted polling, the maximum target of weighted value is selected to survey from each target detection server
Examination server executes test.
In the present embodiment, according to the target detection server determined in step 402, above-mentioned proxy server be can use
The method of weighted polling selects the maximum target detection server of weighted value to execute test from each target detection server.
In the present embodiment, common weighted polling method can be used, smooth weighted polling method can also be used,
The maximum target detection server of weighted value is selected to execute test from each target detection server to realize.Wherein, above-mentioned flat
Sliding weighted polling method can realize that Nginx algorithm is to match rope Prokofiev by Igor by Nginx (engine x) algorithm
For Russian amount of access second Rambler.ru website develop.Wherein, Nginx algorithm is existing well-known technique, herein
It repeats no more.
As an example, when above-mentioned proxy server selects 3 testing service device " testing services from candidate testing service device
Device A ", " testing service device B ", " testing service device C " execute above-mentioned testing service device, and " testing service device A's " at this time is initial
Weighted value is 3, and the initial weight value of testing service device " B " is 2, and the initial weight value of " testing service device C " is 1.It is above-mentioned initial
Weighted value is pre-set.When proxy server receives six test requests, above-mentioned proxy server right to choose first
The highest testing service device of weight values " testing service device A " executes one of test;Then, by the power of " testing service device A "
Weight values subtract the summation 6 of the weighted value of above-mentioned 3 testing service devices, and the weighted value of " testing service device A " becomes -3 at this time, then
The present weight value of " testing service device A " is added into its initial weight value, the present weight value of " testing service device A " is 0 at this time,
And the weighted value of " testing service device B " is 2 at this time, the weighted value of " testing service device C " is 1, selects the maximum test of weighted value
Server " testing service device B " executes one of test;Then, the weighted value of " testing service device B " is subtracted into above-mentioned 3 surveys
The summation 6 of the weighted value of server is tried, the weighted value of " testing service device B " becomes -4 at this time, then by " testing service device B "
Present weight value adds its initial weight value, and the present weight value of " testing service device B " is -2 at this time, and " testing service at this time
The weighted value of device A " is 0, and the weighted value of " testing service device C " is 1, selects the maximum testing service device " testing service of weighted value
Device C " executes one of test.In this way, poll selects weighted value maximum according to the weighted value of above-mentioned each target detection server
Testing service device execute test request.
Step 404, in response to the maximum target detection server connection failure within a preset period of time of weighted value, selection
The target detection server that weighted value takes second place executes test, and reduces the default weight of the target detection server of connection failure
Value.
In the present embodiment, above-mentioned proxy server is based on internet protocol address and port address and weighted value is maximum
When target detection server is attached, when the target detection server that connection is established with proxy server be in busy condition,
When inside appearance exception etc. asks situation, above-mentioned proxy server can not be connected with server to be connect within a preset period of time
It connects, at this point, above-mentioned server, which can choose the target detection server that weighted value takes second place, executes test, while reducing connection failure
Target detection server default weighted value.
It can be seen that from embodiment shown in Fig. 4 from unlike embodiment shown in Fig. 2, the present embodiment highlights benefit
Selected from target detection server with the method for weighted polling the maximum target detection server of weighted value execute test and
The method taken after connection failure between proxy server and target detection server wait connect, so that each target is surveyed
The load balancing for trying server, to further increase testing efficiency.
With further reference to Fig. 5, as the realization to method shown in above-mentioned each figure, this application provides one kind for acting on behalf of clothes
One embodiment of the test device of business device, the Installation practice is corresponding with embodiment of the method shown in Fig. 2, and the device is specific
It can be applied in various electronic equipments.
As shown in figure 5, the test device 500 for proxy server of the present embodiment include: the first generation unit 501,
Second generation unit 502 and first selecting unit 503.Wherein, the first generation unit 501 is configured in response to terminating from client
Test request is received, selects linking number from least one testing service device according to linking number preset in test request
Testing service device obtains candidate testing service device set;Second generation unit 502 is configured to according to candidate testing service device
In-degree selects candidate testing service device of the in-degree greater than zero as target detection server from candidate testing service device set,
Wherein, the in-degree of candidate testing service device is the number for the testing service device that received connection request is originated from;And first choice list
Member 503 is configured to that the maximum target detection server of weighted value is selected to execute from selected each target detection server
Test.
In the present embodiment, in the test device of proxy server 500, the first generation unit 501, second to generate single
Specifically processing and its brought technical effect can be respectively with reference in Fig. 2 corresponding embodiments for member 502 and first selecting unit 503
The related description of step 201, step 202 and step 203, details are not described herein.
In some optional implementations of the present embodiment, the second generation unit 502 is further configured to: from candidate
Selected in testing service device set in-degree be greater than zero and out-degree for zero candidate testing service device as target detection server,
In, out-degree is the number of the targeted testing service device of the connection request of sending.
In some optional implementations of the present embodiment, test device 500 is further configured to: for each target
Each of testing service device target detection server detects in the target detection server whether configure test environment configurations
File;In response to determining that, without configuration test environment profile in the target detection server, output characterizes the target detection
Information without test environment profile in server.
In some optional implementations of the present embodiment, test device 500 is further configured to: for each target
There is test environment in response to detecting in the target detection server in each of testing service device target detection server
Configuration file determines matching for the internet protocol address that records in test environment profile and port address and proxy server
It sets the internet protocol address recorded in file and whether port address is identical;It is not identical in response to the two, export characterization test
The information of environment profile configuration error.
In some optional implementations of the present embodiment, first selecting unit 503 is further configured to: being utilized and is added
The method for weighing poll selects the maximum target detection server of weighted value to execute test from each target detection server.
In some optional implementations of the present embodiment, test device 500 further includes that the second selecting unit (is not shown
Out), be configured in response to the maximum target detection server connection failure within a preset period of time of weighted value, select weight
The target detection server that value is taken second place executes test, and reduces the default weighted value of the target detection server of connection failure.
Below with reference to Fig. 6, it illustrates the computer systems for the proxy server for being suitable for being used to realize the embodiment of the present application
600 structural schematic diagram.Proxy server shown in Fig. 6 is only an example, should not function to the embodiment of the present application and
Use scope brings any restrictions.
As shown in fig. 6, computer system 600 includes central processing unit (CPU, Central Processing Unit)
601, it can be according to the program being stored in read-only memory (ROM, Read Only Memory) 602 or from storage section
606 programs being loaded into random access storage device (RAM, Random Access Memory) 603 and execute various appropriate
Movement and processing.In RAM 603, also it is stored with system 600 and operates required various programs and data.CPU 601,ROM
602 and RAM 603 is connected with each other by bus 604.Input/output (I/O, Input/Output) interface 605 is also connected to
Bus 604.
I/O interface 605 is connected to lower component: the storage section 606 including hard disk etc.;And including such as LAN (local
Net, Local Area Network) card, modem etc. network interface card communications portion 607.Communications portion 607 passes through
Communication process is executed by the network of such as internet.Driver 608 is also connected to I/O interface 605 as needed.Detachable media
609, such as disk, CD, magneto-optic disk, semiconductor memory etc., are mounted on as needed on driver 608, in order to from
The computer program read thereon is mounted into storage section 606 as needed.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description
Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable medium
On computer program, which includes the program code for method shown in execution flow chart.In such reality
It applies in example, which can be downloaded and installed from network by communications portion 607, and/or from detachable media
609 are mounted.When the computer program is executed by central processing unit (CPU) 601, limited in execution the present processes
Above-mentioned function.It should be noted that the above-mentioned computer-readable medium of the application can be computer-readable signal media or
Computer readable storage medium either the two any combination.Computer readable storage medium for example can be --- but
Be not limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.
The more specific example of computer readable storage medium can include but is not limited to: have one or more conducting wires electrical connection,
Portable computer diskette, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only deposit
Reservoir (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory
Part or above-mentioned any appropriate combination.In this application, computer readable storage medium, which can be, any include or stores
The tangible medium of program, the program can be commanded execution system, device or device use or in connection.And
In the application, computer-readable signal media may include in a base band or the data as the propagation of carrier wave a part are believed
Number, wherein carrying computer-readable program code.The data-signal of this propagation can take various forms, including but not
It is limited to electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer
Any computer-readable medium other than readable storage medium storing program for executing, the computer-readable medium can send, propagate or transmit use
In by the use of instruction execution system, device or device or program in connection.Include on computer-readable medium
Program code can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF etc., Huo Zheshang
Any appropriate combination stated.
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the application, method and computer journey
The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation
A part of one module, program segment or code of table, a part of the module, program segment or code include one or more use
The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box
The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually
It can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it to infuse
Meaning, the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart can be with holding
The dedicated hardware based system of functions or operations as defined in row is realized, or can use specialized hardware and computer instruction
Combination realize.
Being described in unit involved in the embodiment of the present application can be realized by way of software, can also be by hard
The mode of part is realized.Described unit also can be set in the processor, for example, can be described as: a kind of processor packet
Include the first generation unit, the second generation unit and first selecting unit.Wherein, the title of these units is not under certain conditions
The restriction to the unit itself is constituted, for example, acquiring unit is also described as " asking in response to receiving test from client
It asks, linking number testing service is selected from least one testing service device according to linking number preset in test request
Device obtains the unit of candidate testing service device set ".
As on the other hand, present invention also provides a kind of computer-readable medium, which be can be
Included in device described in above-described embodiment;It is also possible to individualism, and without in the supplying device.Above-mentioned calculating
Machine readable medium carries one or more program, when said one or multiple programs are executed by the device, so that should
Device: it in response to receiving test request from client, is tested according to linking number preset in test request from least one
Linking number testing service device is selected in server, obtains candidate testing service device set;According to candidate testing service device
In-degree selects candidate testing service device of the in-degree greater than zero as target detection server from candidate testing service device set,
Wherein, the in-degree of candidate testing service device is the number for the testing service device that received connection request is originated from;From selected each
The maximum target detection server of weighted value is selected to execute test in a target detection server.
Above description is only the preferred embodiment of the application and the explanation to institute's application technology principle.Those skilled in the art
Member is it should be appreciated that invention scope involved in the application, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic
Scheme, while should also cover in the case where not departing from foregoing invention design, it is carried out by above-mentioned technical characteristic or its equivalent feature
Any combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed herein
Can technical characteristic replaced mutually and the technical solution that is formed.
Above description is only the preferred embodiment of the application and the explanation to institute's application technology principle.Those skilled in the art
Member is it should be appreciated that invention scope involved in the application, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic
Scheme, while should also cover in the case where not departing from the inventive concept, it is carried out by above-mentioned technical characteristic or its equivalent feature
Any combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed herein
Can technical characteristic replaced mutually and the technical solution that is formed.
Claims (14)
1. a kind of test method for proxy server, the proxy server and at least one testing service device communication link
It connects, the test method includes:
In response to receiving test request from client, according to linking number preset in the test request from described at least one
The linking number testing service device is selected in a testing service device, obtains candidate testing service device set;
According to the in-degree of candidate testing service device, candidate survey of the selection in-degree greater than zero from the candidate testing service device set
Server is tried as target detection server, wherein the in-degree of candidate testing service device is the survey that received connection request is originated from
Try the number of server;
The maximum target detection server of weighted value is selected to execute test from selected each target detection server.
2. according to the method described in claim 1, the selection in-degree from the candidate testing service device set is greater than zero
Candidate testing service device is as target detection server, comprising:
Select in-degree greater than zero from the candidate testing service device set and out-degree for zero candidate testing service device as mesh
Mapping tries server, wherein the out-degree is the number of the targeted testing service device of the connection request of sending.
3. method according to claim 1 or 2, the method also includes:
For each of each target detection server target detection server, detects and whether match in the target detection server
Set test environment profile;In response to determining in the target detection server without configuration test environment profile, output
Characterize the information without test environment profile in the target detection server.
4. method according to claim 1 or 2, the method also includes:
For each of each target detection server target detection server, in response to detecting the target detection server
It is middle to there is test environment profile, with determining the internet protocol address recorded in the test environment profile and port
Whether the internet protocol address and port address recorded in the configuration file of location and the proxy server be identical;In response to two
Person is not identical, then exports the information for characterizing the test environment profile configuration error.
5. according to the method described in claim 1, described select weighted value most from selected each target detection server
Big target detection server executes test, comprising:
Using the method for weighted polling, the maximum target detection server of weighted value is selected to execute from each target detection server
Test.
6. according to the method described in claim 1, described select weighted value most from selected each target detection server
After big target detection server executes test, the method also includes:
In response to weighted value maximum target detection server connection failure within a preset period of time, select weighted value to take second place
Target detection server executes test, and reduces the default weighted value of the target detection server of connection failure.
7. a kind of test device for proxy server, the proxy server and at least one testing service device communication link
It connects, the test device includes:
First generation unit is configured to preset in response to receiving test request from client according in the test request
Linking number select the linking number testing service device from least one described testing service device, obtain candidate test
Server set;
Second generation unit is configured to the in-degree according to candidate testing service device, from the candidate testing service device set
Select candidate testing service device of the in-degree greater than zero as target detection server, wherein the in-degree of candidate testing service device is
The number for the testing service device that received connection request is originated from;
First selecting unit is configured to that the maximum target of weighted value is selected to survey from selected each target detection server
Examination server executes test.
8. device according to claim 7, second generation unit is further configured to:
Select in-degree greater than zero from the candidate testing service device set and out-degree for zero candidate testing service device as mesh
Mapping tries server, wherein the out-degree is the number of the targeted testing service device of the connection request of sending.
9. device according to claim 7 or 8, the test device is further configured to:
For each of each target detection server target detection server, detects and whether match in the target detection server
Set test environment profile;In response to determining in the target detection server without configuration test environment profile, output
Characterize the information without test environment profile in the target detection server.
10. device according to claim 7 or 8, the test device is further configured to:
For each of each target detection server target detection server, in response to detecting the target detection server
It is middle to there is test environment profile, with determining the internet protocol address recorded in the test environment profile and port
Whether the internet protocol address and port address recorded in the configuration file of location and the proxy server be identical;In response to two
Person is not identical, then exports the information for characterizing the test environment profile configuration error.
11. device according to claim 7, the first selecting unit is further configured to:
Using the method for weighted polling, the maximum target detection server of weighted value is selected to execute from each target detection server
Test.
12. device according to claim 7, the test device further include:
Second selecting unit is configured in response to connecting within a preset period of time with the maximum target detection server of weighted value
Failure, the target detection server for selecting weighted value to take second place execute test, and reduce the target detection server of connection failure
Default weighted value.
13. a kind of server, the server include:
One or more processors;
Storage device, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processors are real
Now such as method as claimed in any one of claims 1 to 6.
14. a kind of computer readable storage medium, is stored thereon with computer program, the computer program is executed by processor
Shi Shixian method for example as claimed in any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711269651.0A CN109873732B (en) | 2017-12-05 | 2017-12-05 | Test method and device for proxy server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711269651.0A CN109873732B (en) | 2017-12-05 | 2017-12-05 | Test method and device for proxy server |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109873732A true CN109873732A (en) | 2019-06-11 |
CN109873732B CN109873732B (en) | 2021-05-25 |
Family
ID=66916547
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711269651.0A Active CN109873732B (en) | 2017-12-05 | 2017-12-05 | Test method and device for proxy server |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109873732B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111930620A (en) * | 2020-08-07 | 2020-11-13 | 中国工商银行股份有限公司 | Application running environment data processing method and device |
CN112363879A (en) * | 2020-11-20 | 2021-02-12 | 上海连尚网络科技有限公司 | Cache server performance test method, device, equipment and medium |
CN112653632A (en) * | 2019-10-09 | 2021-04-13 | 北京京东振世信息技术有限公司 | Flow control realization method and device |
CN113179334A (en) * | 2021-06-30 | 2021-07-27 | 神威超算(北京)科技有限公司 | Server selection method, device and computer readable medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110119369A1 (en) * | 2009-11-13 | 2011-05-19 | International Business Machines,Corporation | Monitoring computer system performance |
CN102662941A (en) * | 2011-12-31 | 2012-09-12 | 武汉理工大学 | Sequencing method based on random walk |
CN103401947A (en) * | 2013-08-20 | 2013-11-20 | 曙光信息产业(北京)有限公司 | Method and device for allocating tasks to multiple servers |
SE1750428A1 (en) * | 2015-02-04 | 2017-04-10 | Lumenradio Ab | A method and system for selecting communication parameters in a wireless network |
CN107026899A (en) * | 2017-02-23 | 2017-08-08 | 成都谷辘信息技术有限公司 | A kind of load-balanced server of the efficient easy-to-use stabilization based on dynamic link library |
-
2017
- 2017-12-05 CN CN201711269651.0A patent/CN109873732B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110119369A1 (en) * | 2009-11-13 | 2011-05-19 | International Business Machines,Corporation | Monitoring computer system performance |
CN102662941A (en) * | 2011-12-31 | 2012-09-12 | 武汉理工大学 | Sequencing method based on random walk |
CN103401947A (en) * | 2013-08-20 | 2013-11-20 | 曙光信息产业(北京)有限公司 | Method and device for allocating tasks to multiple servers |
SE1750428A1 (en) * | 2015-02-04 | 2017-04-10 | Lumenradio Ab | A method and system for selecting communication parameters in a wireless network |
CN107026899A (en) * | 2017-02-23 | 2017-08-08 | 成都谷辘信息技术有限公司 | A kind of load-balanced server of the efficient easy-to-use stabilization based on dynamic link library |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112653632A (en) * | 2019-10-09 | 2021-04-13 | 北京京东振世信息技术有限公司 | Flow control realization method and device |
CN111930620A (en) * | 2020-08-07 | 2020-11-13 | 中国工商银行股份有限公司 | Application running environment data processing method and device |
CN111930620B (en) * | 2020-08-07 | 2023-08-11 | 中国工商银行股份有限公司 | Application running environment data processing method and device |
CN112363879A (en) * | 2020-11-20 | 2021-02-12 | 上海连尚网络科技有限公司 | Cache server performance test method, device, equipment and medium |
CN113179334A (en) * | 2021-06-30 | 2021-07-27 | 神威超算(北京)科技有限公司 | Server selection method, device and computer readable medium |
CN113179334B (en) * | 2021-06-30 | 2021-09-24 | 神威超算(北京)科技有限公司 | Server selection method, device and computer readable medium |
Also Published As
Publication number | Publication date |
---|---|
CN109873732B (en) | 2021-05-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107256195B (en) | Webpage front-end test method and device | |
CN109873732A (en) | Test method and device for proxy server | |
CN109446071A (en) | Interface test method, interface test device, electronic equipment and storage medium | |
CN108989362A (en) | A kind for the treatment of method and apparatus of static resource | |
US10592399B2 (en) | Testing web applications using clusters | |
CN109815105A (en) | Applied program testing method and device based on Btrace | |
CN109426593A (en) | The method and apparatus of automatic evaluation system performance | |
CN108696481A (en) | leak detection method and device | |
CN109684188A (en) | Test method and device | |
CN112311620A (en) | Method, apparatus, electronic device and readable medium for diagnosing network | |
CN109614340A (en) | Exploitation adjustment method, device, electronic equipment and the storage medium of application program | |
CN109981647A (en) | Method and apparatus for detecting Brute Force | |
CN110362488A (en) | A kind of page test method, device, electronic equipment and storage medium | |
CN109194776A (en) | A kind of detection method, system, electronic equipment and medium | |
CN108600377A (en) | A kind of pause method of file download, device, terminal and storage medium | |
CN107360036A (en) | A kind of network failure locating method, terminal and server | |
CN109218041A (en) | Request processing method and device for server system | |
CN109818994A (en) | Information processing method and device for agent side | |
CN109828920A (en) | A kind of log analysis method, device and computer readable storage medium | |
CN113852426A (en) | Remote testing method, device and system | |
CN109635923A (en) | Method and apparatus for handling data | |
CN109471713A (en) | Method and apparatus for query information | |
CN107678965A (en) | It is automatically integrating method of testing and system, service terminal, memory | |
CN109150928A (en) | Method and apparatus for handling request | |
CN108920309B (en) | Method and apparatus for handling information |
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 |