CN104102578B - Test method and system and operation terminal - Google Patents
Test method and system and operation terminal Download PDFInfo
- Publication number
- CN104102578B CN104102578B CN201410301283.3A CN201410301283A CN104102578B CN 104102578 B CN104102578 B CN 104102578B CN 201410301283 A CN201410301283 A CN 201410301283A CN 104102578 B CN104102578 B CN 104102578B
- Authority
- CN
- China
- Prior art keywords
- test
- browser
- instruction
- candidate
- page
- 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
Links
- 238000010998 test method Methods 0.000 title claims abstract description 8
- 238000012360 testing method Methods 0.000 claims abstract description 442
- 238000009826 distribution Methods 0.000 claims description 88
- 230000006399 behavior Effects 0.000 claims description 77
- 230000004044 response Effects 0.000 claims description 48
- 238000000034 method Methods 0.000 claims description 26
- 238000004891 communication Methods 0.000 description 15
- 230000005540 biological transmission Effects 0.000 description 12
- 230000008569 process Effects 0.000 description 10
- 230000003993 interaction Effects 0.000 description 8
- 238000010586 diagram Methods 0.000 description 7
- 238000012544 monitoring process Methods 0.000 description 7
- 238000012545 processing Methods 0.000 description 6
- 230000006870 function Effects 0.000 description 5
- 238000012546 transfer Methods 0.000 description 5
- 230000001960 triggered effect Effects 0.000 description 5
- 238000007499 fusion processing Methods 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 238000003860 storage Methods 0.000 description 3
- 229910006119 NiIn Inorganic materials 0.000 description 2
- 238000012790 confirmation Methods 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000013522 software testing Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Landscapes
- Debugging And Monitoring (AREA)
Abstract
The invention provides a test method, a test system and an operation terminal. According to the embodiment of the invention, only an operator using the operation terminal needs to execute one test operation manually on a page to be tested, which is displayed by a browser, namely a first browser, the same test operation is driven to be automatically executed on a page to be tested, which is displayed by other browser, namely a second browser by a test end in real time, and the operator does not need manually to execute the same test operation for many times on pages to be tested, which are displayed by different browsers. The operation is simple, the accuracy is high, and the efficiency and the reliability of test operation are thus improved.
Description
[ technical field ] A method for producing a semiconductor device
The present invention relates to testing technologies, and in particular, to a testing method and system, and an operating terminal.
[ background of the invention ]
In a software testing process, for example, in a User Interface (UI) test, to avoid the risk of a program, a designed test case needs to be used to automatically run a testing operation. At present, some test operations of page display and page interaction cannot automatically run by using test cases. Instead, the operator is required to manually execute the same test operation for a plurality of times on the pages to be tested displayed by different browsers.
However, the operation of the existing test operation is complicated and error-prone, resulting in a reduction in the efficiency and reliability of the test operation.
[ summary of the invention ]
Aspects of the present invention provide a testing method, a testing system, and an operating terminal, so as to improve efficiency and reliability of testing operations.
In one aspect of the present invention, a testing method is provided, including:
the method comprises the steps that an operation end collects operation behaviors of an input device on a page to be tested, wherein the operation behaviors are displayed by a first browser and comprise operation page element information and operation behavior information;
the operation end generates an operation instruction according to the operation behavior;
the operation end sends a test instruction and the operation instruction to each test end in at least one test end, so that each test end executes the operation instruction on the page to be tested displayed by the second browser according to the test instruction.
The foregoing aspect and any possible implementation manner further provide an implementation manner, where the sending, by the operation end, a test instruction and the operation instruction to each test end in at least one test end includes:
and the operation end sends a test instruction and the operation instruction to each test end in at least one test end through the distribution server.
As to the above-mentioned aspect and any possible implementation manner, there is further provided an implementation manner, before the sending, by the operation terminal, the test instruction and the operation instruction to each test terminal in the at least one test terminal through the distribution server, the method further includes:
the operation end sends triggering information to the distribution server;
the operation end receives the test instruction sent by the distribution server so that the user can determine each test end, and the test instruction is generated by the distribution server starting a service instance for the test according to the trigger information;
the operation end sends the test instruction, the identification information of the page to be tested and the identification information of each test end to the distribution server, so that the distribution server sends the test instruction and the identification information of the page to be tested to each test end according to the identification information of each test end, and each test end drives the second browser to display the page to be tested.
The above-described aspects and any possible implementations further provide an implementation, and the method further includes:
the proxy server receives a first candidate HTTP request, wherein the first candidate HTTP request is generated by the first browser according to the operation result of the operation behavior;
the proxy server receives a second candidate HTTP request, wherein the second candidate HTTP request is generated by the second browser according to an operation result of the operation instruction executed by the test end;
the proxy server sends the first candidate HTTP request to a Web server and receives a first candidate HTTP response sent by the Web server according to the first candidate HTTP request; the proxy server sends the second candidate HTTP request to a Web server and receives a second candidate HTTP response sent by the Web server according to the second candidate HTTP request; the proxy server sending the first candidate HTTP response to the first browser and sending the second candidate HTTP response to the second browser; or
The proxy server generates a target HTTP request according to the first candidate HTTP request and the second candidate HTTP request, sends the target HTTP request to a Web server, and receives a target HTTP response sent by the Web server according to the target HTTP request; and the proxy server sends the target HTTP response to the first browser and the second browser.
The above aspect and any possible implementation manner further provide an implementation manner, where the operation terminal and the first browser run on a first terminal independently; the operation end is arranged in the first browser in an SDK form or a plug-in form.
The above aspect and any possible implementation manner further provide an implementation manner, where each test end and the corresponding second browser independently run on a second terminal; the test end is arranged in the second browser in an SDK form or a plug-in form.
In another aspect of the present invention, a test system is provided, which includes an operation terminal and at least one test terminal; wherein,
the operation terminal is used for acquiring operation behaviors of the input equipment on a page to be tested displayed by the first browser, wherein the operation behaviors comprise operation page element information and operation behavior information; generating an operation instruction according to the operation behavior; sending a test instruction and the operation instruction to each test end in the at least one test end;
and each testing end is used for executing the operation instruction on the page to be tested displayed by the second browser according to the testing instruction.
The above-described aspects and any possible implementations further provide an implementation in which the system further includes a distribution server; the operating end is particularly used for
And sending a test instruction and the operation instruction to each test terminal through the distribution server.
The above aspects, and any possible implementations, further provide an implementation,
the operation terminal is further used for sending triggering information to the distribution server;
the distribution server is further configured to start a service instance for the current test according to the trigger information to generate the test instruction of the current test; sending the test instruction to the operation end so that the user determines each test end;
the operation terminal is further configured to send the test instruction, the identification information of the page to be tested, and the identification information of each test terminal to the distribution server;
the distribution server is further configured to send the test instruction and the identification information of the page to be tested to each testing end according to the identification information of each testing end;
and each testing end is also used for driving the second browser to display the page to be tested.
There is further provided in accordance with the above-described aspect and any possible implementation, an implementation, and the system further includes a proxy server for
Receiving a first candidate HTTP request, wherein the first candidate HTTP request is generated according to an operation result of the operation behavior by the first browser; receiving a second candidate HTTP request, wherein the second candidate HTTP request is generated according to an operation result of the second browser executing the operation instruction by the test terminal;
sending the first candidate HTTP request to a Web server, and receiving a first candidate HTTP response sent by the Web server according to the first candidate HTTP request; sending the second candidate HTTP request to a Web server, and receiving a second candidate HTTP response sent by the Web server according to the second candidate HTTP request; sending the first candidate HTTP response to the first browser and sending the second candidate HTTP response to the second browser; or
Generating a target HTTP request according to the first candidate HTTP request and the second candidate HTTP request; sending the target HTTP request to a Web server; receiving a target HTTP response sent by the Web server according to the target HTTP request; and sending the target HTTP response to the first browser and the second browser.
The above aspect and any possible implementation manner further provide an implementation manner, where the operation terminal and the first browser run on a first terminal independently; the operation end is arranged in the first browser in an SDK form or a plug-in form.
The above aspect and any possible implementation manner further provide an implementation manner, where each test end and the corresponding second browser independently run on a second terminal; the test end is arranged in the second browser in an SDK form or a plug-in form.
In another aspect of the present invention, there is provided an operation terminal, comprising
The system comprises an acquisition unit, a display unit and a display unit, wherein the acquisition unit is used for acquiring operation behaviors of an input device on a page to be tested displayed by a first browser, and the operation behaviors comprise operation page element information and operation behavior information;
the generating unit is used for generating an operation instruction according to the operation behavior;
and the sending unit is used for sending a test instruction and the operation instruction to each test end in at least one test end, so that each test end executes the operation instruction on the page to be tested displayed by the second browser according to the test instruction.
The above-mentioned aspects and any possible implementation further provide an implementation that the sending unit is specifically configured to
And sending a test instruction and the operation instruction to each test end in at least one test end through a distribution server.
The above-described aspect and any possible implementation manner further provide an implementation manner, where the operation end further includes a receiving unit; wherein,
the sending unit is further configured to send trigger information to the distribution server;
the receiving unit is configured to receive the test instruction sent by the distribution server, so that the user determines each test end, where the test instruction is generated by the distribution server starting a service instance for the current test according to the trigger information;
the sending unit is further configured to send the test instruction, the identification information of the page to be tested, and the identification information of each test end to the distribution server, so that the distribution server sends the test instruction and the identification information of the page to be tested to each test end according to the identification information of each test end, so that each test end drives the second browser to display the page to be tested.
The above aspect and any possible implementation manner further provide an implementation manner, where the operation terminal and the first browser run on a first terminal independently; the operation end is arranged in the first browser in an SDK form or a plug-in form.
The above aspect and any possible implementation manner further provide an implementation manner, where each test end and the corresponding second browser independently run on a second terminal; the test end is arranged in the second browser in an SDK form or a plug-in form.
As can be seen from the foregoing technical solutions, in the embodiments of the present invention, an operation behavior of an input device on a to-be-tested page displayed by a first browser is acquired by an operation end, where the operation behavior includes operation page element information and operation behavior information, and an operation instruction is generated according to the operation behavior, so that the operation end can send a test instruction and the operation instruction to each test end in at least one test end, so that each test end can execute the operation instruction on the to-be-tested page displayed by a second browser according to the test instruction, and only one operator at the operation end needs to manually execute a test operation on the to-be-tested page displayed by one browser, i.e., the first browser, and can automatically execute the same test operation on the to-be-tested page displayed by the other browser, i.e., the second browser, driven by the test end in real time, the same test operation is performed for multiple times manually without needing an operator to display the pages to be tested on different browsers, the operation is simple, the accuracy is high, and therefore the efficiency and the reliability of the test operation are improved.
In addition, by adopting the technical scheme provided by the invention, the same test operation is automatically executed on the page to be tested displayed by other browsers, namely the second browser, driven by the test terminal in real time, and the types of the second browser are not limited in quantity, so that the coverage rate of the browsers in the test process can be effectively improved.
In addition, by adopting the technical scheme provided by the invention, the same test operation is automatically executed on the page to be tested displayed by other browsers, namely the second browser, driven by the test end in real time, so that the operation results of the test operations can be compared in real time, and the purpose of real-time monitoring is realized.
In addition, by adopting the technical scheme provided by the invention, the service instance is started for the test through the distribution server to generate the test instruction of the test, so that each test can correspond to different test instructions, therefore, the distribution server can provide test service for a plurality of operation terminals at the same time, and the efficiency of test operation can be effectively improved.
[ description of the drawings ]
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed in the embodiments or the prior art descriptions will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without inventive labor.
Fig. 1 is a schematic flow chart of a testing method according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of a test system according to another embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a test system according to another embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a test system according to another embodiment of the present invention;
fig. 5 is a schematic structural diagram of an operation end according to another embodiment of the present invention;
fig. 6 is a schematic structural diagram of an operation end according to another embodiment of the present invention.
[ detailed description ] embodiments
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
It should be noted that, in the embodiment of the present invention, the operation instruction may include, but is not limited to, a program compiled from C language codes, a program compiled from C + + language codes, or a program compiled from java language codes, and any other program language capable of implementing compilation is within the scope of the present invention, which is not limited in this respect.
In addition, the term "and/or" herein is only one kind of association relationship describing an associated object, and means that there may be three kinds of relationships, for example, a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
A World Wide Web (Web) page may include a display tile, referred to as a page element, consisting of one or more page tags, HyperText Markup Language (HTML) tags, such as text, tags, hyperlinks, buttons, input boxes, drop-down boxes, and the like. In a User Interface (UI) test, a specified page element needs to be operated to perform a test operation, and the like.
Fig. 1 is a schematic flowchart of a testing method according to an embodiment of the present invention, and is applied to a testing system, where the testing system may include an operation end and at least one testing end. As shown in fig. 1.
101. The operation terminal collects operation behaviors of the input equipment on a page to be tested displayed by the first browser, wherein the operation behaviors comprise operation page element information and operation behavior information.
102. And the operation end generates an operation instruction according to the operation behavior.
103. The operation end sends a test instruction and the operation instruction to each test end in at least one test end, so that each test end executes the operation instruction on the page to be tested displayed by the second browser according to the test instruction.
Optionally, in a possible implementation manner of this embodiment, the interaction between the operation end and each test end may adopt a manner based on multiple Socket (Socket) protocols. For example, a standard Socket Protocol based on Transmission Control Protocol (TCP). Alternatively, for example, a Web Socket Protocol based on HyperText Transfer Protocol (HTTP) is used to simulate a TCP-based communication scheme under HTTP. Therefore, uninterrupted stateful communication connection between the operation end and each test end can be realized, and the reliability of sequential transmission of messages is ensured.
The second browser and the first browser are different browsers; the number of the second browsers is the same as that of the test ends, the second browsers correspond to the test ends one by one, and the second browser corresponding to each test end is different.
It is to be understood that the different browsers may be different browsers running in the same operating system, or may also be the same browser running in different operating systems, or may also be different browsers running in different operating systems, which is not particularly limited in this embodiment.
For example, the second browser is a Firefox browser running in the Windows7 operating system, the first browser is a Firefox browser running in the Windows8 operating system, and the two are different browsers.
Or, for another example, the second browser is an IE browser running in the Windows7 operating system, the first browser is a Firefox browser running in the Windows7 operating system, and the two are different browsers.
Or, for another example, the second browser corresponding to one testing end is an IE browser running in the Windows7 operating system, the second browser corresponding to the other testing end is an IE browser running in the Windows8 operating system, and the two browsers are different browsers.
It should be noted that the operation terminal and the first browser may independently run on the first terminal; or, the operation end may also be arranged inside the first browser in a Software Development Kit (SDK) form or a plug-in form; this embodiment is not particularly limited.
It should be noted that each test end and the corresponding second browser may independently operate on the second terminal; or, the test end may also be arranged inside the second browser in an SDK form or a plug-in form; this embodiment is not particularly limited.
It is understood that the Page according to the present invention may be a Web Page (Web Page) written based on HTML, and may also be referred to as a Web Page.
In this way, the operation behavior of the input device on the page to be tested, which is shown in the first browser, is collected through the operation terminal, the operation behavior includes operation page element information and operation behavior information, and then, according to the operation behavior, an operation instruction is generated, so that the operation terminal can send a test instruction and the operation instruction to each test terminal in at least one test terminal, and thus, each test terminal can execute the operation instruction on the page to be tested, which is shown in the second browser, according to the test instruction, and only one operator of the operation terminal needs to manually execute one test operation on the page to be tested, which is shown in one browser, namely the first browser, and can automatically execute the same test operation on the page to be tested, which is shown in the second browser, through the test terminal in real time, the same test operation is performed for multiple times manually without needing an operator to display the pages to be tested on different browsers, the operation is simple, the accuracy is high, and therefore the efficiency and the reliability of the test operation are improved.
Optionally, in a possible implementation manner of this embodiment, the interaction between the operation end and each test end may adopt a manner based on multiple Socket (Socket) protocols. For example, a standard Socket Protocol based on Transmission Control Protocol (TCP). Alternatively, for example, a Web Socket Protocol based on HyperText Transfer Protocol (HTTP) is used to simulate a TCP-based communication scheme under HTTP. Therefore, uninterrupted stateful communication connection between the operation end and each test end can be realized, and the reliability of sequential transmission of messages is ensured.
Optionally, in a possible implementation manner of this embodiment, in 101, the operation end may specifically collect, in a monitoring manner, an operation behavior of an input device, such as a keyboard, a mouse, or a touch screen, on a page to be tested that is displayed by the first browser. The operation behavior may include, but is not limited to, page element information of the operation and behavior information of the operation, such as mouse scroll, mouse click, mouse pass, information input, and the like. The keyboard may be a physical keyboard or a virtual keyboard, and this embodiment is not particularly limited thereto.
Specifically, the operation end may specifically monitor a cursor event to obtain an operation behavior on a page to be tested, which is displayed by the first browser.
If the input device is a mouse, the cursor event, which may be referred to as a mouse event, may include a left mouse click event, a right mouse click event, or a mouse scroll event.
If the input device is a keyboard, it may be referred to as a keyboard event, and the cursor event may include an enter confirmation event or a menu pop-up event.
If the input device is a touch screen, it may be referred to as a touch screen event, and the cursor event may include a short-time touch event or a long-time touch event.
For example, a JavaScript code can be injected into the page to be tested to monitor the cursor event.
Or, for another example, when a cross-page operation is performed, that is, a current page displayed by the first browser or the second browser is not an original page to be tested, but is a new page, a JavaScript code may be injected into the new page to monitor a cursor event.
Take a JavaScript mouse event as an example. Generally, a JavaScript mouse event is bound in an operating system, and when a mouse operation behavior occurs on a terminal, the operating system is triggered to generate a corresponding JavaScript mouse event, so that the operating end can monitor the JavaScript mouse event. When it is monitored that the JavaScript mouse event is triggered, the operation end can determine the mouse operation behavior corresponding to the JavaScript mouse event according to the triggered JavaScript mouse event and the corresponding relation between the JavaScript mouse event and the mouse operation behavior. For example, when a mouse is clicked, an onClick event is triggered, and the operation terminal can determine that the mouse is clicked; meanwhile, the MouseDown event is also triggered, and an x value and a y value can be obtained from the parameter type of the MouseDown event, wherein the x value and the y value are the mouse click positions. The operation terminal can obtain the page element corresponding to the mouse click position on the current page according to the mouse click position, and then can determine the page element information of the page element. Thus, the operation terminal obtains the operation behavior of the mouse on the page, namely the page element information of the operation and the behavior information of the operation.
Optionally, in a possible implementation manner of this embodiment, in 102, the operation end may specifically translate the collected operation behavior into a series of machine languages, that is, operation instructions, so as to simulate the operation behavior.
Optionally, in a possible implementation manner of this embodiment, the test system to which the test method provided in this embodiment is applied may further include a distribution server. Specifically, the distribution server may be a server implemented by using a node.js language, a java language, and a C + + language, and communicates with the operation terminal and each test terminal in a port monitoring manner. Specifically, the interaction between the distribution server and the operation end, and the interaction between the distribution server and each test end may adopt a manner based on multiple Socket (Socket) protocols. For example, a standard Socket Protocol based on Transmission Control Protocol (TCP). Alternatively, for example, a Web Socket Protocol based on HyperText Transfer Protocol (HTTP) is used to simulate a TCP-based communication scheme under HTTP. Therefore, uninterrupted stateful communication connection between the distribution server and the operation end and between the distribution server and each test end can be realized, and the reliability of sequential transmission of messages is ensured.
Accordingly, in 103, the operation end may specifically send a test instruction and the operation instruction to each test end in the at least one test end through the distribution server.
Further, before 103, the operation end may trigger the operation end to establish a communication connection with the distribution server, and start to perform a test. For example, a JavaScript code may be injected into the page to be tested to implement the trigger operation. The distribution server receives the trigger information sent by the operation end, and further starts a service instance for the current test according to the trigger information to generate the test instruction of the current test, such as instance id (case id), session id (session id), and the like. Then, the distribution server may send the test instruction to the operation end, so that the user determines each test end. Then, the distribution server receives the test instruction, the identification information of the page to be tested, and the identification information of each test terminal sent by the operation terminal, so that the distribution server can send the test instruction and the identification information of the page to be tested to each test terminal according to the identification information of each test terminal, so that each test terminal drives the second browser to display the page to be tested.
For example, the same operation terminal, regardless of performing intra-page operation or cross-page operation, belongs to the range of the test, so that the distribution server only needs to start one service instance for the same test, does not need to start multiple service instances, and the test instructions in one test are the same.
Therefore, the service instance is started for the test through the distribution server to generate the test instruction of the test, so that each test can correspond to different test instructions, the distribution server can provide test service for a plurality of operation terminals at the same time, and the efficiency of test operation can be effectively improved.
Optionally, in a possible implementation manner of this embodiment, the test system to which the test method provided in this embodiment is applied may further include a proxy server. Specifically, the proxy server may specifically receive a first candidate HTTP request, where the first candidate HTTP request is generated by the first browser according to an operation result of the operation behavior; and receiving a second candidate HTTP request, wherein the second candidate HTTP request is generated according to an operation result of the second browser executing the operation instruction by the test terminal. Then, the proxy server may generate a target HTTP request according to the first candidate HTTP request and the second candidate HTTP request, and further send the target HTTP request to the Web server. Then, the proxy server receives a target HTTP response sent by the Web server according to the target HTTP request, and the proxy server may send the target HTTP response to the first browser and the second browser.
The first browser generates and sends a first candidate HTTP request according to an operation result of an operation instruction executed by an operation end corresponding to the first browser, and the plurality of second browsers generate and send a second candidate HTTP request according to an operation result of the same operation instruction executed by a test end corresponding to the first browser in real time. Therefore, the proxy server needs to generate only one target HTTP request according to the first candidate HTTP request and the second candidate HTTP request.
Specifically, the proxy server may specifically perform consistency check on the submitted data by using a preconfigured white list on the first candidate HTTP request and the second candidate HTTP request sent by the second browser corresponding to each test end. For example, the whitelist may include partial fields such as a timestamp, a User Agent (UA) of the browser, and the like. Then, the proxy server performs fusion processing on the HTTP requests passing the consistency check to generate target HTTP requests and sends the target HTTP requests to the Web server, and performs alarm processing on the HTTP requests not passing the consistency check.
And then, after further receiving a target HTTP response returned by the Web server according to the target HTTP request, the proxy server copies the target HTTP response by a plurality of copies and respectively sends the target HTTP response to the operation end and the test end which pass the consistency check.
For some simple HTTP requests, for example, HTTP requests that do not involve data submission, etc., the test system to which the test method provided by this embodiment is applied does not need to include a proxy server, and the operation end and each test end may directly communicate with the Web server, respectively. Namely, the first browser sends a first candidate HTTP request to the Web server and receives a first candidate HTTP response returned by the Web server according to the first candidate HTTP request, and the second browser sends a second candidate HTTP request to the Web server and receives a second candidate HTTP response returned by the Web server according to the second candidate HTTP request.
Therefore, in order to be able to process all HTTP requests, the proxy server may be configured with two modes of operation, one is a pass-through mode and the other is a converged mode.
Defining that for some simple HTTP requests, the proxy server adopts a transparent transmission mode to process. In the request stage, the first candidate HTTP requests and the plurality of second candidate HTTP requests are directly and respectively sent to the Web server without any processing; in the response stage, a first candidate HTTP response returned by the Web server according to the first candidate HTTP request is directly sent to a first browser corresponding to an operation end, and a second candidate HTTP response returned by the Web server according to the second candidate HTTP request is directly sent to a second browser corresponding to each testing end.
The HTTP request proxy server for submitting data is defined to adopt a fusion mode for processing. In the request stage, the first candidate HTTP requests and a plurality of second candidate HTTP requests are subjected to fusion processing to generate target HTTP requests, and the target HTTP requests are sent to the Web server; in the response stage, the Web server copies a plurality of copies of the target HTTP response returned according to the target HTTP request, and respectively sends the copies to a first browser corresponding to the operation end, namely the operation end, and a second browser corresponding to each test end, namely the test end.
It should be noted that, in this embodiment, the operation terminal, the test terminal, the distribution server, and the proxy server included in the test system may be deployed on the same terminal, or may also be deployed on different terminals, or a part of the test system may be deployed on one terminal, another part of the test system may be deployed on another terminal, and another part of the test system may be deployed on another terminal, which is not particularly limited in this embodiment. Further, if the test terminals are all deployed on the same terminal, the test terminals may be implemented by using a virtual machine technology, and each test terminal may be an instance of a virtual machine.
A preferred deployment method is that the operation end is deployed on the terminal a, the distribution server and the proxy server are deployed on the terminal B, and each test end is deployed on a different terminal, namely the terminal NiIn the above, i is an integer greater than or equal to 1 and less than or equal to n, and n is the number of test terminals.
In the embodiment, the operation behavior of the input device on the page to be tested, which is shown in the first browser, is collected through the operation end, where the operation behavior includes operation page element information and operation behavior information, and then, according to the operation behavior, an operation instruction is generated, so that the operation end can send a test instruction and the operation instruction to each test end in at least one test end, so that each test end can execute the operation instruction on the page to be tested, which is shown in the second browser, according to the test instruction, and only one operator of the operation end needs to manually execute one test operation on the page to be tested, which is shown in one browser, i.e., the first browser, and can automatically execute the same test operation on the page to be tested, which is shown in the second browser, by driving other browsers through the test ends in real time, the same test operation is performed for multiple times manually without needing an operator to display the pages to be tested on different browsers, the operation is simple, the accuracy is high, and therefore the efficiency and the reliability of the test operation are improved.
In addition, by adopting the technical scheme provided by the invention, the same test operation is automatically executed on the page to be tested displayed by other browsers, namely the second browser, driven by the test terminal in real time, and the types of the second browser are not limited in quantity, so that the coverage rate of the browsers in the test process can be effectively improved.
In addition, by adopting the technical scheme provided by the invention, the same test operation is automatically executed on the page to be tested displayed by other browsers, namely the second browser, driven by the test end in real time, so that the operation results of the test operations can be compared in real time, and the purpose of real-time monitoring is realized.
In addition, by adopting the technical scheme provided by the invention, the service instance is started for the test through the distribution server to generate the test instruction of the test, so that each test can correspond to different test instructions, therefore, the distribution server can provide test service for a plurality of operation terminals at the same time, and the efficiency of test operation can be effectively improved.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
Fig. 2 is a schematic structural diagram of a test system according to another embodiment of the present invention, as shown in fig. 2. The test system of the present embodiment may include an operation terminal 21 and at least one test terminal 221、222……22n. Wherein n is an integer greater than or equal to 1. The operation terminal 21 is configured to acquire an operation behavior of an input device on a page to be tested, where the operation behavior includes page element information of an operation and behavior information of the operation; generating an operation instruction according to the operation behavior; and to the at least one test terminal 221、222……22nEach of the test terminals 22iSending a test instruction and the operation instruction, wherein i is an integer which is greater than or equal to 1 and less than or equal to n; each of the test terminals 22iAnd the operation instruction is executed on the page to be tested displayed by the second browser according to the test instruction.
The second browser and the first browser are different browsers; the number of the second browsers is the same as that of the test terminals, and the second browsers correspond to the test terminals one to one, and each test terminal 22iThe corresponding second browser is a different browser.
It is to be understood that the different browsers may be different browsers running in the same operating system, or may also be the same browser running in different operating systems, or may also be different browsers running in different operating systems, which is not particularly limited in this embodiment.
For example, the second browser is a Firefox browser running in the Windows7 operating system, the first browser is a Firefox browser running in the Windows8 operating system, and the two are different browsers.
Or, for another example, the second browser is an IE browser running in the Windows7 operating system, the first browser is a Firefox browser running in the Windows7 operating system, and the two are different browsers.
Or, for another example, the second browser corresponding to one testing end is an IE browser running in the Windows7 operating system, the second browser corresponding to the other testing end is an IE browser running in the Windows8 operating system, and the two browsers are different browsers.
It should be noted that the operation terminal 21 and the first browser may run on the first terminal independently; alternatively, the operation end 21 may also be disposed inside the first browser in a Software Development Kit (SDK) form or a plug-in form; this embodiment is not particularly limited.
It should be noted that each of the test terminals 22 is describediThe corresponding second browser can independently run on a second terminal; or, the test end may also be arranged inside the second browser in an SDK form or a plug-in form; this embodiment is not particularly limited.
It is understood that the Page according to the present invention may be a Web Page (Web Page) written based on HTML, and may also be referred to as a Web Page.
In this way, the operation behavior of the input device on the page to be tested, which is shown in the first browser, is collected through the operation terminal, the operation behavior includes operation page element information and operation behavior information, and then, according to the operation behavior, an operation instruction is generated, so that the operation terminal can send a test instruction and the operation instruction to each test terminal in at least one test terminal, and thus, each test terminal can execute the operation instruction on the page to be tested, which is shown in the second browser, according to the test instruction, and only one operator of the operation terminal needs to manually execute one test operation on the page to be tested, which is shown in one browser, namely the first browser, and can automatically execute the same test operation on the page to be tested, which is shown in the second browser, through the test terminal in real time, the same test operation is performed for multiple times manually without needing an operator to display the pages to be tested on different browsers, the operation is simple, the accuracy is high, and therefore the efficiency and the reliability of the test operation are improved.
Optionally, in a possible implementation manner of this embodiment, the operation end 21 and each test end 22iThe interaction between them can be in a way based on various Socket protocols. For example, a standard Socket Protocol based on Transmission Control Protocol (TCP). Alternatively, for example, a Web Socket Protocol based on HyperText Transfer Protocol (HTTP) is used to simulate a TCP-based communication scheme under HTTP. Thus, canThe uninterrupted stateful communication connection between the operation end and each test end is realized, so that the reliability of the sequential transmission of the messages is ensured.
Optionally, in a possible implementation manner of this embodiment, as shown in fig. 3, the test system provided in this embodiment may further include a distribution server 31. Specifically, the distribution server 31 may be a server implemented by using node. js language, java language, and C + + language, and is connected to the operation end 21 and each test end 22 in a port monitoring manneriAnd communication is performed. Specifically, the interaction between the distribution server and the operation end 21, and the interaction between the distribution server and each test end may adopt a manner based on a plurality of Socket (Socket) protocols. For example, a standard Socket Protocol based on Transmission Control Protocol (TCP). Alternatively, for example, a Web Socket Protocol based on HyperText Transfer Protocol (HTTP) is used to simulate a TCP-based communication scheme under HTTP. Therefore, uninterrupted stateful communication connection between the distribution server and the operation end and between the distribution server and each test end can be realized, and the reliability of sequential transmission of messages is ensured.
Accordingly, the operation end 21 may be specifically configured to transmit the data to each of the testing ends 22 through the distribution serveriAnd sending a test instruction and the operation instruction.
Further, the operation end 21 may be further configured to send trigger information to the distribution server 31. The distribution server 31 may further be configured to start a service instance for the current test according to the trigger information, so as to generate the test instruction of the current test; sending the test instruction to the operation terminal 21 so that the user determines each test terminal 22i. The operation end 21 may be further configured to send the test instruction, the identification information of the page to be tested, and the each test end 22 to the distribution server 31iThe identification information of (1). The distribution server 31 may be further configured toAccording to each of the test terminals 22iTo said each testing terminal 22iAnd sending the test instruction and the identification information of the page to be tested. Each of the test terminals 22iAnd the second browser can be further used for driving the second browser to display the page to be tested.
For example, the same operation end 21, regardless of performing intra-page operation or cross-page operation, belongs to the range of this test, so the distribution server 31 only needs to start one service instance for the same test, and does not need to start multiple service instances, and the test instructions in one test are the same.
Therefore, the service instance is started for the test through the distribution server to generate the test instruction of the test, so that each test can correspond to different test instructions, the distribution server can provide test service for a plurality of operation terminals at the same time, and the efficiency of test operation can be effectively improved.
Optionally, in a possible implementation manner of this embodiment, as shown in fig. 4, the test system provided in this embodiment may further include a proxy server 41.
Specifically, the method may be specifically configured to receive a first candidate HTTP request, where the first candidate HTTP request is generated by the first browser according to an operation result of the operation behavior; receiving a second candidate HTTP request, wherein the second candidate HTTP request is generated according to an operation result of the second browser executing the operation instruction by the test terminal; and generating a target HTTP request according to the first candidate HTTP request and the second candidate HTTP request; sending the target HTTP request to a Web server; receiving a target HTTP response sent by the Web server according to the target HTTP request; sending the target HTTP response to the first browser and the second browser
Because the first browser generates and sends the first candidate HTTP request according to the operation result of the operation instruction executed by the corresponding operation terminal 21, and the plurality of second browsers generate and send the same second candidate HTTP request according to the operation result of the same operation instruction executed by the corresponding test terminals in real time, for HTTP requests for submitting data, for example, submitting after creating a new form, it is imperative that only one HTTP request is successfully submitted, for example, the first candidate HTTP request or any one of the second candidate HTTP requests, and other HTTP requests are unsuccessfully submitted. Therefore, the proxy server 41 needs to generate only one target HTTP request according to the first candidate HTTP request and the second candidate HTTP request.
In particular, the proxy server 41 may specifically request the first candidate HTTP, and each test peer 22iAnd the second candidate HTTP request sent by the corresponding second browser carries out consistency check on the submitted data by utilizing a pre-configured white list. For example, the whitelist may include partial fields such as a timestamp, a User Agent (UA) of the browser, and the like. Then, the proxy server 41 performs fusion processing on the HTTP requests that pass the consistency check to generate target HTTP requests and send the target HTTP requests to the Web server, and performs alarm processing on the HTTP requests that do not pass the consistency check.
Next, after further receiving the target HTTP response returned by the Web server according to the target HTTP request, the proxy server 41 copies the target HTTP response by several copies, and sends the target HTTP response to the operation terminal 21 and the test terminal that pass the consistency check, respectively.
For some simple HTTP requests, for example, HTTP requests that do not involve data submission, etc., the test method provided by this embodiment is applicable to a test system, and does not need to include the proxy server 41, the operation end 21, and each test end 22iThe communication can be made directly with the Web server, respectively. Namely, the first browser sends a first candidate HTTP request to the Web server and receives a first candidate HTTP response returned by the Web server according to the first candidate HTTP request, and the second browser sends a second candidate HTTP request to the Web server and receives a second candidate HTTP request returned by the Web server according to the second candidate HTTP requestThe second candidate HTTP response returned.
Therefore, in order to be able to process all HTTP requests, the proxy server 41 may be configured with two modes of operation, one mode being transparent mode and the other mode being converged mode.
Definitions for some simple HTTP requests, the proxy server 41 handles in transparent mode. In the request stage, the first candidate HTTP requests and the plurality of second candidate HTTP requests are directly and respectively sent to the Web server without any processing; in the response phase, the first candidate HTTP response returned by the Web server according to the first candidate HTTP request is directly sent to the first browser corresponding to the operation end, that is, the operation end, and the second candidate HTTP response returned by the Web server according to the second candidate HTTP request is directly sent to each test end 22 in partiNamely the second browser corresponding to the test end.
It is defined that the HTTP request proxy server 41 for submitting data is processed in a converged mode. In the request stage, the first candidate HTTP requests and a plurality of second candidate HTTP requests are subjected to fusion processing to generate target HTTP requests, and the target HTTP requests are sent to the Web server; in the response phase, the Web server copies a plurality of target HTTP responses returned according to the target HTTP request, and sends the copies to the first browser corresponding to the operation end, i.e. the operation end, and each test end 22iNamely the second browser corresponding to the test end.
In this embodiment, the test system includes an operation end 21 and at least one test end 221、222……22nThe distribution server 31 and the proxy server 41 may be disposed on the same terminal, or may be disposed on different terminals, or may also be disposed on one terminal in part, disposed on another terminal in part, and disposed on another terminal in part, which is not particularly limited in this embodiment. Further, if the test terminals are all deployed on the same terminal, the test terminals can be specifically implemented by using a virtual machine technology, and each test terminal can be a single test terminalAn instance of a virtual machine.
A preferred deployment method is that the operation end 21 is deployed on the terminal a, the distribution server 31 and the proxy server 41 are deployed on the terminal B, and each test end 22iAre all respectively deployed on different terminals, namely terminal NiIn the above, i is an integer greater than or equal to 1 and less than or equal to n, and n is the number of test terminals.
It should be noted that, the functions of the operation end in the embodiment corresponding to fig. 1 can be implemented by the operation end 21 in the test system provided in this embodiment; the function of at least one test terminal in the embodiment corresponding to fig. 1 can be implemented by at least one test terminal 22 in the test system provided by this embodiment1、222……22nThe implementation is carried out; the functions of the distribution server in the embodiment corresponding to fig. 1 may be implemented by the distribution server 31 in the test system provided in this embodiment; the functions of the distribution server in the embodiment corresponding to fig. 1 may all be implemented by the proxy server 41 in the test system provided in this embodiment. For a detailed description, reference may be made to relevant contents in the embodiment corresponding to fig. 1, and details are not described here.
In the embodiment, the operation behavior of the input device on the page to be tested, which is shown in the first browser, is collected through the operation end, where the operation behavior includes operation page element information and operation behavior information, and then, according to the operation behavior, an operation instruction is generated, so that the operation end can send a test instruction and the operation instruction to each test end in at least one test end, so that each test end can execute the operation instruction on the page to be tested, which is shown in the second browser, according to the test instruction, and only one operator of the operation end needs to manually execute one test operation on the page to be tested, which is shown in one browser, i.e., the first browser, and can automatically execute the same test operation on the page to be tested, which is shown in the second browser, by driving other browsers through the test ends in real time, the same test operation is performed for multiple times manually without needing an operator to display the pages to be tested on different browsers, the operation is simple, the accuracy is high, and therefore the efficiency and the reliability of the test operation are improved.
In addition, by adopting the technical scheme provided by the invention, the same test operation is automatically executed on the page to be tested displayed by other browsers, namely the second browser, driven by the test terminal in real time, and the types of the second browser are not limited in quantity, so that the coverage rate of the browsers in the test process can be effectively improved.
In addition, by adopting the technical scheme provided by the invention, the same test operation is automatically executed on the page to be tested displayed by other browsers, namely the second browser, driven by the test end in real time, so that the operation results of the test operations can be compared in real time, and the purpose of real-time monitoring is realized.
In addition, by adopting the technical scheme provided by the invention, the service instance is started for the test through the distribution server to generate the test instruction of the test, so that each test can correspond to different test instructions, therefore, the distribution server can provide test service for a plurality of operation terminals at the same time, and the efficiency of test operation can be effectively improved.
Fig. 5 is a schematic structural diagram of an operation end according to another embodiment of the present invention, as shown in fig. 5. The operation end of the present embodiment may include an acquisition unit 51, a generation unit 52, and a transmission unit 53. The acquisition unit 51 is configured to acquire an operation behavior of an input device on a page to be tested, where the operation behavior includes page element information of an operation and behavior information of the operation; a generating unit 52, configured to generate an operation instruction according to the operation behavior; the sending unit 53 is configured to send a test instruction and the operation instruction to each test end in the at least one test end, so that each test end executes the operation instruction on the page to be tested displayed by the second browser according to the test instruction.
The second browser and the first browser are different browsers; the number of the second browsers is the same as that of the test ends, the second browsers correspond to the test ends one by one, and the second browser corresponding to each test end is different.
It is to be understood that the different browsers may be different browsers running in the same operating system, or may also be the same browser running in different operating systems, or may also be different browsers running in different operating systems, which is not particularly limited in this embodiment.
It should be noted that the operation terminal and the first browser may independently run on the first terminal; or, the operation end may also be arranged inside the first browser in a Software Development Kit (SDK) form or a plug-in form; this embodiment is not particularly limited.
It should be noted that each test end and the corresponding second browser may independently operate on the second terminal; or, the test end may also be arranged inside the second browser in an SDK form or a plug-in form; this embodiment is not particularly limited.
Optionally, in a possible implementation manner of this embodiment, the sending unit 53 may be specifically configured to send, by the distribution server, the test instruction and the operation instruction to each test end in the at least one test end.
Optionally, in a possible implementation manner of this embodiment, as shown in fig. 6, the operation end provided in this embodiment may further include a receiving unit 61. The sending unit 53 may be further configured to send trigger information to the distribution server. The receiving unit 61 is configured to receive the test instruction sent by the distribution server, so that the user determines each test end, where the test instruction is generated by the distribution server starting a service instance for the test according to the trigger information. Correspondingly, the sending unit 53 may be further configured to send the test instruction, the identification information of the page to be tested, and the identification information of each test end to the distribution server, so that the distribution server sends the test instruction and the identification information of the page to be tested to each test end according to the identification information of each test end, so that each test end drives the second browser to display the page to be tested.
It should be noted that, the functions of the operation end in the embodiment corresponding to fig. 1 may be implemented by the operation end provided by the test system provided in this embodiment. For a detailed description, reference may be made to relevant contents in the embodiment corresponding to fig. 1, and details are not described here.
In this way, the acquisition unit acquires the operation behavior of the input device on the page to be tested displayed by the first browser, the operation behavior comprises operation page element information and operation behavior information, and the generation unit generates an operation instruction according to the operation behavior, so that the sending unit can send a test instruction and the operation instruction to each test terminal in at least one test terminal, and thus each test terminal can execute the operation instruction on the page to be tested displayed by the second browser according to the test instruction, and only one operator of the operation terminal needs to manually execute one test operation on the page to be tested displayed by one browser, namely the first browser, so that the same test operation can be automatically executed on the page to be tested displayed by the other browser, namely the second browser, driven by the test terminal in real time, the same test operation is performed for multiple times manually without needing an operator to display the pages to be tested on different browsers, the operation is simple, the accuracy is high, and therefore the efficiency and the reliability of the test operation are improved.
In addition, by adopting the technical scheme provided by the invention, the same test operation is automatically executed on the page to be tested displayed by other browsers, namely the second browser, driven by the test terminal in real time, and the types of the second browser are not limited in quantity, so that the coverage rate of the browsers in the test process can be effectively improved.
In addition, by adopting the technical scheme provided by the invention, the same test operation is automatically executed on the page to be tested displayed by other browsers, namely the second browser, driven by the test end in real time, so that the operation results of the test operations can be compared in real time, and the purpose of real-time monitoring is realized.
In addition, by adopting the technical scheme provided by the invention, the service instance is started for the test through the distribution server to generate the test instruction of the test, so that each test can correspond to different test instructions, therefore, the distribution server can provide test service for a plurality of operation terminals at the same time, and the efficiency of test operation can be effectively improved.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or page components may be combined or integrated into another system, or some features may be omitted or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (11)
1. A method of testing, comprising:
the method comprises the steps that an operation end collects operation behaviors of an input device on a page to be tested, wherein the operation behaviors are displayed by a first browser and comprise operation page element information and operation behavior information;
the operation end generates an operation instruction according to the operation behavior;
the operation end sends a test instruction and the operation instruction to each test end in at least one test end, so that each test end executes the operation instruction on the page to be tested displayed by the second browser according to the test instruction; wherein,
the operation end sends a test instruction and the operation instruction to each test end in at least one test end, and the method comprises the following steps:
the operation end sends a test instruction and the operation instruction to each test end in at least one test end through a distribution server;
before the operation end sends the test instruction and the operation instruction to each testing end in at least one testing end through the distribution server, the method further comprises the following steps:
the operation end sends triggering information to the distribution server;
the operation end receives the test instruction sent by the distribution server so that a user can determine each test end, wherein the test instruction is generated by the distribution server starting a service instance for the test according to the trigger information;
the operation end sends the test instruction, the identification information of the page to be tested and the identification information of each test end to the distribution server, so that the distribution server sends the test instruction and the identification information of the page to be tested to each test end according to the identification information of each test end, and each test end drives the second browser to display the page to be tested.
2. The method of claim 1, further comprising:
the proxy server receives a first candidate HTTP request, wherein the first candidate HTTP request is generated by the first browser according to the operation result of the operation behavior;
the proxy server receives a second candidate HTTP request, wherein the second candidate HTTP request is generated by the second browser according to an operation result of the operation instruction executed by the test end;
the proxy server sends the first candidate HTTP request to a Web server and receives a first candidate HTTP response sent by the Web server according to the first candidate HTTP request; the proxy server sends the second candidate HTTP request to a Web server and receives a second candidate HTTP response sent by the Web server according to the second candidate HTTP request; the proxy server sending the first candidate HTTP response to the first browser and sending the second candidate HTTP response to the second browser; or
The proxy server generates a target HTTP request according to the first candidate HTTP request and the second candidate HTTP request, sends the target HTTP request to a Web server, and receives a target HTTP response sent by the Web server according to the target HTTP request; and the proxy server sends the target HTTP response to the first browser and the second browser.
3. The method according to any one of claims 1-2, wherein the operation terminal and the first browser run independently on the first terminal; the operation end is arranged in the first browser in an SDK form or a plug-in form.
4. The method according to any one of claims 1-2, wherein each testing terminal and the corresponding second browser independently run on a second terminal; the test end is arranged in the second browser in an SDK form or a plug-in form.
5. A test system is characterized by comprising an operation end and at least one test end; wherein,
the operation terminal is used for acquiring operation behaviors of the input equipment on a page to be tested displayed by the first browser, wherein the operation behaviors comprise operation page element information and operation behavior information; generating an operation instruction according to the operation behavior; sending a test instruction and the operation instruction to each test end in the at least one test end;
each testing end is used for executing the operation instruction on the page to be tested displayed by the second browser according to the testing instruction; wherein,
the system further comprises a distribution server; the operating end is particularly used for
Sending a test instruction and the operation instruction to each test terminal through the distribution server;
the operation terminal is further used for sending triggering information to the distribution server;
the distribution server is further configured to start a service instance for the current test according to the trigger information to generate the test instruction of the current test; sending the test instruction to the operation end so that a user can determine each test end;
the operation terminal is further configured to send the test instruction, the identification information of the page to be tested, and the identification information of each test terminal to the distribution server;
the distribution server is further configured to send the test instruction and the identification information of the page to be tested to each testing end according to the identification information of each testing end;
and each testing end is also used for driving the second browser to display the page to be tested.
6. The system of claim 5, further comprising a proxy server for
Receiving a first candidate HTTP request, wherein the first candidate HTTP request is generated according to an operation result of the operation behavior by the first browser; receiving a second candidate HTTP request, wherein the second candidate HTTP request is generated according to an operation result of the second browser executing the operation instruction by the test terminal;
sending the first candidate HTTP request to a Web server, and receiving a first candidate HTTP response sent by the Web server according to the first candidate HTTP request; sending the second candidate HTTP request to a Web server, and receiving a second candidate HTTP response sent by the Web server according to the second candidate HTTP request; sending the first candidate HTTP response to the first browser and sending the second candidate HTTP response to the second browser; or
Generating a target HTTP request according to the first candidate HTTP request and the second candidate HTTP request; sending the target HTTP request to a Web server; receiving a target HTTP response sent by the Web server according to the target HTTP request; and sending the target HTTP response to the first browser and the second browser.
7. The system according to any one of claims 5 to 6, wherein the operation terminal and the first browser run independently on the first terminal; the operation end is arranged in the first browser in an SDK form or a plug-in form.
8. The system according to any one of claims 5 to 6, wherein each testing terminal and the corresponding second browser independently run on a second terminal; the test end is arranged in the second browser in an SDK form or a plug-in form.
9. An operation end is characterized in that the operation end is provided with a plurality of connecting rods,
the system comprises an acquisition unit, a display unit and a display unit, wherein the acquisition unit is used for acquiring operation behaviors of an input device on a page to be tested displayed by a first browser, and the operation behaviors comprise operation page element information and operation behavior information;
the generating unit is used for generating an operation instruction according to the operation behavior;
the sending unit is used for sending a test instruction and the operation instruction to each test end in at least one test end so that each test end executes the operation instruction on the page to be tested displayed by the second browser according to the test instruction; wherein,
the transmitting unit is particularly used for
Sending a test instruction and the operation instruction to each test end in at least one test end through a distribution server;
the operation end also comprises a receiving unit; wherein,
the sending unit is further configured to send trigger information to the distribution server;
the receiving unit is configured to receive the test instruction sent by the distribution server, so that a user determines each test end, where the test instruction is generated by the distribution server starting a service instance for the current test according to the trigger information;
the sending unit is further configured to send the test instruction, the identification information of the page to be tested, and the identification information of each test end to the distribution server, so that the distribution server sends the test instruction and the identification information of the page to be tested to each test end according to the identification information of each test end, so that each test end drives the second browser to display the page to be tested.
10. The operation terminal according to claim 9, wherein the operation terminal and the first browser run independently on a first terminal; the operation end is arranged in the first browser in an SDK form or a plug-in form.
11. The operation end according to claim 9, wherein each test end and the corresponding second browser independently run on a second terminal; the test end is arranged in the second browser in an SDK form or a plug-in form.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410301283.3A CN104102578B (en) | 2014-06-27 | 2014-06-27 | Test method and system and operation terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410301283.3A CN104102578B (en) | 2014-06-27 | 2014-06-27 | Test method and system and operation terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104102578A CN104102578A (en) | 2014-10-15 |
CN104102578B true CN104102578B (en) | 2017-01-25 |
Family
ID=51670747
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410301283.3A Active CN104102578B (en) | 2014-06-27 | 2014-06-27 | Test method and system and operation terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104102578B (en) |
Families Citing this family (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106886489A (en) * | 2015-12-16 | 2017-06-23 | 百度在线网络技术(北京)有限公司 | Method and apparatus for being debugged to Mobile solution |
CN106970870B (en) * | 2016-01-14 | 2023-02-24 | 腾讯科技(北京)有限公司 | Webpage test platform, webpage test method and webpage test system |
CN107358407A (en) * | 2017-07-11 | 2017-11-17 | 明珠家具股份有限公司 | Data processing method and system |
CN109189344A (en) * | 2018-09-17 | 2019-01-11 | 郑州云海信息技术有限公司 | A kind of logical volume management method, system, equipment and computer readable storage medium |
CN110262931B (en) * | 2019-05-31 | 2023-02-28 | 深圳市杰科数码有限公司 | Keyboard testing method and keyboard testing computer |
US10983762B2 (en) * | 2019-06-27 | 2021-04-20 | Sap Se | Application assessment system to achieve interface design consistency across micro services |
CN110362488B (en) * | 2019-07-12 | 2023-08-08 | 北京字节跳动网络技术有限公司 | Page testing method and device, electronic equipment and storage medium |
CN111552643A (en) * | 2020-04-27 | 2020-08-18 | 深圳壹账通智能科技有限公司 | Multi-browser web page access synchronization method and system |
CN113326188A (en) * | 2021-05-27 | 2021-08-31 | 北京沃东天骏信息技术有限公司 | Browser testing method and device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101163024A (en) * | 2006-10-12 | 2008-04-16 | 国际商业机器公司 | Method and device of performing concurrent operation to a plurality of network servers |
CN102033803A (en) * | 2009-09-29 | 2011-04-27 | 国际商业机器公司 | Method and device for testing web application across browsers |
CN102999424A (en) * | 2012-11-27 | 2013-03-27 | 广东欧珀移动通信有限公司 | Parallel remote automated testing method |
-
2014
- 2014-06-27 CN CN201410301283.3A patent/CN104102578B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101163024A (en) * | 2006-10-12 | 2008-04-16 | 国际商业机器公司 | Method and device of performing concurrent operation to a plurality of network servers |
CN102033803A (en) * | 2009-09-29 | 2011-04-27 | 国际商业机器公司 | Method and device for testing web application across browsers |
CN102999424A (en) * | 2012-11-27 | 2013-03-27 | 广东欧珀移动通信有限公司 | Parallel remote automated testing method |
Also Published As
Publication number | Publication date |
---|---|
CN104102578A (en) | 2014-10-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104102578B (en) | Test method and system and operation terminal | |
CN110198247B (en) | Interface test method and system | |
US10003671B2 (en) | Capturing and replaying application sessions using resource files | |
CN108595304B (en) | Webpage monitoring method and device | |
CN106484611B (en) | Fuzzy test method and device based on automatic protocol adaptation | |
CN103457783B (en) | Method and system for testing mobile network application | |
CN107688529B (en) | Component debugging method and device | |
CN106878361B (en) | Debugging method and device for terminal application page and client | |
CN112988599B (en) | Page debugging method and device, electronic equipment and storage medium | |
CN104156213A (en) | Android application running method and device | |
CN105260082B (en) | A kind of test data methods of exhibiting and exploitation terminal | |
US20150082286A1 (en) | Real-time code instrumentation | |
US10775751B2 (en) | Automatic generation of regular expression based on log line data | |
CN108628739A (en) | A kind of method that Lua scripts are debugged, client, server and debugger | |
CN104317570A (en) | Device and method for dynamically analyzing web application | |
CN106708717B (en) | A kind of exploitation adjustment method and device | |
CN107203470A (en) | Page adjustment method and device | |
CN112559278B (en) | Method and device for acquiring operation data | |
CN106815150B (en) | Server-side interface test system and method | |
CN112241356B (en) | Page test method, device, equipment and storage medium | |
CN105068926A (en) | Program test method and device thereof | |
CN111581518A (en) | Information pushing method and device | |
CN102662467A (en) | Instruction control method and device in remote assistance process | |
CN113676547A (en) | Data processing method, apparatus, storage medium and electronic device | |
CN112306591B (en) | Remote debugging method and device based on page |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |