CN107193728A - Mobile terminal automation testing method and device - Google Patents
Mobile terminal automation testing method and device Download PDFInfo
- Publication number
- CN107193728A CN107193728A CN201610148155.9A CN201610148155A CN107193728A CN 107193728 A CN107193728 A CN 107193728A CN 201610148155 A CN201610148155 A CN 201610148155A CN 107193728 A CN107193728 A CN 107193728A
- Authority
- CN
- China
- Prior art keywords
- type
- script
- mobile terminal
- test
- prerequisite
- 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
Links
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)
- Mobile Radio Communication Systems (AREA)
Abstract
The present invention provides a kind of mobile terminal automation testing method and device.Methods described includes:Receive the trigger command of the automatic setting prerequisite of user's input, and sent the APK application programs of the prerequisite needed for for setting automatic test to the mobile terminal to be measured being connected with PC ends according to trigger command so that user carries out the setting of prerequisite by APK application programs in mobile terminal to be measured;The prerequisite for receiving mobile terminal transmission to be measured is provided with order, and receives the resource file copy command of user's input, and according to resource file copy command, resource file is sent to mobile terminal to be measured;Type of cell phone, script type and the testing time of user's input are received, and performs test script corresponding with type of cell phone and script type;Test report is generated after the completion of test script execution, and sends the mailbox that test report is specified to user.The error that the present invention can reduce the cost of labor of test and its cause, so as to improve testing efficiency.
Description
Technical field
The present invention relates to automatization testing technique field, more particularly to a kind of mobile terminal automation testing method
And device.
Background technology
UIAutomator is a kind of automation UI test frames based on Android, its can provide accurately,
Efficient UI tests.
Tester carries out the setting of prerequisite before UIAutomator automatic tests to mobile phone to be measured
Generally using setting manually by the way of, for example, setting system language, newly-built a number of contact person or
Short message etc., tester needs to enter one by one to be configured in corresponding options menu.Performing every time
Before UIAutomator automatic tests, tester needs manually to carry out the xml document in test frame
Modification, it would be desirable to which the script name of test is added in the xml document one by one.
During the present invention is realized, inventor has found at least there is following technical problem in the prior art:
On the one hand, if desired newly-built contact person or short message quantity are excessive, then need largely to be repeated numerous
Trivial step, while being also relatively easy to mistake occur in the setting up procedure of prerequisite;On the other hand, nothing
Method rapidly carries out batch addition according to testing requirement to test script, and flexibility is poor.
The content of the invention
The mobile terminal automation testing method and device that the present invention is provided, it is set by the automatic of prerequisite
The automatic execution with test script is put, the cost of labor of automatic test can be reduced, while the artificial behaviour of reduction
Make the error brought, so as to improve automatic test efficiency.
In a first aspect, the present invention provides a kind of mobile terminal automation testing method, applied to PC ends, including:
The trigger command of the automatic setting prerequisite of user's input is received, and will be used according to the trigger command
The APK application programs of prerequisite needed for the automatic test is set, which are sent to the PC ends, to be connected
The mobile terminal to be measured connect so that the user is by the APK application programs in the mobile terminal to be measured
Carry out the setting of the prerequisite;
The prerequisite for receiving the mobile terminal transmission to be measured is provided with order, and receives user's input
Resource file copy command, and according to the resource file copy command, resource file is sent to described
Mobile terminal to be measured;
Type of cell phone, script type and the testing time of user's input are received, and is performed and the type of cell phone
Test script corresponding with script type;
Test report is generated after the completion of test script execution, and sends the test report and is used to described
The mailbox that family is specified.
Alternatively, it is described receive user input type of cell phone, script type and testing time, and perform with
The corresponding test script of the type of cell phone and script type includes:
Receive type of cell phone, script type and the testing time of user's input;
It is attached by IP address with the server for storing test script;
The type of cell phone and the corresponding test script of script type are obtained by store path;
Perform the type of cell phone and the corresponding test script of script type.
Alternatively, the prerequisite includes common option, network options, contact people option, message registration
Option, short message option and multimedia message option.
Second aspect, the present invention provides a kind of mobile terminal automation testing device, described applied to PC ends
Device includes first processing module, Second processing module, the 3rd processing module and fourth processing module, wherein,
The first processing module, the trigger command of the automatic setting prerequisite for receiving user's input,
And according to the trigger command by the APK application journeys of the prerequisite needed for for setting the automatic test
Sequence is sent to the mobile terminal to be measured being connected with the PC ends so that the user is applied by the APK
Program carries out the setting of the prerequisite in the mobile terminal to be measured;
The Second processing module, is provided with for receiving the prerequisite that the mobile terminal to be measured is sent
Order;And the resource file copy command of user's input is received, and according to the resource file copy command,
Resource file is sent to the mobile terminal to be measured;
3rd processing module, type of cell phone, script type and testing time for receiving user's input,
And perform test script corresponding with the type of cell phone and script type;
The fourth processing module, for generating test report after the completion of test script execution, concurrently
The mailbox for sending the test report to be specified to the user.
Alternatively, the 3rd processing module includes receiving unit, associative cell, acquiring unit and performs list
Member, wherein,
The receiving unit, type of cell phone, script type and testing time for receiving user's input;
The associative cell, for being attached by IP address with the server for storing test script;
The acquiring unit, for obtaining the type of cell phone and the corresponding survey of script type by store path
Training sheet;
The execution unit, for performing the type of cell phone and the corresponding test script of script type.
Alternatively, the prerequisite includes common option, network options, contact people option, message registration
Option, short message option and multimedia message option.
Mobile terminal automation testing method and device provided in an embodiment of the present invention based on UIAutomator,
Compared with prior art, on the one hand, it is carried out preset by APK (AndroidPackage) application programs
The setting of condition, can save the cost of labor of automatic test, while reduction manually operates the error brought,
So as to provide automatic test efficiency;On the other hand, its by select type of cell phone and script type come
Corresponding test script is directly obtained, the operation of test script is added manually without tester, from
And further increase the efficiency of automatic test.
Brief description of the drawings
Fig. 1 is the flow chart of one embodiment of the invention mobile terminal automation testing method;
Fig. 2 is the example screenshot that APK application programs set prerequisite described in above-described embodiment;
Fig. 3 is that step S13 implements schematic flow sheet in above-described embodiment;
Fig. 4 is the structural representation of one embodiment of the invention mobile terminal automation testing device;
Fig. 5 is the structural representation of the 3rd processing module described in a upper embodiment.
Embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the present invention
Accompanying drawing in embodiment, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that
Described embodiment is only a part of embodiment of the invention, rather than whole embodiments.Based on this hair
Embodiment in bright, the institute that those of ordinary skill in the art are obtained under the premise of creative work is not made
There is other embodiment, belong to the scope of protection of the invention.
The present invention provides a kind of mobile terminal automation testing method, applied to PC ends, as shown in figure 1, described
Method includes:
S11, the trigger command for receiving the automatic setting prerequisite that user inputs, and according to the trigger command
By for the APK application programs that the prerequisite needed for the automatic test is set send to the PC
Hold the mobile terminal to be measured of connection so that the user is by the APK application programs in the movement to be measured
Terminal carries out the setting of the prerequisite.
Wherein, the prerequisite includes common option, network options, contact people option, message registration choosing
Item, short message option and multimedia message option.
As shown in Fig. 2 for the APK applications of the prerequisite being used for needed for setting the automatic test
The use interface of program, here by taking the setting interface of common option as an example, it is known that the APK application programs
Common option includes following functions:
1) non-automatic Rotation screen, it is no operation 30 minutes after dormancy, Chinese information processing system language, input method acquiescence
For Android keyboards, system time is set, not lock-screen, it is allowed to install it is unknown come source software, screen is not
Dormancy, it is allowed to analog position;
2) give tacit consent to when data traffic is closed and be turned on, remove slog, wifi is specified in automatic connection;
3) radom insertion specifies number contact person, message registration, short message, multimedia message.
The prerequisite that S12, the reception mobile terminal to be measured are sent is provided with order, and receives user
The resource file copy command of input, and according to the resource file copy command, by resource file send to
The mobile terminal to be measured.
Wherein, the resource file is including the music file needed for the automatic test, picture file or regards
Frequency file.
S13, type of cell phone, script type and the testing time for receiving user's input, and perform and the mobile phone
Type and the corresponding test script of script type.
Wherein, the script type is pre-set, and it includes the respective option correspondence in the prerequisite
Test script type, for example, the related test script of the related test script of short message, contact person.
S14, after the completion of the test script execution test report is generated, and send the test report to institute
State the mailbox that user specifies.
Mobile terminal automation testing method provided in an embodiment of the present invention, compared with prior art, on the one hand,
It is by sending the APK application programs for being used for setting the prerequisite needed for automatic test so that Yong Huke
It is mobile whole without respectively enteing to be configured on the graphical interfaces directly using the APK application programs
It is configured, so as to save the cost of labor of automatic test, drops simultaneously in each respective menu at end
The error that low artificial operation is brought, so as to improve automatic test efficiency;On the other hand, it is by selecting hand
Machine type and script type directly obtain corresponding test script, are added manually without tester
The operation of test script, so as to further increase the efficiency of automatic test.
Further, as shown in figure 3, the step S13 is specifically included:
S131, type of cell phone, script type and the testing time for receiving user's input;
S132, it is attached with the server for storing test script by IP address;
S133, the type of cell phone and the corresponding test script of script type are obtained by store path;
S134, the execution type of cell phone and the corresponding test script of script type.
Specifically, exemplified by based on UIAutomator test structures, stored by IP address with being used for
The server of UIAutomator test scripts is attached, and obtains by store path the type of cell phone
Test script corresponding with script type.
It can be seen that, compared with test script is stored in PC ends, the present invention stores test pin by server
This, can further enhance the flexibility of automatic test.
The embodiment of the present invention also provide it is a kind of be based on mobile terminal automation testing device, applied to PC ends, such as
Shown in Fig. 4, described device includes first processing module 51, Second processing module 52, the 3rd processing module 53
With fourth processing module 54.
The first processing module 51, the trigger command of the automatic setting prerequisite for receiving user's input,
And according to the trigger command by the APK application journeys of the prerequisite needed for for setting the automatic test
Sequence is sent to the mobile terminal to be measured being connected with the PC ends so that the user is applied by the APK
Program carries out the setting of the prerequisite in the mobile terminal to be measured.
Wherein, the prerequisite includes common option, network options, contact people option, message registration choosing
Item, short message option and multimedia message option.
The Second processing module 52, sets up for receiving the prerequisite that the mobile terminal to be measured is sent
Into order;And the resource file copy command of user's input is received, and life is copied according to the resource file
Order, resource file is sent to the mobile terminal to be measured.
Wherein, the resource file is including the music file needed for the automatic test, picture file or regards
Frequency file.
3rd processing module 53, type of cell phone, script type and test time for receiving user's input
Number, and perform test script corresponding with the type of cell phone and script type.
The fourth processing module 54, for generating test report after the completion of test script execution, and
Send the mailbox that the test report is specified to the user.
Mobile terminal automation testing device provided in an embodiment of the present invention, it is compared with prior art, and existing
Technology is compared, on the one hand, it should by sending the APK for being used to set the prerequisite needed for automatic test
With program so that user can be configured on the graphical interfaces directly using the APK application programs, and
It is configured in each respective menu that mobile terminal need not be respectively enterd, so as to save automatic test
Cost of labor, while reduction manually operates the error that brings, so as to improve automatic test efficiency;It is another
Aspect, it directly obtains corresponding test script by selecting type of cell phone and script type, and nothing
Tester is needed to add the operation of test script manually, so as to further increase the efficiency of automatic test.
Further, as shown in figure 5, the 3rd processing module 53 includes receiving unit 531, association table
Member 531, acquiring unit 533 and execution unit 534, wherein,
The receiving unit 531, type of cell phone, script type and testing time for receiving user's input;
The associative cell 532, for being connected by IP address with the server for storing test script
Connect;
The acquiring unit 533, for obtaining the type of cell phone by store path and script type is corresponding
Test script;
The execution unit 534, for performing the type of cell phone and the corresponding test script of script type.
It can be seen that, compared with test script is stored in PC ends, the present invention stores test pin by server
This, can further enhance the flexibility of automatic test.
The foregoing is only a specific embodiment of the invention, but protection scope of the present invention is not limited to
This, any one skilled in the art the invention discloses technical scope in, can readily occur in
Change or replacement, should all be included within the scope of the present invention.Therefore, protection scope of the present invention
It should be defined by scope of the claims.
Claims (6)
1. a kind of mobile terminal automation testing method, applied to PC ends, it is characterised in that including:
The trigger command of the automatic setting prerequisite of user's input is received, and will be used according to the trigger command
The APK application programs of prerequisite needed for the automatic test is set, which are sent to the PC ends, to be connected
The mobile terminal to be measured connect so that the user is by the APK application programs in the mobile terminal to be measured
Carry out the setting of the prerequisite;
The prerequisite for receiving the mobile terminal transmission to be measured is provided with order, and receives user's input
Resource file copy command, and according to the resource file copy command, resource file is sent to described
Mobile terminal to be measured;
Type of cell phone, script type and the testing time of user's input are received, and is performed and the type of cell phone
Test script corresponding with script type;
Test report is generated after the completion of test script execution, and sends the test report and is used to described
The mailbox that family is specified.
2. according to the method described in claim 1, it is characterised in that the cell phone type for receiving user's input
Type, script type and testing time, and perform test script corresponding with the type of cell phone and script type
Including:
Receive type of cell phone, script type and the testing time of user's input;
It is attached by IP address with the server for storing test script;
The type of cell phone and the corresponding test script of script type are obtained by store path;
Perform the type of cell phone and the corresponding test script of script type.
3. method according to claim 1 or 2, it is characterised in that the prerequisite includes common
Option, network options, contact people option, message registration option, short message option and multimedia message option.
4. a kind of mobile terminal automation testing device, applied to PC ends, it is characterised in that described device
Including first processing module, Second processing module, the 3rd processing module and fourth processing module, wherein,
The first processing module, the trigger command of the automatic setting prerequisite for receiving user's input,
And according to the trigger command by the APK application journeys of the prerequisite needed for for setting the automatic test
Sequence is sent to the mobile terminal to be measured being connected with the PC ends so that the user is applied by the APK
Program carries out the setting of the prerequisite in the mobile terminal to be measured;
The Second processing module, is provided with for receiving the prerequisite that the mobile terminal to be measured is sent
Order;And the resource file copy command of user's input is received, and according to the resource file copy command,
Resource file is sent to the mobile terminal to be measured;
3rd processing module, type of cell phone, script type and testing time for receiving user's input,
And perform test script corresponding with the type of cell phone and script type;
The fourth processing module, for generating test report after the completion of test script execution, concurrently
The mailbox for sending the test report to be specified to the user.
5. device according to claim 4, it is characterised in that the 3rd processing module includes receiving
Unit, associative cell, acquiring unit and execution unit, wherein,
The receiving unit, type of cell phone, script type and testing time for receiving user's input;
The associative cell, for being attached by IP address with the server for storing test script;
The acquiring unit, for obtaining the type of cell phone and the corresponding survey of script type by store path
Training sheet;
The execution unit, for performing the type of cell phone and the corresponding test script of script type.
6. device according to claim 5, it is characterised in that the prerequisite include common option,
Network options, contact people option, message registration option, short message option and multimedia message option.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610148155.9A CN107193728A (en) | 2016-03-15 | 2016-03-15 | Mobile terminal automation testing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610148155.9A CN107193728A (en) | 2016-03-15 | 2016-03-15 | Mobile terminal automation testing method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107193728A true CN107193728A (en) | 2017-09-22 |
Family
ID=59870731
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610148155.9A Pending CN107193728A (en) | 2016-03-15 | 2016-03-15 | Mobile terminal automation testing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107193728A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110505352A (en) * | 2018-05-17 | 2019-11-26 | 腾讯科技(深圳)有限公司 | Call quality test method, system, computer equipment and computer storage medium |
CN112306857A (en) * | 2020-02-24 | 2021-02-02 | 北京字节跳动网络技术有限公司 | Method and apparatus for testing applications |
CN112383665A (en) * | 2020-11-06 | 2021-02-19 | 闻泰通讯股份有限公司 | Information processing method, information processing device, computer equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102421132A (en) * | 2011-07-29 | 2012-04-18 | 展讯通信(上海)有限公司 | Test system, test equipment and test method for mobile terminal |
CN104853020A (en) * | 2015-03-19 | 2015-08-19 | 惠州Tcl移动通信有限公司 | Interaction test method and terminal thereof |
CN104978263A (en) * | 2014-04-09 | 2015-10-14 | 腾讯科技(深圳)有限公司 | Mobile terminal application program test method and mobile terminal application program test system |
US20150339215A1 (en) * | 2013-07-02 | 2015-11-26 | Tencent Technology (Shenzhen) Company Limited | Systems and Methods for Testing Terminal Applications |
CN105302722A (en) * | 2015-11-03 | 2016-02-03 | 腾讯科技(深圳)有限公司 | CTS automatic test method and apparatus |
-
2016
- 2016-03-15 CN CN201610148155.9A patent/CN107193728A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102421132A (en) * | 2011-07-29 | 2012-04-18 | 展讯通信(上海)有限公司 | Test system, test equipment and test method for mobile terminal |
US20150339215A1 (en) * | 2013-07-02 | 2015-11-26 | Tencent Technology (Shenzhen) Company Limited | Systems and Methods for Testing Terminal Applications |
CN104978263A (en) * | 2014-04-09 | 2015-10-14 | 腾讯科技(深圳)有限公司 | Mobile terminal application program test method and mobile terminal application program test system |
CN104853020A (en) * | 2015-03-19 | 2015-08-19 | 惠州Tcl移动通信有限公司 | Interaction test method and terminal thereof |
CN105302722A (en) * | 2015-11-03 | 2016-02-03 | 腾讯科技(深圳)有限公司 | CTS automatic test method and apparatus |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110505352A (en) * | 2018-05-17 | 2019-11-26 | 腾讯科技(深圳)有限公司 | Call quality test method, system, computer equipment and computer storage medium |
CN110505352B (en) * | 2018-05-17 | 2021-09-24 | 腾讯科技(深圳)有限公司 | Call quality testing method, system, computer device and computer storage medium |
CN112306857A (en) * | 2020-02-24 | 2021-02-02 | 北京字节跳动网络技术有限公司 | Method and apparatus for testing applications |
CN112383665A (en) * | 2020-11-06 | 2021-02-19 | 闻泰通讯股份有限公司 | Information processing method, information processing device, computer equipment and storage medium |
CN112383665B (en) * | 2020-11-06 | 2023-06-06 | 闻泰通讯股份有限公司 | Information processing method, apparatus, computer device, and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111159049B (en) | Automatic interface testing method and system | |
CN104281518B (en) | Terminal applies test method, device, system, platform and mobile terminal | |
CN105302722B (en) | CTS automatic testing method and device | |
WO2017083207A1 (en) | Digital assistant setting up device | |
US20200026640A1 (en) | Systems and methods for modular test platform for applications | |
CN104778121A (en) | Game program test method, device and system | |
CN113312064B (en) | Method and device for installing and configuring physical machine and computer readable medium | |
CN106533719A (en) | Method and system for realizing cluster deployment | |
CN107391362A (en) | Application testing method, mobile terminal and storage medium | |
CN105022687A (en) | Implementation method and device of sliding operation in automated testing scheme | |
CN108628739A (en) | A kind of method that Lua scripts are debugged, client, server and debugger | |
CN109344058B (en) | Automatic small program testing method | |
CN107193728A (en) | Mobile terminal automation testing method and device | |
CN110659021B (en) | Development and test system for micro application in mobile terminal | |
CN111158987B (en) | Health check method and device for micro-service architecture | |
CN111427776A (en) | Automatic testing method and device for intelligent equipment | |
CN108023905B (en) | Internet of things application system and method | |
CN113794602B (en) | Equipment testing method and device, terminal equipment and storage medium | |
CN105487978A (en) | Method and system for automatically testing application software based on UFT | |
CN109729346B (en) | Remote debugging method and system for television, debugging terminal and television terminal | |
CN105426192A (en) | Information modification method and terminal | |
CN109144850B (en) | Method and system for testing interactive communication of mobile terminal | |
CN108540344B (en) | Router upgrading test method and system | |
CN105095076B (en) | Method and device for testing compatibility between application software versions | |
CN111930625B (en) | Log acquisition method, device and system based on cloud service platform |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170922 |
|
RJ01 | Rejection of invention patent application after publication |