CN110727578B - Automatic testing method and device for intelligent terminal - Google Patents
Automatic testing method and device for intelligent terminal Download PDFInfo
- Publication number
- CN110727578B CN110727578B CN201910811414.5A CN201910811414A CN110727578B CN 110727578 B CN110727578 B CN 110727578B CN 201910811414 A CN201910811414 A CN 201910811414A CN 110727578 B CN110727578 B CN 110727578B
- Authority
- CN
- China
- Prior art keywords
- code
- intelligent terminal
- test
- operation command
- tested
- 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
- 238000012360 testing method Methods 0.000 title claims abstract description 337
- 238000013515 script Methods 0.000 claims abstract description 164
- 238000000034 method Methods 0.000 claims abstract description 56
- 238000012795 verification Methods 0.000 claims description 71
- 238000003780 insertion Methods 0.000 claims description 20
- 230000037431 insertion Effects 0.000 claims description 20
- 238000012545 processing Methods 0.000 claims description 15
- 238000010998 test method Methods 0.000 claims description 12
- 238000001914 filtration Methods 0.000 claims description 10
- 238000012544 monitoring process Methods 0.000 claims description 8
- 238000006243 chemical reaction Methods 0.000 claims description 5
- 238000010276 construction Methods 0.000 claims description 4
- 238000010586 diagram Methods 0.000 description 11
- 230000008569 process Effects 0.000 description 9
- 230000006870 function Effects 0.000 description 6
- 238000011056 performance test Methods 0.000 description 6
- 238000012423 maintenance Methods 0.000 description 4
- 238000011161 development Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
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/3684—Test management for test design, e.g. generating new test cases
-
- 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
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Test And Diagnosis Of Digital Computers (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses an automatic testing method and device for an intelligent terminal, and belongs to the field of terminal testing, wherein the method at least comprises the steps of recording testing scripts of the intelligent terminal to be tested and playing back the testing scripts of the intelligent terminal to be tested; the step of recording the test script of the intelligent terminal to be tested at least comprises the following steps: the control end outputs a first operation command aiming at the intelligent terminal to be tested according to a preset test case; the test terminal monitors a first operation command of the control terminal, converts the first operation command into a corresponding first code, converts the first code into a corresponding test script in real time and stores the test script; the step of playing back the test script of the intelligent terminal to be tested at least comprises the following steps: when the test terminal executes the test script, a second code corresponding to the test script is sent to the intelligent terminal to be tested; the intelligent terminal to be tested receives the second code and executes the operation corresponding to the second code, the method is simple to operate, the use difficulty is low, a tester without code capability can also use and develop an automatic test script, and the method is suitable for zero-base testers.
Description
Technical Field
The invention relates to the field of terminal testing, in particular to an intelligent terminal automatic testing method and device.
Background
Intelligent terminals are a class of embedded computer system devices, so that their architecture framework is consistent with the embedded system architecture; meanwhile, the intelligent terminal is used as an application direction of the embedded system, and the application scene is set clearly, so that the system structure is clearer than that of a common embedded system, the granularity is finer, and the intelligent terminal has the characteristics of itself. At present, android platform intelligent terminals are common, such as android platform intelligent televisions, android platform intelligent air conditioners and other devices.
For Android smart televisions, the current common automated test schemes are: robotium Monkeyrunner UIAutomator, etc., all of which require various development languages by the user. In addition, these solutions have the further disadvantage of: the existing test method is not suitable for people without development experience because of higher learning cost, higher use case maintenance cost and more complex operation (such as environment construction and deployment).
Therefore, the existing test method has higher professional degree, has higher professional requirement for testers, is not suitable for common operators, and has larger limitation in use.
Disclosure of Invention
In order to solve the technical problems, the invention provides an intelligent terminal automatic test method and device, which are simple to operate and low in use difficulty, and can be used by a tester without proxy capability.
The technical scheme provided by the embodiment of the invention is as follows:
In a first aspect, an automatic testing method for an intelligent terminal is provided, where the method at least includes a step of recording a testing script of the intelligent terminal to be tested and a step of playing back the testing script of the intelligent terminal to be tested;
the recording of the test script of the intelligent terminal to be tested at least comprises the following steps:
The control end outputs a first operation command aiming at the intelligent terminal to be tested according to a preset test case;
The test terminal monitors a first operation command of the control terminal, converts the first operation command into a corresponding first code, converts the first code into a corresponding test script in real time and stores the test script;
The playback of the test script of the intelligent terminal to be tested at least comprises the following steps:
The test terminal converts the test script into a corresponding second code and sends the second code to the intelligent terminal to be tested;
and the intelligent terminal to be tested receives the second code and executes the operation corresponding to the second code.
In some preferred embodiments, the test terminal monitors a first operation command of the control terminal, converts the first operation command into a corresponding first code, and converts the first code into a corresponding test script in real time and stores the test script, which specifically includes:
the test end receives the first operation instruction in real time;
converting the first operation instruction into a corresponding first code;
Filtering the first code to obtain a corresponding code;
according to the code number, matching and displaying corresponding operation command characters;
and saving the operation command words obtained by matching as test scripts.
In some preferred embodiments, before the control end outputs the first operation instruction for the intelligent terminal to be tested according to the preset test case, the method further includes:
A database is built in advance, and the first code, the code number and the operation command word and the corresponding relation between the first code and the code number and between the code number and the operation command word are stored in the database.
In some preferred embodiments, when the test terminal executes the test script, the sending a second code corresponding to the test script to the intelligent terminal to be tested specifically includes:
when the test terminal executes the test script, converting the operation command text into a second code which can be identified by the intelligent terminal to be tested;
and sending the second code to the intelligent terminal to be tested.
In some preferred embodiments, the smart terminal to be tested receives the second code and performs an operation corresponding to the second code, which specifically includes:
The intelligent terminal to be tested receives the second code;
And the intelligent terminal to be tested executes corresponding operation according to the second code so as to play back the test script of the intelligent terminal to be tested.
In some preferred embodiments, the step of recording the test script of the intelligent terminal to be tested further includes:
When the verification point is required to be inserted, based on the current test script, the test terminal receives a verification point insertion instruction input by a user and adds a corresponding verification method to the verification point.
In some preferred embodiments, when the preset test case is a complex case, the step of recording the test script of the intelligent terminal to be tested further includes:
Based on the current test script, the test terminal receives the input additional verification insertion content and adds a corresponding verification method; the additional verification inserted content at least comprises one or more of adding waiting time, adding circulation, assisting, waiting for text to appear, quickly starting a status bar and acquiring current data.
The second aspect also provides an intelligent terminal automatic test method, the test method at least comprises the steps of recording the test script of the intelligent terminal to be tested and playing back the test script of the intelligent terminal to be tested;
The recording of the test script of the intelligent terminal to be tested comprises the following steps:
the monitoring control terminal outputs a first operation command aiming at the intelligent terminal to be tested according to a preset test case, converts the first operation command into a corresponding first code, converts the first code into a corresponding test script in real time and stores the test script;
The method for playing back the test script of the intelligent terminal to be tested comprises the following steps:
and converting the test script into a corresponding second code, and sending the second code to the intelligent terminal to be tested so that the intelligent terminal to be tested can execute the operation corresponding to the second code.
In a third aspect, there is also provided an intelligent terminal automation test device, the device at least including:
And an output module: the control terminal is used for outputting a first operation command aiming at the intelligent terminal to be tested according to a preset test case;
a first processing module: the testing terminal is used for monitoring a first operation command of the control terminal, converting the first operation command into a corresponding first code, converting the first code into a corresponding test script in real time and storing the test script;
and a sending module: the testing terminal is used for converting the test script into a corresponding second code and sending the second code to the intelligent terminal to be tested;
And a second processing module: and the intelligent terminal to be tested is used for receiving the second code and executing the operation corresponding to the second code.
In some preferred embodiments, the first processing module includes at least:
a first receiving unit: the testing end is used for receiving the first operation instruction in real time;
conversion unit: the first operation instruction is converted into corresponding first code;
And a filtering unit: the code generation module is used for filtering the first code to obtain a corresponding code;
matching unit: the code number is used for matching and displaying corresponding operation command characters according to the code number;
a storage unit: and the operation command words obtained by matching are stored as test scripts.
In some preferred embodiments, the apparatus further comprises:
and a database construction module: the code and operation command word corresponding relation between the first code and between the code and operation command word are stored.
In some preferred embodiments, the transmitting module includes at least:
Conversion unit: when the testing terminal executes the testing script, the operation command text is converted into a second code which can be identified by the intelligent terminal to be tested;
A transmitting unit: and the second code is used for sending the second code to the intelligent terminal to be tested.
In some preferred embodiments, the second processing module includes at least:
a second receiving unit: the intelligent terminal to be tested is used for receiving the second code;
An execution unit: and the intelligent terminal to be tested executes corresponding operation according to the second code so as to play back the test script of the intelligent terminal to be tested.
In some preferred embodiments, the apparatus further comprises:
The verification point insertion module: and the test terminal is used for receiving the verification point insertion instruction input by the user based on the current test script and adding a corresponding verification method to the verification point when the verification point needs to be inserted.
In some preferred embodiments, the apparatus further comprises:
An additional verification insertion module: the testing terminal is used for receiving input additional verification insertion content based on the current test script and adding a corresponding verification method; the additional verification inserted content at least comprises one or more of adding waiting time, adding circulation, assisting, waiting for text to appear, quickly starting a status bar and acquiring current data.
In a fourth aspect, there is also provided an intelligent terminal automation test device, the accounting device at least includes:
And a third processing module: the monitoring control terminal is used for outputting a first operation command aiming at the intelligent terminal to be tested according to a preset test case, converting the first operation command into a corresponding first code, converting the first code into a corresponding test script in real time and storing the corresponding test script;
The execution module: and the test script is used for converting the test script into a corresponding second code, and the second code is sent to the intelligent terminal to be tested so that the intelligent terminal to be tested can execute the operation corresponding to the second code.
Compared with the prior art, the invention has the beneficial effects that:
the invention protects an automatic test method and device of an intelligent terminal, the method sends the first operation command to the terminal to be tested through the test terminal when the test script is recorded, the test terminal monitors the first operation command and converts it into the first code, then converts it into the test script to save, when replaying, the test terminal converts the test script into the second code and sends it to the terminal to be tested, the terminal to be tested executes the code to replay the test case, therefore the method only needs to complete the real-time recording of the test script corresponding to the execution operation on the intelligent terminal to be tested under the control of the control terminal, after saving the test script, the test terminal controls the intelligent terminal to be tested to replay the test script to perform the performance test, so the method is simple to operate, the use difficulty is low, even the test personnel without the code capability can use and develop the automatic test script, and the method is suitable for zero-base test personnel to use;
The recording and playback processes of the method are carried out separately, and the test script can be played back at any time for testing, so that the intelligent terminal performance test can be realized at any time, and thus, different use cases can be designed to realize the tests of 'function', 'stability', 'pressure', and the like which are not easy to be completed manually before or have high repeatability;
the method can be directly used after the connection among the intelligent terminal to be tested, the testing end and the control end is established, and the environment does not need to be deployed, so that the learning and use cost of the device is lower, and the maintenance cost is low;
The scheme of the application only needs to realize any technical effect.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of an automated testing method for an intelligent terminal according to a first embodiment of the present invention;
FIG. 2 is a diagram of a test interface after a test device is started in accordance with a first embodiment of the present invention;
FIG. 3 is a diagram of a portion of a test interface in accordance with an embodiment of the present invention;
FIG. 4 is a schematic diagram of a verification point insertion interface in accordance with a first embodiment of the present invention;
FIG. 5 is a diagram of a complex use case insertion interface according to a first embodiment of the present invention;
FIG. 6 is a schematic diagram of an interface when a test case is played back in the first embodiment of the present invention;
FIG. 7 is a flowchart of an automated testing method for an intelligent terminal according to a second embodiment of the present invention;
fig. 8 is a schematic structural diagram of an automatic testing device for an intelligent terminal in a third embodiment of the present invention;
Fig. 9 is a schematic structural diagram of an intelligent terminal automatic test device in a fourth embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The application aims to provide an automatic testing method and device for an intelligent terminal, when a testing script is recorded, a first operation command is sent to the terminal to be tested through a testing end, the testing end monitors the first operation command and converts the first operation command into a first code, then the first code is converted into the testing script for storage, when the testing script is played back, the testing end converts the testing script into a second code and sends the second code to the terminal to be tested, and the terminal to be tested executes the code to play back the test case.
Example 1
As shown in fig. 1, the embodiment provides an automatic testing method for an intelligent terminal, which belongs to the field of terminal testing and is shown in fig. 1, and the automatic testing method for the intelligent terminal at least comprises the following steps:
s1, recording a test script of an intelligent terminal to be tested;
s2, playing back the test script of the intelligent terminal to be tested.
After step S1 is completed, the obtained test script may be stored, and when the test is required, the use case test tool is started to select the corresponding test script for use case playback as described in step S2, thereby implementing the automatic test of the intelligent terminal.
The intelligent terminal related in the embodiment is one of terminal devices such as an intelligent television and an intelligent air conditioner, and an operating system which is generally configured is an Android system. For convenience of description, the embodiment specifically describes the intelligent terminal automation test method by taking intelligent electricity of the android system as an example.
The step S1 of recording the test script of the intelligent terminal to be tested at least comprises the following steps:
S11, the control end outputs a first operation command aiming at the intelligent terminal to be tested according to a preset test case.
The test cases are designed in advance according to the test purpose of the user, and different test cases are designed according to different performances of the intelligent terminal.
Preferably, the control end in this embodiment is a remote controller, the intelligent terminal to be tested is an intelligent television, and the test end is a test device.
Preset test cases such as a key command "up-down-left-right-homepage-back". And outputting the identifiable 'up-down-left-right-homepage-return' operation command to the intelligent television by the remote controller through a key at the preset initial position of the test initial page of the intelligent terminal to be tested. And the intelligent television receives the operation command, and starts from the test initial page, and executes the operation command of 'up-down-left-right-homepage-return'. The operation command is usually an infrared signal or a bluetooth signal, and this embodiment takes an infrared signal as an example.
Of course, before step S11, communication connection needs to be established between the intelligent terminal to be tested and the testing terminal, and the communication connection mode may be one of bluetooth connection, WIFI connection or other connection modes, which is not limited in this embodiment.
S12, the testing end monitors a first operation command of the control end, converts the first operation command into a corresponding first code, converts the first code into a corresponding test script in real time and stores the corresponding test script.
Specifically, the step S12 specifically includes:
a. the testing end receives the first operation instruction in real time;
b. converting the first operation instruction into a corresponding first code;
c. Filtering the first code to obtain a corresponding code;
d. According to the code number, matching and displaying corresponding operation command characters;
e. And saving the operation command words obtained by matching as test scripts.
Fig. 2 is a diagram of a test interface after a test device is started, where the left side can input an IP address of an intelligent television and perform network connection, the right side is a control button for recording, stopping recording, etc., the middle upper end records a key record content (i.e. a test script), and the lower end displays a current key content. Therefore, after clicking the record button, the test device starts to monitor the first operation command sent by the remote controller key, and acquires the state code of the smart television in real time through the command adb SHELL GETEVENT.
Illustratively, when the preset test case is "up-down-left-right-home-back", the "record button" in the test interface is clicked and the test equipment starts recording the case. At this time, the corresponding position of the remote controller is pressed down in sequence, and a corresponding first operation command is sent out.
When the remote controller presses the first operation command "up", the test end receives the first operation command in the form of the infrared signal in real time, converts the signal into a first code corresponding to "up", filters the first code to obtain code "0067", and matches the operation command word "up" corresponding to code "0067" through a database built in advance in the test equipment, as shown in fig. 3, and at the moment, the "up" is displayed at the current key. Illustratively, the snoop code in this embodiment is as follows:
Therefore, before step S11, the following steps are further included:
S0, a database is built in advance, and the database stores a first code, a code number and an operation command word, and the corresponding relation between the first code and the code number and between the code number and the operation command word. Thus, after the testing end obtains the first operation command and converts the first operation command into the code, the corresponding code number and the operation command text to be displayed can be quickly matched, and a test script is formed.
Of course, in the actual testing process, the preset test cases are not as simple as "up-down-left-right-homepage-return", and there are often cases where the preset test cases need to be inserted with verification points or are additional verification.
Specifically, when the preset test case needs to be inserted into the verification point, step S1 further includes:
based on the current test script, the test terminal receives a verification point insertion instruction input by a user and adds a corresponding verification method to the verification point.
Generally, during or after recording the current script, the user can manually insert the verification point and the verification method into the test interface. Fig. 4 is a schematic diagram of a corresponding verification point insertion interface, where the verification point may be a picture, a picture text, a text, or a focus text. The verification points of each type can be subdivided according to the specific situation of the verification point in the current test process, for example, the picture comparison type verification points can comprise the situation of adding local picture comparison or adding full picture comparison, and the like, and can be added or deleted according to the actual use situation, which is not limited, and in addition, the verification method corresponding to the corresponding verification point is common knowledge in the field, and is not repeated herein.
When the preset test case needs to be inserted with additional verification, step S1 further includes:
Based on the current test script, the test terminal receives input additional verification inserted content and adds a corresponding verification method, wherein the additional verification inserted content at least comprises one or more of adding waiting time, adding circulation, assisting, waiting for text to appear, quickly starting a status bar and acquiring current data.
Illustratively, if there is 15s of advertisement latency while playing a video, the remote control is not operating during the latency, so the test equipment cannot record to the latency. Thus, the latency 15s can be entered in the "wait for several seconds" verification point by inserting the interface schematic through a complex use case as shown in FIG. 5. Of course, the number of loops may also be set at the "loop" verification point in the complex use case insertion schematic interface, the current UI data may be checked at the "auxiliary" verification point, the words waiting for appearance may be checked at the "waiting for appearance" verification point, and so on, and similarly, the specific verification point types and verification methods may be added and deleted according to the actual requirements, which is not limited herein.
After finishing recording the single test script, storing the test script in a system database, and playing back the test script when the test is performed next time.
Of course, in order to view the test case at the time of recording, a playback function may also be performed during recording. The method comprises the following steps: in the single recording, after the recording of part of the test script is completed, the recording can be stopped, the playback is executed to check the recording condition of the completed part, and after the playback is stopped, the recording of another part can be continued until the recording of the test script is completed.
Further, the step S2 of playing back the test script of the intelligent terminal to be tested at least includes the following sub-steps:
and S21, when the test terminal executes the test script, sending a second code corresponding to the test script to the intelligent terminal to be tested. Specifically, the step S21 specifically includes the following sub-steps:
a. when the test terminal executes the test script, converting the operation command text into a second code which can be identified by the intelligent terminal to be tested;
b. And sending the second code to the intelligent terminal to be tested.
For example, when a certain performance of the smart tv needs to be tested, a corresponding recorded test script is selected from the test device database, and as shown in fig. 6, the test script is opened and executed. When the test script is executed, the test equipment firstly converts the operation command words contained in the test script into corresponding second codes which can be identified by the intelligent television, and the second codes are sent to the intelligent television through WIFI.
S22, the intelligent terminal to be tested receives the second code and executes the operation corresponding to the second code. Specifically, the step S22 specifically includes the following sub-steps:
a. the intelligent terminal to be tested receives the second code;
b. And the intelligent terminal to be tested executes corresponding operation according to the second code so as to play back the test script of the intelligent terminal to be tested.
Therefore, the testing equipment sends out the second code, and after the intelligent television receives the second code, the intelligent television executes the operation corresponding to the second code, and in fact, the testing equipment achieves the same operation effect as the remote controller.
Illustratively, for example, the test script is "up", and the code "adb shell input keyevent 19" that is recognizable by the smart tv is converted into "up" during playback, and is sent to the smart tv, i.e., played back.
The code is as follows:
preferably, in a specific operation process, the playback button is in a color development state during the playback process, and the normal state is restored after the execution is completed.
Therefore, the embodiment provides a recording and playback technology of a test script in an automatic test method of an intelligent terminal, and the performance of the intelligent terminal can be evaluated or judged through playback of test cases. The evaluation or judgment may be performed manually by a tester, or may be performed intelligently by machine learning, etc., and the comparison of the embodiment is not limited.
Therefore, the embodiment provides an automatic test method for an intelligent terminal, when a test script is recorded, a first operation command is sent to the terminal to be tested through a test terminal, the test terminal monitors the first operation command and converts the first operation command into a first code, then the first code is converted into the test script for storage, when the test script is played back, the test terminal converts the test script into a second code and sends the second code to the terminal to be tested, and the terminal to be tested executes the code to play back the test case, so that the method only needs to complete the real-time recording of the test script corresponding to the execution operation on the intelligent terminal to be tested under the control of a control terminal, and after the test script is stored, the test script is controlled by the test terminal to play back the test script to perform performance test, so that the method is simple to operate, has low use difficulty, and even a tester without code capability can use and develop the automatic test script, and is suitable for zero-base testers to use.
In addition, the recording and playback processes of the method are carried out separately, and the test script can be played back at any time for testing, so that the intelligent terminal performance test can be realized at any time, and thus, different test cases can be designed to realize the tests such as 'function', 'stability', 'pressure', and the like which are not easy to be completed manually before or have high repeatability;
Furthermore, the method can be directly used after the connection among the intelligent terminal to be tested, the testing terminal and the control terminal is established, and an environment does not need to be deployed, so that the learning and use cost of the device is lower, and the maintenance cost is low.
Example two
As shown in fig. 7, this embodiment provides an automatic testing method for an intelligent terminal, where the testing method at least includes:
S1', recording a test script of an intelligent terminal to be tested;
S2', playing back a test script of the intelligent terminal to be tested;
the step of recording the test script of the intelligent terminal to be tested comprises the following steps:
The monitoring control end outputs a first operation command aiming at the intelligent terminal to be tested according to a preset test case, converts the first operation command into a corresponding first code, converts the first code into a corresponding test script in real time and stores the test script.
Specifically, step S1' comprises at least the following sub-steps:
a. Receiving a first operation instruction which is output by a control terminal according to a preset test case and aims at an intelligent terminal to be tested in real time;
b. converting the first operation instruction into a corresponding first code;
c. Filtering the first code to obtain a corresponding code;
d. According to the code number, matching and displaying corresponding operation command characters;
e. And saving the operation command words obtained by matching as test scripts.
Before step S1', the method further comprises the following steps:
S0', a database is built in advance, and the database stores a first code, a code number and an operation command word, and the corresponding relation between the first code and the code number and between the code number and the operation command word. Thus, after the first operation command is obtained and converted into the code, the corresponding code number and the operation command text to be displayed can be quickly matched, and the test script is formed.
Further, when the preset test case needs to be inserted into the verification point, step S1' further includes:
based on the current test script, receiving a verification point insertion instruction input by a user and adding a corresponding verification method to the verification point.
When the preset test case needs to be inserted with additional verification, step S1' further includes:
Based on the current test script, input additional verification insert content is received and a corresponding verification method is added.
S2', the step of playing back the test script of the intelligent terminal to be tested at least comprises the following steps:
And converting the test script into a corresponding second code, and sending the second code to the intelligent terminal to be tested so that the intelligent terminal to be tested can execute the operation corresponding to the second code.
Further, step S2' is at least specifically:
And when the test script is executed, sending a second code corresponding to the test script to the intelligent terminal to be tested. And the intelligent terminal to be tested receives the second code and executes the operation corresponding to the second code so as to enable the tester to evaluate or judge the performance.
The present embodiment is consistent with the central idea of the first embodiment, so that the technical solution and the corresponding technical effects in the present embodiment are not fully described, please refer to the first embodiment specifically.
Therefore, the embodiment provides an automatic test method for an intelligent terminal, when a test script is recorded, a first operation command is sent to the terminal to be tested through a test terminal, the test terminal monitors the first operation command and converts the first operation command into a first code, then the first code is converted into the test script for storage, when the test script is played back, the test terminal converts the test script into a second code and sends the second code to the terminal to be tested, and the terminal to be tested executes the code to play back the test case, so that the method only needs to record the test script corresponding to the execution operation on the intelligent terminal to be tested in real time under the control of a control terminal, and after the test script is stored, the test script is played back by controlling the intelligent terminal to be tested to perform performance test.
In addition, the recording and playback processes of the method are carried out separately, and the test script can be played back at any time for testing, so that the intelligent terminal performance test can be realized at any time, and thus, different use cases can be designed to realize the tests of 'function', 'stability', 'pressure', and the like which are not easy to be completed manually before or have high repeatability;
Furthermore, the method can be directly used after the connection among the intelligent terminal to be tested, the testing terminal and the control terminal is established, and an environment does not need to be deployed, so that the learning and use cost of the device is lower, and the maintenance cost is low.
Example III
To execute the automatic testing method for the intelligent terminal in the first embodiment, the embodiment provides an automatic testing device 100 for the intelligent terminal.
Fig. 8 is a schematic structural diagram of the automatic testing device 100 for an intelligent terminal, and as shown in fig. 8, the device 100 at least includes:
Output module 1: the control terminal is used for outputting a first operation command aiming at the intelligent terminal to be tested according to a preset test case;
The first processing module 2: the testing terminal monitors a first operation command of the control terminal, converts the first operation command into a corresponding first code, converts the first code into a corresponding testing script in real time and stores the testing script;
And a transmitting module 3: the testing terminal is used for converting the test script into a corresponding second code and sending the second code to the intelligent terminal to be tested;
The second processing module 4: and the intelligent terminal to be tested is used for receiving the second code and executing the operation corresponding to the second code.
In some preferred embodiments, the first processing module 2 comprises at least:
the first receiving unit 21: the testing terminal is used for receiving the first operation instruction in real time;
Conversion unit 22: the first operation instruction is converted into corresponding first code;
the filter unit 23: the code processing module is used for filtering the first code to obtain a corresponding code;
matching unit 24: the code number is used for matching and displaying corresponding operation command characters according to the code number;
The holding unit 25: and the operation command words obtained by matching are stored as test scripts.
In some preferred embodiments, the apparatus 100 further comprises:
Database construction module 5: the method is used for pre-constructing a database, and the database stores a first code, a code number and an operation command text and the corresponding relation between the first code and the code number and between the code number and the operation command text.
In some preferred embodiments, the sending module 3 comprises at least:
Conversion unit 31: when the testing terminal executes the testing script, the operation command text is converted into a second code which can be identified by the intelligent terminal to be tested;
the transmission unit 32: and the second code is used for sending the second code to the intelligent terminal to be tested.
In some preferred embodiments, the second processing module 4 comprises at least:
The second receiving unit 41: the method comprises the steps that the intelligent terminal to be tested receives a second code;
execution unit 42: and the intelligent terminal to be tested executes corresponding operation according to the second code so as to play back the test script of the intelligent terminal to be tested.
In some preferred embodiments, the apparatus 100 further comprises:
Verification point insertion module 6: and the testing end is used for receiving the verification point insertion instruction input by the user based on the current test script and adding a corresponding verification method to the verification point when the verification point needs to be inserted.
In some preferred embodiments, the apparatus further comprises:
Additional authentication insertion module 7: the testing terminal is used for receiving input additional verification insertion content based on the current test script and adding a corresponding verification method; the additional verification inserted content at least comprises one or more of adding waiting time, adding circulation, assisting, waiting for text to appear, quickly starting a status bar and acquiring current data.
It should be noted that: when triggering the intelligent terminal automatic test service, the intelligent terminal automatic test device provided by the embodiment only performs illustration by dividing the functional modules, and in practical application, the functional allocation can be completed by different functional modules according to the needs, namely, the internal structure of the device is divided into different functional modules so as to complete all or part of the functions described above. In addition, the embodiment of the automatic testing device for the intelligent terminal provided in the foregoing embodiment and the embodiment of the automatic testing method for the intelligent terminal in the first embodiment belong to the same concept, that is, the device is based on the method, and the specific implementation process of the device is detailed in the method embodiment and will not be described herein.
Example IV
In order to execute the automatic testing method of the intelligent terminal in the second embodiment, the embodiment provides an automatic testing device 200 of the intelligent terminal, fig. 9 is a schematic structural diagram of the automatic testing device 200 of the intelligent terminal, and as shown in fig. 9, the automatic testing device 200 of the intelligent terminal at least further includes:
the third processing module 8: the monitoring control terminal is used for outputting a first operation command aiming at the intelligent terminal to be tested according to a preset test case, converting the first operation command into a corresponding first code, converting the first code into a corresponding test script in real time and storing the test script;
execution module 9: and the testing script is used for converting the testing script into a corresponding second code, and the second code is sent to the intelligent terminal to be tested so that the intelligent terminal to be tested can execute the operation corresponding to the second code.
It should be noted that: when triggering the intelligent terminal automatic test service, the intelligent terminal automatic test device provided by the embodiment only performs illustration by dividing the functional modules, and in practical application, the functional allocation can be completed by different functional modules according to the needs, namely, the internal structure of the device is divided into different functional modules so as to complete all or part of the functions described above. In addition, the embodiment of the automatic testing device for the intelligent terminal provided in the foregoing embodiment and the embodiment of the automatic testing method for the intelligent terminal in the second embodiment belong to the same concept, that is, the device is based on the method, and the specific implementation process of the device is detailed in the method embodiment and will not be described herein.
Those of ordinary skill in the art will appreciate that all or a portion of the steps implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and the above storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The foregoing is only illustrative of the present invention and is not to be construed as limiting thereof, but rather as various modifications, equivalent arrangements, improvements, etc., within the spirit and principles of the present invention.
Claims (7)
1. An automatic testing method of an intelligent terminal is characterized by at least comprising the steps of recording a testing script of the intelligent terminal to be tested and playing back the testing script of the intelligent terminal to be tested;
the recording of the test script of the intelligent terminal to be tested at least comprises the following steps:
The control end outputs a first operation command aiming at the intelligent terminal to be tested according to a preset test case;
The test terminal monitors a first operation command of the control terminal, converts the first operation command into a corresponding first code, converts the first code into a corresponding test script in real time and stores the test script;
The playback of the test script of the intelligent terminal to be tested at least comprises the following steps:
The test terminal converts the test script into a corresponding second code and sends the second code to the intelligent terminal to be tested;
The intelligent terminal to be tested receives the second code and executes the operation corresponding to the second code;
The test terminal monitors a first operation command of the control terminal, converts the first operation command into a corresponding first code, converts the first code into a corresponding test script in real time and stores the test script, and specifically comprises the following steps:
The test end receives the first operation command in real time;
converting the first operation command into a corresponding first code;
Filtering the first code to obtain a corresponding code;
according to the code number, matching and displaying corresponding operation command characters;
storing the operation command words obtained by matching as a test script;
The step of recording the test script of the intelligent terminal to be tested further comprises the following steps:
When the verification point is required to be inserted, based on the current test script, the test terminal receives a verification point insertion instruction input by a user and adds a corresponding verification method to the verification point;
Based on the current test script, the test terminal receives the input additional verification insertion content and adds a corresponding verification method; the additional verification inserted content at least comprises one or more of adding waiting time, adding circulation, assisting, waiting for text to appear, quickly starting a status bar and acquiring current data.
2. The method for automatically testing an intelligent terminal according to claim 1, wherein before the control end outputs the first operation command for the intelligent terminal to be tested according to the preset test case, the method further comprises:
A database is built in advance, and the first code, the code number and the operation command word and the corresponding relation between the first code and the code number and between the code number and the operation command word are stored in the database.
3. The automatic testing method for the intelligent terminal is characterized by at least comprising the steps of recording testing scripts of the intelligent terminal to be tested and playing back the testing scripts of the intelligent terminal to be tested;
The recording of the test script of the intelligent terminal to be tested comprises the following steps:
the monitoring control terminal outputs a first operation command aiming at the intelligent terminal to be tested according to a preset test case, converts the first operation command into a corresponding first code, converts the first code into a corresponding test script in real time and stores the test script;
The step of playing back the test script of the intelligent terminal to be tested specifically comprises the following steps:
converting the test script into a corresponding second code, and sending the second code to the intelligent terminal to be tested so that the intelligent terminal to be tested can execute the operation corresponding to the second code;
The control end outputs a first operation command aiming at the intelligent terminal to be tested according to a preset test case, converts the first operation command into a corresponding first code, converts the first code into a corresponding test script in real time and stores the test script, and comprises the following steps:
The testing end receives the first operation command in real time;
converting the first operation command into a corresponding first code;
Filtering the first code to obtain a corresponding code;
according to the code number, matching and displaying corresponding operation command characters;
storing the operation command words obtained by matching as a test script;
The step of recording the test script of the intelligent terminal to be tested further comprises the following steps:
When the verification point is required to be inserted, based on the current test script, the test terminal receives a verification point insertion instruction input by a user and adds a corresponding verification method to the verification point;
Based on the current test script, the test terminal receives the input additional verification insertion content and adds a corresponding verification method; the additional verification inserted content at least comprises one or more of adding waiting time, adding circulation, assisting, waiting for text to appear, quickly starting a status bar and acquiring current data.
4. An intelligent terminal automation test device based on the test method of any one of claims 1-2, characterized in that the test device comprises at least:
And an output module: the control terminal is used for outputting a first operation command aiming at the intelligent terminal to be tested according to a preset test case;
a first processing module: the testing terminal is used for monitoring a first operation command of the control terminal, converting the first operation command into a corresponding first code, converting the first code into a corresponding test script in real time and storing the test script;
and a sending module: the testing terminal is used for converting the test script into a corresponding second code and sending the second code to the intelligent terminal to be tested;
And a second processing module: and the intelligent terminal to be tested is used for receiving the second code and executing the operation corresponding to the second code.
5. The automated testing device of claim 4, wherein the first processing module comprises at least:
a first receiving unit: the testing terminal is used for receiving the first operation command in real time;
conversion unit: for converting the first operation command into a corresponding first code;
And a filtering unit: the code generation module is used for filtering the first code to obtain a corresponding code;
matching unit: the code number is used for matching and displaying corresponding operation command characters according to the code number;
a storage unit: and the operation command words obtained by matching are stored as test scripts.
6. The automated intelligent terminal testing apparatus of claim 5, further comprising:
And a database construction module: the method is used for pre-constructing a database, and the first code, the code number and the operation command word and the corresponding relation between the first code and the code number and between the code number and the operation command word are stored in the database.
7. An intelligent terminal automation test device based on the test method of claim 3, wherein the test device at least comprises:
And a third processing module: the monitoring control terminal is used for outputting a first operation command aiming at the intelligent terminal to be tested according to a preset test case, converting the first operation command into a corresponding first code, converting the first code into a corresponding test script in real time and storing the corresponding test script;
The execution module: and the test script is used for converting the test script into a corresponding second code, and the second code is sent to the intelligent terminal to be tested so that the intelligent terminal to be tested can execute the operation corresponding to the second code.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910811414.5A CN110727578B (en) | 2019-08-30 | 2019-08-30 | Automatic testing method and device for intelligent terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910811414.5A CN110727578B (en) | 2019-08-30 | 2019-08-30 | Automatic testing method and device for intelligent terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110727578A CN110727578A (en) | 2020-01-24 |
CN110727578B true CN110727578B (en) | 2024-05-31 |
Family
ID=69217845
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910811414.5A Active CN110727578B (en) | 2019-08-30 | 2019-08-30 | Automatic testing method and device for intelligent terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110727578B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112506388A (en) * | 2020-12-04 | 2021-03-16 | 中信银行股份有限公司 | Operation recording method, device, equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102419732A (en) * | 2011-12-27 | 2012-04-18 | Tcl集团股份有限公司 | Android-platform-based automated testing method and testing tool |
CN104008047A (en) * | 2013-02-27 | 2014-08-27 | 腾讯科技(深圳)有限公司 | Intelligent terminal program testing method and system |
WO2014169565A1 (en) * | 2013-08-21 | 2014-10-23 | 中兴通讯股份有限公司 | Terminal testing method and device |
CN104899132A (en) * | 2014-03-05 | 2015-09-09 | 腾讯科技(深圳)有限公司 | Application software test method, apparatus and system |
CN106021099A (en) * | 2016-05-12 | 2016-10-12 | 上海联彤网络通讯技术有限公司 | System and method for achieving UI automatic test of intelligent terminal |
-
2019
- 2019-08-30 CN CN201910811414.5A patent/CN110727578B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102419732A (en) * | 2011-12-27 | 2012-04-18 | Tcl集团股份有限公司 | Android-platform-based automated testing method and testing tool |
CN104008047A (en) * | 2013-02-27 | 2014-08-27 | 腾讯科技(深圳)有限公司 | Intelligent terminal program testing method and system |
WO2014169565A1 (en) * | 2013-08-21 | 2014-10-23 | 中兴通讯股份有限公司 | Terminal testing method and device |
CN104899132A (en) * | 2014-03-05 | 2015-09-09 | 腾讯科技(深圳)有限公司 | Application software test method, apparatus and system |
CN106021099A (en) * | 2016-05-12 | 2016-10-12 | 上海联彤网络通讯技术有限公司 | System and method for achieving UI automatic test of intelligent terminal |
Also Published As
Publication number | Publication date |
---|---|
CN110727578A (en) | 2020-01-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106227335B (en) | Interactive learning method for preview lecture and video course and application learning client | |
CN106776294B (en) | Automatic android mobile phone testing method and system | |
CN103596000B (en) | Intelligent television multiple solutions handoff testing method and system | |
JP3236323B2 (en) | Test equipment | |
CN110830791A (en) | Automatic testing method, device and system for software function of television complete machine | |
CN103347194A (en) | Method, apparatus and system for starting-up and shut-down testing | |
CN109345813A (en) | The matching method of playback equipment and blue Tooth remote controller, equipment and readable storage medium storing program for executing | |
CN102833577A (en) | Method and device for automatically testing function of television | |
CN110837474A (en) | Script recording method, device, terminal and storage medium | |
CN105548753A (en) | Automatic testing method and system of standby and boot function of electric equipment | |
CN110727578B (en) | Automatic testing method and device for intelligent terminal | |
US20160373816A1 (en) | Automation testing apparatus | |
CN108810525B (en) | Combined intelligent set top box mass production test method and system | |
US8738762B2 (en) | Electronic device and log-output method | |
CN112769645B (en) | Terminal testing method and device, terminal equipment and storage medium | |
CN107317687B (en) | Remote control method, equipment and system | |
CN112420019B (en) | Equipment testing method and device | |
US10165313B1 (en) | Testing set top appliance boxes | |
CN113301059A (en) | Method and system for realizing interconnection of car box and car machine and related equipment | |
EP3457284A1 (en) | Technique for testing an electronic device | |
KR100597537B1 (en) | Apparatus and method for playing multimedia file | |
CN110687429A (en) | Single board testing method, single board and system | |
CN106792198A (en) | TV initial method and device | |
CN115883822B (en) | Method and device for debugging camera of online examination system and storage medium | |
CN113497975A (en) | Log processing method, program, television set, and storage 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 |