CN109684196B - Test method and device - Google Patents
Test method and device Download PDFInfo
- Publication number
- CN109684196B CN109684196B CN201811296302.2A CN201811296302A CN109684196B CN 109684196 B CN109684196 B CN 109684196B CN 201811296302 A CN201811296302 A CN 201811296302A CN 109684196 B CN109684196 B CN 109684196B
- Authority
- CN
- China
- Prior art keywords
- behavior
- recording
- instruction
- robot
- testing
- 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 description 7
- 238000012360 testing method Methods 0.000 claims abstract description 78
- 230000009471 action Effects 0.000 claims abstract description 13
- 230000001960 triggered effect Effects 0.000 claims abstract description 11
- 230000006399 behavior Effects 0.000 claims description 173
- 238000000034 method Methods 0.000 claims description 40
- 230000008569 process Effects 0.000 claims description 12
- 238000012545 processing Methods 0.000 claims description 8
- 244000208734 Pisonia aculeata Species 0.000 claims description 7
- 230000005856 abnormality Effects 0.000 claims description 6
- 239000000725 suspension Substances 0.000 claims description 3
- 238000005516 engineering process Methods 0.000 abstract description 4
- 230000006870 function Effects 0.000 description 15
- 238000010586 diagram Methods 0.000 description 13
- 238000004590 computer program Methods 0.000 description 10
- 230000005540 biological transmission Effects 0.000 description 6
- 238000004891 communication Methods 0.000 description 3
- 238000011161 development Methods 0.000 description 3
- 230000009191 jumping Effects 0.000 description 3
- 101100000858 Caenorhabditis elegans act-3 gene Proteins 0.000 description 2
- HEFNNWSXXWATRW-UHFFFAOYSA-N Ibuprofen Chemical compound CC(C)CC1=CC=C(C(C)C(O)=O)C=C1 HEFNNWSXXWATRW-UHFFFAOYSA-N 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 101100161935 Caenorhabditis elegans act-4 gene Proteins 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000009662 stress testing Methods 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3692—Test management for test results analysis
Abstract
The invention provides a testing method and a testing device, wherein the testing method comprises the following steps: receiving a starting instruction recorded through a starting action triggered on a client; recording the behavior operated on the client in real time according to the starting instruction; generating a message file when a completion instruction for completing the behavior recording is received through the client, wherein the message file stores the recorded behavior in a form of a table; and testing the server through the behavior of the robot replay record. The invention solves the problem that the test is difficult to be completed for personnel without programming foundation in the related technology, and the operation threshold is low by adopting a robot behavior recording mode, so that the personnel without programming foundation can also easily complete the test.
Description
Technical Field
The invention relates to the field of communication, in particular to a testing method and device.
Background
Fig. 1 is a schematic diagram of a prior art pressure test, as shown in fig. 1, where the conventional robot is extremely inflexible and cannot be used by a tester (e.g., development, planning, operation, etc.), and a better robot driving scheme is required. Conventional stress testing creates a library of stress test cases that require programming by a programmer with a programming base. Writing use cases is simply not possible for a 0-base functional tester. Thus, a functional programmer is required to have a rich test experience.
For the problem that it is difficult for a person without programming foundation to complete the test in the related art, no effective solution exists at present.
Disclosure of Invention
The embodiment of the invention provides a testing method and a testing device, which at least solve the problem that testing is difficult to be completed for personnel without programming foundation in the related technology.
According to one embodiment of the present invention, there is provided a test method including:
receiving a starting instruction recorded through a starting action triggered on a client;
recording the behavior operated on the client in real time according to the starting instruction;
generating a message file when a completion instruction for completing the behavior recording is received through the client, wherein the message file stores the recorded behavior in a form of a table;
and testing the server through the behavior of the robot replay record.
Optionally, before testing the server by the behavior of the robot replay recording, the method further comprises:
receiving an editing instruction for adding judgment logic and editing robot attributes in the recorded table of the behaviors;
and completing the test case according to the editing instruction.
Optionally, testing the server by the behavior of the robot replay recording includes:
and replaying the test case by the robot to test the server.
Optionally, the method further comprises:
and carrying out rich text processing on the behavior operated on the client in real time according to the starting instruction.
Optionally, before testing the server by the behavior of the robot replay recording, the method further comprises:
receiving a replacement instruction for replacing the dynamic text in the table with the corresponding attribute of the robot;
and replacing the dynamic text in the table with the corresponding attribute of the robot according to the replacement instruction.
Optionally, the method further comprises:
receiving a pause instruction for pausing the recording behavior in the process of recording the behavior operated on the client in real time according to the starting instruction;
and suspending recording according to the suspension instruction.
Optionally, after the suspending recording according to the suspending instruction, the method further comprises:
receiving a recording instruction for continuing recording behavior;
and continuing recording according to the recording instruction.
Optionally, the method further comprises:
if abnormality occurs in the process of testing the server through the behavior of the robot replay recording, judging whether a server position pull-back mark exists or not;
if the judgment result is yes, traversing from the current behavior number to determine the behavior number with the position smaller than the preset value from the current behavior number;
and testing the server by replaying the behavior from the determined behavior number.
Optionally, each behavior in the table includes at least a behavior number, a behavior type, a delay between behaviors, and parameters of a behavior, where the behavior type includes: sending a message, judging the attribute of the robot and judging the function.
According to another embodiment of the present invention, there is also provided a test apparatus including:
the first receiving module is used for receiving a starting instruction recorded through a starting action triggered on the client;
the recording module is used for recording the behavior operated on the client in real time according to the starting instruction;
the generation module is used for generating a message file when a completion instruction for completing behavior recording is received through the client, wherein the message file stores the recorded behaviors in a form of a table;
and the first testing module is used for testing the server through the behavior recorded by the robot replay.
Optionally, the apparatus further comprises:
the second receiving module is used for receiving an editing instruction for adding judgment logic and editing robot attributes in the recorded table of the behaviors;
and the completion module is used for completing the test case according to the editing instruction.
Optionally, the first test module is further configured to
And replaying the test case by the robot to test the server.
Optionally, the apparatus further comprises:
and the marking module is used for carrying out rich text processing on the behavior operated on the client in real time according to the starting instruction and marking the user identification ID.
Optionally, the apparatus further comprises:
the third receiving module is used for receiving a replacement instruction for replacing the dynamic text in the table with the corresponding attribute of the robot;
and the replacing module is used for replacing the dynamic text in the table with the corresponding attribute of the robot according to the replacing instruction.
Optionally, the apparatus further comprises:
a fourth receiving module, configured to receive a pause instruction for pausing the recording behavior during the process of recording the behavior operated on the client in real time according to the start instruction;
and the pause module is used for pausing the recording behavior according to the pause instruction.
Optionally, the apparatus further comprises:
a fifth receiving module, configured to receive a recording instruction for continuing recording behavior;
and the continuous recording module is used for continuing recording according to the recording instruction.
Optionally, the apparatus further comprises:
the judging module is used for judging whether a server position pull-back mark exists or not if an abnormality occurs in the process of testing the server through the behavior of the robot replay recording;
the determining module is used for traversing from the current behavior number to determine the behavior number which is smaller than a preset value from the current behavior number position under the condition that the judging result is yes;
and the second testing module is used for testing the server by replaying the behavior from the determined behavior number.
Optionally, each behavior in the table includes at least a behavior number, a behavior type, a delay between behaviors, and parameters of a behavior, where the behavior type includes: sending a message, judging the attribute of the robot and judging the function.
According to another embodiment of the present invention, there is also provided a storage medium including a stored program, wherein the program, when run, performs the method described in any one of the above embodiments.
According to another embodiment of the present invention, there is also provided a processor for running a program, wherein the program when run performs the method as described in any of the above embodiments.
According to the method and the device, a starting instruction recorded through a starting action triggered on a client is received; recording the behavior operated on the client in real time according to the starting instruction; generating a message file when a completion instruction for completing the behavior recording is received through the client, wherein the message file stores the recorded behavior in a form of a table; the server is tested through the behavior recorded by the robot replay, so that the problem that the test is difficult to be completed for personnel without a programming foundation in the related technology is solved, and the operation threshold is low by adopting the robot behavior recording mode, so that the test can be easily completed by the testers without the programming foundation.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on the invention. In the drawings:
FIG. 1 is a schematic diagram of a prior art pressure test;
FIG. 2 is a block diagram of a hardware configuration of a mobile terminal according to a test method according to an embodiment of the present invention;
FIG. 3 is a flow chart of a test method according to an embodiment of the invention;
FIG. 4 is a schematic diagram of recording behavior according to an embodiment of the present invention;
FIG. 5 is a flow chart diagram of a logic determination according to an embodiment of the present invention;
FIG. 6 is a second flowchart of logic determination according to an embodiment of the present invention;
FIG. 7 is a schematic diagram I of a logic determination according to an embodiment of the present invention;
FIG. 8 is a second schematic diagram of logic determination according to an embodiment of the present invention;
fig. 9 is a block diagram of a test apparatus according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the drawings in conjunction with embodiments. It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be combined with each other.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order.
Example 1
The method embodiment provided in the first embodiment of the present application may be executed in a mobile terminal, a computer terminal or a similar computing device. Taking a mobile terminal as an example, fig. 2 is a block diagram of a hardware structure of a mobile terminal according to a test method of an embodiment of the present invention, as shown in fig. 2, the mobile terminal 10 may include one or more (only one is shown in fig. 2) processors 102 (the processors 102 may include, but are not limited to, a microprocessor MCU or a processing device such as a programmable logic device FPGA) and a memory 104 for storing data, and optionally, the mobile terminal may further include a transmission device 106 for communication functions and an input/output device 108. It will be appreciated by those skilled in the art that the structure shown in fig. 2 is merely illustrative and not limiting of the structure of the mobile terminal described above. For example, the mobile terminal 10 may also include more or fewer components than shown in FIG. 2 or have a different configuration than shown in FIG. 2.
The memory 104 may be used to store a computer program, for example, a software program of application software and a module, such as a computer program corresponding to a message receiving method in an embodiment of the present invention, and the processor 102 executes the computer program stored in the memory 104 to perform various functional applications and data processing, that is, implement the method described above. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the mobile terminal 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission means 106 is arranged to receive or transmit data via a network. The specific examples of networks described above may include wireless networks provided by the communication provider of the mobile terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, simply referred to as NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the internet wirelessly.
Based on the above mobile terminal, this embodiment provides a testing method, and fig. 3 is a flowchart of a testing method according to an embodiment of the present invention, as shown in fig. 3, where the flowchart includes the following steps:
step S302, receiving a starting instruction recorded through a starting action triggered on a client;
step S304, recording the operation on the client in real time according to the starting instruction;
step S306, when a completion instruction for completing the behavior recording is received through the client, a message file is generated, wherein the message file stores the recorded behavior in a form of a table;
step S308, testing the server through the behavior of the robot replay record.
Receiving a start instruction recorded by a start action triggered on the client through the steps S302 to S308; recording the behavior operated on the client in real time according to the starting instruction; generating a message file when a completion instruction for completing the behavior recording is received through the client, wherein the message file stores the recorded behavior in a form of a table; the server is tested through the behavior recorded by the robot replay, so that the problem that testing is difficult to be completed for a tester without a programming foundation in the related technology is solved, and the operation threshold is low by adopting the robot behavior recording mode, so that the tester without the programming foundation can also complete testing easily.
In the embodiment of the invention, rich text processing is performed on the behavior operated on the client in real time according to the starting instruction, and the dynamic text is marked, specifically, the user identification ID is marked, so that the behavior is replaced by the corresponding attribute of the robot, such as the ID of the robot, before the robot rebroadcasts the recorded behavior.
Optionally, before testing the server by the behavior of the robot replay recording, receiving a replacement instruction to replace dynamic text in the table with a corresponding attribute of the robot; and replacing the dynamic text in the table with the corresponding attribute of the robot according to the replacing instruction, specifically, for example, replacing the user ID in the table with the ID of the robot.
In the embodiment of the invention, in the process of recording the behavior, the operation can be paused, so that the operation is more humanized, and a pause instruction for pausing the recording behavior is received in the process of recording the behavior operated on the client in real time according to the starting instruction; and suspending recording according to the suspension instruction. Further, after the recording behavior is paused according to the pause instruction, receiving a recording instruction for continuing the recording behavior; and continuing recording according to the recording instruction. The experience effect of the user is further improved.
In the embodiment of the invention, if an abnormality occurs in the process of testing the server through the behavior of the robot replay recording, judging whether a server position pull-back mark exists or not; if the judgment result is yes, traversing from the current behavior number to determine the behavior number with the position smaller than the preset value from the current behavior number; and testing the server by replaying the behavior from the determined behavior number.
The test in the embodiment of the invention can be applied to stress test, software test and the like of the server such as games and the like.
Each behavior in the table of the embodiment of the invention at least comprises a behavior number, a behavior type, time delay between behaviors and parameters of the behaviors, wherein the behavior type comprises: sending a message, judging the attribute of the robot and judging the function.
The embodiment of the invention adopts a robot behavior recording mode, has low operation threshold, and can construct the testing environment of the functional tester through simple recording. Zero programming of the driving robot is truly realized. The product is obtained. Giving the tester an excellent experience. The robot is more similar to a shared resource, not only can a tester record to assist the development of the function and the primary function verification of the robot, but also can discover and solve the bug in time. The recording system can provide the demander with an ultra-high degree of freedom. The robot behavior can be randomly combined for recording. And the variable requirements are met. The robot will replay the behavior at the time of recording, what is seen. The recording is carried out by simply recording the own requirement and then adding the requirement into the judgment logic. So that the 0 programming base personnel can easily get up with his hands. Recording a case of a module is much more efficient than a developer writing a case of a module, it takes only five minutes, but 1-3 hours for writing a case of a module. The method specifically comprises the following steps:
fig. 4 is a schematic diagram of recording behavior according to an embodiment of the present invention, as shown in fig. 4, in which a user clicks a recording behavior button (as shown in fig. 4 (1)), then clicks recording (as shown in fig. 4 (2)), and then clicks on starting (as shown in fig. 4 (1)), so that recording can be started, and a recorded file is stored in a robot directory folder. After the recording is completed, displaying the recorded behaviors on a display interface, displaying the recorded behaviors in a form, wherein part of the recorded behaviors are shown in a table 1, and the user adds judgment logic and edits rich text in the form to complete the behavior recording.
TABLE 1
Description of each behavior:
above is the demo of the recorded case.
ActionKey: behavior numbering
ActionType: behavior type: 1-message; 2-judging the attribute; 3-tone judging function
ActionDelay-delay between behaviors
Para1, para2, para3, para4: parameters of each behavior.
The description of each behavior type is shown in table 2.
TABLE 2
ActionType | Para1 | Para2 | Para3 | Para4 |
1 | Message type | Message structure | Message structure name | |
2 | Robot attribute index | Compared to the value | Equally skip to a message | Unequal jumping to a message |
3 | Called judgment function | Function parameters | Returning true to jump | Return false jump to |
After the case is recorded, the robot traverses the behavior and executes logic jump. FIG. 5 is a flowchart I of a logic determination according to an embodiment of the present invention, as shown in FIG. 5, comprising:
step S501, judging whether a server position pull-back mark exists, executing step S502 if the judgment result is yes, and otherwise, returning;
step S502, traversing from the current behavior number;
step S503, judging whether to find the point with the current position less than 3;
step S504, if found, returning the behavior number;
in step S505, if not found, return to 0.
FIG. 6 is a second flowchart of a logic determination according to an embodiment of the present invention, as shown in FIG. 6, wherein first it is determined whether there is a server pull location and processing is performed according to the steps of FIG. 2.
Step S601, processor position is pulled back;
step S602, judging the message type:
step S603, when the type is 1, the messaging type is performed.
In step S604, the rich text is processed, and the rich text is replaced with the corresponding character.
Step S605, sending a message;
step S606, jump to the next action.
In step S607, when the type is 2, the robot attribute type behavior is determined. Traversing the attribute data of the robot layer by layer according to the index;
step S608, comparing with Para2, determining whether they are equal, if yes, executing step S609, otherwise executing step S610;
step S609, jumping to the value of Para3;
step S610 jumps to the value of Para4.
In step S611, when the type is 3, the function behavior is judged for the call.
Step S612, a judging function is called, whether the function return value is correct or not is judged, if yes, step S613 is executed, otherwise;
step S613, jumping to Para3;
step S614, jump to Para4.
The decision logic in the embodiment of the present invention further relates to a loop, fig. 7 is a schematic diagram of logic decision according to the embodiment of the present invention, and as shown in fig. 7, act 6 may be a call decision function type act, and if true, it jumps back to act 3, so that loop execution { act 3, act 4, act 5} may be implemented.
The judgment logic in the embodiment of the present invention also involves waiting, and fig. 8 is a schematic diagram of logic judgment according to the embodiment of the present invention, and as shown in fig. 8, if the behavior 4 judges that false is detected, the judgment logic jumps to itself, i.e. continues waiting, and if the judgment logic judges that true is detected, the judgment logic jumps to the next behavior.
The embodiment of the invention has simple operation, high efficiency and high degree of freedom, and can be obtained. Entry programming is a very difficult task for the person on the 0 programming basis. However, when the present invention is applied to a skilled person, the logic can be recorded and added to the skilled person, so that the logic of the program can be intuitively understood, and the present invention is very helpful for entering a small white program. The robot resources can be truly made to be common resources. Anyone can build his robot environment so that testing, development, operation, etc. can be applied.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
Example 2
In this embodiment, a test device is further provided, and the test device is used to implement the foregoing embodiments and preferred embodiments, which are not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Fig. 9 is a block diagram of a test apparatus according to an embodiment of the present invention, as shown in fig. 9, including:
a first receiving module 92, configured to receive a startup instruction recorded by a startup behavior triggered on the client;
a recording module 94, configured to record, in real time, the behavior operating on the client according to the start instruction;
a generating module 96, configured to generate a message file when a completion instruction for completing recording of an action is received by the client, where the message file stores the recorded action in a form of a table;
a first testing module 98, configured to test the server by replaying the recorded behavior by the robot.
Optionally, the apparatus further comprises:
the second receiving module is used for receiving an editing instruction for adding judgment logic and editing robot attributes in the recorded table of the behaviors;
and the completion module is used for completing the test case according to the editing instruction.
Optionally, the first testing module 98 is further configured to
And replaying the test case by the robot to test the server.
Optionally, the apparatus further comprises:
and the marking module is used for carrying out rich text processing on the behavior operated on the client in real time according to the starting instruction, and particularly can mark a user Identification (ID).
Optionally, the apparatus further comprises:
the third receiving module is used for receiving a replacement instruction for replacing the dynamic text in the table with the corresponding attribute of the robot;
and the replacing module is used for replacing the dynamic text in the table with the corresponding attribute of the robot according to the replacing instruction.
Optionally, the apparatus further comprises:
a fourth receiving module, configured to receive a pause instruction for pausing the recording behavior during the process of recording the behavior operated on the client in real time according to the start instruction;
and the pause module is used for pausing the recording behavior according to the pause instruction.
Optionally, the apparatus further comprises:
a fifth receiving module, configured to receive a recording instruction for continuing recording behavior;
and the continuous recording module is used for continuing recording according to the recording instruction.
Optionally, the apparatus further comprises:
the judging module is used for judging whether a server position pull-back mark exists or not if an abnormality occurs in the process of testing the server through the behavior of the robot replay recording;
the determining module is used for traversing from the current behavior number to determine the behavior number which is smaller than a preset value from the current behavior number position under the condition that the judging result is yes;
and the second testing module is used for testing the server by replaying the behavior from the determined behavior number.
Optionally, each behavior in the table includes at least a behavior number, a behavior type, a delay between behaviors, and parameters of a behavior, where the behavior type includes: sending a message, judging the attribute of the robot and judging the function.
It should be noted that each of the above modules may be implemented by software or hardware, and for the latter, it may be implemented by, but not limited to: the modules are all located in the same processor; alternatively, the above modules may be located in different processors in any combination.
Example 3
An embodiment of the invention also provides a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
Alternatively, in the present embodiment, the above-described storage medium may be configured to store a computer program for performing the steps of:
s11, receiving a starting instruction recorded through a starting action triggered on a client;
s12, recording the behavior operated on the client in real time according to the starting instruction;
s13, when a completion instruction for completing behavior recording is received through the client, generating a message file, wherein the message file stores the recorded behaviors in a form of a table;
s14, testing the server through the behavior of the robot replay record.
Alternatively, in the present embodiment, the storage medium may include, but is not limited to: a usb disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
Example 4
An embodiment of the invention also provides an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, where the transmission device is connected to the processor, and the input/output device is connected to the processor.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
s11, receiving a starting instruction recorded through a starting action triggered on a client;
s12, recording the behavior operated on the client in real time according to the starting instruction;
s13, when a completion instruction for completing behavior recording is received through the client, generating a message file, wherein the message file stores the recorded behaviors in a form of a table;
s14, testing the server through the behavior of the robot replay record.
Alternatively, specific examples in this embodiment may refer to examples described in the foregoing embodiments and optional implementations, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may alternatively be implemented in program code executable by computing devices, so that they may be stored in a memory device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps within them may be fabricated into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (7)
1. A method of testing, comprising:
receiving a starting instruction recorded through a starting action triggered on a client;
recording the behavior operated on the client in real time according to the starting instruction;
when a completion instruction for completing the behavior recording is received through the client, generating a message file, wherein the message file stores the recorded behaviors in a form of a table, each behavior in the table at least comprises a behavior number, a behavior type and parameters of time delay and behaviors among the behaviors, and the behavior type comprises: sending a message, judging the attribute of the robot and judging a function;
testing the server through the behavior of the robot replay record;
before testing the server by the behavior of the robot replay recording, the method further comprises:
receiving an editing instruction for adding judgment logic and editing robot attributes in the recorded table of the behaviors;
completing the test case according to the editing instruction;
testing the server through the behavior of robot replay recording includes:
the server is tested by replaying the test cases through the robot;
before testing the server by the robot replay of the recorded behavior, the method further comprises:
receiving a replacement instruction for replacing the dynamic text in the table with the corresponding attribute of the robot;
replacing the dynamic text in the table with the corresponding attribute of the robot according to the replacement instruction;
the method further comprises the steps of:
if abnormality occurs in the process of testing the server through the behavior of the robot replay recording, judging whether a server position pull-back mark exists or not;
if the judgment result is yes, traversing from the current behavior number to determine the behavior number with the position smaller than the preset value from the current behavior number;
and testing the server by replaying the behavior from the determined behavior number.
2. The method according to claim 1, wherein the method further comprises:
and carrying out rich text processing on the behavior operated on the client in real time according to the starting instruction.
3. The method according to claim 1, wherein the method further comprises:
receiving a pause instruction for pausing the recording behavior in the process of recording the behavior operated on the client in real time according to the starting instruction;
and suspending recording according to the suspension instruction.
4. The method of claim 3, wherein after said suspending recording acts in accordance with said suspending instructions, said method further comprises:
receiving a recording instruction for continuing recording behavior;
and continuing recording according to the recording instruction.
5. A test device, comprising:
the first receiving module is used for receiving a starting instruction recorded through a starting action triggered on the client;
the recording module is used for recording the behavior operated on the client in real time according to the starting instruction;
the generating module is used for generating a message file when a completion instruction for completing the recording of the behaviors is received through the client, wherein the message file stores the recorded behaviors in a form of a table, each behavior in the table at least comprises a behavior number, a behavior type, time delay between behaviors and parameters of the behaviors, and the behavior type comprises: sending a message, judging the attribute of the robot and judging a function;
the first testing module is used for testing the server through the behavior recorded by the robot replay;
the apparatus further comprises: the second receiving module is used for receiving an editing instruction for adding judgment logic and editing robot attributes in the recorded table of the behaviors; the completion module is used for completing the test case according to the editing instruction;
the apparatus further comprises: the third receiving module is used for receiving a replacement instruction for replacing the dynamic text in the table with the corresponding attribute of the robot; the replacing module is used for replacing the dynamic text in the table with the corresponding attribute of the robot according to the replacing instruction;
the apparatus further comprises: the judging module is used for judging whether a server position pull-back mark exists or not if an abnormality occurs in the process of testing the server through the behavior of the robot replay recording; the determining module is used for traversing from the current behavior number to determine the behavior number which is smaller than a preset value from the current behavior number position under the condition that the judging result is yes; and the second testing module is used for testing the server by replaying the behavior from the determined behavior number.
6. A storage medium comprising a stored program, wherein the program when run performs the method of any one of the preceding claims 1 to 4.
7. A processor for running a program, wherein the program when run performs the method of any one of the preceding claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811296302.2A CN109684196B (en) | 2018-11-01 | 2018-11-01 | Test method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811296302.2A CN109684196B (en) | 2018-11-01 | 2018-11-01 | Test method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109684196A CN109684196A (en) | 2019-04-26 |
CN109684196B true CN109684196B (en) | 2024-01-09 |
Family
ID=66185272
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811296302.2A Active CN109684196B (en) | 2018-11-01 | 2018-11-01 | Test method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109684196B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112463605B (en) * | 2020-11-26 | 2024-03-15 | 杭州网易云音乐科技有限公司 | Automatic test method and device, storage medium and electronic equipment |
CN112565648A (en) * | 2020-12-02 | 2021-03-26 | 用友网络科技股份有限公司 | Robot behavior acquisition method and device, electronic equipment and readable storage medium |
Citations (27)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1503168A (en) * | 2002-11-22 | 2004-06-09 | 深圳市中兴通讯股份有限公司 | Automatic test method for system products |
CN1601483A (en) * | 2004-10-22 | 2005-03-30 | 中国工商银行 | Automation software testing system based on script explanatory tool |
CN1773941A (en) * | 2004-11-11 | 2006-05-17 | 中兴通讯股份有限公司 | Performance test method and apparatus for identification service |
CN101241466A (en) * | 2007-02-08 | 2008-08-13 | 深圳迈瑞生物医疗电子股份有限公司 | Embedded software test method and system |
CN101620564A (en) * | 2008-06-30 | 2010-01-06 | 福建升腾资讯有限公司 | Method for automatically testing recording playback mode of terminal system |
US7793154B2 (en) * | 2006-11-30 | 2010-09-07 | International Business Machines Corporation | Method and implementation for automating processes using data driven pre-recorded transactions |
CN101902368A (en) * | 2010-06-10 | 2010-12-01 | 福建升腾资讯有限公司 | WEB performance test method based on simulation of bulk thin client operation and test system thereof |
CN102306122A (en) * | 2011-09-14 | 2012-01-04 | 北京星网锐捷网络技术有限公司 | Automated testing method and equipment |
CN103064781A (en) * | 2011-10-18 | 2013-04-24 | 飞图科技(北京)有限公司 | Mobile software automated testing method |
CN103593294A (en) * | 2013-11-21 | 2014-02-19 | 福建天晴数码有限公司 | Method and system for testing network game performance |
CN103729294A (en) * | 2013-12-30 | 2014-04-16 | 金蝶软件(中国)有限公司 | Method and device for testing performance script of application software |
CN104331477A (en) * | 2014-11-04 | 2015-02-04 | 哈尔滨工业大学 | Method for testing concurrency property of cloud platform based on federated research |
CN104391782A (en) * | 2014-03-28 | 2015-03-04 | 烽火通信科技股份有限公司 | Network-equipment managing-software client-end simulating method on basis of XML (X Extensive Markup Language) script |
CN104407980A (en) * | 2014-12-17 | 2015-03-11 | 用友软件股份有限公司 | Mobile application automated testing device and method |
CN104579822A (en) * | 2014-12-10 | 2015-04-29 | 华南理工大学 | Automatic performance test system and method of mobile application based on Http protocol |
CN104572444A (en) * | 2014-12-10 | 2015-04-29 | 网易(杭州)网络有限公司 | Cloud testing platform for game performance and testing method for cloud testing platform |
CN104699617A (en) * | 2015-03-31 | 2015-06-10 | 成都优聚软件有限责任公司 | Automated testing method for games |
CN104978261A (en) * | 2014-04-03 | 2015-10-14 | 腾讯科技(深圳)有限公司 | Test method, device and system of application program |
CN105512031A (en) * | 2015-11-30 | 2016-04-20 | 惠州Tcl移动通信有限公司 | Mobile terminal and automatic test method |
CN105740154A (en) * | 2016-03-03 | 2016-07-06 | 北京白鹭时代信息技术有限公司 | Webgame test script generation method and device |
CN105740153A (en) * | 2016-02-29 | 2016-07-06 | 网易(杭州)网络有限公司 | Cloud testing method and device |
CN105959177A (en) * | 2016-04-26 | 2016-09-21 | 网易(杭州)网络有限公司 | Game server stress test script generation method and device |
CN106528413A (en) * | 2016-10-27 | 2017-03-22 | 北京锐安科技有限公司 | Method and device for testing application program |
WO2017067441A1 (en) * | 2015-10-19 | 2017-04-27 | 广州爱九游信息技术有限公司 | Method, device and system for testing application, and non-transient machine-readable storage medium |
CN108132879A (en) * | 2017-12-21 | 2018-06-08 | 周舟 | Automated software testing method, platform, terminal and medium |
CN108923999A (en) * | 2018-05-31 | 2018-11-30 | 苏州蜗牛数字科技股份有限公司 | A kind of net surfing server automatic performance test method and system |
CN109669851A (en) * | 2018-12-25 | 2019-04-23 | 上海新炬网络技术有限公司 | Performance test script method for recording based on Selenium automation |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9129058B2 (en) * | 2013-02-19 | 2015-09-08 | Microsoft Technology Licensing, Llc | Application monitoring through continuous record and replay |
-
2018
- 2018-11-01 CN CN201811296302.2A patent/CN109684196B/en active Active
Patent Citations (27)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1503168A (en) * | 2002-11-22 | 2004-06-09 | 深圳市中兴通讯股份有限公司 | Automatic test method for system products |
CN1601483A (en) * | 2004-10-22 | 2005-03-30 | 中国工商银行 | Automation software testing system based on script explanatory tool |
CN1773941A (en) * | 2004-11-11 | 2006-05-17 | 中兴通讯股份有限公司 | Performance test method and apparatus for identification service |
US7793154B2 (en) * | 2006-11-30 | 2010-09-07 | International Business Machines Corporation | Method and implementation for automating processes using data driven pre-recorded transactions |
CN101241466A (en) * | 2007-02-08 | 2008-08-13 | 深圳迈瑞生物医疗电子股份有限公司 | Embedded software test method and system |
CN101620564A (en) * | 2008-06-30 | 2010-01-06 | 福建升腾资讯有限公司 | Method for automatically testing recording playback mode of terminal system |
CN101902368A (en) * | 2010-06-10 | 2010-12-01 | 福建升腾资讯有限公司 | WEB performance test method based on simulation of bulk thin client operation and test system thereof |
CN102306122A (en) * | 2011-09-14 | 2012-01-04 | 北京星网锐捷网络技术有限公司 | Automated testing method and equipment |
CN103064781A (en) * | 2011-10-18 | 2013-04-24 | 飞图科技(北京)有限公司 | Mobile software automated testing method |
CN103593294A (en) * | 2013-11-21 | 2014-02-19 | 福建天晴数码有限公司 | Method and system for testing network game performance |
CN103729294A (en) * | 2013-12-30 | 2014-04-16 | 金蝶软件(中国)有限公司 | Method and device for testing performance script of application software |
CN104391782A (en) * | 2014-03-28 | 2015-03-04 | 烽火通信科技股份有限公司 | Network-equipment managing-software client-end simulating method on basis of XML (X Extensive Markup Language) script |
CN104978261A (en) * | 2014-04-03 | 2015-10-14 | 腾讯科技(深圳)有限公司 | Test method, device and system of application program |
CN104331477A (en) * | 2014-11-04 | 2015-02-04 | 哈尔滨工业大学 | Method for testing concurrency property of cloud platform based on federated research |
CN104579822A (en) * | 2014-12-10 | 2015-04-29 | 华南理工大学 | Automatic performance test system and method of mobile application based on Http protocol |
CN104572444A (en) * | 2014-12-10 | 2015-04-29 | 网易(杭州)网络有限公司 | Cloud testing platform for game performance and testing method for cloud testing platform |
CN104407980A (en) * | 2014-12-17 | 2015-03-11 | 用友软件股份有限公司 | Mobile application automated testing device and method |
CN104699617A (en) * | 2015-03-31 | 2015-06-10 | 成都优聚软件有限责任公司 | Automated testing method for games |
WO2017067441A1 (en) * | 2015-10-19 | 2017-04-27 | 广州爱九游信息技术有限公司 | Method, device and system for testing application, and non-transient machine-readable storage medium |
CN105512031A (en) * | 2015-11-30 | 2016-04-20 | 惠州Tcl移动通信有限公司 | Mobile terminal and automatic test method |
CN105740153A (en) * | 2016-02-29 | 2016-07-06 | 网易(杭州)网络有限公司 | Cloud testing method and device |
CN105740154A (en) * | 2016-03-03 | 2016-07-06 | 北京白鹭时代信息技术有限公司 | Webgame test script generation method and device |
CN105959177A (en) * | 2016-04-26 | 2016-09-21 | 网易(杭州)网络有限公司 | Game server stress test script generation method and device |
CN106528413A (en) * | 2016-10-27 | 2017-03-22 | 北京锐安科技有限公司 | Method and device for testing application program |
CN108132879A (en) * | 2017-12-21 | 2018-06-08 | 周舟 | Automated software testing method, platform, terminal and medium |
CN108923999A (en) * | 2018-05-31 | 2018-11-30 | 苏州蜗牛数字科技股份有限公司 | A kind of net surfing server automatic performance test method and system |
CN109669851A (en) * | 2018-12-25 | 2019-04-23 | 上海新炬网络技术有限公司 | Performance test script method for recording based on Selenium automation |
Also Published As
Publication number | Publication date |
---|---|
CN109684196A (en) | 2019-04-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10866978B2 (en) | Techniques to respond to user requests using natural-language machine learning based on branching example conversations | |
CN108845930B (en) | Interface operation test method and device, storage medium and electronic device | |
CN108228444B (en) | Test method and device | |
CN110912809B (en) | Information sharing chain generation method and device, electronic equipment and storage medium | |
CN109684196B (en) | Test method and device | |
CN112463634A (en) | Software testing method and device under micro-service architecture | |
CN105447614A (en) | Information processing apparatus, method and program | |
CN112148607A (en) | Interface testing method and device for service scene | |
CN105100244A (en) | Head portrait setting method and apparatus | |
CN112702225B (en) | Cloud platform performance testing device and method, computer terminal and readable storage medium | |
CN111178846B (en) | Workflow file generation method, device, equipment and storage medium | |
CN110427277B (en) | Data verification method, device, equipment and storage medium | |
CN113495723B (en) | Method, device and storage medium for calling functional component | |
CN111860855B (en) | Behavior-guided resource release strategy generation method and device | |
CN110580172B (en) | Configuration rule verification method and device, storage medium and electronic device | |
CN113485864A (en) | Abnormality detection method, abnormality analysis method, abnormality detection apparatus, abnormality analysis apparatus, electronic device, and storage medium | |
CN113934421A (en) | Page path writing method, device and equipment of application program and storage medium | |
CN109992482B (en) | Method, device, computer equipment and storage medium for observing middleware destructor | |
CN109150951B (en) | Method and device for starting Activity of Android system | |
CN109985387B (en) | Automatic testing method and device | |
CN112199229A (en) | Data processing method, device, equipment and storage medium | |
CN113760518A (en) | Information processing method, device and storage medium | |
CN114371866A (en) | Version reconfiguration test method, device and equipment of service system | |
CN111562982B (en) | Method and device for processing request data, computer readable storage medium and electronic equipment | |
CN110659204A (en) | Code detection method, device and medium |
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 |