CN104317720A - Mobile terminal automated testing system and method based on Robotium automated scripts - Google Patents

Mobile terminal automated testing system and method based on Robotium automated scripts Download PDF

Info

Publication number
CN104317720A
CN104317720A CN201410636163.9A CN201410636163A CN104317720A CN 104317720 A CN104317720 A CN 104317720A CN 201410636163 A CN201410636163 A CN 201410636163A CN 104317720 A CN104317720 A CN 104317720A
Authority
CN
China
Prior art keywords
mobile terminal
robotium
event
automatized script
automated
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.)
Granted
Application number
CN201410636163.9A
Other languages
Chinese (zh)
Other versions
CN104317720B (en
Inventor
陈潇潞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huzhou YingLie Intellectual Property Operation Co.,Ltd.
Original Assignee
Shanghai Feixun Data Communication Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Feixun Data Communication Technology Co Ltd filed Critical Shanghai Feixun Data Communication Technology Co Ltd
Priority to CN201410636163.9A priority Critical patent/CN104317720B/en
Publication of CN104317720A publication Critical patent/CN104317720A/en
Application granted granted Critical
Publication of CN104317720B publication Critical patent/CN104317720B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a mobile terminal automated testing system and method based on the Robotium automated scripts. The method includes the steps: creating an automated testing framework packet by a computer; controlling a mobile terminal to run applications of the Robotium automated scripts by the computer; setting and executing the applications needing execution in the automated testing framework packet according to an internal testing setup file by the mobile terminal; writing testing results into the automated testing framework packet by the mobile terminal and transmitting the automated testing framework packet to the computer. The automated testing framework packet is created by the computer, a JAVA unit testing framework packet is set, the computer can directly start the Robotium automated scripts, and starting of the Robotium automated scripts by an Eclipse framework is avoided. A control application executing packet is set in the testing framework packet to control the mobile terminal to execute related Robotium automated testing applications or not, and the testing results are stored.

Description

A kind of mobile terminal automation testing system and method based on Robotium automatized script
Technical field
The present invention relates to mobile terminal automation testing method, be specifically related to a kind of mobile terminal automation testing system and method based on Robotium automatized script.
Background technology
In prior art, robotium is as a kind of automated test frame based on Android system, black box automatic test is carried out in application mainly for Android platform, need first to start Eclipse program and carry out configuration surroundings, this makes automatic test script apply on different computing machine to be very limited.
Prior art is carried out robotium automatized script and is produced based on the robotization frame J Unit of Java, and the test report content of JUnit is few and not comprehensive.Once after exporting as xml file, JUnit only has Fail item identify and do not have Pass item identify, and when the many and user of test Case number only need wherein several test time, complicated operation, and needs human intervention more in the process of implementation, waste of manpower.
Summary of the invention
The object of the present invention is to provide a kind of mobile terminal automation testing system and method based on Robotium automatized script, automated test frame bag is created by computing machine, JAVA unit testing framework bag is set, make computing machine can directly start Robotium automatized script, avoid and start Robotium automatized script by Eclipse framework.In this test frame bag, control application is set and performs bag, control the related application whether mobile terminal performs Robotium automatic test, and preserve test result.
In order to achieve the above object, the present invention is achieved through the following technical solutions:
Based on a mobile terminal automation testing method for Robotium automatized script, be characterized in, the method comprises following steps:
S1, computing machine creates automated test frame bag;
S2, described automated test frame bag is sent to described mobile terminal by described computing machine, and controls the application of running of mobile terminal Robotium automatized script;
S3, described mobile terminal according in the test setting file established, arrange and perform in described automated test frame bag the application in the Robotium automatized script needing to perform;
S4, test result is write automated test frame bag by described mobile terminal, and the automated test frame bag after upgrading is sent to described computing machine.
Preferably, this method of testing, before described step S1, also comprises following steps:
Described computing machine creates test setting file, and described test setting file is sent to described mobile terminal;
Described test setting file comprises: Apply Names, reading executing code commands.
Preferably, described automated test frame handbag is containing the JAVA unit testing framework bag by described computer installation; According to described JAVA unit testing framework bag, this computing machine directly starts Robotium automatized script.
Preferably, described automated test frame bag also comprise by described computer installation control apply perform bag;
Described control application performs in bag and comprises: event information class, event control class;
Described event information class comprises: Apply Names, event id, run time version, event title and event result remarks;
Described event control class comprises: read test arranges file utility command, controls application fill order and writing events result command.
Preferably, when described in described computer installation during event information class,
The Apply Names of each application in event information class described in this computer installation, corresponding event id, event title;
When described application is without the need to performing, this computer installation run time version is without the need to performing field; When described application needs to perform, this computer installation run time version is set to and need performs field.
Preferably, after described computing machine directly starts Robotium automatized script,
Described automated test frame bag is sent in described mobile terminal by described computing machine;
The automated test frame bag of described computer based in mobile terminal, controls Robotium automatized script described in described running of mobile terminal.
Preferably, described step S3 comprises following steps:
S3.1, the read test that described mobile terminal performs in described event control class arranges file utility command, reads the Apply Names in the described test setting file in mobile terminal, reads executing code commands;
S3.2, described mobile terminal performs the control application fill order in described event control class, call described event information class, search the Apply Names in the event information class identical with the Apply Names in described test setting file, and check the run time version value that this Apply Names is corresponding;
S3.3, according to Apply Names, event id in described event information class, described mobile terminal calls and performs the related application of described Robotium automatic test.
Preferably, described step S3.2 comprises following steps:
S3.2.1, described mobile terminal performs the reading executing code commands in described test setting file, reads the run time version of the correspondence in described event information class; When run time version is for during without the need to performing field, jump to described step S4; When run time version is for performing field, perform step S3.3.
Preferably, described step S4 comprises following steps:
S4.1, when described mobile terminal be finished Robotium automatized script related application after, this mobile terminal controls writing events result command in described event control class and creates event result file;
S4.2, described mobile terminal is by event result, event handling remarks write said write event result file;
S4.3, said write event result file is sent in the event result remarks of described event information class by described mobile terminal;
S4.4, the automated test frame bag after renewal is sent to described computing machine by described mobile terminal.
Based on a mobile terminal automation testing system for Robotium automatized script, be characterized in, this test macro comprises:
Mobile terminal;
Computing machine, is connected with described mobile terminal; Described computing machine creates test setting file, automated test frame bag respectively, and described test setting file, automated test frame bag are sent to described mobile terminal; And control the application of running of mobile terminal Robotium automatized script.
The present invention compared with prior art has the following advantages:
The present invention needs to perform by creating which application in test setting file control Robotium automatized script.The mobile terminal test feedback that is easily understood is obtained by reading writing events destination file.By creating automated test frame bag at computing machine and arranging JAVA unit testing framework bag, avoid configuring Eclipse framework on different computing machine, increase work efficiency.
Accompanying drawing explanation
Fig. 1 is the overall flow schematic diagram of a kind of mobile terminal automation testing method based on Robotium automatized script of the present invention.
Embodiment
Below in conjunction with accompanying drawing, by describing a preferably specific embodiment in detail, the present invention is further elaborated.
Based on a mobile terminal automation testing system for Robotium automatized script, this test macro comprises: mobile terminal, the computing machine be connected with described mobile terminal.Described computing machine creates test setting file, automated test frame bag respectively, and described test setting file, automated test frame bag are sent to described mobile terminal; And control the application of running of mobile terminal Robotium automatized script.
As shown in Figure 1, a kind of mobile terminal automation testing method based on Robotium automatized script, the method comprises following steps:
This method of testing, before described step S1, also comprises following steps:
Computing machine creates test setting file, and described test setting file is sent to described mobile terminal.
Described test setting file comprises: Apply Names, reading executing code commands.
S1, computing machine creates automated test frame bag.This step S1 comprises following steps:
S1.1, computer installation JAVA unit testing framework bag.
In the present embodiment, computer installation JAVA unit testing framework bag is official of Google jar bag-testjunit, and the unit testing starter (Instrumentation runner) wherein applied in configuration (i.e. Run Configurations) is changed to android special cell test starting device (com.neenbedankt.android.test.InstrumentationTestRunner).
S1.2, computer installation controls application and performs bag.This step S1.2 comprises following steps:
S1.2.1, computer installation event information class (being also CaseInfo class); Described CaseInfo class comprises: Apply Names, event id, run time version, event title and event result remarks.This step comprises following steps:
The Apply Names of each application in S1.2.1.1, computer installation CaseInfo class, corresponding event id, event title.
In the present embodiment, CaseInfo class comprises Apply Names field--the Name of each application, corresponding event ID field-Case Id, event name field-CaseName, run time version field-Execute, event result memo field-Comment.
S1.2.1.2, when applying without the need to performing, this computer installation run time version is without the need to performing field; When described application needs to perform, this computer installation run time version is set to and need performs field.
In the present embodiment, when applying without the need to performing, Execute=0; When application needs to perform, Execute is set to non-zero value.
S1.2.2, computer installation event control class (being also CaseControl class); Described CaseControl class comprises: read test arranges file utility command, controls application fill order and writing events result command.
In the present embodiment, arranging read test, to arrange file utility command be readCaseSetting, and arranging and controlling application fill order is checkCaseSetting, and arranging writing events result command is caseResToXml.
S1.2.3, described CaseInfo class, CaseControl class are combined to form described control application and perform bag by computing machine.
S1.3, described JAVA unit testing framework bag, control application are performed bag and are combined to form described automated test frame bag by computing machine.
In the present embodiment, the automated test frame bag of computer installation is a jar bag, and this jar bag comprises respectively: testjunit jar wraps, control application performs bag.
S2, computing machine controls the application of running of mobile terminal Robotium automatized script.This step S2 comprises following steps:
S2.1, according to the JAVA unit testing framework bag in automated test frame bag, computing machine directly starts Robotium automatized script.
In the present embodiment, owing to wrapping containing testjunit jar in automated test frame bag, then can start this testjunit jar and wrap, Robotium automatized script is run directly in computing machine.
S2.2, described automated test frame bag is sent in described mobile terminal by computing machine.
S2.3, the automated test frame bag of computer based in mobile terminal, controls Robotium automatized script described in described running of mobile terminal.
S3, mobile terminal according in the test setting file established, arrange and perform in described automated test frame bag the application needing to perform.This step S3 comprises following steps:
S3.1, the read test that mobile terminal performs in CaseControl class arranges file utility command, reads the Apply Names in the described test setting file in mobile terminal, reads executing code commands.
S3.2, mobile terminal performs the control application fill order in described CaseControl class, call described CaseInfo class, search the Apply Names in the CaseInfo class identical with the Apply Names in test setting file, and check the run time version value that this Apply Names is corresponding.This step S3.2 comprises following steps:
S3.2.1, mobile terminal performs the reading executing code commands in test setting file, reads the run time version of the correspondence in CaseInfo class; When run time version is for during without the need to performing field, jump to described step S4; When run time version is for performing field, perform step S3.3.
In the present embodiment, test setting file is set to setting.xml file, and this file concrete structure is as follows:
Wherein, Case Id represents the ID of different event, as above-mentioned example, only has the Execute=1 of the application correspondence of Case Id=" U_1 ", illustrates that mobile terminal only needs the application that Case Id=" U_1 " is corresponding, and other application are without the need to performing.
S3.3, according to Apply Names, event id in described CaseInfo class, described mobile terminal calls and performs the related application of Robotium automatic test.
S4, test result is write automated test frame bag by mobile terminal, and the automated test frame bag after upgrading is sent to described computing machine.This step S4 comprises following steps:
S4.1, when mobile terminal be finished Robotium automatized script related application after, this mobile terminal controls writing events result command in described CaseControl class and creates event result file.
In the present embodiment, event result file is caseres.xml file.
S4.2, mobile terminal is by event result, event handling remarks write said write event result file.
In the present invention, specific embodiment caseres.xml file is as follows:
As above-mentioned example, show the result of different application correspondences, process remarks and event title.Wherein Res Id is also the Case Id in corresponding setting.xml file.
S4.3, said write event result file is sent in the event result remarks of described CaseInfo class by mobile terminal;
S4.4, the automated test frame bag after renewal is sent to computing machine by mobile terminal.
Although content of the present invention has done detailed introduction by above preferred embodiment, will be appreciated that above-mentioned description should not be considered to limitation of the present invention.After those skilled in the art have read foregoing, for multiple amendment of the present invention and substitute will be all apparent.Therefore, protection scope of the present invention should be limited to the appended claims.

Claims (10)

1., based on a mobile terminal automation testing method for Robotium automatized script, it is characterized in that, the method comprises following steps:
S1, computing machine creates automated test frame bag;
S2, described automated test frame bag is sent to described mobile terminal by described computing machine, and controls the application of running of mobile terminal Robotium automatized script;
S3, described mobile terminal according in the test setting file established, arrange and perform in described automated test frame bag the application in the Robotium automatized script needing to perform;
S4, test result is write automated test frame bag by described mobile terminal, and the automated test frame bag after upgrading is sent to described computing machine.
2., as claimed in claim 1 based on the mobile terminal automation testing method of Robotium automatized script, it is characterized in that, this method of testing, before described step S1, also comprises following steps:
Described computing machine creates test setting file, and described test setting file is sent to described mobile terminal;
Described test setting file comprises: Apply Names, reading executing code commands.
3. as claimed in claim 1 based on the mobile terminal automation testing method of Robotium automatized script, it is characterized in that, described automated test frame handbag is containing the JAVA unit testing framework bag by described computer installation; According to described JAVA unit testing framework bag, this computing machine directly starts Robotium automatized script.
4., as claimed in claim 2 based on the mobile terminal automation testing method of Robotium automatized script, it is characterized in that, described automated test frame bag also comprise by described computer installation control apply perform bag;
Described control application performs in bag and comprises: event information class, event control class;
Described event information class comprises: Apply Names, event id, run time version, event title and event result remarks;
Described event control class comprises: read test arranges file utility command, controls application fill order and writing events result command.
5. as claimed in claim 4 based on the mobile terminal automation testing method of Robotium automatized script, it is characterized in that, when described in described computer installation during event information class, the Apply Names of each application in event information class described in this computer installation, corresponding event id, event title;
When described application is without the need to performing, this computer installation run time version is without the need to performing field; When described application needs to perform, this computer installation run time version is set to and need performs field.
6. as claimed in claim 3 based on the mobile terminal automation testing method of Robotium automatized script, it is characterized in that, after described computing machine directly starts Robotium automatized script, described automated test frame bag is sent in described mobile terminal by described computing machine;
The automated test frame bag of described computer based in mobile terminal, controls Robotium automatized script described in described running of mobile terminal.
7., as claimed in claim 5 based on the mobile terminal automation testing method of Robotium automatized script, it is characterized in that, described step S3 comprises following steps:
S3.1, the read test that described mobile terminal performs in described event control class arranges file utility command, reads the Apply Names in the described test setting file in mobile terminal, reads executing code commands;
S3.2, described mobile terminal performs the control application fill order in described event control class, call described event information class, search the Apply Names in the event information class identical with the Apply Names in described test setting file, and check the run time version value that this Apply Names is corresponding;
S3.3, according to Apply Names, event id in described event information class, described mobile terminal calls and performs the related application of described Robotium automatic test.
8., as claimed in claim 7 based on the mobile terminal automation testing method of Robotium automatized script, it is characterized in that, described step S3.2 comprises following steps:
S3.2.1, described mobile terminal performs the reading executing code commands in described test setting file, reads the run time version of the correspondence in described event information class; When run time version is for during without the need to performing field, jump to described step S4; When run time version is for performing field, perform step S3.3.
9., as claimed in claim 3 based on the mobile terminal automation testing method of Robotium automatized script, it is characterized in that, described step S4 comprises following steps:
S4.1, when described mobile terminal be finished Robotium automatized script related application after, this mobile terminal controls writing events result command in described event control class and creates event result file;
S4.2, described mobile terminal is by event result, event handling remarks write said write event result file;
S4.3, said write event result file is sent in the event result remarks of described event information class by described mobile terminal;
S4.4, the automated test frame bag after renewal is sent to described computing machine by described mobile terminal.
10. based on a mobile terminal automation testing system for Robotium automatized script, it is characterized in that, this test macro comprises:
Mobile terminal;
Computing machine, is connected with described mobile terminal; Described computing machine creates test setting file, automated test frame bag respectively, and described test setting file, automated test frame bag are sent to described mobile terminal; And control the application of running of mobile terminal Robotium automatized script.
CN201410636163.9A 2014-11-12 2014-11-12 A kind of mobile terminal automation testing system and method based on Robotium automatized script Active CN104317720B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410636163.9A CN104317720B (en) 2014-11-12 2014-11-12 A kind of mobile terminal automation testing system and method based on Robotium automatized script

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410636163.9A CN104317720B (en) 2014-11-12 2014-11-12 A kind of mobile terminal automation testing system and method based on Robotium automatized script

Publications (2)

Publication Number Publication Date
CN104317720A true CN104317720A (en) 2015-01-28
CN104317720B CN104317720B (en) 2019-09-13

Family

ID=52372955

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410636163.9A Active CN104317720B (en) 2014-11-12 2014-11-12 A kind of mobile terminal automation testing system and method based on Robotium automatized script

Country Status (1)

Country Link
CN (1) CN104317720B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106126414A (en) * 2016-06-14 2016-11-16 珠海格力电器股份有限公司 Application software testing method and system
CN108415820A (en) * 2017-02-09 2018-08-17 腾讯科技(深圳)有限公司 The test method and device of application installation package

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101093108B1 (en) * 2010-09-09 2011-12-13 주식회사 이노와이어리스 Automatic test apparatus for dut
CN102541740A (en) * 2012-01-04 2012-07-04 广东欧珀移动通信有限公司 Android-based automatic test method for mobile phone notes
CN103744784A (en) * 2014-01-06 2014-04-23 中国移动(深圳)有限公司 Method and system for automatically testing mobile phone applications

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101093108B1 (en) * 2010-09-09 2011-12-13 주식회사 이노와이어리스 Automatic test apparatus for dut
CN102541740A (en) * 2012-01-04 2012-07-04 广东欧珀移动通信有限公司 Android-based automatic test method for mobile phone notes
CN103744784A (en) * 2014-01-06 2014-04-23 中国移动(深圳)有限公司 Method and system for automatically testing mobile phone applications

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
潘大鹏: "面向Android应用的分布式自动化测试系统设计及实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106126414A (en) * 2016-06-14 2016-11-16 珠海格力电器股份有限公司 Application software testing method and system
CN106126414B (en) * 2016-06-14 2019-12-06 珠海格力电器股份有限公司 Application software testing method and system
CN108415820A (en) * 2017-02-09 2018-08-17 腾讯科技(深圳)有限公司 The test method and device of application installation package
CN108415820B (en) * 2017-02-09 2021-05-14 腾讯科技(深圳)有限公司 Test method and device of application installation package

Also Published As

Publication number Publication date
CN104317720B (en) 2019-09-13

Similar Documents

Publication Publication Date Title
CN106933609B (en) Android application program installation package generation method and device
CN103019928B (en) A kind of automated testing method and system
CN104281518A (en) Terminal application test method, device, system and platform and mobile terminal
CN104102506B (en) A kind of Android Acceleration of starting methods based on ARM platforms
CN107733985B (en) Method and device for deploying functional components of cloud computing system
CN104298534B (en) Programmed method and device based on Lua language
CN103309800B (en) A kind of webpage automated testing method and system
CN106707848A (en) Control program organization structure of control system and download method
US10073761B2 (en) Legacy system
CN105204913A (en) Method and system for running Linux application on Android operating system and system
CN105224401A (en) Scheduled task control method and device
CN105786538A (en) Software upgrading method and device based on Android system
CN109933350B (en) Method and device for embedding codes in application and electronic equipment
CN103399814A (en) Automated testing method and automated testing device
CN106528184A (en) App development method based on cordova platform
CN106569854B (en) Method and system for setting equipment firmware and realizing factory test
CN104317720A (en) Mobile terminal automated testing system and method based on Robotium automated scripts
CN102999371B (en) Interface Development method and system based on Lua script
CN106557411B (en) Method and system for testing Hybrid application in Android system
CN103309741A (en) Method and device for calling plug-in function
CN113254054A (en) Intelligent contract one-stop development system and method
CN108614764B (en) IMA application software fault injection method
CN110825373B (en) Mobile terminal dynamic method and device
CN112650487A (en) Hybrid application development method, system, computer device and storage medium
CN103294510A (en) Dynamic application loading method and device

Legal Events

Date Code Title Description
C06 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
TR01 Transfer of patent right

Effective date of registration: 20201209

Address after: 313105 Jincun Village, Lushan Township, Changxing County, Huzhou City, Zhejiang Province

Patentee after: Changxing Lushan golden Heron Incubator Co., Ltd

Address before: No.3666 Sixian Road, Songjiang District, Shanghai, 201620

Patentee before: Phicomm (Shanghai) Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20211206

Address after: 313000 room 1019, Xintiandi commercial office, Yishan street, Wuxing District, Huzhou, Zhejiang, China

Patentee after: Huzhou YingLie Intellectual Property Operation Co.,Ltd.

Address before: 313105 Jincun Village, Lushan Township, Changxing County, Huzhou City, Zhejiang Province

Patentee before: Changxing Lushan golden Heron Incubator Co., Ltd

TR01 Transfer of patent right