CN110727578A - Automatic testing method and device for intelligent terminal - Google Patents

Automatic testing method and device for intelligent terminal Download PDF

Info

Publication number
CN110727578A
CN110727578A CN201910811414.5A CN201910811414A CN110727578A CN 110727578 A CN110727578 A CN 110727578A CN 201910811414 A CN201910811414 A CN 201910811414A CN 110727578 A CN110727578 A CN 110727578A
Authority
CN
China
Prior art keywords
code
intelligent terminal
tested
test
operation command
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910811414.5A
Other languages
Chinese (zh)
Inventor
赵猛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suning Intelligent Terminal Co Ltd
Original Assignee
Suning Intelligent Terminal Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suning Intelligent Terminal Co Ltd filed Critical Suning Intelligent Terminal Co Ltd
Priority to CN201910811414.5A priority Critical patent/CN110727578A/en
Publication of CN110727578A publication Critical patent/CN110727578A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Abstract

The invention discloses an automatic testing method and device for an intelligent terminal, belonging to the field of terminal testing, wherein the method at least comprises 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 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 end monitors a first operation command of the control end, 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; the step of replaying the test script of the intelligent terminal to be tested at least comprises the following steps: when the test end 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 and low in using difficulty, and testers without code capability can use and develop the automatic test script, so that the method is suitable for zero-base testers.

Description

Automatic testing method and device for intelligent terminal
Technical Field
The invention relates to the field of terminal testing, in particular to an automatic testing method and device for an intelligent terminal.
Background
The intelligent terminal is a type of embedded computer system equipment, so that the architecture framework of the intelligent terminal is consistent with that of an embedded system; meanwhile, the intelligent terminal is used as an application direction of the embedded system, and the application scene setting is clear, so that the system structure is more clear than that of a common embedded system, the granularity is finer, and the system has certain characteristics. At present, the common android platform intelligent terminal is, for example, an android platform smart television, an android platform smart air conditioner and other devices.
As for the Android smart television, currently, common automated testing schemes are as follows: robotium monkey launcher UIAutomator et al, which all require the user to develop a variety of languages. In addition, these solutions have other drawbacks: the existing testing method is not suitable for people without development experience to use.
Therefore, the existing testing method has high professional degree and high professional requirement on testers, is not suitable for general operators, and has large limitation in use.
Disclosure of Invention
In order to solve the technical problems, the invention provides an automatic testing method and device for an intelligent terminal, which are simple to operate and low in use difficulty, and can be used by testers without agent 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, wherein the method at least comprises a step of recording a testing script of the intelligent terminal to be tested and a step of replaying the testing script of the intelligent terminal to be tested;
the method for 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 end monitors a first operation command of the control end, 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;
the method for replaying the test script of the intelligent terminal to be tested at least comprises the following steps:
the test end 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 monitoring, by the testing end, a first operation command of the control end, converting the first operation command into a corresponding first code, and converting the first code into a corresponding test script in real time and storing the test script, 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;
matching and displaying corresponding operation command characters according to the code number;
and storing the operation command characters obtained by matching as a test script.
In some preferred embodiments, before the controlling end outputs the first operation instruction for the intelligent terminal to be tested according to a preset test case, the method further includes:
and a database is pre-established, wherein 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 end executes a test script, the sending a second code corresponding to the test script to the intelligent terminal to be tested specifically includes:
when the test end executes the test script, converting the operation command characters into second codes 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 receiving, by the intelligent terminal to be tested, the second code and executing an operation corresponding to the second code specifically include:
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:
and when the verification point needs to be inserted, based on the current test script, the test end 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 end receives the input additional verification insertion content and adds a corresponding verification method; the additional verification insertion 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 second aspect, an automatic testing method for an intelligent terminal is further provided, wherein the testing method at least comprises 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 method comprises the following steps of recording a test script of the intelligent terminal to be tested:
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, and converts the first code into a corresponding test script in real time and stores the test script;
the step of replaying the test script of the intelligent terminal to be tested specifically 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, an automatic testing apparatus for an intelligent terminal is further provided, where the apparatus at least includes:
an output module: the control end 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 test end monitors a first operation command of the control end, 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;
a sending module: the test end is used for converting the test script into a corresponding second code and sending the second code to the intelligent terminal to be tested;
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 comprises at least:
a first receiving unit: the test end is used for receiving the first operation instruction in real time;
a transformation unit: the first operation instruction is converted into corresponding first code;
a filtering unit: the first code is used for filtering to obtain a corresponding code;
a matching unit: the system is used for matching and displaying corresponding operation command characters according to the code number;
a storage unit: and the operation command text obtained by matching is saved as a test script.
In some preferred embodiments, the apparatus further comprises:
a database construction module: the system is used for storing 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.
In some preferred embodiments, the sending module at least includes:
a transformation unit: the operation command text is converted into a second code which can be identified by the intelligent terminal to be tested when the test end executes the test script;
a transmission 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 comprises 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:
an authentication point insertion module: and the test end is used for receiving a verification point insertion instruction input by a user and adding a corresponding verification method to the verification point based on the current test script when the verification point needs to be inserted.
In some preferred embodiments, the apparatus further comprises:
an additional verification insertion module: the test end is used for receiving input additional verification insertion content and adding a corresponding verification method based on a current test script; the additional verification insertion 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, an automatic testing apparatus for an intelligent terminal is further provided, where the accounting apparatus at least includes:
a third processing module: the monitoring control end 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, and converting the first code into a corresponding test script in real time and storing the test script;
an execution module: and the intelligent 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 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 a device of an intelligent terminal, when a test script is recorded, a first operation command is sent to a terminal to be tested through a test end, the test end 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 to be stored, when the test script is replayed, the test end 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 a 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 a control end, after the test script is stored, the intelligent terminal to be tested is controlled to replay the test script through the test end to carry out a performance test, so the method has simple operation and low use difficulty, and even a tester without code capability can use and, the device is suitable for zero-base testing personnel;
the recording and playback processes of the method are separately carried out, and the test script can be played back at any time for testing, so that the performance test of the intelligent terminal can be carried out at any time, and thus, different cases can be designed to realize the tests which are difficult to be manually completed or have high repeatability before, such as 'function', 'stability', 'pressure', and the like;
the method can be directly used after the intelligent terminal to be tested, the test end and the control end are connected, and the deployment environment is not needed, so the learning and use cost of the device is low, and the maintenance cost is low;
the scheme of the application can be realized only by realizing any technical effect.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart 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 test equipment is started according to an embodiment of the present invention;
FIG. 3 is a partial test interface diagram according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a verification point insertion interface according to an embodiment of the invention;
FIG. 5 is a schematic diagram of a complex use case insertion interface according to an embodiment of the present invention;
FIG. 6 is a schematic interface diagram illustrating playback of a test case according to a 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 intelligent terminal automation test apparatus in a third embodiment of the present invention;
fig. 9 is a schematic structural diagram of an intelligent terminal automation test apparatus in the fourth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The method comprises the steps that when a test script is recorded, a first operation command is sent to a terminal to be tested through a test end, the test end 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 to be stored, when the test script is replayed, the test end converts the test script into a second code and sends the second code to the terminal to be tested, the terminal to be tested executes a code to replay the test case, and the method can realize that the performance test of the intelligent terminal can be carried out even if a tester does not have the code capability.
Example one
As shown in fig. 1, this 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 an intelligent terminal at least includes the following steps:
s1, recording a test script of the intelligent terminal to be tested;
and S2, playing back the test script of the intelligent terminal to be tested.
After step S1 is completed, the obtained test scripts may be stored, and when a 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, so as to implement an automated test of the intelligent terminal.
The intelligent terminal related to the embodiment is one of terminal devices such as an intelligent television and an intelligent air conditioner, and the commonly configured operating system is an Android (Android) system. For convenience of description, the present embodiment specifically explains the intelligent terminal automation test method by taking an intelligent electronic product of an android system as an example.
The step S1 of recording the test script of the intelligent terminal to be tested at least includes the following steps:
and S11, the control terminal outputs a first operation command aiming at the intelligent terminal to be tested according to the preset test case.
The test cases are pre-designed according to the test purpose of the user, and different test cases are usually 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 the button command "up-down-left-right-home-return". And at the preset initial test page position of the intelligent terminal to be tested, the remote controller outputs the operation command of 'up-down-left-right-homepage-return' which can be recognized by the remote controller to the intelligent television through keys. And the intelligent television receives the operation command and executes the operation command of 'up-down-left-right-homepage-return' from the test initial page. The operation command is usually an infrared signal or a bluetooth signal, and the infrared signal is taken as an example in this embodiment.
Certainly, before step S11, a communication connection needs to be established between the intelligent terminal to be tested and the testing terminal, where the communication connection mode may be one of a bluetooth connection, a WIFI connection, or other connection modes, and this embodiment does not limit this.
S12, the test end monitors the first operation command of the control end, 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.
Specifically, the step S12 specifically includes:
a. the test 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 number;
d. matching and displaying corresponding operation command characters according to the code number;
e. and storing the operation command characters obtained by matching as a test script.
Fig. 2 shows a test interface diagram after the test equipment is started, where the left side can input an IP address of the smart television and perform network connection, the right side is control buttons for recording, stopping recording, and the like, the upper end in the middle records key record content (i.e., a test script), and the lower end displays current key content. Therefore, after the recording button is clicked, the testing equipment starts to monitor a first operation command sent by a remote controller key, and obtains the state code of the intelligent television in real time through the command adb shell getevent.
Illustratively, when the preset test case is "up-down-left-right-homepage-return", the test equipment starts recording the case by clicking the "record button" in the test interface. At the moment, the corresponding positions of the remote controller are pressed in sequence, and a corresponding first operation command is sent.
When the remote controller presses down 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 a code number '0067', then matches an operation command character 'up' corresponding to the code number '0067' through a database constructed in advance in the test equipment, and displays 'up' at the current key position as shown in fig. 3. Illustratively, the snoop code in this embodiment is as follows:
Figure BDA0002185479690000091
therefore, before step S11, the following steps are also included:
s0, a database is pre-constructed, wherein the database stores 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. Therefore, after the test end acquires the first operation command and converts the first operation command into the code, the corresponding code and the operation command characters to be displayed can be matched quickly, and a test script is formed.
Of course, in the actual testing process, the preset test cases are not all as simple as "up-down-left-right-home-return", and there are usually cases where the preset test cases need to be inserted into the verification point or 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 end receives a verification point insertion instruction input by a user and adds a corresponding verification method to the verification point.
Generally, during or after the recording of the current script is completed, a user can manually insert a verification point and a verification method into a test interface. As shown in fig. 4, a schematic diagram of a corresponding verification point insertion interface is shown, where the verification point may be a picture, a picture text, a text, or a focus text. Each type of verification point may also be subdivided according to the specific situation of the verification point in the current testing process, for example, the picture comparison type verification point may include situations of adding a local picture comparison or adding a full picture comparison, and the like, and the addition and deletion may be specifically performed 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 art, and is not described herein any more.
When the preset test case needs to insert additional verification, step S1 further includes:
based on the current test script, the test end receives input additional verification insertion content and adds a corresponding verification method, wherein the additional verification insertion content at least comprises one or more of adding waiting time, adding circulation, assisting, waiting for characters to appear, quickly starting a status bar and acquiring current data.
For example, when a video is played, if there is an advertisement waiting time of 15s, the remote controller is not operated during the waiting time, so that the testing equipment cannot record the waiting time. Thus, the wait time 15s can be entered in the "wait for a few seconds" verification point through a complex use case insertion interface diagram as shown in FIG. 5. Of course, in the complex use case insertion diagram interface, the number of cycles may also be set at the "cycle" verification point, the current UI data may be viewed at the "auxiliary" verification point, the characters waiting for appearing may be viewed at the "character appearance waiting" verification point, and so on.
After the recording of the single test script is finished, the test script is stored in a system database and is played back when the next test is carried out.
Of course, in order to view the test case during recording, a playback function may also be performed during recording. The method specifically comprises the following steps: in a single recording, after the recording of a part of the test script is finished, the recording can be stopped, the playback is executed to check the recording condition of the finished part, and after the playback is stopped, the recording of another part can be continued until the recording of the test script is finished.
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 end 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 end executes the test script, converting the operation command characters into second codes which can be identified by the intelligent terminal to be tested;
b. and sending the second code to the intelligent terminal to be tested.
Illustratively, when a certain performance of the smart television needs to be tested, a corresponding recorded test script is selected from the test equipment database, and the test script is opened and executed as shown in fig. 6. When the test script is executed, the test equipment firstly converts the operation command characters contained in the test script into second codes which correspond to the operation command characters and can be identified by the smart television, and the second codes are sent to the smart television through the WIFI.
And 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 test equipment sends the second code, and after receiving the second code, the smart television executes the operation corresponding to the second code, so that the test equipment actually achieves the same operation effect as the remote controller.
Illustratively, for example, the test script is "up", and the "up" is converted into a code "adb shell input keyervent 19" recognizable by the smart television during playback and is sent to the smart television, that is, the playback is performed.
The code is as follows:
preferably, in the specific operation process, the "playback" button is in a color rendering state during the playback process, and the playback button returns to a normal state after the execution is completed.
Therefore, the embodiment provides a recording and playback technology of the test script in the automatic test method of the intelligent terminal, and the performance of the intelligent terminal can be evaluated or judged through the playback of the test case. The evaluation or judgment may be made manually by a tester, or may be made intelligently by machine learning, and the comparison in this embodiment is not limited.
Therefore, the embodiment provides an automatic test method for an intelligent terminal, which is characterized in that when a test script is recorded, a first operation command is sent to a terminal to be tested through a test end, the test end 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 to be stored, when the test script is played back, the test end 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 a 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 end, after the test script is stored, the test end controls the intelligent terminal to be tested to play back the test script to perform a performance test, and therefore, the method is simple in operation and low in use difficulty, and even, the device is suitable for zero-base testing personnel;
in addition, the recording and playback processes of the method are separately carried out, and the test script can be played back at any time for testing, so that the performance test of the intelligent terminal can be carried out at any time, and thus, different test cases can be designed to realize the tests which are difficult to be manually completed or have high repeatability before, such as 'function', 'stability', 'pressure', and the like;
moreover, the method can be directly used after the intelligent terminal to be tested, the test end and the control end are connected, and the deployment environment is not needed, so the device has low learning and use cost and low maintenance cost.
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 the intelligent terminal to be tested;
s2', a step of replaying the test script of the intelligent terminal to be tested;
the step of recording the test script of the intelligent terminal to be tested in the S1' specifically 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, and converts the first code into a corresponding test script in real time and stores the test script.
Specifically, step S1' includes at least the following sub-steps:
a. receiving a first operation instruction which is output by a control end 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 number;
d. matching and displaying corresponding operation command characters according to the code number;
e. and storing the operation command characters obtained by matching as a test script.
Before the step of S1', the method further comprises the following steps:
s0', a database is pre-constructed, in which the first code, the code number and the operation command word, and the corresponding relationship between the first code and the code number, and between the code number and the operation command word are stored. Therefore, after the first operation command is obtained and converted into the code, the corresponding code number and the operation command characters to be displayed can be matched quickly, and a test script is formed.
Further, when the preset test case needs to be inserted into the verification point, step S1' further includes:
and receiving a verification point insertion instruction input by a user and adding a corresponding verification method to the verification point based on the current test script.
When the preset test case needs to insert additional verification, step S1' further includes:
and receiving input additional verification insertion content and adding a corresponding verification method based on the current test script.
S2', the step of replaying 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 facilitate the performance evaluation or judgment of a tester.
The present embodiment is consistent with the central idea of the first embodiment, and therefore, the technical solution and the corresponding technical effects in the present embodiment are not described to the full extent, please refer to the first embodiment specifically.
Therefore, the present embodiment provides an automatic testing method for an intelligent terminal, which, when a test script is recorded, sending a first operation command to the terminal to be tested through the test end, monitoring the first operation command by the test end and converting the first operation command into a first code, then converting the first code into a test script for storage, during playback, the test end converts the test script into a second code and sends the second code to the terminal to be tested, the terminal to be tested executes the code to play back the test case, therefore, the method only needs to record the test script corresponding to the execution operation on the intelligent terminal to be tested under the control of the control end in real time, and after the test script is stored, the performance test is carried out by controlling the intelligent terminal to be tested to playback the test script, the method has simple operation and low use difficulty, even testers without code capability can use and develop the automatic test script, and the automatic test script is suitable for zero-base testers;
in addition, the recording and playback processes of the method are separately carried out, and the test script can be played back at any time for testing, so that the performance test of the intelligent terminal can be carried out at any time, and thus, different cases can be designed to realize the tests which are difficult to be manually completed or have high repeatability before, such as 'function', 'stability', 'pressure', and the like;
moreover, the method can be directly used after the intelligent terminal to be tested, the test end and the control end are connected, and the deployment environment is not needed, so the device has low learning and use cost and low maintenance cost.
EXAMPLE III
In order to execute an automatic testing method for an intelligent terminal in the first embodiment, the present embodiment provides an automatic testing apparatus 100 for an intelligent terminal.
Fig. 8 is a schematic structural diagram of the automatic testing apparatus 100 for an intelligent terminal, and as shown in fig. 8, the apparatus 100 at least includes:
an output module 1: the control end 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 test end monitors a first operation command of the control end, 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;
a sending module 3: the test end 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 receives the second code and executes the operation corresponding to the second code.
In some preferred embodiments, the first processing module 2 at least comprises:
the first receiving unit 21: the test end is used for receiving a first operation instruction in real time;
the conversion unit 22: the first operation instruction is converted into corresponding first code;
the filter unit 23: the first code is filtered to obtain a corresponding code;
the matching unit 24: the system is used for matching and displaying corresponding operation command characters according to the code number;
the saving unit 25: and the operation command text obtained by matching is saved as a test script.
In some preferred embodiments, the apparatus 100 further comprises:
the database construction module 5: the method is used for constructing a database in advance, wherein 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.
In some preferred embodiments, the sending module 3 at least comprises:
the conversion unit 31: the intelligent terminal to be tested is used for converting the operation command characters into second codes which can be identified by the intelligent terminal to be tested when the test end executes the test script;
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 intelligent terminal to be tested receives the second code;
the 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 when the verification point needs to be inserted, based on the current test script, the test end receives a verification point insertion instruction input by a user and adds a corresponding verification method to the verification point.
In some preferred embodiments, the apparatus further comprises:
the additional authentication insertion module 7: the test end is used for receiving input additional verification insertion content and adding a corresponding verification method based on a current test script; the additional verification insertion 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: in the present embodiment, when triggering an automatic testing service of an intelligent terminal, the automatic testing apparatus for an intelligent terminal is described by way of example only by dividing the functional modules, and in practical applications, the function distribution may be completed by different functional modules according to needs, that is, the internal structure of the apparatus is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the above-mentioned embodiment provides an automatic testing apparatus for an intelligent terminal, and an embodiment of an automatic testing method for an intelligent terminal in the first embodiment belong to the same idea, that is, the apparatus is based on the method, and the specific implementation process thereof is described in detail in the method embodiment, and is not described herein again.
Example four
In order to execute an intelligent terminal automatic testing method in the second embodiment, this embodiment provides an intelligent terminal automatic testing apparatus 200, fig. 9 is a schematic structural diagram of the intelligent terminal automatic testing apparatus 200, and as shown in fig. 9, the intelligent terminal automatic testing apparatus 200 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, and converting the first code into a corresponding test script in real time and storing the test script;
the execution module 9: and the intelligent terminal to be tested is used for 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.
It should be noted that: in the present embodiment, when triggering an automatic testing service of an intelligent terminal, the automatic testing apparatus for an intelligent terminal is described by way of example only by dividing the functional modules, and in practical applications, the function distribution may be completed by different functional modules according to needs, that is, the internal structure of the apparatus is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the intelligent terminal automatic testing device provided by the above embodiment and the embodiment of the intelligent terminal automatic testing method in the second embodiment belong to the same concept, that is, the device is based on the method, and the specific implementation process thereof is described in detail in the method embodiment, and is not described herein again.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The present invention is not limited to the above preferred embodiments, and any modifications, equivalent replacements, improvements, etc. within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. An automatic testing method for an intelligent terminal is characterized by at least comprising the steps of recording a testing script of the intelligent terminal to be tested and replaying the testing script of the intelligent terminal to be tested;
the method for 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 end monitors a first operation command of the control end, 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;
the method for replaying the test script of the intelligent terminal to be tested at least comprises the following steps:
the test end 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.
2. The automatic testing method of the intelligent terminal according to claim 1, wherein the testing terminal monitors a first operation instruction of the control terminal, converts the first operation instruction into a corresponding first code, and converts the first code into a corresponding testing script in real time and stores the testing script, specifically comprising:
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;
matching and displaying corresponding operation command characters according to the code number;
and storing the operation command characters obtained by matching as a test script.
3. The automatic testing method of the intelligent terminal according to claim 2, wherein before the control terminal outputs the first operation command for the intelligent terminal to be tested according to the preset test case, the method further comprises:
and a database is pre-established, wherein 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.
4. The automatic testing method of the intelligent terminal according to claim 1, wherein the step of recording the testing script of the intelligent terminal to be tested further comprises:
and when the verification point needs to be inserted, based on the current test script, the test end receives a verification point insertion instruction input by a user and adds a corresponding verification method to the verification point.
5. The automatic testing method of the intelligent terminal according to claim 1, wherein the step of recording the testing script of the intelligent terminal to be tested further comprises:
based on the current test script, the test end receives the input additional verification insertion content and adds a corresponding verification method; the additional verification insertion 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.
6. An automatic testing method for an intelligent terminal is characterized by at least comprising a step of recording a testing script of the intelligent terminal to be tested and a step of replaying the testing script of the intelligent terminal to be tested;
the method comprises the following steps of recording a test script of the intelligent terminal to be tested:
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, and converts the first code into a corresponding test script in real time and stores the test script;
the step of replaying the test script of the intelligent terminal to be tested specifically 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.
7. An automatic intelligent terminal testing device based on the testing method of any one of claims 1 to 5, wherein the testing device at least comprises:
an output module: the control end 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 test end monitors a first operation command of the control end, 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;
a sending module: the test end is used for converting the test script into a corresponding second code and sending the second code to the intelligent terminal to be tested;
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.
8. The intelligent terminal automatic testing device according to claim 7, wherein the first processing module at least comprises:
a first receiving unit: the test end is used for receiving the first operation instruction in real time;
a transformation unit: the first operation instruction is converted into corresponding first code;
a filtering unit: the first code is used for filtering to obtain a corresponding code;
a matching unit: the system is used for matching and displaying corresponding operation command characters according to the code number;
a storage unit: and the operation command text obtained by matching is saved as a test script.
9. The intelligent terminal automated testing device of claim 8, further comprising:
a database construction module: the database is used for pre-constructing a database, and the database stores the first code, the code number and the operation command words, and the corresponding relation between the first code and the code number, and between the code number and the operation command words.
10. An intelligent terminal automatic testing device based on the testing method of claim 6, wherein the testing device at least comprises:
a third processing module: the monitoring control end 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, and converting the first code into a corresponding test script in real time and storing the test script;
an execution module: and the intelligent 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 so that the intelligent terminal to be tested can execute the operation corresponding to the second code.
CN201910811414.5A 2019-08-30 2019-08-30 Automatic testing method and device for intelligent terminal Pending CN110727578A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910811414.5A CN110727578A (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 CN110727578A (en) 2019-08-30 2019-08-30 Automatic testing method and device for intelligent terminal

Publications (1)

Publication Number Publication Date
CN110727578A true CN110727578A (en) 2020-01-24

Family

ID=69217845

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910811414.5A Pending CN110727578A (en) 2019-08-30 2019-08-30 Automatic testing method and device for intelligent terminal

Country Status (1)

Country Link
CN (1) CN110727578A (en)

Citations (5)

* Cited by examiner, † Cited by third party
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

Patent Citations (5)

* Cited by examiner, † Cited by third party
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

Similar Documents

Publication Publication Date Title
CN105608005B (en) The test method and system of a kind of television system
CN110830791A (en) Automatic testing method, device and system for software function of television complete machine
CN110837474A (en) Script recording method, device, terminal and storage medium
CN112306442A (en) Cross-device content screen projection method, device, equipment and storage medium
CN111159047A (en) Android equipment auxiliary debugging device with visual interface and operation method thereof
CN104994459B (en) Terminal digital power amplifier configuration method and device
CN109669831A (en) A kind of test method and electronic equipment
CN106411649A (en) Control method and device for remote play system
CN106469070A (en) The method of panel parameter self-regeneration
KR100585577B1 (en) Test method for mobile communication terminals based on auto-making of test scenario file
CN110727578A (en) Automatic testing method and device for intelligent terminal
CN105704484A (en) Testing device and method for simulating user operation on TV set
CN108810525A (en) A kind of combined Intelligent set top box volume production test method and system
CN107105327A (en) One kind association method for start-up and shutdown and terminal
CN102761453B (en) Method for testing availability of client and client
US20070256756A1 (en) Electronic device and log-output method
JP2009116535A (en) Automatic test system, automatic test method and program
CN101312546A (en) Method for tracking and recording television operation steps and television thereof
WO2021230181A1 (en) Information processing method, information processing device, program, and information processing system
US20090094295A1 (en) Electronic equipment and log output method
CN113766212A (en) Video decoding function test method, test device and test equipment
CN111836087A (en) Method and device for processing TV log information based on mobile phone capture
EP3457284A1 (en) Technique for testing an electronic device
KR100597537B1 (en) Apparatus and method for playing multimedia file
CN110262650B (en) Method and system for customizing starting mode

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