CN105721251B - A kind of method and system of configurable test pile service - Google Patents

A kind of method and system of configurable test pile service Download PDF

Info

Publication number
CN105721251B
CN105721251B CN201610123758.3A CN201610123758A CN105721251B CN 105721251 B CN105721251 B CN 105721251B CN 201610123758 A CN201610123758 A CN 201610123758A CN 105721251 B CN105721251 B CN 105721251B
Authority
CN
China
Prior art keywords
server
call request
test pile
configuration
sent
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.)
Active
Application number
CN201610123758.3A
Other languages
Chinese (zh)
Other versions
CN105721251A (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.)
Shenzhen Qianhai Juzi Information Technology Co Ltd
Shenzhen Fenqile Network Technology Co Ltd
Original Assignee
Shenzhen Qianhai Juzi Information Technology Co Ltd
Shenzhen Fenqile Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Qianhai Juzi Information Technology Co Ltd, Shenzhen Fenqile Network Technology Co Ltd filed Critical Shenzhen Qianhai Juzi Information Technology Co Ltd
Priority to CN201610123758.3A priority Critical patent/CN105721251B/en
Publication of CN105721251A publication Critical patent/CN105721251A/en
Application granted granted Critical
Publication of CN105721251B publication Critical patent/CN105721251B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0817Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Landscapes

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

Abstract

The invention discloses a kind of method and system of configurable test pile service.This method comprises: invoking server obtains the service request for the hypertext transfer protocol that client is sent, and corresponding call request is generated according to the service request;The invoking server modifies configuration file, and the call request is sent to test pile server according to modified configuration file;The invoking server receives the configuration result corresponding with the call request of the test pile server feedback, and generates corresponding service result according to the configuration result and be sent to the client.It can solve in the prior art in invoking server setting blocker process complexity, and the technical issues of manual loading, complex management.

Description

A kind of method and system of configurable test pile service
Technical field
The present invention relates to field of computer technology more particularly to a kind of method and system of configurable test pile service.
Background technique
Hypertext transfer protocol (HyperText Transfer Protocol, HTTP) is that interconnection web-based applications are the widest A kind of general network protocol.All WWW files must comply with this standard.HTTP is that a client and server end asks The standard of summation response.Client is terminal user, and server end is website.In general, a request is initiated by HTTP client, Establish a transmission control protocol (Transmission Control Protocol, TCP) to server end designated port even It connects.Server end then monitors the request that client sends in that designated port.Once receiving connection request, server end (to client) sends back to a statusline, such as " HTTP/1.1 200OK ", and the message of response, and the message of response may be to ask File, error message or some other information asked.
Now, client is usually that the request that client is initiated is sent to invoking server and is being adjusted to the test of HTTP Increase a blocker with server, intercept the request that client is sent, and returns to the response knot of simulation according to the request of interception Whether fruit, the processing after response results are received with test client meet expected need.Increase blocker just to need to calling The code of server system is modified, and in modification, need to be triggered manually configuration file and be reloaded, and can not accomplish that change is real Shi Shengxiao, and complex management easily cause O&M accident.
Summary of the invention
In view of this, the embodiment of the present invention provides a kind of method and system of configurable test pile service, it is existing to solve Increase blocker process complexity in invoking server in technology, and the technical issues of manual loading, complex management.
In a first aspect, the embodiment of the invention provides a kind of methods of configurable test pile service, comprising:
Invoking server obtains the service request for the hypertext transfer protocol that client is sent, and according to the service request Generate corresponding call request;
The invoking server modifies configuration file, and is sent to the call request according to modified configuration file Test pile server;
The invoking server receives the configuration result corresponding with the call request of the test pile server feedback, And corresponding service result is generated according to the configuration result and is sent to the client.
Second aspect, the embodiment of the invention also provides a kind of systems of configurable test pile service, comprising:
Request module, is configured at invoking server, the clothes of the hypertext transfer protocol for obtaining client transmission Business request, and corresponding call request is generated according to the service request;
Modified module is configured at the invoking server, for modifying configuration file, and according to modified configuration file The call request is sent to test pile server;
Receiving module is configured at the invoking server, for receiving the test pile server feedback with the tune With requesting corresponding configuration result, and corresponding service result is generated according to the configuration result and is sent to the client.
The method and system of configurable test pile service provided in an embodiment of the present invention, obtain client by invoking server The service request of the hypertext transfer protocol sent is held, call request is generated and is asked the calling according to the configuration file of modification It asks and is sent to test pile server, it is not only simple and convenient without installing blocker in invoking server, it is also possible that configuration Modification comes into force in real time.Invoking server receives the configuration result corresponding with call request of the test pile server feedback, and Generate request results according to configuration result and be sent to client so as to the processing of call request all by test pile server into Row, since test pile server is unrelated with environment on line, it can thus be avoided because of the O&M accident that allocation problem generates, and adjust It is all sent to test pile server with request, convenient for management, is searched problem after generation problem.It only needs to test pile service Device changes, so that it may the configuration result change for realizing call request, but also change is more controllable.
Detailed description of the invention
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, of the invention other Feature, objects and advantages will become more apparent upon:
Fig. 1 is a kind of flow chart of the method for configurable test pile service that the embodiment of the present invention one provides;
Fig. 2 is a kind of flow chart of the method for configurable test pile service provided by Embodiment 2 of the present invention;
Fig. 3 is that the test pile server in a kind of method for configurable test pile service that the embodiment of the present invention three provides is defeated Out configuration result to invoking server flow chart;
Fig. 4 is the test pile server parsing in a kind of method of configurable test pile service provided in an embodiment of the present invention The flow chart of call request;
Fig. 5 is a kind of flow chart of the method for configurable test pile service that the embodiment of the present invention four provides;
Fig. 6 is the test pile server parsing in a kind of method of configurable test pile service provided in an embodiment of the present invention The flow chart of call request;
Fig. 7 is a kind of structural schematic diagram of the system for configurable test pile service that the embodiment of the present invention five provides.
Specific embodiment
The present invention 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 the present invention rather than limiting the invention.It also should be noted that in order to just In description, only some but not all contents related to the present invention are shown in the drawings.
Embodiment one
Fig. 1 is a kind of flow chart of the method for configurable test pile service that the embodiment of the present invention one provides.The present embodiment The case where service request suitable for sending to client carries out intercept process.Configurable test pile service provided in this embodiment Method can be executed by the system that can configure test pile service, which can be realized by software and/or hardware, and integrate In corresponding terminal device.As shown in Figure 1, this method comprises:
S110, invoking server obtain the service request for the hypertext transfer protocol that client is sent, and according to the clothes Business request generates corresponding call request.
Illustratively, client can be the terminal device that client holds, such as desktop computer, laptop, plate Computer, mobile phone etc..Client can show the hypertext mark of web page server or file system by application programs such as browsers Remember language content, and allows user and these file interactions.The service request that client issues is that user passes through the application such as browser Program input, and the request for following hypertext transfer protocol, the side of specific particular procedure are generated by client particular procedure Formula can be set according to the actual situation.Invoking server is the service request that can receive client transmission, and passes through solution Analyse the equipment that received service request calls the related service of other relevant servers to generate corresponding call request.Every tune It can receive the service request of at least client transmission with server.Call request can receive for invoking server parsing After the service request arrived, the request that can be sent to target web server of generation may include invocation target network service The data such as the uniform resource locator and IP address of device, the particular content for calling service.Wherein, invoking server analysis service is asked The concrete mode for seeking survival into corresponding call request can be set according to the actual situation, not make any restriction here.
S120, the invoking server modify configuration file, and according to modified configuration file by the call request It is sent to test pile server.
Illustratively, after invoking server obtains call request, the configuration file in read operation system, according to configuration text Call request is sent to target device by the data of part, and wherein configuration file is to be stored in the operating system of invoking server , file comprising specific data, such as hosts file may include network server domain name and IP address mapping relations etc. Content.Invoking server modifies to configuration file, it is ensured that can be sent call request according to modified configuration file To test pile server.Test pile server is the server that can execute particular test functionality.Preferably, in the present embodiment Test pile server can parse call request, and searches the relevant configuration with call request in the database and generate configuration knot Fruit.Same invoking server can receive different service requests and generate different call requests, but refer to same configuration File is called the subsequent processing of request, it is therefore desirable to which explanation, invoking server carries out configuration file in this step Modification is not limited to after generating a certain call request, can also before the service request for receiving client transmission, or Person is real time modifying configuration file according to actual needs.
S130, the invoking server receive the corresponding with the call request of the test pile server feedback and configure As a result, and generating corresponding service result according to the configuration result and being sent to the client.
Illustratively, the configuration result is the preset analog response result for different call requests.Wherein Analog response result can be the error result of setting, and different call requests may correspond to different analog response results.When When invoking server receives the configuration result of test pile server feedback, indicate that test pile server has received call request And it carries out response and generates configuration result.After invoking server receives configuration result, parsing is carried out to configuration result and generates phase The service result answered.Wherein, invoking server can call the service creation visitor of other relevant servers according to configuration result The service result that family end can respond, invoking server specifically parses and method of calling can be set according to the actual situation It is fixed, it is not construed as limiting here.Client is responded according to the service result received, can if service result is error result To test out client for the processing capacity of error result according to response results of the client to error result.It needs to illustrate It is that invoking server thinks that the configuration result can not be sent to client after analyzing the configuration result received, this When invoking server the result of test pile server feedback can not be sent to client, but invoking server is voluntarily analyzed Processing, can determine invoking server for the processing capacity of configuration result.
The method for the configurable test pile service that the embodiment of the present invention one provides, invoking server can be obtained by parsing Service request generate corresponding call request, and the call request is sent to by test pile according to modified configuration file Server, and the corresponding configuration result of test pile server feedback is received, carry out subsequent processing.In this way, both not needing Blocker is installed in invoking server, by modifying the configuration file of invoking server configuration modification can also be given birth in real time Effect, and can be to avoid the O&M accident generated by allocation problem.Call request is all sent to test pile server, convenient for managing, It is convenient for searching problem after generation problem.
Further, the method for configurable test pile service provided in this embodiment can also include:
The test pile server receives the call request that the invoking server is sent, and is exported according to the call request Corresponding configuration result is to the invoking server.
Illustratively, after test pile server receives call request, call request is parsed to obtain and call request Corresponding configuration result, and the configuration result is sent to the invoking server, simulated target network server completes Response to call request.It only needs to change test pile server in this way, so that it may realize the configuration to call request As a result it changes, but also change is more controllable.
Embodiment two
Fig. 2 is a kind of flow chart of the method for configurable test pile service provided by Embodiment 2 of the present invention.The present embodiment On the basis of example 1, configuration file is modified to the invoking server, and will be described according to modified configuration file Call request is sent to test pile server and is optimized.With reference to Fig. 2, this method comprises:
S210, invoking server obtain the service request for the hypertext transfer protocol that client is sent, and according to the clothes Business request generates corresponding call request.
S220, the invoking server obtain IP address addition instruction.
Illustratively, invoking server obtains IP address addition instruction with can be the IP for obtaining that this invoking server issues Location addition instruction, the IP address addition for being also possible to obtain the other equipment sending for carrying out data interaction with invoking server refer to It enables, other equipment are preferably configuration server, and wherein configuration server is the hardware clothes for having data and/or file management facilities Business device.The IP address that preferably invoking server obtains that configuration server issues adds instruction.Using configuration server to calling Server sends the benefit of IP address addition instruction are as follows: when the quantity of invoking server in system is excessive, by configuration server It is managed collectively the modification of the configuration file of each invoking server, modification time can be saved, promotes the efficiency of modification.Configuration service Device can be obtained by visualization window and IP address addition instruction is sent to invoking server after IP address addition instructs, In, visualization window is to show the window that can be watched on the screen.Configuration server can also generate IP according to ad hoc rules Address addition instruction, and IP address addition instruction is sent to invoking server.It may include tune in IP address addition instruction With the IP address of the target device of request transmission and the addition manner of the IP address.Target device is that can receive and parse calling The equipment of request, but it is not limited to target web server.Preferably, target device is test pile server, and IP address is to survey The IP address of test pile server.The time sequencing that invoking server obtains IP address addition instruction is not construed as limiting, that is, calls service Device can obtain IP address addition instruction in real time.
S230, the invoking server are added according to the IP address and are instructed, and add test pile in the configuration file The IP address of server.
Illustratively, invoking server is added according to IP address and is instructed, and test pile server is added in configuration file IP address, it is preferred that the IP address is added before or after the domain name of the target web server of configuration file, preferably in mesh IP address is added after marking the domain name of network server.If having existed the IP address of other target devices in configuration file, this When can according to the IP address of acquisition add instruct, with newly obtain IP address replacement configuration file in original IP address. Further, the process for adding IP address can be shown by invoking server by visualization window, be watched convenient for user It modifies in adding procedure manually.
The call request is sent to test pile server according to the IP address by S240, the invoking server.
Illustratively, if adding the IP address of test pile server in configuration file, invoking server is sending tune When with request, the call request will be sent to test pile server according to the IP address in configuration file.Wherein, it tests The specific setting means of stake server ip address can be set according to the actual situation.
S250, the invoking server receive the corresponding with the call request of the test pile server feedback and configure As a result, and generating corresponding service result according to the configuration result and being sent to the client.
The method of configurable test pile service provided by Embodiment 2 of the present invention, invoking server are obtaining call request Afterwards, it is added and is instructed according to IP address, the IP address of test pile server is added in the configuration file, so that invoking server The call request is sent to test pile server, is rung when waiting the configuration result for receiving test pile server feedback It answers.Call request can be made all to be sent to test pile server in this way, due on test pile server and line environment without It closes, it can thus be avoided because of the O&M accident that allocation problem generates, and convenient for managing, it searches problem after generation problem.
Embodiment three
Fig. 3 is that the test pile server in a kind of method for configurable test pile service that the embodiment of the present invention three provides is defeated Out configuration result to invoking server flow chart.The present embodiment on the basis of example 1, to the test pile server The call request that the invoking server is sent is received, corresponding configuration result is exported to the calling according to the call request The step of server, optimizes.As shown in figure 3, the test pile server output in the method for the configurable test pile service is matched Setting result to invoking server includes:
S310, the test pile server receive the call request that the invoking server is sent.
Illustratively, whole tune that the test pile server can be sent with a real-time reception at least invoking server With request.
S320, the test pile server check whether there is configuration relevant to the call request, and if it exists, then press Corresponding configuration result is exported according to the configuration, and the call request is otherwise sent to target network to the invoking server Network server.
Illustratively, after test pile server receives call request, checking in database whether there is and the tune With the relevant configuration of request, and if it exists, then export corresponding configuration result to invoking server.If not having in test pile server Configuration relevant to call request, then be sent to external interface for the call request, is sent to target network by external interface Network server.Wherein, database can be only fitted in test pile server, also can be only fitted in other servers.If data Library configures in test pile server, then test pile server is when checking whether to have configuration relevant to call request, directly The database configured in test pile server is asked in receiving.If database configures the test pile server in other servers It needs to access other servers, and checks whether that there are matched data in the database of other servers.Number in database According to write-in and/or the type of storage can be controlled by configuration server.Preferably, with reference to Fig. 4, which be can wrap It includes:
S321, the test pile server parse the calling domain name in the call request.
Illustratively, domain name is called to can include determining that the uniform resource locator and target network of target web server The IP address of server.After test pile server receives call request, the calling domain name in call request is parsed to get mesh is arrived Mark the uniform resource locator and IP address of network server.
S322, the test pile server are checked in database matches with the presence or absence of domain name corresponding with the calling domain name It sets.
Illustratively, a certain number of calling domain names have been stored in advance in the database that test pile server is checked.Work as solution After analysing the calling domain name in call request, test pile server checks whether there is identical calling domain name in the database, i.e., It checks in database and is configured with the presence or absence of domain name corresponding with the calling domain name of call request.Test pile server can set and look into It sees in database with the presence or absence of the uniform resource locator and IP address whole with the target web server in calling domain name The configuration matched can also set and check in database that the unified resource for only existing and calling the target web server in domain name is determined Any one of position symbol or IP address matched configuration, specific setting means can be set according to the actual situation.Wherein, it looks into It is configured if seeing in result database and there is domain name corresponding with the calling domain name, then S323 is executed, if not depositing in database It is configured in domain name corresponding with the calling domain name, then executes S325.
S323, if it exists domain name configuration corresponding with the calling domain name, then the test pile server parses the tune With the calling service type in request.
Illustratively, if checking, result is to have domain name corresponding with the calling domain name in database to configure, and is tested Stake server continues to parse the calling service type in call request.Wherein, calling service type is the service of invocation target network Device provides the type of service, such as opens the homepage of target web server, or the service such as broadcasting video.
S324, the test pile server are checked in the database with the presence or absence of corresponding with the calling service type Service configuration, and if it exists, then according to default template, export configuration result corresponding with the call request to the calling and service Otherwise the call request is sent to the target web server by device.
Illustratively, a certain number of calling service types have been stored in advance in the database that test pile server is checked, The corresponding specifically default template of each calling service type, wherein different configuration knots can be generated in different default templates Fruit.When existing in the database that test pile server is checked and calling that domain name is corresponding configures in call request, then continue to check In database whether there is calling service type identical with the call request, i.e., in database with the presence or absence of in call request Call the corresponding service configuration of service type.Corresponding service configuration if it exists, then test pile server obtains the calling service The corresponding default template of type according to default template generation and exports corresponding configuration result to the invoking server, wherein The configuration result is analog response result.If being not present in database and calling service type in the configuration file of call request Corresponding service configuration, then the call request is sent to external interface by test pile server, is sent out by the external interface It send to target web server.Its external interface is the interface of test pile server and other server data transports, preferably For the interface of test pile server and webserver data transmission.
S325, the if it does not exist configuration of corresponding with calling domain name domain name, then the test pile server is by the tune The target web server is sent to request.
Illustratively, if there is no call domain name corresponding with call request in the database that test pile server is checked Domain name configuration, then be sent to external interface for the call request, and be sent to target web server by the external interface. After target web server receives call request, feedback response result to external interface, and tune is sent to by external interface With server, is parsed by invoking server and generate service result.After call request can also being received by target web server, Direct feedback result is parsed by invoking server to invoking server and generates service result.
The method for the configurable test pile service that the embodiment of the present invention three provides, test pile server parse received calling Request and check in database whether have it is corresponding with call request configure, if being respectively present the tune with call request in database With domain name and service type is called to configure accordingly, then test pile server according to default template generation and exports corresponding configuration As a result to invoking server, if being not present in database and the calling domain name or calling clothes in the configuration file of the call request Service type configures accordingly, then the call request is sent to target web server by test pile server.So that calling The processing of request is all carried out by test pile server, since test pile server is unrelated with environment on line, is avoided because matching The O&M accident of problem generation is set, and test pile server carries out shunting processing to call request, convenient for managing, after generation problem Convenient for searching problem.
Example IV
Fig. 5 is a kind of flow chart of the method for configurable test pile service that the embodiment of the present invention four provides.The present embodiment For a preferable example.With reference to Fig. 5, this method comprises:
S510, xxxService initiate request call api.yyy.com/service service.
Illustratively, xxxService is client, and api.yyy.com/service is the of specific network server end Tripartite's service.
S520, the hosts file for modifying invoking server.
Illustratively, hosts file is the configuration file in the operating system of invoking server, can be by visualizing window The hosts file of mouth modification invoking server.The mode of modification is that test pile server ip address is obtained from configuration server Addition instruction and the IP address for increasing test pile server in host file.For example, api.yyy.com 192.168.6.66. I.e. at the uniform resource locator of api.yyy.com/service (Uniform Resoure Locator, URL) 192.168.6.66 is added after api.yyy.com, wherein 192.168.6.66 is the IP address of test pile server, wherein Api.yyy.com is the URL for the third party's service being stored in advance in configuration file.It should be noted that the step can be put Before S510.
S530, invoking server receive xxxService and initiate request call api.yyy.com/service service, and raw Test pile server is forwarded at corresponding call request.
Illustratively, invoking server receives the calling api.yyy.com/service service of xxxService initiation Request after, to the service request carry out dissection process after generate corresponding call request.It is surveyed due to increasing in configuration file The call request can be sent to test pile service according to the IP address by the IP address of test pile server, invoking server Device.
After S540, test pile server receive call request, the configuration in comparison database such as has correlation in the database Configuration, then return to the configuration in database as a result, otherwise directly accesses external system.
Illustratively, if configuration not relevant to call request in database, test pile server is by the calling Request is sent to external system by external interface, and external system can be the corresponding network server of api.yyy.com.With reference to Fig. 6, the step include:
S541, test pile server receive call request.
S542, test pile server inquire database according to URL, IP address.
Illustratively, according in call request URL and IP address inquire corresponding configuration in the database.If no Relevant configuration then executes S543, if there is relevant configuration, then executes S544.
If S543, without relevant configuration, test pile server calls directly external interface.
Illustratively, if not corresponding with the URL of call request and IP address in database configure, by the calling Request is sent to external interface, is sent to external equipment by external interface.
S544, if there is relevant configuration, test pile server judge whether with call service type match.
Illustratively, if configured in database in the presence of corresponding with the URL of call request and IP address, test pile clothes Business device judges the configuration to match in database with the presence or absence of the calling service type with call request.If existed in database With the calling matched configuration of service type, then S546 is executed, S545 is otherwise executed.
If S545, mismatched with service type is called, test pile server calls directly external interface.
Illustratively, if it does not match, the call request is sent to external interface by test pile server, by outer Portion's interface is sent to external equipment.
If S546, matched with service type is called, test pile server analytic parameter is used for filling template.
Illustratively, if existing in database and calling that service type is corresponding configures, the parsing of test pile server Corresponding parameter is configured, and the parameter of parsing is filled in template.
S547, according to template generation configuration result.
Illustratively, test pile server generates configuration result according to the parameter in template.
S548, result return to called side, and process terminates.
Illustratively, the configuration result is fed back to the called side for issuing call request, i.e. invoking server, process knot Beam.
The method for the configurable test pile service that the embodiment of the present invention four provides modifies configuration text by invoking server The call request is sent to test pile server by part, is asked if existing in the database that test pile server is checked with calling Ask corresponding configuration, then export configuration result to called side, if in the database that test pile server is checked not with calling The corresponding configuration of request, then be sent to external equipment for the call request, so that invoking server no setting is required blocker, and It, can be to avoid O&M accident convenient for management.
Embodiment five
Fig. 7 is a kind of structural schematic diagram of the system for configurable test pile service that the embodiment of the present invention five provides, such as Fig. 7 Shown, the system comprises invoking servers 701 and test pile server 702.
Wherein, the invoking server 701 may include: request module, for obtaining the super text of client transmission The service request of this transport protocol, and corresponding call request is generated according to the service request;Modified module is matched for modifying File is set, and the call request is sent to by test pile server 702 according to modified configuration file;Receiving module is used In the configuration result corresponding with the call request for receiving the feedback of test pile server 702, and according to configuration knot Fruit generates corresponding service result and is sent to the client.
Further, the modified module may include: instruction acquisition unit, for obtaining IP address addition instruction;Ground Location adding unit is instructed for being added according to the IP address, and the IP of test pile server 702 is added in the configuration file Address;Transmission unit, for the call request to be sent to the test pile server 702 according to the IP address.
Preferably, the test pile server 702 may include: output module, for receiving the invoking server 701 The call request of transmission exports corresponding configuration result to the invoking server 701 according to the call request.
Further, the output module may include: request reception unit, for receiving the invoking server 701 The call request of transmission;Configuration unit, for checking whether there is configuration relevant to the call request, and if it exists, then press Corresponding configuration result is exported according to the configuration, and the call request is otherwise sent to target to the invoking server 701 Network server.
Preferably, the configuration unit may include: domain name confirmation subelement, for parsing the tune in the call request Use domain name;Domain name coupling subelement is configured for checking in database with the presence or absence of domain name corresponding with the calling domain name;Clothes Business confirmation subelement parses the tune if configuring for there is domain name corresponding with the calling domain name in the database With the calling service type in request;Service Matching subelement whether there is and the calling for checking in the database The corresponding service configuration of service type, and if it exists, then according to default template, export configuration result corresponding with the call request The call request is otherwise sent to the target web server to the invoking server;Transmission sub-unit is used for If there is no domain names corresponding with the calling domain name to configure in the database, the call request is sent to the mesh Mark network server.
On the basis of above-described embodiment, the configuration result is the preset analog response for different call requests As a result.
The system for the configurable test pile service that the embodiment of the present invention five provides can be used for executing above-mentioned any embodiment institute The method of the configurable testing service provided, has the corresponding functional module of execution method and beneficial effect.
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation, It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.

Claims (12)

1. a kind of method of configurable test pile service characterized by comprising
Invoking server obtains the service request for the hypertext transfer protocol that client is sent, and is generated according to the service request Corresponding call request;
The invoking server modifies configuration file, and the call request is sent to test according to modified configuration file Stake server;
The invoking server receives the configuration result corresponding with the call request of the test pile server feedback, and root Corresponding service result is generated according to the configuration result and is sent to the client;The configuration result is preset needle To the analog response result of different call requests.
2. the method according to claim 1, wherein the invoking server modifies configuration file, and according to repairing The call request is sent to test pile server and includes: by the configuration file after changing
The invoking server obtains IP address addition instruction;
The invoking server is added according to the IP address and is instructed, and the IP of test pile server is added in the configuration file Address;
The call request is sent to test pile server according to the IP address by the invoking server.
3. the method according to claim 1, wherein further include:
The test pile server receives the call request that the invoking server is sent, and is answered according to the call request output phase Configuration result to the invoking server.
4. according to the method described in claim 3, it is characterized in that, the test pile server receives the invoking server hair The call request sent, exporting corresponding configuration result to the invoking server according to the call request includes:
The test pile server receives the call request that the invoking server is sent;
The test pile server checks whether there is configuration relevant to the call request, and if it exists, then matches according to described It sets the corresponding configuration result of output and the call request is otherwise sent to target web server to the invoking server.
5. according to the method described in claim 4, it is characterized in that, the test pile server checks whether exist and the tune With the relevant configuration of request, and if it exists, no then according to the corresponding configuration result of configuration output to the invoking server Then, the call request is sent to target web server includes:
The test pile server parses the calling domain name in the call request;
The test pile server is checked in database and is configured with the presence or absence of domain name corresponding with the calling domain name;
Domain name configuration corresponding with the calling domain name if it exists, then the test pile server parses in the call request Call service type;
The test pile server, which is checked, whether there is service configuration corresponding with the calling service type in the database, If it exists, then according to default template, configuration result corresponding with the call request is exported to the invoking server, otherwise, The call request is sent to the target web server;
Domain name configuration corresponding with the calling domain name if it does not exist, then the test pile server sends the call request To the target web server.
6. method according to any one of claims 1-5, which is characterized in that the configuration result is preset needle To the analog response result of different call requests.
7. a kind of system of configurable test pile service characterized by comprising
Request module, is configured at invoking server, asks for obtaining the service of hypertext transfer protocol of client transmission It asks, and corresponding call request is generated according to the service request;
Modified module is configured at the invoking server, for modifying configuration file, and according to modified configuration file by institute It states call request and is sent to test pile server;
Receiving module is configured at the invoking server, for receiving asking with the calling for the test pile server feedback Corresponding configuration result is sought, and corresponding service result is generated according to the configuration result and is sent to the client;It is described Configuration result is the preset analog response result for different call requests.
8. system according to claim 7, which is characterized in that the modified module includes:
Instruction acquisition unit, for obtaining IP address addition instruction;
Address adding unit is instructed for being added according to the IP address, and test pile server is added in the configuration file IP address;
Transmission unit, for the call request to be sent to the test pile server according to the IP address.
9. system according to claim 7, which is characterized in that further include:
Output module is configured at test pile server, the call request sent for receiving the invoking server, according to described Call request exports corresponding configuration result to the invoking server.
10. system according to claim 9, which is characterized in that the output module includes:
Request reception unit, the call request sent for receiving the invoking server;
Configuration unit, for checking whether there is configuration relevant to the call request, and if it exists, then defeated according to the configuration Out otherwise the call request is sent to target web server to the invoking server by corresponding configuration result.
11. system according to claim 10, which is characterized in that the configuration unit includes:
Domain name confirms subelement, for parsing the calling domain name in the call request;
Domain name coupling subelement is configured for checking in database with the presence or absence of domain name corresponding with the calling domain name;
Service confirmation subelement parses if configuring for there is domain name corresponding with the calling domain name in the database Calling service type in the call request;
Service Matching subelement is matched for checking in the database with the presence or absence of service corresponding with the calling service type It sets, and if it exists, then according to default template, output configuration result corresponding with the call request is no to the invoking server Then, the call request is sent to the target web server;
Transmission sub-unit, if for there is no domain names corresponding with the calling domain name to configure in the database, it will be described Call request is sent to the target web server.
12. system according to any one of claims 7-11, which is characterized in that the configuration result is preset For the analog response result of different call requests.
CN201610123758.3A 2016-03-04 2016-03-04 A kind of method and system of configurable test pile service Active CN105721251B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610123758.3A CN105721251B (en) 2016-03-04 2016-03-04 A kind of method and system of configurable test pile service

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610123758.3A CN105721251B (en) 2016-03-04 2016-03-04 A kind of method and system of configurable test pile service

Publications (2)

Publication Number Publication Date
CN105721251A CN105721251A (en) 2016-06-29
CN105721251B true CN105721251B (en) 2019-03-08

Family

ID=56157360

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610123758.3A Active CN105721251B (en) 2016-03-04 2016-03-04 A kind of method and system of configurable test pile service

Country Status (1)

Country Link
CN (1) CN105721251B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108460612B (en) * 2017-02-20 2023-01-06 腾讯科技(北京)有限公司 Advertisement delivery test method, device and equipment
CN109768951A (en) * 2018-08-17 2019-05-17 付东光 Remote analog data method and remote dummy server

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1988479A (en) * 2006-12-31 2007-06-27 金蝶软件(中国)有限公司 Method for recording system information and object pile
CN101141328A (en) * 2007-10-11 2008-03-12 中兴通讯股份有限公司 Method and device for simulating Diameter server terminal
CN103150238A (en) * 2011-12-07 2013-06-12 阿里巴巴集团控股有限公司 Service request processing method, simulation performance test method and simulation performance test device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1988479A (en) * 2006-12-31 2007-06-27 金蝶软件(中国)有限公司 Method for recording system information and object pile
CN101141328A (en) * 2007-10-11 2008-03-12 中兴通讯股份有限公司 Method and device for simulating Diameter server terminal
CN103150238A (en) * 2011-12-07 2013-06-12 阿里巴巴集团控股有限公司 Service request processing method, simulation performance test method and simulation performance test device

Also Published As

Publication number Publication date
CN105721251A (en) 2016-06-29

Similar Documents

Publication Publication Date Title
US10613916B2 (en) Enabling a web application to call at least one native function of a mobile device
WO2020119434A1 (en) Method and apparatus for interface data processing, method and apparatus for automated testing, device, and medium
US6119247A (en) Remote debugging of internet applications
CN108574604B (en) Test method and device
CN108427631A (en) A kind of application test systems, method, electronic equipment and readable storage medium storing program for executing
US8924867B2 (en) Web interface for remote platform build
CN104427627A (en) Test data obtaining method, client and server
US20080091775A1 (en) Method and apparatus for parallel operations on a plurality of network servers
CN106897336A (en) Web page files sending method, webpage rendering intent and device, webpage rendering system
US20220198025A1 (en) Web Attack Simulator
US9986057B2 (en) UI framework support for portal systems
US20230161766A1 (en) Data investigation and visualization system
CN105721251B (en) A kind of method and system of configurable test pile service
CN106708717B (en) A kind of exploitation adjustment method and device
CN104486333A (en) Debug method and debug device for mobile application programs
CN108089972A (en) interface test method and device
CN113127335A (en) System testing method and device
JP5737249B2 (en) Load simulation apparatus, simulation apparatus, load simulation method, simulation method, and program
CN111338928A (en) Chrome-based browser testing method and device
US11954013B2 (en) Method of testing applet performance, electronic device, and computer-readable medium
US20140173587A1 (en) Managing an application modification process
CN114915565A (en) Method and system for debugging network
WO2022155685A1 (en) Web attack simulator
CN112685285A (en) User interface test case generation method and device
CN113138915A (en) Page testing method, device and medium

Legal Events

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