CN108427635A - Quickly method, server and the computer readable storage medium of test web page - Google Patents

Quickly method, server and the computer readable storage medium of test web page Download PDF

Info

Publication number
CN108427635A
CN108427635A CN201810003926.4A CN201810003926A CN108427635A CN 108427635 A CN108427635 A CN 108427635A CN 201810003926 A CN201810003926 A CN 201810003926A CN 108427635 A CN108427635 A CN 108427635A
Authority
CN
China
Prior art keywords
web page
request
http request
default
initiated
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810003926.4A
Other languages
Chinese (zh)
Inventor
刘芳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
OneConnect Smart Technology Co Ltd
Original Assignee
OneConnect Smart Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by OneConnect Smart Technology Co Ltd filed Critical OneConnect Smart Technology Co Ltd
Priority to CN201810003926.4A priority Critical patent/CN108427635A/en
Publication of CN108427635A publication Critical patent/CN108427635A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • 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)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a kind of method of quick test web page, the method includes:Establish contextual data resources bank;Monitor the request that the web page is initiated;Judge to whether there is request identical with default HTTP request in the request that the web page monitored is initiated;If there is request identical with the default HTTP request in the request that the web page monitored is initiated, is imported from the contextual data resources bank and ask the corresponding response data of the identical default HTTP request with described;Web page test is completed according to the corresponding response data of the default HTTP request identical with the request.The present invention also provides a kind of server and computer readable storage mediums.Method, server and the computer readable storage medium of quick test web page provided by the invention can directly obtain required contextual data, and then the convenient and efficient test for realizing web page from contextual data resources bank, promote the efficiency entirely tested.

Description

Quickly method, server and the computer readable storage medium of test web page
Technical field
The present invention relates to finance data field more particularly to a kind of method, server and the calculating of quick test web page Machine readable storage medium storing program for executing.
Background technology
Usually the page of web is tested, system is needed to call multi-party interface to obtain the hypertext under different scenes Transport protocol (Hyper Text Transport Protocol, HTTP) responds (response) data, however, in practical survey During examination, if the also non-joint debugging in interface side, or the case where need to obtain specific interface data and the test system of web When uniting and do not know each operation flow of affiliated party again, and then can not clearly call corresponding interface, to produce or obtain at this time Different scenes http response data are relatively difficult.In this way, the test stand-by period mistake that entire web page will be led to Long, inefficiency is unfavorable for large-scale web page test, and then influences the progress of entire project development.
Invention content
In view of this, the present invention proposes a kind of method, server and the computer-readable storage medium of quick test web page Matter can directly obtain required contextual data, and then the convenient and efficient test for realizing web page from contextual data resources bank, Promote the efficiency entirely tested.
First, to achieve the above object, the present invention proposes a kind of server, and the server includes memory, processor, The program for the quick test web page that can be run on the processor, the quick test web are stored on the memory When the program of the page is executed by the processor, following steps are realized:
Contextual data resources bank is established, the scenario resources library includes default HTTP request and the default HTTP request pair The response data answered;
Monitor the request that the web page is initiated;
Judge to ask with the presence or absence of identical with the default HTTP request in the request that the web page monitored is initiated It asks;
If there is request identical with the default HTTP request in the request that the web page monitored is initiated, from The contextual data resources bank is imported asks the corresponding response data of the identical default HTTP request with described;And
Web page is completed according to the corresponding response data of the default HTTP request identical with the request to survey Examination.
Optionally, described the step of establishing contextual data resources bank, including:
Record the HTTP request initiated when the web page normal operation and the HTTP corresponding to the HTTP request response;And
It is associated using the HTTP request as default HTTP request and with the HTTP response, and deposits in pairs The memory is stored in build the contextual data resources bank.
Optionally, described to monitor the step of request that the web page is initiated, including:
Number of active lanes is monitored in setting;And
The request initiated the web page according to the monitoring number of active lanes is monitored.
Optionally, when the program of the quick test web page is executed by the processor, following steps are also realized:
The scene set data repository update cycle;And
When time contextual data resources bank update cycle then, then carry out default HTTP request and the default HTTP Ask the update of corresponding response data.
In addition, to achieve the above object, the present invention also provides a kind of method of quick test web page, this method applications In server, the method includes:
Contextual data resources bank is established, the scenario resources library includes default HTTP request and the default HTTP request pair The response data answered;
Monitor the request that the web page is initiated;
Judge to ask with the presence or absence of identical with the default HTTP request in the request that the web page monitored is initiated It asks;
If there is request identical with the default HTTP request in the request that the web page monitored is initiated, from The contextual data resources bank is imported asks the corresponding response data of the identical default HTTP request with described;And
Web page is completed according to the corresponding response data of the default HTTP request identical with the request to survey Examination.
Optionally, described the step of establishing contextual data resources bank, including:
Record the HTTP request initiated when the web page normal operation and the HTTP corresponding to the HTTP request response;And
It is associated using the HTTP request as default HTTP request and with the HTTP response, and deposits in pairs Storage is to build the contextual data resources bank.
Optionally, the method further includes step:
The scene set data repository update cycle;And
When time contextual data resources bank update cycle then, then carry out default HTTP request and the default HTTP Ask the update of corresponding response data.
Optionally, described to monitor the step of request that the web page is initiated, including:
Number of active lanes is monitored in setting;And
The request initiated the web page according to the monitoring number of active lanes is monitored.
Optionally, complete in the corresponding response data of the identical default HTTP request of the basis and the request After the step of being tested at web page, the method further includes step:
HTTP request after record test and corresponding response response datas.
Further, to achieve the above object, the present invention also provides a kind of computer readable storage medium, the computers Readable storage medium storing program for executing is stored with the program of quickly test web page, and the program of the quick test web page can be at least one Processor executes, so that the step of at least one processor executes the method such as above-mentioned quick test web page.
Compared to the prior art, server proposed by the invention, quickly the test method of web page and computer-readable Storage medium establishes contextual data resources bank first, and the scenario resources library includes default HTTP request and the default HTTP Ask corresponding response data;Secondly, the request that the web page is initiated is monitored;Then, judge the web page monitored With the presence or absence of request identical with the default HTTP request in the request of initiation;Then, if the web page monitored is initiated Request in when there is request identical with the default HTTP request, imported and the request from the contextual data resources bank The corresponding response data of the identical default HTTP request;Finally, according to identical described default with the request The corresponding response data of HTTP request completes web page test.This way it is possible to avoid the survey of web page in the prior art It is long to try the stand-by period, can be in the business for not needing web tests system and go to understand each affiliated party the drawbacks of inefficiency It after logic, then goes to create contextual data, also withouts waiting for each affiliated party and complete the contextual data that joint debugging generates, but directly Required contextual data, and then the convenient and efficient test for realizing web page are obtained from contextual data resources bank, promote entire test Efficiency.
Description of the drawings
Fig. 1 is the schematic diagram of one optional hardware structure of server of the present invention;
Fig. 2 is the Program modual graph of the program first embodiment of quickly test web page of the invention;
Fig. 3 is the Program modual graph of the program second embodiment of quickly test web page of the invention;
Fig. 4 is the flow chart for the method first embodiment that the present invention quickly tests web page;
Fig. 5 is the flow chart for the method second embodiment that the present invention quickly tests web page.
Reference numeral:
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific implementation mode
In order to make the purpose , technical scheme and advantage of the present invention be clearer, with reference to the accompanying drawings and embodiments, right The present invention is further elaborated.It should be appreciated that described herein, specific examples are only used to explain the present invention, not For limiting the present invention.Based on the embodiments of the present invention, those of ordinary skill in the art are not before making creative work The every other embodiment obtained is put, shall fall within the protection scope of the present invention.
It should be noted that the description for being related to " first ", " second " etc. in the present invention is used for description purposes only, and cannot It is interpreted as indicating or implying its relative importance or implicitly indicates the quantity of indicated technical characteristic.Define as a result, " the One ", the feature of " second " can explicitly or implicitly include at least one of the features.In addition, the skill between each embodiment Art scheme can be combined with each other, but must can be implemented as basis with those of ordinary skill in the art, when technical solution Will be understood that the combination of this technical solution is not present in conjunction with there is conflicting or cannot achieve when, also not the present invention claims Protection domain within.
As shown in fig.1, being the schematic diagram of 1 one optional hardware structure of server.
The server 1 can be rack-mount server, blade server, tower server or Cabinet-type server etc. Computing device, which can be independent server, can also be the server cluster that multiple servers are formed.
In the present embodiment, the server 1 may include, but be not limited only to, and can be in communication with each other connection by system bus and deposit Reservoir 11, processor 12, network interface 13.
The server 1 connects network by network interface 13, obtains information.The network can be intranet (Intranet), internet (Internet), global system for mobile communications (Global System of Mobile Communication, GSM), wideband code division multiple access (Wideband Code Division Multiple Access, WCDMA), the wirelessly or non-wirelessly network such as 4G networks, 5G networks, bluetooth (Bluetooth), Wi-Fi, speech path network.
It should be pointed out that Fig. 1 illustrates only the server 1 with component 11-13, it should be understood that simultaneously should not Realistic to apply all components shown, the implementation that can be substituted is more or less component.
Wherein, the memory 11 includes at least a type of readable storage medium storing program for executing, and the readable storage medium storing program for executing includes Flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memories etc.), random access storage device (RAM), it is static with Machine accesses memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), may be programmed only Read memory (PROM), magnetic storage, disk, CD etc..In some embodiments, the memory 11 can be the clothes Be engaged in device 1 internal storage unit, such as the server 1 hard disk or memory.In further embodiments, the memory 11 Can be the External memory equipment of the server 1, such as the plug-in type hard disk that the server 1 is equipped with, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card) etc..When So, the memory 11 can also both include the server 1 internal storage unit and also including its External memory equipment.This reality It applies in example, the memory 11 is installed on the operating system and types of applications software of the server 1 commonly used in storage, such as The quickly program code etc. of the program 200 of test web page.In addition, the memory 11 can be also used for temporarily storing Various types of data through exporting or will export.
The processor 12 can be in some embodiments central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor or other data processing chips.The processor 12 is commonly used in the control clothes The overall operation of business device 1, such as execute data interaction or the relevant control of communication and processing etc..In the present embodiment, the place Reason device 12 is used to run the program code stored in the memory 11 or processing data, such as runs the quick test Program 200 of web page etc..
The network interface 13 may include radio network interface or wired network interface, which is commonly used in Communication connection is established between the server 1 and other electronic equipments.
In the present embodiment, the program 200 of quickly test web page is installed and run in the server 1, when described fast When the program 200 of speed test web page is run, the server 1 establishes contextual data resources bank, the scenario resources first Library includes default HTTP request and the corresponding response data of the default HTTP request;Secondly, monitor what the web page was initiated Request;Then, judge to ask with the presence or absence of identical with the default HTTP request in the request that the web page monitored is initiated It asks;Then, if there is request identical with the default HTTP request in the request that the web page monitored is initiated, from The contextual data resources bank is imported asks the corresponding response data of the identical default HTTP request with described;Most Afterwards, web page test is completed according to the corresponding response data of the default HTTP request identical with the request.This The drawbacks of sample, can be long to avoid the test stand-by period of web page in the prior art, inefficiency, can not need web It after test system goes the service logic for understanding each affiliated party, then goes to create contextual data, also withouts waiting for each association Side completes the contextual data that joint debugging generates, but required contextual data is directly obtained from contextual data resources bank, and then conveniently The quick test for realizing web page, promotes the efficiency entirely tested.
So far, oneself is through describing the hardware configuration and function of the relevant device of each embodiment of the present invention in detail.In the following, will Based on above application environment and relevant device, each embodiment of the present invention is proposed.
First, the present invention proposes a kind of program 200 of quick test web page.
As shown in fig.2, being the Program modual graph of 200 first embodiment of program of quickly test web page of the invention.
In the present embodiment, the program 200 of the quick test web page includes a series of is stored on memory 11 Computer program instructions various embodiments of the present invention may be implemented when the computer program instructions are executed by processor 12 The quickly operation of test web page.In some embodiments, it is realized based on the computer program instructions each section specific Operation, the program 200 of the quick test web page can be divided into one or more modules.For example, in fig. 2, it is described Quick test web page program 200 can be divided into establish module 201, monitor module 202, judgment module 203 and Test module 204.Wherein:
It is described to establish module 201, for establishing contextual data resources bank.In the present embodiment, the scenario resources library includes Default hypertext transfer protocol (Hyper Text Transport Protocol, HTTP) request and the default HTTP request Corresponding response data.The module 201 of establishing establishes contextual data resources bank in the following manner:It is described to establish module 201 Record the HTTP request initiated when web page normal operation and the http response (HTTP corresponding to the HTTP request Response it), and using the HTTP request as default HTTP request and with the HTTP response is associated, and at To being stored in memory to build the contextual data resources bank.Usually, HTTP request and the HTTP can be established The mapping table of response.
In the present embodiment, when establishing contextual data resources bank, HTTP request and the default HTTP request are preset There are a variety of situations in the source of corresponding response data, are the collections of historical data described above first, normal by monitoring Web page HTTP request in the process of running and corresponding response data, automatically record the base as scenario resources library Plinth data, i.e., default HTTP request and the corresponding response data of the default HTTP request.Secondly, be by artificial input, In a large amount of exploitation practical experiences of developer, accumulates or record when the web page under many different scenes is run The response data of HTTP request and corresponding response can also build above-mentioned contextual data resources bank.
The monitoring module 201, the request initiated for monitoring the web page.Further, the monitoring module 201, number of active lanes is monitored in setting, and is monitored according to the request that the monitoring number of active lanes initiates the web page.
It monitors module 201 and request realization monitoring is initiated to web page, needing could be real using pre-set monitoring channel It is existing, it monitors channel for usually one and a kind of monitoring of request may be implemented, the monitoring of multiple requests may be implemented in plurality of passages.Therefore In the present embodiment, the monitoring carried out to the request that web page is initiated can monitor a request with a moment, it is of course possible to As needed, the same moment multiple requests can also be monitored.Specific choice, can be true according to the actual needs of tester It is fixed.
Further, after the monitoring module 201 listens to the request that the web page is initiated, the judgment module It whether there is request identical with the default HTTP request in the request that 203 web pages for judging to monitor are initiated. Specifically, the mapping table that the judgment module 203 passes through calling HTTP request and the HTTP response, you can sentence With the presence or absence of request identical with the default HTTP request in the request that the disconnected web page monitored is initiated.
If there is request identical with the default HTTP request in the request that the web page monitored is initiated, institute It states judgment module 203 and is imported from the contextual data resources bank and ask the corresponding institute of the identical default HTTP request with described State response data.
The test module 204 is used to be imported according to the judgment module 203 identical described default with the request The corresponding response data of HTTP request completes web page test.Further, the test module 204 is additionally operable to, in root After web page test being completed according to the corresponding response data of the default HTTP request identical with the request, record HTTP request after test and corresponding response response datas.That is, by HTTP request after test and corresponding In the storage to HTTP request and the mapping table of the HTTP response of response response datas.In this way, by surveying HTTP request and corresponding response response datas are recorded after examination, and a test well can be provided for tester With reference to providing guide for subsequent test, and then improve the whole efficiency of test.
By above procedure module 201-204, the program 200 of quick test web page proposed by the invention, first, Contextual data resources bank is established, the scenario resources library includes default HTTP request and the corresponding response of the default HTTP request Data;Secondly, the request that the web page is initiated is monitored;Then, judge monitor the web page initiate request in be It is no to there is request identical with the default HTTP request;Then, if monitor the web page initiate request in exist with When the identical request of the default HTTP request, imported from the contextual data resources bank identical described default with the request The corresponding response data of HTTP request;Finally, according to the corresponding institute of the default HTTP request identical with the request It states response data and completes web page test.This way it is possible to avoid the test stand-by period of web page is long in the prior art, effect The low drawback of rate, can be after not needing web tests system and going the service logic for understanding each affiliated party, then goes to creation field Scape data also without waiting for each affiliated party and complete the contextual data that joint debugging generates, but directly from contextual data resources bank Contextual data needed for obtaining, and then conveniently and efficiently realize the test of web page, promote the efficiency entirely tested.
Further, the above-mentioned first embodiment based on quickly test web page program 200 of the invention, proposes the present invention Second embodiment (as shown in Figure 3).In the present embodiment, the quick test web page program 200 further includes update module 205, wherein:
The update module 205 is used for the scene set data repository update cycle, and works as the contextual data resources bank Time update cycle then, carries out the update of default HTTP request and the corresponding response data of the default HTTP request.That is, will Default HTTP request and the corresponding response data of the default HTTP request are updated to HTTP request and the HTTP response Mapping table in, specifically, the update cycle is configured as needed by developer, for example, 24 hours update Once or update in 72 hours is primary.
In the present embodiment, contextual data resources bank is not unalterable, can be with by default certain update cycle When suitable, the contextual data that will newly obtain, i.e. HTTP request and response response datas are updated to contextual data money Source library, and then abundant contextual data resources bank so that the test of web page more complete and accurate.
By above procedure module 205, quick test web page program 200 proposed by the invention, by default certain Update cycle, can be when suitable, the contextual data that will newly obtain, i.e. HTTP request and response response datas are more Newly to contextual data resources bank, and then abundant contextual data resources bank so that the test of web page more complete and accurate.
In addition, the present invention also proposes a kind of method of quick test web page.
As shown in fig.4, being the flow chart of the method first embodiment of quickly test web page of the invention.In this implementation In example, the execution sequence of the step in flow chart shown in Fig. 4 can change according to different requirements, and certain steps can save Slightly.
Step S401 establishes contextual data resources bank.In the present embodiment, the scenario resources library includes that default hypertext passes Defeated agreement (Hyper Text Transport Protocol, HTTP) request and the corresponding number of responses of the default HTTP request According to.The server 1 establishes contextual data resources bank in the following manner:When the server 1 records web page normal operation The HTTP request of initiation and http response (HTTP response) corresponding to the HTTP request, and the HTTP is asked It asks as default HTTP request and is associated with the HTTP response, and it is described to build to be stored in memory in pairs Contextual data resources bank.Usually, the mapping table of default HTTP request and the HTTP response can be established.
In the present embodiment, when establishing contextual data resources bank, HTTP request and the default HTTP request are preset There are a variety of situations in the source of corresponding response data, are the collections of historical data described above first, normal by monitoring Web page HTTP request in the process of running and corresponding response data, automatically record the base as scenario resources library Plinth data, i.e., default HTTP request and the corresponding response data of the default HTTP request.Secondly, be by artificial input, In a large amount of exploitation practical experiences of developer, accumulates or record when the web page under many different scenes is run The response data of HTTP request and corresponding response can also build above-mentioned contextual data resources bank.
Step S402 monitors the request that the web page is initiated.Further, port number is monitored in the setting of the server 1 Mesh, and monitored according to the request that the monitoring number of active lanes initiates the web page.
The server 1 initiates request to web page and realizes monitoring, and needing could be real using pre-set monitoring channel It is existing, it monitors channel for usually one and a kind of monitoring of request may be implemented, the monitoring of multiple requests may be implemented in plurality of passages.Therefore In the present embodiment, the monitoring carried out to the request that web page is initiated can monitor a request with a moment, it is of course possible to As needed, the same moment multiple requests can also be monitored.Specific choice, can be true according to the actual needs of tester It is fixed.
Step S403 judges to whether there is and the default HTTP request in the request that the web page monitored is initiated Identical request.When there is request identical with the default HTTP request in the request that the web page of monitoring is initiated, Step S404 is executed, conversely, terminating flow.
Specifically, the server 1 by call HTTP request and the HTTP response mapping table, i.e., It can determine whether in the request that the web page monitored is initiated with the presence or absence of request identical with the default HTTP request.
It is corresponding to import the default HTTP request identical with the request from the contextual data resources bank by step S404 The response data.The mapping table that the server 1 passes through calling HTTP request and the HTTP response It is quickly obtained the corresponding response data of the default HTTP request.
Step S405 is completed according to the corresponding response data of the default HTTP request identical with the request Web page is tested.Further, the server 1 is corresponding according to the default HTTP request identical with the request After the response data completes web page test, the HTTP request after record test and corresponding response response datas. That is, by after test HTTP request and the storage of corresponding response response datas to HTTP request and the HTTP In the mapping table of response.In this way, by HTTP request after test and the progress of corresponding response response datas Record, can provide a good test reference for tester, provide guide for subsequent test, and then improve test Whole efficiency.
The method of S401-405 through the above steps, quick test web page proposed by the invention establish field first Scape data repository, the scenario resources library include default HTTP request and the corresponding response data of the default HTTP request; Secondly, the request that the web page is initiated is monitored;Then, judge to whether there is in the request that the web page monitored is initiated Request identical with the default HTTP request;Then, if monitor the web page initiate request in exist with it is described pre- If when the identical request of HTTP request, being imported from the contextual data resources bank and asking the identical default HTTP to ask with described Seek the corresponding response data;Finally, according to the corresponding response of the default HTTP request identical with the request Data complete web page test.This way it is possible to avoid the test stand-by period of web page is long in the prior art, inefficiency The drawbacks of, it can be after not needing web tests system and going the service logic for understanding each affiliated party, then go to create scene number According to, it also withouts waiting for each affiliated party and completes the contextual data that joint debugging generates, but directly from the acquisition of contextual data resources bank Required contextual data, and then conveniently and efficiently realize the test of web page, promote the efficiency entirely tested.
Based on the method first embodiment of quickly test web page of the invention, quickly test web page of the invention is proposed The second embodiment of method.
As shown in fig.5, being the flow chart of the method second embodiment of quickly test web page of the invention.In this implementation In example, the execution sequence of the step in flow chart shown in fig. 5 can change according to different requirements, and certain steps can save Slightly.
Step S501 establishes contextual data resources bank.In the present embodiment, the scenario resources library includes that default hypertext passes Defeated agreement (Hyper Text Transport Protocol, HTTP) request and the corresponding number of responses of the default HTTP request According to.The server 1 establishes contextual data resources bank in the following manner:When the server 1 records web page normal operation The HTTP request of initiation and http response (HTTP response) corresponding to the HTTP request, and the HTTP is asked It asks as default HTTP request and is associated with the HTTP response, and it is described to build to be stored in memory in pairs Contextual data resources bank.Usually, the mapping table of default HTTP request and the HTTP response can be established.
In the present embodiment, when establishing contextual data resources bank, HTTP request and the default HTTP request are preset There are a variety of situations in the source of corresponding response data, are the collections of historical data described above first, normal by monitoring Web page HTTP request in the process of running and corresponding response data, automatically record the base as scenario resources library Plinth data, i.e., default HTTP request and the corresponding response data of the default HTTP request.Secondly, be by artificial input, In a large amount of exploitation practical experiences of developer, accumulates or record when the web page under many different scenes is run The response data of HTTP request and corresponding response can also build above-mentioned contextual data resources bank.
Step S502 monitors the request that the web page is initiated.Further, port number is monitored in the setting of the server 1 Mesh, and monitored according to the request that the monitoring number of active lanes initiates the web page.
The server 1 initiates request to web page and realizes monitoring, and needing could be real using pre-set monitoring channel It is existing, it monitors channel for usually one and a kind of monitoring of request may be implemented, the monitoring of multiple requests may be implemented in plurality of passages.Therefore In the present embodiment, the monitoring carried out to the request that web page is initiated can monitor a request with a moment, it is of course possible to As needed, the same moment multiple requests can also be monitored.Specific choice, can be true according to the actual needs of tester It is fixed.
Step S503 judges to whether there is and the default HTTP request in the request that the web page monitored is initiated Identical request.When there is request identical with the default HTTP request in the request that the web page of monitoring is initiated, Step S504 is executed, conversely, terminating flow.
Specifically, the server 1 by call HTTP request and the HTTP response mapping table, i.e., It can determine whether in the request that the web page monitored is initiated with the presence or absence of request identical with the default HTTP request.
It is corresponding to import the default HTTP request identical with the request from the contextual data resources bank by step S504 The response data.The mapping table that the server 1 passes through calling HTTP request and the HTTP response It is quickly obtained the corresponding response data of the default HTTP request.
Step S505 is completed according to the corresponding response data of the default HTTP request identical with the request Web page is tested.
Step S506, scene set data repository update cycle.Specifically, the update cycle by developer according to It needs to be configured, for example, update in 24 hours is primary or update in 72 hours is primary.
Step S507, when time contextual data resources bank update cycle then, then carry out default HTTP request and institute State the update of the corresponding response data of default HTTP request.That is, default HTTP request and the default HTTP request is corresponding Response data is updated in HTTP request and the mapping table of the HTTP response.In the present embodiment, contextual data money Source library is not unalterable, can be when suitable by default certain update cycle, the scene number that will newly obtain According to that is, HTTP request and response response datas are updated to contextual data resources bank, and then abundant contextual data resources bank, make Obtain the test more complete and accurate of web page.
S501-507 through the above steps, the method for quick test web page proposed by the invention, by default certain Update cycle, can be when suitable, the contextual data that will newly obtain, i.e. HTTP request and response response datas are more Newly to contextual data resources bank, and then abundant contextual data resources bank so that the test of web page more complete and accurate.
Further, to achieve the above object, the present invention also provides a kind of computer readable storage medium, the computers Readable storage medium storing program for executing is stored with the program of quickly test web page, and the program of the quick test web page can be at least one Processor executes, so that the step of at least one processor executes the method such as above-mentioned quick test web page.
The embodiments of the present invention are for illustration only, can not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical scheme of the present invention substantially in other words does the prior art Going out the part of contribution can be expressed in the form of software products, which is stored in a storage medium In (such as ROM/RAM, magnetic disc, CD), including some instructions are used so that a station terminal equipment (can be mobile phone, computer, clothes Be engaged in device, air conditioner or the network equipment etc.) execute method described in each embodiment of the present invention.
It these are only the preferred embodiment of the present invention, be not intended to limit the scope of the invention, it is every to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of method of quick test web page is applied to server, which is characterized in that the method includes the steps:
Contextual data resources bank is established, the scenario resources library includes that default HTTP request and the default HTTP request are corresponding Response data;
Monitor the request that the web page is initiated;
Judge in the request that the web page monitored is initiated with the presence or absence of request identical with the default HTTP request;
If there is request identical with the default HTTP request in the request that the web page monitored is initiated, from described Contextual data resources bank is imported asks the corresponding response data of the identical default HTTP request with described;And
Web page test is completed according to the corresponding response data of the default HTTP request identical with the request.
2. the method for quickly test web page as described in claim 1, which is characterized in that described to establish contextual data resource The step of library, including:
Record the HTTP request initiated when the web page normal operation and the HTTP corresponding to the HTTP request response;And
Be associated using the HTTP request as default HTTP request and with the HTTP response, and store in pairs with Build the contextual data resources bank.
3. the method for quickly test web page as described in claim 1, which is characterized in that the method further includes step:
The scene set data repository update cycle;And
When time contextual data resources bank update cycle then, then carry out default HTTP request and the default HTTP request The update of corresponding response data.
4. the method for quickly test web page as described in claim 1, which is characterized in that described to monitor the web page hair The step of request risen, including:
Number of active lanes is monitored in setting;And
The request initiated the web page according to the monitoring number of active lanes is monitored.
5. the method for quickly test web page as described in claim 1, which is characterized in that in the basis and the request After the step of corresponding response data of the identical default HTTP request completes web page test, the method is also Including step:
HTTP request after record test and corresponding response response datas.
6. a kind of server, which is characterized in that the server includes memory, processor, and being stored on the memory can The program of the quick test web page run on the processor, the program of the quick test web page is by the processing Device realizes following steps when executing:
Contextual data resources bank is established, the scenario resources library includes that default HTTP request and the default HTTP request are corresponding Response data;
Monitor the request that the web page is initiated;
Judge in the request that the web page monitored is initiated with the presence or absence of request identical with the default HTTP request;
If there is request identical with the default HTTP request in the request that the web page monitored is initiated, from described Contextual data resources bank is imported asks the corresponding response data of the identical default HTTP request with described;And
Web page test is completed according to the corresponding response data of the default HTTP request identical with the request.
7. server as claimed in claim 6, which is characterized in that described the step of establishing contextual data resources bank, including:
Record the HTTP request initiated when the web page normal operation and the HTTP corresponding to the HTTP request response;And
It is associated using the HTTP request as default HTTP request and with the HTTP response, and is stored in pairs The memory is to build the contextual data resources bank.
8. server as claimed in claim 6, which is characterized in that it is described to monitor the step of request that the web page is initiated, Including:
Number of active lanes is monitored in setting;And
The request initiated the web page according to the monitoring number of active lanes is monitored.
9. server as claimed in claim 6, which is characterized in that the program of the quick test web page is by the processing When device executes, following steps are also realized:
The scene set data repository update cycle;And
When time contextual data resources bank update cycle then, then carry out default HTTP request and the default HTTP request The update of corresponding response data.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has the journey of quickly test web page The program of sequence, the quick test web page can be executed by least one processor, so that at least one processor executes The step of method of quick test web page as described in any one of claim 1-5.
CN201810003926.4A 2018-01-03 2018-01-03 Quickly method, server and the computer readable storage medium of test web page Pending CN108427635A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810003926.4A CN108427635A (en) 2018-01-03 2018-01-03 Quickly method, server and the computer readable storage medium of test web page

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810003926.4A CN108427635A (en) 2018-01-03 2018-01-03 Quickly method, server and the computer readable storage medium of test web page

Publications (1)

Publication Number Publication Date
CN108427635A true CN108427635A (en) 2018-08-21

Family

ID=63155869

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810003926.4A Pending CN108427635A (en) 2018-01-03 2018-01-03 Quickly method, server and the computer readable storage medium of test web page

Country Status (1)

Country Link
CN (1) CN108427635A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110008117A (en) * 2019-03-12 2019-07-12 深圳壹账通智能科技有限公司 Page test method, device, computer equipment and storage medium
CN110008118A (en) * 2019-03-13 2019-07-12 深圳壹账通智能科技有限公司 Page data test method, device, computer equipment and storage medium
CN112579442A (en) * 2020-12-04 2021-03-30 的卢技术有限公司 AR HUD test method, system, computer device and storage medium
CN112835671A (en) * 2021-02-23 2021-05-25 北京字节跳动网络技术有限公司 Application page scene switching method, device and equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101903880A (en) * 2007-12-20 2010-12-01 阿尔卡特朗讯 Method and agent for processing messages exchanged between terminals
CN103297475A (en) * 2012-03-01 2013-09-11 阿里巴巴集团控股有限公司 Mock service system and processing method of Mock service
CN106528432A (en) * 2016-12-12 2017-03-22 北京三快在线科技有限公司 Construction method and apparatus for test scene data, and buried point test method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101903880A (en) * 2007-12-20 2010-12-01 阿尔卡特朗讯 Method and agent for processing messages exchanged between terminals
CN103297475A (en) * 2012-03-01 2013-09-11 阿里巴巴集团控股有限公司 Mock service system and processing method of Mock service
CN106528432A (en) * 2016-12-12 2017-03-22 北京三快在线科技有限公司 Construction method and apparatus for test scene data, and buried point test method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
夏秦、王志文、陈妍编著: "《计算机网络技术经典案例集》", 30 November 2012 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110008117A (en) * 2019-03-12 2019-07-12 深圳壹账通智能科技有限公司 Page test method, device, computer equipment and storage medium
CN110008118A (en) * 2019-03-13 2019-07-12 深圳壹账通智能科技有限公司 Page data test method, device, computer equipment and storage medium
CN110008118B (en) * 2019-03-13 2023-03-10 深圳壹账通智能科技有限公司 Page data testing method and device, computer equipment and storage medium
CN112579442A (en) * 2020-12-04 2021-03-30 的卢技术有限公司 AR HUD test method, system, computer device and storage medium
CN112579442B (en) * 2020-12-04 2024-04-09 的卢技术有限公司 AR HUD test method, system, computer device and storage medium
CN112835671A (en) * 2021-02-23 2021-05-25 北京字节跳动网络技术有限公司 Application page scene switching method, device and equipment

Similar Documents

Publication Publication Date Title
CN108427635A (en) Quickly method, server and the computer readable storage medium of test web page
CN109815252A (en) Test data generating method, device, computer equipment and readable storage medium storing program for executing
CN107689982A (en) Multi-data source method of data synchronization, application server and computer-readable recording medium
CN108681504A (en) Automated testing method, test server and computer readable storage medium
CN108845950A (en) Test device, the method for test and storage medium
CN114095567B (en) Data access request processing method and device, computer equipment and medium
CN107070752B (en) Testing method and testing system for long connection capacity
CN108255707A (en) Development roles creation method, device, equipment and the storage medium of test case
CN108667840A (en) Injection loophole detection method and device
WO2019178957A1 (en) Distributed system test method and device, computer device and storage medium
CN107908553A (en) Correlation testing method, application server and computer-readable recording medium
CN108255701A (en) Scrnario testing method and mobile terminal
CN109491889A (en) The method and apparatus of automatic test in NFV
CN112559291A (en) Resource monitoring method and device, electronic equipment and storage medium
CN106547658A (en) A kind of automated testing method and device
CN108733545B (en) Pressure testing method and device
CN108427634A (en) Electronic device, the method for test and computer readable storage medium
CN109542754A (en) The cut-in method of mobile device, the adjustment method of application program, device and system
CN108280024A (en) Traffic distribution strategy test method, device and electronic equipment
US20140215035A1 (en) Distribution of application components among devices
CN108428097A (en) Independently enter department's method, application server and computer readable storage medium
CN112181822A (en) Test method and test method for starting time consumption of application program
CN115002011B (en) Flow bidirectional test method and device, electronic equipment and storage medium
CN115033551A (en) Database migration method and device, electronic equipment and storage medium
CN103605480A (en) Web server and method for Web server disk resource access control

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20180821

RJ01 Rejection of invention patent application after publication