CN110740152B - Test task processing method, device and system - Google Patents

Test task processing method, device and system Download PDF

Info

Publication number
CN110740152B
CN110740152B CN201810802202.6A CN201810802202A CN110740152B CN 110740152 B CN110740152 B CN 110740152B CN 201810802202 A CN201810802202 A CN 201810802202A CN 110740152 B CN110740152 B CN 110740152B
Authority
CN
China
Prior art keywords
test
task
test task
channel
establishing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810802202.6A
Other languages
Chinese (zh)
Other versions
CN110740152A (en
Inventor
刘俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo 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 Beijing Qihoo Technology Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201810802202.6A priority Critical patent/CN110740152B/en
Publication of CN110740152A publication Critical patent/CN110740152A/en
Application granted granted Critical
Publication of CN110740152B publication Critical patent/CN110740152B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • 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]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a method, a device and a system for processing a test task. The method comprises the following steps: receiving a test task submitted by a front-end page; and when the test task is the first type of test task, starting a back-end agent object corresponding to the test task, and establishing a test channel for transmitting messages in the test process based on the back-end agent object corresponding to the test task. The technical scheme provides a method for establishing the test channel for the test task of a specific type, and the established test channel can transmit messages without interference in the test process.

Description

Test task processing method, device and system
Technical Field
The invention relates to the field of software testing, in particular to a method, a device and a system for processing a testing task.
Background
Currently, testing for many applications is accomplished as follows: the testing personnel are connected with a plurality of testing terminals on the testing server, and the testing personnel are connected with the server through the client side to realize corresponding tests on the testing terminals.
However, if the connection from the client to the server is a remote network connection, a problem of how to implement communication inevitably arises, and if a plurality of clients need to control a plurality of devices, congestion arises, and how to schedule is also a problem to be solved.
Disclosure of Invention
In view of the above, the present invention has been made to provide a method, apparatus and system for processing a test task that overcomes or at least partially solves the above problems.
According to an aspect of the present invention, there is provided a method for processing a test task, including:
receiving a test task submitted by a front-end page;
and when the test task is the first type of test task, starting a back-end agent object corresponding to the test task, and establishing a test channel for transmitting messages in the test process based on the back-end agent object corresponding to the test task.
Optionally, the establishing a test channel for transmitting a message in a test process based on the backend agent object corresponding to the test task includes:
and establishing a test channel through the websocket object and the front-end proxy object of the front-end page, the rear-end proxy object corresponding to the test task, the test server and the test terminal.
Optionally, the first type of test task includes: and (3) a performance test task and/or a performance special test task of the html5 page.
Optionally, the method further comprises:
and when the test task is the second type of test task, distributing a corresponding message processing object for the test task, and establishing a test channel based on the message processing object.
Optionally, the message processing object is capable of processing messages transmitted by the second type of test task in the test process, and is incapable of processing messages transmitted by the first type of test task in the test process.
Optionally, the message processing object is generated according to a preset message processing object mirror image.
Optionally, the establishing a test channel based on the message processing object includes:
and establishing a test channel through a websocket object of a front-end page, a front-end proxy object, the message processing object, a rear-end general proxy object, a test server and a test terminal.
Optionally, messages passed through the test channel are processed based on zeroMQ.
According to another aspect of the present invention, there is provided a test task processing apparatus, including:
the test task receiving unit is suitable for receiving the test tasks submitted by the front-end page;
and the test channel establishing unit is suitable for starting a back-end agent object corresponding to the test task when the test task is the first type of test task, and establishing a test channel for transmitting the message in the test process based on the back-end agent object corresponding to the test task.
Optionally, the test channel establishing unit is adapted to establish a test channel through the websocket object of the front-end page, the front-end proxy object, the back-end proxy object corresponding to the test task, the test server, and the test terminal.
Optionally, the first type of test task includes: and (3) a performance test task and/or a performance special test task of the html5 page.
Optionally, the test channel establishing unit is further adapted to, when the test task is a second type of test task, allocate a corresponding message processing object to the test task, and establish the test channel based on the message processing object.
Optionally, the message processing object is capable of processing messages transmitted by the second type of test task in the test process, and is incapable of processing messages transmitted by the first type of test task in the test process.
Optionally, the message processing object is generated according to a preset message processing object mirror image.
Optionally, the test channel establishing unit is adapted to establish a test channel through a websocket object of a front-end page, a front-end proxy object, the message processing object, a back-end general proxy object, a test server, and a test terminal.
Optionally, messages passed through the test channel are processed based on zeroMQ.
According to another aspect of the present invention, there is provided a test task processing system, including: one or more clients, a test server, processing means for a test task as defined in any one of the above, and one or more test terminals;
the client is suitable for displaying a front-end page, receiving the submitted test task through the front-end page and sending the test task to a processing device of the test task;
the test server is suitable for being connected with one or more test terminals;
the test server, the test terminal and the client are also suitable for transmitting messages in the test process according to the test channel established by the processing device of the test task.
According to still another aspect of the present invention, there is provided an electronic apparatus including: a processor; and a memory arranged to store computer executable instructions that, when executed, cause the processor to perform a method as any one of the above.
According to a further aspect of the invention, there is provided a computer readable storage medium, wherein the computer readable storage medium stores one or more programs which, when executed by a processor, implement a method as any one of the above.
As can be seen from the above, in the technical solution of the present invention, by receiving the test task submitted by the front-end page, when it is determined that the test task is the first type of test task, the back-end agent object corresponding to the test task is started, and a test channel for transmitting the message in the test process is established based on the back-end agent object corresponding to the test task. The technical scheme provides a method for establishing the test channel for the test task of a specific type, and the established test channel can transmit messages without interference in the test process.
The above description is only an overview of the technical solutions of the present invention, and the present invention can be implemented in accordance with the content of the description so as to make the technical means of the present invention more clearly understood, and the above and other objects, features, and advantages of the present invention will be more clearly understood.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a flow diagram illustrating a method for processing a test task according to one embodiment of the invention;
FIG. 2 is a schematic diagram of a processing apparatus for testing tasks according to an embodiment of the present invention;
FIG. 3 shows a message processing architecture diagram according to an embodiment of the invention;
FIG. 4 shows a block diagram of a processing system for testing tasks according to an embodiment of the invention;
FIG. 5 shows a schematic structural diagram of an electronic device according to an embodiment of the invention;
fig. 6 shows a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
FIG. 1 is a flow chart illustrating a method for processing a test task according to an embodiment of the invention. As shown in fig. 1, the method includes:
step S110, receiving a test task submitted by a front-end page. The front end page may be accessed through an application or browser.
Step S120, when the test task is the first type of test task, starting a back-end agent object corresponding to the test task, and establishing a test channel for transmitting a message in the test process based on the back-end agent object corresponding to the test task.
As can be seen, in the method shown in fig. 1, by receiving the test task submitted by the front-end page, when it is determined that the test task is the first type of test task, the back-end proxy object corresponding to the test task is started, and a test channel for transmitting the message in the test process is established based on the back-end proxy object corresponding to the test task. The technical scheme provides a method for establishing the test channel for the test task of a specific type, and the established test channel can transmit messages without interference in the test process.
Since the message transmitted in the test process is actually from the client to the test terminal, in an embodiment of the present invention, the establishing a test channel for transmitting the message in the test process based on the backend agent object corresponding to the test task in the method includes: and establishing a test channel through the websocket object of the front-end page, the front-end proxy object, the rear-end proxy object corresponding to the test task, the test server and the test terminal.
That is, fig. 1 shows how messages are passed between a client and a server, and in particular, a front-end proxy object is required to be relied upon. Fig. 3 shows a message processing architecture diagram according to an embodiment of the invention. The components on which the test channels are established for the first type of test task are shown in fig. 3, as are the components on which the test channels are established for the second type of test task.
In an embodiment of the present invention, the method further includes: and when the test task is the second type of test task, distributing a corresponding message processing object for the test task, and establishing a test channel based on the message processing object. Specifically, in an embodiment of the present invention, the establishing a test channel based on a message processing object in the method includes: and establishing a test channel through a websocket object of a front-end page, a front-end proxy object, a message processing object, a rear-end general proxy object, a test server and a test terminal.
That is, for a part (which may be most in practical applications) of the test task, the message delivery flow is as follows: the client side transmits the message to the front-end proxy object through the websocket object, the front-end proxy object transmits the message to the corresponding message processing object, and the number of the message processing objects can be multiple, so that the support for multiple client sides can be realized; naturally, the scheduling needs to be implemented by using a message queue, and the messages on the message processing objects are sequentially scheduled to the back-end agent object according to the message queue, and then sent to the test server by the back-end agent object, and then transmitted to the corresponding test terminal by the test server. The flow of messages, in turn, from the test terminal to the client is similar and will not be described in detail here. It can be seen that a test channel for message transmission without interference is formed.
However, there may be a problem that in one embodiment of the present invention, the above method, the message processing object is generated according to a preset message processing object image. It is then clear that the functionality of the message processing object mirror is already consolidated and that if a new type of test task occurs, it may be necessary to make a large improvement to the message processing object mirror. However, such improvements may not be justified, for example, most testing tasks do not require such improvements, and thus the improvements may not be compatible and may result in a waste of resources because each message processing object is generated from the same message processing object image.
In practice, such test tasks that do have test requirements but cannot apply the same message processing object image as other test tasks do exist, for example, in one embodiment of the present invention, the first type of test task includes: and (3) a performance test task and/or a performance special test task of the html5 page. These tasks may involve the recording of a User Interface (UI), which is not generally available in other testing tasks, and which requires major improvements to existing message processing object mirroring. That is, in an embodiment of the present invention, in the method, the message processing object is capable of processing the message transmitted by the second type of test task in the test process, and is incapable of processing the message transmitted by the first type of test task in the test process.
In order to solve such a problem, the solution proposed by the embodiment of the present invention is to set up a back-end proxy object separately instead of generating a message processing object for the first type of test task. The transmission flow of the message through the test channel is as follows: the client transmits the message to the front-end proxy object through the websocket object, the front-end proxy object directly transmits the message to an independent rear-end proxy object, the rear-end proxy object sends the message to the test server, and the test server transmits the message to the corresponding test terminal. The procedure for the message delivery by the test terminal to the client in turn is similar and will not be described in detail here. As can be seen from fig. 3, the back-end generic proxy object communicates with each message handling object, while the back-end proxy object communicates directly with the front-end proxy object. And this also does not affect message scheduling.
In one embodiment of the present invention, in the above method, messages passed through the test channel are processed based on ZeroMQ.
Specifically, the front-end proxy object and the websocket object may communicate in a divide-and-conquer (pull/push) mode and a publish-subscribe (pub/sub) mode, for example, the websocket object sends a test instruction through a push, and the front-end proxy object receives the test instruction through the push; the websocket object subscribes the returned test data through sub, and the front-end proxy object publishes the test data through pub. The communication between the front-end proxy object and the back-end proxy object, the front-end proxy object and the message processing object, and the message processing object and the back-end general proxy object use a route (scaler-router) mode to realize message scheduling. For example, when a message is sent by a dealer object corresponding to the first type test task, the message processing object is directly skipped and transmitted to the dealer object in the back-end proxy object; when the dealer object corresponding to the second type test task sends a message, the message needs to be sent to the dealer object in the corresponding message processing object first, and then the dealer object in the rear-end general proxy object is sent by the computer. A divide-and-conquer (pull/push) mode and a publish-and-subscribe (pub/sub) mode are also adopted for communication between the rear-end universal proxy object and the server, for example, the rear-end universal proxy object and the rear-end proxy object send a test instruction through a push, and a test server (actually, a test terminal connected with the test server) receives the test instruction through the pull; the back-end general agent object and the back-end agent object subscribe the returned test data through sub, and the test server (actually, the test terminal connected with the test server) publishes the test data through pub.
Fig. 2 shows a schematic structural diagram of a processing device for a test task according to an embodiment of the present invention. As shown in fig. 2, the processing apparatus 200 for testing tasks includes:
the test task receiving unit 210 is adapted to receive a test task submitted by a front-end page. The front-end page may be accessed through an application or browser.
The test channel establishing unit 220 is adapted to start a backend agent object corresponding to the test task when the test task is the first type of test task, and establish a test channel for transmitting a message in a test process based on the backend agent object corresponding to the test task.
It can be seen that, the apparatus shown in fig. 2 receives the test task submitted by the front-end page through the mutual cooperation of the units, starts the back-end agent object corresponding to the test task when it is determined that the test task is the first type of test task, and establishes the test channel for transmitting the message in the test process based on the back-end agent object corresponding to the test task. The technical scheme provides a method for establishing the test channel for the test task of a specific type, and the established test channel can transmit messages without interference in the test process.
Since the message transmitted in the testing process is actually from the client to the testing terminal, in an embodiment of the present invention, in the apparatus, the testing channel establishing unit 220 is adapted to establish the testing channel through the websocket object of the front-end page, the front-end proxy object, the back-end proxy object corresponding to the testing task, the testing server, and the testing terminal.
That is, specifically, a front-end proxy object also needs to be relied upon. Fig. 3 shows a message processing architecture according to an embodiment of the invention. The components on which the test channels are established for the first type of test task are shown in fig. 3, as are the components on which the test channels are established for the second type of test task.
In an embodiment of the present invention, in the above apparatus, the test channel establishing unit 220 is further adapted to, when the test task is a second type of test task, allocate a corresponding message processing object to the test task, and establish the test channel based on the message processing object. Specifically, in an embodiment of the present invention, in the above apparatus, the test channel establishing unit 220 is adapted to establish the test channel through the websocket object of the front-end page, the front-end proxy object, the message processing object, the back-end generic proxy object, the test server, and the test terminal.
That is, for a part (which may be most in practical applications) of the test task, the message delivery flow is as follows: the client side transmits the message to the front-end proxy object through the websocket object, the front-end proxy object transmits the message to the corresponding message processing object, and the number of the message processing objects can be multiple, so that the support for multiple client sides can be realized; naturally, the scheduling needs to be implemented by using a message queue, and the messages on the message processing objects are sequentially scheduled to the back-end agent object according to the message queue, and then sent to the test server by the back-end agent object, and then transmitted to the corresponding test terminal by the test server. The flow of messages, in turn, from the test terminal to the client is similar and will not be described in detail here. It can be seen that a test channel for message transmission without interference is formed.
However, there may arise a problem that, in an embodiment of the present invention, in the above-described apparatus, the message processing object is generated based on a preset message processing object image. It is then clear that the functionality of the message processing object mirror is already consolidated and that if a new type of test task occurs, there may be a need for a large improvement in the message processing object mirror. However, such improvements may not be justified, for example, most testing tasks do not require such improvements, and thus the improvements may not be compatible and may result in a waste of resources because each message processing object is generated from the same message processing object image.
In practice, such test tasks, which do have test requirements but cannot apply the same message processing object image as other test tasks, do exist, for example, in one embodiment of the present invention, the first type of test task includes: and (3) a performance test task and/or a performance special test task of the html5 page. These tasks may involve the recording of a User Interface (UI), which is not commonly used in other testing tasks, and which requires significant improvements to existing message processing object images. That is, in an embodiment of the present invention, in the apparatus, the message processing object is capable of processing the message transmitted by the second type of test task during the test, and is incapable of processing the message transmitted by the first type of test task during the test.
In order to solve such a problem, the solution proposed by the embodiment of the present invention is to set up a back-end proxy object separately instead of generating a message processing object for the first type of test task. The transmission flow of the message through the test channel is as follows: the client side transmits the message to the front-end proxy object through the websocket object, the front-end proxy object directly transmits the message to an independent rear-end proxy object, the rear-end proxy object sends the message to the test server, and the test server transmits the message to the corresponding test terminal. The flow of messages, in turn, from the test terminal to the client is similar and will not be described in detail here. As can be seen from fig. 3, the back-end generic proxy object communicates with each message handling object, while the back-end proxy object communicates directly with the front-end proxy object. And this also does not affect the message scheduling.
In one embodiment of the invention, in the above device, messages passed through the test channel are processed based on ZeroMQ.
Specifically, the front-end proxy object and the websocket object may communicate in a divide-and-conquer (pull/push) mode and a publish-subscribe (pub/sub) mode, for example, the websocket object sends a test instruction through a push, and the front-end proxy object receives the test instruction through the push; the websocket object subscribes the returned test data through the sub, and the front-end proxy object publishes the test data through the pub. The communication between the front-end proxy object and the back-end proxy object, the front-end proxy object and the message processing object, and the message processing object and the back-end general proxy object use a route (scaler-router) mode to realize message scheduling. For example, when a message is sent by a dealer object corresponding to the first type test task, the message processing object is directly skipped and transmitted to the dealer object in the back-end proxy object; when the dealer object corresponding to the second type test task sends a message, the message needs to be sent to the dealer object in the corresponding message processing object first, and then the dealer object in the rear-end general proxy object is sent by the computer. The back-end general proxy object and the back-end proxy object communicate with the server in a divide-and-conquer (pull/push) mode and a publish-and-subscribe (pub/sub) mode, for example, the back-end general proxy object and the back-end proxy object send a test instruction through push, and the test server (actually, a test terminal connected with the test server) receives the test instruction through push; the back-end general agent object and the back-end agent object subscribe the returned test data through sub, and the test server (actually, the test terminal connected with the test server) publishes the test data through pub.
FIG. 4 shows a block diagram of a processing system for testing tasks according to an embodiment of the invention. As shown in fig. 4, the processing system 400 for testing tasks includes: one or more clients 410, a test server 420, a processing device 200 for a test task as in any of the embodiments described above, and one or more test terminals 430;
the client 410 is adapted to display a front-end page, receive the submitted test task through the front-end page and send it to the processing device of the test task;
the test server 420 is adapted to connect to one or more test terminals 430;
the test server 420, the test terminal 430 and the client 410 are further adapted to communicate messages during the test according to the test channel established by the processing means 200 of the test task.
In summary, according to the technical solution of the present invention, by receiving a test task submitted by a front-end page, when it is determined that the test task is a first type of test task, a back-end proxy object corresponding to the test task is started, and a test channel for transmitting a message in a test process is established based on the back-end proxy object corresponding to the test task. The technical scheme provides a method for establishing the test channel for the test task of a specific type, and the established test channel can transmit messages without interference in the test process.
It should be noted that:
the algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose devices may be used with the teachings herein. The required structure for constructing an arrangement of this type will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: rather, the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
Various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It will be appreciated by those skilled in the art that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components of the processing apparatus and system of test tasks according to embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website, or provided on a carrier signal, or provided in any other form.
For example, fig. 5 shows a schematic structural diagram of an electronic device according to an embodiment of the invention. The electronic device comprises a processor 510 and a memory 520 arranged to store computer executable instructions (computer readable program code). The memory 520 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. The memory 520 has a storage space 530 storing computer readable program code 531 for performing any of the method steps in the above described method. For example, the storage space 530 for storing the computer readable program code may include respective computer readable program codes 531 for respectively implementing various steps in the above method. The computer readable program code 531 may be read from or written to one or more computer program products. These computer program products comprise a program code carrier such as a hard disk, a Compact Disc (CD), a memory card or a floppy disk. Such a computer program product is typically a computer readable storage medium such as described in fig. 6. Fig. 6 shows a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present invention. The computer readable storage medium 600 has stored thereon a computer readable program code 531 for performing the steps of the method according to the invention, which is readable by the processor 510 of the electronic device 500, and when the computer readable program code 531 is executed by the electronic device 500, causes the electronic device 500 to perform the steps of the method described above, in particular the computer readable program code 531 stored on the computer readable storage medium may perform the method shown in any of the embodiments described above. The computer readable program code 531 may be compressed in a suitable form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means can be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
The embodiment of the invention discloses a method for processing a test task, which comprises the following steps:
receiving a test task submitted by a front-end page;
and when the test task is the first type of test task, starting a back-end agent object corresponding to the test task, and establishing a test channel for transmitting messages in the test process based on the back-end agent object corresponding to the test task.
The method A2, as described in A1, where the establishing a test channel for transmitting a message in a test process based on a backend agent object corresponding to the test task includes:
and establishing a test channel through the websocket object of the front-end page, the front-end proxy object, the rear-end proxy object corresponding to the test task, the test server and the test terminal.
The method of A1, wherein the first type of test task comprises: and (3) a performance test task and/or a performance special test task of the html5 page.
The method A4, as stated in A1, wherein the method further comprises:
and when the test task is the second type of test task, distributing a corresponding message processing object for the test task, and establishing a test channel based on the message processing object.
The method A5 is as described in A4, wherein the message processing object is capable of processing messages transmitted by the second type of test task in the test process, and is incapable of processing messages transmitted by the first type of test task in the test process.
The method as A5, wherein the message processing object is generated according to a preset message processing object mirror image.
The method of A7, as stated in A4, wherein the establishing a test channel based on the message processing object includes:
and establishing a test channel through a websocket object of a front-end page, a front-end proxy object, the message processing object, a rear-end general proxy object, a test server and a test terminal.
A8, the method as claimed in any of A1-A6, wherein messages passed through the test channel are processed based on ZeroMQ.
The embodiment of the invention also discloses B9, a processing device of the test task, which comprises:
the test task receiving unit is suitable for receiving the test tasks submitted by the front-end page;
and the test channel establishing unit is suitable for starting a back-end agent object corresponding to the test task when the test task is the first type of test task, and establishing a test channel for transmitting the message in the test process based on the back-end agent object corresponding to the test task.
B10. The apparatus according to B9, wherein,
the test channel establishing unit is suitable for establishing a test channel through a websocket object of a front-end page, a front-end proxy object, a rear-end proxy object corresponding to the test task, a test server and a test terminal.
The apparatus of B11, as in B9, wherein the first type of test task comprises: and (3) a performance test task and/or a performance special test task of the html5 page.
B12, the apparatus of B9, wherein,
the test channel establishing unit is further adapted to, when the test task is a second type of test task, allocate a corresponding message processing object to the test task, and establish a test channel based on the message processing object.
The device B13 is the device B12, wherein the message processing object is capable of processing the message transmitted by the second type of test task in the test process, and is incapable of processing the message transmitted by the first type of test task in the test process.
The apparatus of B14, as set forth in B13, wherein the message processing object is generated according to a preset message processing object mirror.
B15. The apparatus as claimed in B12, wherein,
the test channel establishing unit is suitable for establishing a test channel through a websocket object of a front-end page, a front-end proxy object, the message processing object, a rear-end universal proxy object, a test server and a test terminal.
B16, the device as in any of B9-B15, wherein messages passed through the test channel are processed based on ZeroMQ.
The embodiment of the invention also discloses C17, a processing system of test tasks, comprising: one or more clients, a test server, a processing device for a test task according to any of B9-B16, and one or more test terminals;
the client is suitable for displaying a front-end page, receiving a submitted test task through the front-end page and sending the test task to a processing device of the test task;
the test server is suitable for being connected with one or more test terminals;
the test server, the test terminal and the client are also suitable for transmitting messages in the test process according to the test channel established by the processing device of the test task.
The embodiment of the invention also discloses D18 and electronic equipment, wherein the electronic equipment comprises: a processor; and a memory arranged to store computer executable instructions that, when executed, cause the processor to perform the method of any one of A1-A8.
Embodiments of the invention also disclose E19, a computer readable storage medium, wherein the computer readable storage medium stores one or more programs which, when executed by a processor, implement the method as described in any of A1-A8.

Claims (15)

1. A processing method of a test task comprises the following steps:
receiving a test task submitted by a front-end page;
when the test task is a first type of test task, starting a separately set back-end agent object corresponding to the test task, and establishing a test channel for transmitting messages in the test process based on the back-end agent object corresponding to the test task;
when the test task is a second type of test task, distributing one message processing object corresponding to the test task in a plurality of message processing objects for the test task, and establishing a test channel based on the message processing object;
the message processing object can process messages transmitted by the second type of test task in the test process, and cannot process messages transmitted by the first type of test task in the test process.
2. The method of claim 1, wherein establishing a test channel for delivering messages in a test procedure based on a backend agent object corresponding to the test task comprises:
and establishing a test channel through the websocket object and the front-end proxy object of the front-end page, the rear-end proxy object corresponding to the test task, the test server and the test terminal.
3. The method of claim 1, wherein the first type of test task comprises a performance specific test task.
4. The method of claim 1, wherein the message handling object is generated from a preset message handling object image.
5. The method of claim 1, wherein said establishing a test channel based on the message processing object comprises:
and establishing a test channel through a websocket object of a front-end page, a front-end proxy object, the message processing object, a rear-end general proxy object, a test server and a test terminal.
6. The method of any of claims 1-5, wherein messages passed through the test channel are processed based on zeroMQ.
7. A processing device of a test task, comprising:
the test task receiving unit is suitable for receiving a test task submitted by a front-end page;
the test channel establishing unit is suitable for starting a separately arranged back-end agent object corresponding to the test task when the test task is the first type of test task, and establishing a test channel for transmitting messages in the test process based on the back-end agent object corresponding to the test task;
the method is also suitable for distributing one message processing object corresponding to the test task in a plurality of message processing objects for the test task when the test task is a second type of test task, and establishing a test channel based on the message processing object;
the message processing object can process messages transmitted by the second type of test task in the test process, and cannot process messages transmitted by the first type of test task in the test process.
8. The apparatus of claim 7, wherein,
the test channel establishing unit is suitable for establishing a test channel through a websocket object of a front-end page, a front-end proxy object, a rear-end proxy object corresponding to the test task, a test server and a test terminal.
9. The apparatus of claim 7, wherein the first type of test task comprises a performance specific test task.
10. The apparatus of claim 7, wherein the message handling object is generated according to a preset message handling object mirror.
11. The apparatus of claim 7, wherein,
the test channel establishing unit is suitable for establishing a test channel through a websocket object of a front-end page, a front-end proxy object, the message processing object, a rear-end general proxy object, a test server and a test terminal.
12. The apparatus according to any of claims 7-11, wherein messages passed through the test channel are processed based on ZeroMQ.
13. A processing system for testing tasks, comprising: one or more clients, a test server, processing means for a test task according to any of claims 7-12, and one or more test terminals;
the client is suitable for displaying a front-end page, receiving the submitted test task through the front-end page and sending the test task to a processing device of the test task;
the test server is suitable for being connected with one or more test terminals;
the test server, the test terminal and the client are also suitable for transmitting messages in the test process according to the test channel established by the processing device of the test task.
14. An electronic device, wherein the electronic device comprises: a processor; and a memory arranged to store computer executable instructions that, when executed, cause the processor to perform the method of any one of claims 1-6.
15. A computer readable storage medium, wherein the computer readable storage medium stores one or more programs which, when executed by a processor, implement the method of any of claims 1-6.
CN201810802202.6A 2018-07-20 2018-07-20 Test task processing method, device and system Active CN110740152B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810802202.6A CN110740152B (en) 2018-07-20 2018-07-20 Test task processing method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810802202.6A CN110740152B (en) 2018-07-20 2018-07-20 Test task processing method, device and system

Publications (2)

Publication Number Publication Date
CN110740152A CN110740152A (en) 2020-01-31
CN110740152B true CN110740152B (en) 2022-11-04

Family

ID=69235428

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810802202.6A Active CN110740152B (en) 2018-07-20 2018-07-20 Test task processing method, device and system

Country Status (1)

Country Link
CN (1) CN110740152B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114360630B (en) * 2022-01-24 2022-07-15 北京得瑞领新科技有限公司 Batch test method and system for SSD (solid State disk)
CN114897321A (en) * 2022-04-22 2022-08-12 瑞浦兰钧能源股份有限公司 Test resource management method, device, equipment and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006067549A (en) * 2004-07-29 2006-03-09 Sharp Corp Testing system, client device and relay device contained in the system, testing method for communications apparatus, and program product for causing computer to function as client device or relay device
CN101150456A (en) * 2007-10-17 2008-03-26 中兴通讯股份有限公司 Hardware module testing method and system
CN103634165A (en) * 2013-12-05 2014-03-12 北京奇虎科技有限公司 Method, terminal device and system for realizing network testing based on reverse proxy
CN104951380A (en) * 2014-03-24 2015-09-30 环旭电子股份有限公司 Test method and system used for testing on-line products
CN105959179A (en) * 2016-06-08 2016-09-21 微梦创科网络科技(中国)有限公司 Reverse proxy nginx testing system and method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9071989B2 (en) * 2012-02-01 2015-06-30 Dynatrace Llc System and methods that enable automated testing of mobile devices at a remote monitor site

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006067549A (en) * 2004-07-29 2006-03-09 Sharp Corp Testing system, client device and relay device contained in the system, testing method for communications apparatus, and program product for causing computer to function as client device or relay device
CN101150456A (en) * 2007-10-17 2008-03-26 中兴通讯股份有限公司 Hardware module testing method and system
CN103634165A (en) * 2013-12-05 2014-03-12 北京奇虎科技有限公司 Method, terminal device and system for realizing network testing based on reverse proxy
CN104951380A (en) * 2014-03-24 2015-09-30 环旭电子股份有限公司 Test method and system used for testing on-line products
CN105959179A (en) * 2016-06-08 2016-09-21 微梦创科网络科技(中国)有限公司 Reverse proxy nginx testing system and method

Also Published As

Publication number Publication date
CN110740152A (en) 2020-01-31

Similar Documents

Publication Publication Date Title
CN109474688B (en) Method, device, equipment and medium for sending instant communication network request message
CN112073758B (en) Cloud desktop screen projection method and device, computer equipment, computer readable storage medium and cloud desktop screen projection interaction system
CN106557288B (en) Method and device for acquiring printing data
CN110740152B (en) Test task processing method, device and system
CN109168012B (en) Information processing method and device for terminal equipment
CN109977822B (en) Data supply method, model training method, device, system, equipment and medium
CN108549586B (en) Information processing method and device
CN105930249B (en) Using monitoring method and device
US20150296014A1 (en) Picture download method and apparatus
CN110618768B (en) Information presentation method and device
KR20170125252A (en) Message Fragmentation Method using a MQTT Protocol in M2M/IoT Platforms
CN110839074A (en) Data request receiving and processing method and device
CN108512889B (en) Application response pushing method based on HTTP and proxy server
CN110489326B (en) IDS-based HTTPAPI debugging method device, medium and equipment
CN104836820A (en) Method and system for client interaction, and client terminals
CN109391817B (en) Texture data transmission method and device
CN115665274A (en) Data transmission method and system of heterogeneous protocol, electronic device and storage medium
CN105978853B (en) Session scheduling method, scheduling server and terminal
CN105335470B (en) User login information shows method and apparatus
CN110297685B (en) User interface description file generation method, device, equipment and storage medium
CN110022300B (en) Edge calculation implementation method, device, system and storage medium
CN104539613B (en) The login method and Mail Clients of mail account
CN110351602B (en) Method for electronic device, information processing system and electronic device
CN108270803B (en) Method and system for realizing transmission of network file and desktop application through webpage technology
CN111611507A (en) Modularization-based in-application page jump method and computing device

Legal Events

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