CN104407980A - Mobile application automated testing device and method - Google Patents

Mobile application automated testing device and method Download PDF

Info

Publication number
CN104407980A
CN104407980A CN201410782404.0A CN201410782404A CN104407980A CN 104407980 A CN104407980 A CN 104407980A CN 201410782404 A CN201410782404 A CN 201410782404A CN 104407980 A CN104407980 A CN 104407980A
Authority
CN
China
Prior art keywords
application program
measured
mobile phone
playback
record
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
CN201410782404.0A
Other languages
Chinese (zh)
Other versions
CN104407980B (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.)
Yonyou Software Co Ltd
Original Assignee
Yonyou Software 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 Yonyou Software Co Ltd filed Critical Yonyou Software Co Ltd
Priority to CN201410782404.0A priority Critical patent/CN104407980B/en
Publication of CN104407980A publication Critical patent/CN104407980A/en
Application granted granted Critical
Publication of CN104407980B publication Critical patent/CN104407980B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Telephone Function (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a mobile application automated testing device which comprises a terminal connecting unit, a testing script recording unit and a task testing unit, wherein the terminal connecting unit is used for installing to-be-tested application program on a PC, a mobile phone is connected with the PC through a USB line, and mobile phone connection is recognized under the USB debugging mode; the testing script recording unit is used for utilizing the android system to record, translate and replay the to-be-tested application program, and/or utilizing the iOS system to record and replay the to-be-tested application program; the task testing unit is used for adding corresponding verification points in automated scripts, verifying the to-be-tested application program and outputting the verification result. The invention further provides a mobile application automated testing method. Through the technical scheme, on the basis of the existing application testing mode, a simple object type is fully utilized to complete application test of a complicated object type, and a general and unified testing thinking, participated by multiple object types, of application testing, is established.

Description

Mobile solution automatic test device and method
Technical field
The present invention relates to technical field of data processing, particularly, relate to a kind of Mobile solution automatic test device and a kind of Mobile solution automated testing method.
 
Background technology
The automatic test of software is a kind of process being converted into machine execution with the behavioral test artificially driven.Tester writes automatic test script according to test case, then is performed the normal condition and exception condition verifying and pre-set by machine.Automatized script just fortune can run when engineers sleep, and logging test results; Automatic test can also constantly repeat certain action and can not feel tired; After with the addition of New function, the test of some original functions can also be returned to ensure that it is unaffected.Save manpower, time and hardware resource in the process, improve testing efficiency and accuracy rate.
Due to operation system of smart phone and the UI singularity compared with computer, writing automatic test script for smart mobile phone application program is a very complicated thing, and is difficult to ensure correctness.
Current smart mobile phone has almost spread to the degree of staff one, and Mobile solution automatic test is the unavoidable problem in this field.
Therefore, need a kind of new application testing technology, on existing application testing mode basis, the application testing that simple object type completes complex object type can be made full use of, set up general, the unified test thinking of the application testing that multi-object type participates in.
 
Summary of the invention
The present invention is just based on the problems referred to above, propose a kind of new application testing technology, on existing application testing mode basis, the application testing that simple object type completes complex object type can be made full use of, set up general, the unified test thinking of the application testing that multi-object type participates in.
In view of this, the present invention proposes a kind of Mobile solution automatic test device, comprising: terminal connection unit, for installing application program to be measured at PC end, mobile phone connects PC end by USB line, recognizes mobile phone and connect under USB debugging mode; Test script recording elements, for when having recognized mobile phone and having connected, has utilized Android system to record application program to be measured, has translated and playback process, and/or, utilize iOS system to record and playback process application program to be measured; Task test cell, for based on the result to application program to be measured, adds corresponding check post, verifies, and export the result to application program to be measured in automatized script.In this technical scheme, automatized script can be generated easily, the input of tester in compile script is reduced greatly.
In technique scheme, preferably, described test script recording elements, specifically comprises: recording engine processing module, for when having recognized mobile phone and having connected, has utilized Android system to record application program to be measured, translates and playback process; And/or robotization engine processing module, for when having recognized mobile phone and having connected, has utilized iOS system to record and playback process application program to be measured.In this technical scheme, can be called by continuous integrating, automatic compiling, coil after carry out Black-box Testing, test result again continuous integration system read represent, make exploitation whole process realize closed loop.
In technique scheme, preferably, the operation that described recording engine processing module utilizes Android system to record application program to be measured, comprise further: use the adb order getevent that Android system carries, user is at hand hands-operation, action is sent on PC end in the mode of flow of event, resolves lid flow of event and obtains the click location of user on mobile phone screen; And/or use adb order sectional drawing function, be sent to by mobile phone screen sectional drawing in the interface of instrument PC end, user clicks the mobile phone sectional drawing in interface with mouse, obtains the click location on mobile phone screen; Send instructions to mobile phone with the use of sendkey order, mobile phone screen can hold the sectional drawing screen in interface to be consistent with PC simultaneously; After obtaining the behavior act of user on mobile phone and/or coordinate information, use uiautomator to obtain in current screen and comprise the coordinate of all objects, the information of shared screen area; And/or, the operation that described recording engine processing module utilizes Android system to translate application program to be measured, comprise further: use the Robotium framework of increasing income as playback engine, use java language to read the script xml file recorded, its content is translated and becomes Robotium framework test case used; And/or, described recording engine processing module utilizes Android system to carry out the operation of playback to application program to be measured, comprise further: preset playback environment, unpack heavily to sign to the apk bag of application program to be measured and pack again, reinstall on mobile phone, make the action that translated use-case can be recorded before playback on mobile phone; And/or, the operation that described robotization engine processing module utilizes iOS system to record application program to be measured, comprise further: the application program utilizing UI Automation to sign to Developer or the application program operated in simulator are recorded, obtain the behavior act of user, preserve with object form; And/or, described robotization engine processing module utilizes iOS system to carry out the operation of playback to application program to be measured, comprise further: after application program to be measured is carried out Developer signature, the certificate of upper developer is configured after taking source code, directly be installed in real equipment by Xcode compiling, the automatic test script of playback UI Automation.In this technical scheme, can testing efficiency be improved, make tester more be absorbed in foundation and the exploitation of new test module, thus improve test coverage.
In technique scheme, preferably, described task test cell, specifically comprise: test assignment authentication module, for based on the result to application program to be measured, in automatized script, add corresponding check post, check post is translated into the checking statement that can be played, application program to be measured is verified; The result output module, after having verified, has checked corresponding playback result, and configuration email address, gives corresponding personnel by daily record timed sending.In this technical scheme, can, so that the digital management of test assets, make test assets can obtain multiplexing in whole software test lifecycle.
In technique scheme, preferably, the operation that described test assignment authentication module is verified application program to be measured, comprises further: to the checking of the expectation function of application program to be measured, normal condition and exception condition; And/or the playback result that described the result output module is checked, comprises and performs use-case sum, by counting, unsuccessfully counting, skip number, failed error stack information, failed sectional drawing.In this technical scheme, the test activity of mechanism can be made to carry out more proceduring, meet the thought that CMMI process is improved.
According to a further aspect of the invention, also proposed a kind of Mobile solution automated testing method, comprising: step 202: install application program to be measured at PC end, mobile phone connects PC end by USB line, recognizes mobile phone and connect under USB debugging mode; Step 204: when having recognized mobile phone and having connected, utilized Android system to record application program to be measured, translate and playback process, and/or, utilize iOS system to record and playback process application program to be measured; Step 206: based on the result to application program to be measured, adds corresponding check post in automatized script, verifies, and export the result to application program to be measured.In this technical scheme, automatized script can be generated easily, the input of tester in compile script is reduced greatly.
In technique scheme, preferably, described step 204, specifically comprises: step 302: when having recognized mobile phone and having connected, utilized Android system to record application program to be measured, translate and playback process; And/or, step 304: when having recognized mobile phone and having connected, utilize iOS system to record and playback process application program to be measured.In this technical scheme, can be called by continuous integrating, automatic compiling, coil after carry out Black-box Testing, test result again continuous integration system read represent, make exploitation whole process realize closed loop.
In technique scheme, preferably, the operation that described step 302 utilizes Android system to record application program to be measured, comprise further: use the adb order getevent that Android system carries, user is at hand hands-operation, action is sent on PC end in the mode of flow of event, resolves lid flow of event and obtains the click location of user on mobile phone screen; And/or use adb order sectional drawing function, be sent to by mobile phone screen sectional drawing in the interface of instrument PC end, user clicks the mobile phone sectional drawing in interface with mouse, obtains the click location on mobile phone screen; Send instructions to mobile phone with the use of sendkey order, mobile phone screen can hold the sectional drawing screen in interface to be consistent with PC simultaneously; After obtaining the behavior act of user on mobile phone and/or coordinate information, use uiautomator to obtain in current screen and comprise the coordinate of all objects, the information of shared screen area; And/or, the operation that described step 302 utilizes Android system to translate application program to be measured, comprise further: use the Robotium framework of increasing income as playback engine, use java language to read the script xml file recorded, its content is translated and becomes Robotium framework test case used; And/or, described step 302 utilizes Android system to carry out the operation of playback to application program to be measured, comprise further: preset playback environment, unpack heavily to sign to the apk bag of application program to be measured and pack again, reinstall on mobile phone, make the action that translated use-case can be recorded before playback on mobile phone; And/or, the operation that described step 304 utilizes iOS system to record application program to be measured, comprise further: the application program utilizing UI Automation to sign to Developer or the application program operated in simulator are recorded, obtain the behavior act of user, preserve with object form; And/or, described step 304 utilizes iOS system to carry out the operation of playback to application program to be measured, comprise further: after application program to be measured is carried out Developer signature, the certificate of upper developer is configured after taking source code, directly be installed in real equipment by Xcode compiling, the automatic test script of playback UI Automation.In this technical scheme, can testing efficiency be improved, make tester more be absorbed in foundation and the exploitation of new test module, thus improve test coverage.
In technique scheme, preferably, described step 206, specifically comprise: step 402 is based on the result to application program to be measured, in automatized script, add corresponding check post, check post is translated into the checking statement that can be played, application program to be measured is verified; After step 404 has been verified, check corresponding playback result, configuration email address, gives corresponding personnel by daily record timed sending.In this technical scheme, can, so that the digital management of test assets, make test assets can obtain multiplexing in whole software test lifecycle.
In technique scheme, preferably, the operation that described step 402 is verified application program to be measured, comprises further: to the checking of the expectation function of application program to be measured, normal condition and exception condition; And/or the playback result that described step 404 is checked, comprises and performs use-case sum, by counting, unsuccessfully counting, skip number, failed error stack information, failed sectional drawing.In this technical scheme, the test activity of mechanism can be made to carry out more proceduring, meet the thought that CMMI process is improved.
By above technical scheme, on existing application testing mode basis, the application testing that simple object type completes complex object type can be made full use of, set up general, the unified test thinking of the application testing that multi-object type participates in.
 
Accompanying drawing explanation
Fig. 1 shows the block diagram of Mobile solution automatic test device according to an embodiment of the invention;
Fig. 2 shows the process flow diagram of Mobile solution automated testing method according to an embodiment of the invention;
Fig. 3 shows the process flow diagram of test script recording elements according to an embodiment of the invention;
Fig. 4 shows the process flow diagram of task test cell according to an embodiment of the invention;
Fig. 5 shows instrument schematic diagram according to an embodiment of the invention;
Fig. 6 shows business process map according to an embodiment of the invention.
 
Embodiment
In order to more clearly understand above-mentioned purpose of the present invention, feature and advantage, below in conjunction with the drawings and specific embodiments, the present invention is further described in detail.It should be noted that, when not conflicting, the feature in the embodiment of the application and embodiment can combine mutually.
Set forth a lot of detail in the following description so that fully understand the present invention; but; the present invention can also adopt other to be different from other modes described here and implement, and therefore, protection scope of the present invention is not by the restriction of following public specific embodiment.
Fig. 1 shows the block diagram of Mobile solution automatic test device according to an embodiment of the invention.
As shown in Figure 1, Mobile solution automatic test device 100 according to an embodiment of the invention, comprising: terminal connection unit 102, and for installing application program to be measured at PC end, mobile phone connects PC end by USB line, recognizes mobile phone and connect under USB debugging mode; Test script recording elements 104, for when having recognized mobile phone and having connected, has utilized Android system to record application program to be measured, has translated and playback process, and/or, utilize iOS system to record and playback process application program to be measured; Task test cell 106, for based on the result to application program to be measured, adds corresponding check post, verifies, and export the result to application program to be measured in automatized script.In this technical scheme, automatized script can be generated easily, the input of tester in compile script is reduced greatly.
In technique scheme, preferably, test script recording elements 104, specifically comprises: recording engine processing module 1042, for when having recognized mobile phone and having connected, has utilized Android system to record application program to be measured, translates and playback process; And/or robotization engine processing module 1044, for when having recognized mobile phone and having connected, has utilized iOS system to record and playback process application program to be measured.In this technical scheme, can be called by continuous integrating, automatic compiling, coil after carry out Black-box Testing, test result again continuous integration system read represent, make exploitation whole process realize closed loop.
In technique scheme, preferably, the operation that recording engine processing module 1042 utilizes Android system to record application program to be measured, comprise further: use the adb order getevent that Android system carries, user is at hand hands-operation, action is sent on PC end in the mode of flow of event, resolves lid flow of event and obtains the click location of user on mobile phone screen; And/or use adb order sectional drawing function, be sent to by mobile phone screen sectional drawing in the interface of instrument PC end, user clicks the mobile phone sectional drawing in interface with mouse, obtains the click location on mobile phone screen; Send instructions to mobile phone with the use of sendkey order, mobile phone screen can hold the sectional drawing screen in interface to be consistent with PC simultaneously; After obtaining the behavior act of user on mobile phone and/or coordinate information, use uiautomator to obtain in current screen and comprise the coordinate of all objects, the information of shared screen area; And/or, the operation that recording engine processing module 1042 utilizes Android system to translate application program to be measured, comprise further: use the Robotium framework of increasing income as playback engine, use java language to read the script xml file recorded, its content is translated and becomes Robotium framework test case used; And/or, recording engine processing module 1042 utilizes Android system to carry out the operation of playback to application program to be measured, comprise further: preset playback environment, unpack heavily to sign to the apk bag of application program to be measured and pack again, reinstall on mobile phone, make the action that translated use-case can be recorded before playback on mobile phone; And/or, the operation that robotization engine processing module 1044 utilizes iOS system to record application program to be measured, comprise further: the application program utilizing UI Automation to sign to Developer or the application program operated in simulator are recorded, obtain the behavior act of user, preserve with object form; And/or, robotization engine processing module 1044 utilizes iOS system to carry out the operation of playback to application program to be measured, comprise further: after application program to be measured is carried out Developer signature, the certificate of upper developer is configured after taking source code, directly be installed in real equipment by Xcode compiling, the automatic test script of playback UI Automation.In this technical scheme, can testing efficiency be improved, make tester more be absorbed in foundation and the exploitation of new test module, thus improve test coverage.
In technique scheme, preferably, task test cell 106, specifically comprise: test assignment authentication module 1062, for based on the result to application program to be measured, in automatized script, add corresponding check post, check post is translated into the checking statement that can be played, application program to be measured is verified; The result output module 1064, after having verified, has checked corresponding playback result, and configuration email address, gives corresponding personnel by daily record timed sending.In this technical scheme, can, so that the digital management of test assets, make test assets can obtain multiplexing in whole software test lifecycle.
In technique scheme, preferably, the operation that test assignment authentication module 1062 is verified application program to be measured, comprises further: to the checking of the expectation function of application program to be measured, normal condition and exception condition; And/or the playback result that the result output module 1064 is checked, comprises and performs use-case sum, by counting, unsuccessfully counting, skip number, failed error stack information, failed sectional drawing.In this technical scheme, the test activity of mechanism can be made to carry out more proceduring, meet the thought that CMMI process is improved.
Fig. 2 shows the process flow diagram of Mobile solution automated testing method according to an embodiment of the invention.
As shown in Figure 2, Mobile solution automated testing method according to an embodiment of the invention, comprising: step 202: install application program to be measured at PC end, and mobile phone connects PC end by USB line, recognizes mobile phone and connect under USB debugging mode; Step 204: when having recognized mobile phone and having connected, utilized Android system to record application program to be measured, translate and playback process, and/or, utilize iOS system to record and playback process application program to be measured; Step 206: based on the result to application program to be measured, adds corresponding check post in automatized script, verifies, and export the result to application program to be measured.In this technical scheme, automatized script can be generated easily, the input of tester in compile script is reduced greatly.
In technique scheme, preferably, as shown in Figure 3, step 204, specifically comprises: step 302: when having recognized mobile phone and having connected, utilized Android system to record application program to be measured, translate and playback process; And/or, step 304: when having recognized mobile phone and having connected, utilize iOS system to record and playback process application program to be measured.In this technical scheme, can be called by continuous integrating, automatic compiling, coil after carry out Black-box Testing, test result again continuous integration system read represent, make exploitation whole process realize closed loop.
In technique scheme, preferably, the operation that step 302 utilizes Android system to record application program to be measured, comprise further: use the adb order getevent that Android system carries, user is at hand hands-operation, action is sent on PC end in the mode of flow of event, resolves lid flow of event and obtains the click location of user on mobile phone screen; And/or use adb order sectional drawing function, be sent to by mobile phone screen sectional drawing in the interface of instrument PC end, user clicks the mobile phone sectional drawing in interface with mouse, obtains the click location on mobile phone screen; Send instructions to mobile phone with the use of sendkey order, mobile phone screen can hold the sectional drawing screen in interface to be consistent with PC simultaneously; After obtaining the behavior act of user on mobile phone and/or coordinate information, use uiautomator to obtain in current screen and comprise the coordinate of all objects, the information of shared screen area; And/or, the operation that step 302 utilizes Android system to translate application program to be measured, comprise further: use the Robotium framework of increasing income as playback engine, use java language to read the script xml file recorded, its content is translated and becomes Robotium framework test case used; And/or, step 302 utilizes Android system to carry out the operation of playback to application program to be measured, comprise further: preset playback environment, unpack heavily to sign to the apk bag of application program to be measured and pack again, reinstall on mobile phone, make the action that translated use-case can be recorded before playback on mobile phone; And/or, the operation that step 304 utilizes iOS system to record application program to be measured, comprise further: the application program utilizing UI Automation to sign to Developer or the application program operated in simulator are recorded, and obtain the behavior act of user, preserve with object form; And/or, step 304 utilizes iOS system to carry out the operation of playback to application program to be measured, comprise further: after application program to be measured is carried out Developer signature, the certificate of upper developer is configured after taking source code, directly be installed in real equipment by Xcode compiling, the automatic test script of playback UI Automation.In this technical scheme, can testing efficiency be improved, make tester more be absorbed in foundation and the exploitation of new test module, thus improve test coverage.
In technique scheme, preferably, as shown in Figure 4, step 206, specifically comprises: step 402, based on the result to application program to be measured, adds corresponding check post in automatized script, check post is translated into the checking statement that can be played, application program to be measured is verified; After step 404 has been verified, check corresponding playback result, configuration email address, gives corresponding personnel by daily record timed sending.In this technical scheme, can, so that the digital management of test assets, make test assets can obtain multiplexing in whole software test lifecycle.
In technique scheme, preferably, the operation that step 402 is verified application program to be measured, comprises further: to the checking of the expectation function of application program to be measured, normal condition and exception condition; And/or the playback result that step 404 is checked, comprises and performs use-case sum, by counting, unsuccessfully counting, skip number, failed error stack information, failed sectional drawing.In this technical scheme, the test activity of mechanism can be made to carry out more proceduring, meet the thought that CMMI process is improved.
Technical scheme of the present invention, just in order to solve the instrument of application program automatic test problem on main flow smart mobile phone in prior art; In view of the operation system of smart phone overwhelming majority is occupied by android and iOS, technical scheme of the present invention provides support to android and iOS two systems.
Technical scheme of the present invention, provides a kind of Mobile solution automated test tool, and android, iOS main flow operation system of smart phone realizes the automatic test to its application.The technical scheme technical issues that need to address of the present invention are as follows:
1, automatized script generates.With the mode generation script recorded, replace the mode of manual compiling script in the past.
2, script portability and reusability.The automatized script that instrument is recorded out is preserved with static text, and file itself does not rely on instrument.
3, script is to the support of playback environment.Behavior act is preserved with the form of object in automatic test script.As long as object exists in tested program, and need not consider playback apparatus resolution, the factor such as to arrange can playback checking.
4, playback script combines with playback framework.Select the playback framework of excellent performance to carry out playback to script, save system resource.
solve the technical scheme of the technology of the present invention problem:
(i) instrument schematic diagram.See Fig. 5.
(ii) the UI of instrument and operation.
This instrument uses java language compilation, and interface is generated by swt, succinctly understandable.Its operating process is, install at PC end and open instrument, mobile phone connects computer USB debugging mode of performing fighting by USB line, and at this moment instrument can identify that mobile phone connects (needing PC end to be also the operating system of apple when iOS system mobile phone connects).Open tested application program again, undertaken by the step recording use-case-translation use-case-playback use-case.
(iii) use-case is recorded
1.android system records use-case:
In Android system, there are two kinds of modes gathering user behavior action, the adb order getevent that first kind of way uses Android system to carry, user is at hand hands-operation, action can be sent on computer in the mode of flow of event, resolves this flow of event and can obtain the click location of user on mobile phone screen.The second way uses adb order sectional drawing function, and be sent to by mobile phone screen sectional drawing in the interface of instrument PC end, user clicks the mobile phone sectional drawing in interface with mouse, and instrument can obtain the click location on mobile phone screen.Send instructions to mobile phone with the use of sendkey order, mobile phone screen just can hold the sectional drawing screen in interface to be consistent with PC simultaneously.
Obtain the behavior act of user on mobile phone, namely some coordinate informations now.The combination of action as such in click (200,105), slip (100,600,230,100) and coordinate, but the playback on the mobile phone of different resolution of such information has problem.Use uiautomator can obtain the information such as the coordinate of all objects in current screen, shared screen area, so just click (200,105) can be converted into click (objectName).
2.iOS system records use-case:
UI Automation can record the application program of Developer signature or the application program operated in simulator.This instrument encapsulates UI Automation, utilizes its recording function can obtain the behavior act of user.Use-case action is as follows:
Var target = UITarget.localTarget();
Such script is also preserved with object form, and this is consistent with the design original intention of our instrument.
(iv) use-case is translated
1.android system uses the Robotium framework of increasing income as playback engine.Use java language to read the script xml file recorded during translation, its content is translated and becomes Robotium framework test case used.Because hand hands-operation limitednumber, we only need to be concerned about such as click, double-click, amplify, reduce, slide, the action such as dragging.
The use-case of 2.iOS system does not need again to translate, because the script that UI Automation records out has been available test case.
(v) playback use-case
Playback in 1.android system:
The playback action of use-case can show on mobile phone screen, but before playback performs, needs the preset playback environment of preset instrument.For the application program of Android system, only have heavily signature after could be familiar with by Robotium framework, pack again so this instrument will unpack heavily to sign to the apk bag of tested program, reinstall on mobile phone, the action that translated like this use-case just can be recorded before playback on mobile phone.
Playback in 2.iOS system:
Tested program needs Developer to sign equally, and we take the certificate of the upper developer of configuration after source code, be directly installed in real equipment by Xcode compiling, just can the automatic test script of playback UI Automation.
(vi) result verification
It not is final purpose that the behavior act of note user reappears, and we will realize the checking to program function.The checking that some check posts can realize expectation function, condition is added in automatized script.Use instrument uses the such form of assert (object, value) to insert check post in script, and check post can be translated into the checking statement that can be played framework and perform, and realizes the judgement to program normal condition and exception condition.
(vii) daily record
Robotization use-case holds that the mode of keeping runs often with nobody, its operation result will be checked by complete daily record.After playback task completes, can playback result be checked in the tool, comprise and perform use-case sum, by counting, unsuccessfully counting, skip number, failed error stack information, failed sectional drawing etc.Also email address can be configured, by daily record timed sending to responsible person concerned simultaneously.
(viii), business process map, see Fig. 6.
Compared with prior art, technical scheme of the present invention, at least can reach following beneficial effect:
(1) can generate automatized script easily, the input of tester in compile script is reduced greatly.It is compatible Android and iOS two kinds of main flow mobile phone operating systems also simultaneously, focal point are placed in operation flow instead of frequently switch, configuration testing environment.
(2) can be called by continuous integrating, automatic compiling, coil after carry out Black-box Testing, test result again continuous integration system read represent, make exploitation whole process realize closed loop.
(3) automatic test can improve testing efficiency, tester is made more to be absorbed in foundation and the exploitation of new test module, thus raising test coverage, secondly automatic test is more convenient for testing the digital management of assets, make test assets can obtain multiplexing in whole software test lifecycle, this feature especially has meaning in functional test and regression test.In addition, it is more proceduring that testing process automatic management can make the test activity of mechanism carry out, and meets the thought that CMMI process is improved.
More than be described with reference to the accompanying drawings technical scheme of the present invention, considered in correlation technique there is no easy, the unified solution for complicated type application testing.Existing application testing cannot complete the application testing process that complicated type participates in.Therefore, the present invention proposes a kind of Mobile solution automatic test device and a kind of Mobile solution automated testing method, can on existing application testing mode basis, make full use of the application testing that simple object type completes complex object type, set up general, the unified test thinking of the application testing that multi-object type participates in.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (10)

1. a Mobile solution automatic test device, is characterized in that, comprising:
Terminal connection unit, for installing application program to be measured at PC end, mobile phone connects PC end by USB line, recognizes mobile phone and connect under USB debugging mode;
Test script recording elements, for when having recognized mobile phone and having connected, has utilized Android system to record application program to be measured, has translated and playback process, and/or, utilize iOS system to record and playback process application program to be measured;
Task test cell, for based on the result to application program to be measured, adds corresponding check post, verifies, and export the result to application program to be measured in automatized script.
2. Mobile solution automatic test device according to claim 1, is characterized in that, described test script recording elements, specifically comprises:
Recording engine processing module, for when having recognized mobile phone and having connected, has utilized Android system to record application program to be measured, has translated and playback process;
And/or,
Robotization engine processing module, for when having recognized mobile phone and having connected, has utilized iOS system to record and playback process application program to be measured.
3. Mobile solution automatic test device according to claim 2, is characterized in that, the operation that described recording engine processing module utilizes Android system to record application program to be measured, comprises further:
Use the adb order getevent that Android system carries, user is at hand hands-operation, and action is sent on PC end in the mode of flow of event, resolves lid flow of event and obtains the click location of user on mobile phone screen; And/or use adb order sectional drawing function, be sent to by mobile phone screen sectional drawing in the interface of instrument PC end, user clicks the mobile phone sectional drawing in interface with mouse, obtains the click location on mobile phone screen; Send instructions to mobile phone with the use of sendkey order, mobile phone screen can hold the sectional drawing screen in interface to be consistent with PC simultaneously;
After obtaining the behavior act of user on mobile phone and/or coordinate information, use uiautomator to obtain in current screen and comprise the coordinate of all objects, the information of shared screen area;
And/or,
The operation that described recording engine processing module utilizes Android system to translate application program to be measured, comprises further:
Use the Robotium framework of increasing income as playback engine, use java language to read the script xml file recorded, its content is translated and becomes Robotium framework test case used;
And/or,
Described recording engine processing module utilizes Android system to carry out the operation of playback to application program to be measured, comprises further:
Preset playback environment, unpacks heavily to sign to the apk bag of application program to be measured and packs, reinstall on mobile phone, make the action that translated use-case can be recorded before playback on mobile phone;
And/or,
The operation that described robotization engine processing module utilizes iOS system to record application program to be measured, comprises further:
The application program utilizing UI Automation to sign to Developer or the application program operated in simulator are recorded, and obtain the behavior act of user, preserve with object form;
And/or,
Described robotization engine processing module utilizes iOS system to carry out the operation of playback to application program to be measured, comprises further:
After application program to be measured is carried out Developer signature, after taking source code, configure the certificate of upper developer, be directly installed in real equipment by Xcode compiling, the automatic test script of playback UI Automation.
4. the Mobile solution automatic test device according to any one of claim 1-3, is characterized in that, described task test cell, specifically comprises:
Test assignment authentication module, for based on the result to application program to be measured, adds corresponding check post in automatized script, check post is translated into the checking statement that can be played, verifies application program to be measured;
The result output module, after having verified, has checked corresponding playback result, and configuration email address, gives corresponding personnel by daily record timed sending.
5. Mobile solution automatic test device according to claim 4, is characterized in that, the operation that described test assignment authentication module is verified application program to be measured, comprises further:
To the checking of the expectation function of application program to be measured, normal condition and exception condition;
And/or,
The playback result that described the result output module is checked, comprises and performs use-case sum, by counting, unsuccessfully counting, skip number, failed error stack information, failed sectional drawing.
6. a Mobile solution automated testing method, is characterized in that, comprising:
Step 202: install application program to be measured at PC end, mobile phone connects PC end by USB line, recognizes mobile phone and connect under USB debugging mode;
Step 204: when having recognized mobile phone and having connected, utilized Android system to record application program to be measured, translate and playback process, and/or, utilize iOS system to record and playback process application program to be measured;
Step 206: based on the result to application program to be measured, adds corresponding check post in automatized script, verifies, and export the result to application program to be measured.
7. Mobile solution automated testing method according to claim 6, is characterized in that, described step 204, specifically comprises:
Step 302: when having recognized mobile phone and having connected, utilized Android system to record application program to be measured, translate and playback process;
And/or,
Step 304: when having recognized mobile phone and having connected, utilize iOS system to record and playback process application program to be measured.
8. Mobile solution automated testing method according to claim 7, is characterized in that, the operation that described step 302 utilizes Android system to record application program to be measured, comprises further:
Use the adb order getevent that Android system carries, user is at hand hands-operation, and action is sent on PC end in the mode of flow of event, resolves lid flow of event and obtains the click location of user on mobile phone screen; And/or use adb order sectional drawing function, be sent to by mobile phone screen sectional drawing in the interface of instrument PC end, user clicks the mobile phone sectional drawing in interface with mouse, obtains the click location on mobile phone screen; Send instructions to mobile phone with the use of sendkey order, mobile phone screen can hold the sectional drawing screen in interface to be consistent with PC simultaneously;
After obtaining the behavior act of user on mobile phone and/or coordinate information, use uiautomator to obtain in current screen and comprise the coordinate of all objects, the information of shared screen area;
And/or,
The operation that described step 302 utilizes Android system to translate application program to be measured, comprises further:
Use the Robotium framework of increasing income as playback engine, use java language to read the script xml file recorded, its content is translated and becomes Robotium framework test case used;
And/or,
Described step 302 utilizes Android system to carry out the operation of playback to application program to be measured, comprises further:
Preset playback environment, unpacks heavily to sign to the apk bag of application program to be measured and packs, reinstall on mobile phone, make the action that translated use-case can be recorded before playback on mobile phone;
And/or,
The operation that described step 304 utilizes iOS system to record application program to be measured, comprises further:
The application program utilizing UI Automation to sign to Developer or the application program operated in simulator are recorded, and obtain the behavior act of user, preserve with object form;
And/or,
Described step 304 utilizes iOS system to carry out the operation of playback to application program to be measured, comprises further:
After application program to be measured is carried out Developer signature, after taking source code, configure the certificate of upper developer, be directly installed in real equipment by Xcode compiling, the automatic test script of playback UI Automation.
9. the Mobile solution automated testing method according to any one of claim 6-8, is characterized in that, described step 206, specifically comprises:
Step 402, based on the result to application program to be measured, adds corresponding check post in automatized script, check post is translated into the checking statement that can be played, verifies application program to be measured;
After step 404 has been verified, check corresponding playback result, configuration email address, gives corresponding personnel by daily record timed sending.
10. Mobile solution automated testing method according to claim 9, is characterized in that, the operation that described step 402 is verified application program to be measured comprises further:
To the checking of the expectation function of application program to be measured, normal condition and exception condition;
And/or,
The playback result that described step 404 is checked, comprises and performs use-case sum, by counting, unsuccessfully counting, skip number, failed error stack information, failed sectional drawing.
CN201410782404.0A 2014-12-17 2014-12-17 Mobile solution automatic test device and method Active CN104407980B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410782404.0A CN104407980B (en) 2014-12-17 2014-12-17 Mobile solution automatic test device and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410782404.0A CN104407980B (en) 2014-12-17 2014-12-17 Mobile solution automatic test device and method

Publications (2)

Publication Number Publication Date
CN104407980A true CN104407980A (en) 2015-03-11
CN104407980B CN104407980B (en) 2017-07-11

Family

ID=52645613

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410782404.0A Active CN104407980B (en) 2014-12-17 2014-12-17 Mobile solution automatic test device and method

Country Status (1)

Country Link
CN (1) CN104407980B (en)

Cited By (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104699610A (en) * 2015-03-12 2015-06-10 安一恒通(北京)科技有限公司 Test method and device
CN104899046A (en) * 2015-06-26 2015-09-09 上海斐讯数据通信技术有限公司 Multifunctional script running method and multifunctional script running system
CN104915297A (en) * 2015-07-08 2015-09-16 上海斐讯数据通信技术有限公司 APP electricity consumption automatic test method for android device
CN105022694A (en) * 2015-08-19 2015-11-04 上海斐讯数据通信技术有限公司 Test case generation method and system for mobile terminal test
CN105095078A (en) * 2015-07-22 2015-11-25 厦门美图移动科技有限公司 Systematic automation testing device and method and calculating device
CN105183647A (en) * 2015-09-01 2015-12-23 北京瑞汛世纪科技有限公司 Application testing method, apparatus and system
CN105430171A (en) * 2015-11-02 2016-03-23 Tcl移动通信科技(宁波)有限公司 Method for starting USB debugging port during touch screen ineffectiveness and mobile terminal
CN106021101A (en) * 2016-05-16 2016-10-12 北京奇虎科技有限公司 Method and device for testing mobile terminal
CN106155863A (en) * 2016-07-25 2016-11-23 北京小米移动软件有限公司 Terminal anticipatory behavior control method and terminal
CN106383765A (en) * 2016-08-31 2017-02-08 北京百分点信息科技有限公司 Data monitoring method and apparatus
WO2018059393A1 (en) * 2016-09-30 2018-04-05 腾讯科技(深圳)有限公司 Test method for mobile application program, server, terminal and storage medium
CN108629184A (en) * 2018-05-18 2018-10-09 北京智游网安科技有限公司 A kind of SDK safety detection methods of IOS
CN108733555A (en) * 2017-04-25 2018-11-02 中移信息技术有限公司 A kind of application testing method and device
CN109582566A (en) * 2018-11-01 2019-04-05 苏州蜗牛数字科技股份有限公司 A kind of script method for recording
CN109684196A (en) * 2018-11-01 2019-04-26 北京中清龙图网络技术有限公司 A kind of test method and device
CN110046009A (en) * 2019-02-19 2019-07-23 阿里巴巴集团控股有限公司 Method for recording, device, server and readable storage medium storing program for executing
CN110502437A (en) * 2019-07-31 2019-11-26 惠州市德赛西威汽车电子股份有限公司 A kind of test macro and its method of on-vehicle Bluetooth application program
CN111488275A (en) * 2020-04-03 2020-08-04 携程旅游网络技术(上海)有限公司 UI automation test method and device, storage medium and electronic equipment
CN111611148A (en) * 2019-02-22 2020-09-01 上海哔哩哔哩科技有限公司 Compatibility concurrent testing method and system for iOS system application software
CN112000581A (en) * 2020-08-31 2020-11-27 威创集团股份有限公司 Testing method and tool for Cocos2D framework software
CN113014996A (en) * 2021-02-18 2021-06-22 上海哔哩哔哩科技有限公司 Video generation method and device
CN113176959A (en) * 2021-04-29 2021-07-27 上海云扩信息科技有限公司 Universal RPA mobile phone automatic design system
CN113220569A (en) * 2021-05-10 2021-08-06 中金金融认证中心有限公司 Multi-process-based iOS compatibility automatic testing method and device
CN115842884A (en) * 2022-12-27 2023-03-24 润芯微科技(江苏)有限公司 Method for completing mobile phone test based on recording mobile phone interface coordinates

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012063070A1 (en) * 2010-11-10 2012-05-18 Net Magnus Ltd A method of automatically testing different software applications for defects
CN102841845A (en) * 2012-07-30 2012-12-26 广东欧珀移动通信有限公司 Automatic testing method of Android device software
CN103544100A (en) * 2012-07-12 2014-01-29 腾讯科技(深圳)有限公司 Method, system and client side for testing APP of portable data processing equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012063070A1 (en) * 2010-11-10 2012-05-18 Net Magnus Ltd A method of automatically testing different software applications for defects
CN103544100A (en) * 2012-07-12 2014-01-29 腾讯科技(深圳)有限公司 Method, system and client side for testing APP of portable data processing equipment
CN102841845A (en) * 2012-07-30 2012-12-26 广东欧珀移动通信有限公司 Automatic testing method of Android device software

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
林小捷: "基于Android自动化平台的研究与实现", 《中国优秀硕士学位论文全文数据库》 *

Cited By (32)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104699610A (en) * 2015-03-12 2015-06-10 安一恒通(北京)科技有限公司 Test method and device
CN104899046A (en) * 2015-06-26 2015-09-09 上海斐讯数据通信技术有限公司 Multifunctional script running method and multifunctional script running system
CN104899046B (en) * 2015-06-26 2018-01-30 上海斐讯数据通信技术有限公司 A kind of multi-functional script operation method and system
CN104915297A (en) * 2015-07-08 2015-09-16 上海斐讯数据通信技术有限公司 APP electricity consumption automatic test method for android device
CN104915297B (en) * 2015-07-08 2018-01-16 上海斐讯数据通信技术有限公司 A kind of automated testing method of the APP power consumption of android equipment
CN105095078A (en) * 2015-07-22 2015-11-25 厦门美图移动科技有限公司 Systematic automation testing device and method and calculating device
CN105022694B (en) * 2015-08-19 2018-07-13 上海斐讯数据通信技术有限公司 Method for generating test case and system for mobile terminal test
CN105022694A (en) * 2015-08-19 2015-11-04 上海斐讯数据通信技术有限公司 Test case generation method and system for mobile terminal test
CN105183647A (en) * 2015-09-01 2015-12-23 北京瑞汛世纪科技有限公司 Application testing method, apparatus and system
CN105430171A (en) * 2015-11-02 2016-03-23 Tcl移动通信科技(宁波)有限公司 Method for starting USB debugging port during touch screen ineffectiveness and mobile terminal
CN105430171B (en) * 2015-11-02 2019-10-18 Tcl移动通信科技(宁波)有限公司 The method and mobile terminal of USB debugging port are enabled when a kind of touch screen failure
CN106021101A (en) * 2016-05-16 2016-10-12 北京奇虎科技有限公司 Method and device for testing mobile terminal
CN106155863A (en) * 2016-07-25 2016-11-23 北京小米移动软件有限公司 Terminal anticipatory behavior control method and terminal
CN106383765A (en) * 2016-08-31 2017-02-08 北京百分点信息科技有限公司 Data monitoring method and apparatus
WO2018059393A1 (en) * 2016-09-30 2018-04-05 腾讯科技(深圳)有限公司 Test method for mobile application program, server, terminal and storage medium
US10698797B2 (en) 2016-09-30 2020-06-30 Tencent Technology (Shenzhen) Company Limited Mobile application program testing method, server, terminal, and storage medium
CN108733555A (en) * 2017-04-25 2018-11-02 中移信息技术有限公司 A kind of application testing method and device
CN108629184A (en) * 2018-05-18 2018-10-09 北京智游网安科技有限公司 A kind of SDK safety detection methods of IOS
CN109582566A (en) * 2018-11-01 2019-04-05 苏州蜗牛数字科技股份有限公司 A kind of script method for recording
CN109684196A (en) * 2018-11-01 2019-04-26 北京中清龙图网络技术有限公司 A kind of test method and device
CN109684196B (en) * 2018-11-01 2024-01-09 北京中清龙图网络技术有限公司 Test method and device
CN110046009A (en) * 2019-02-19 2019-07-23 阿里巴巴集团控股有限公司 Method for recording, device, server and readable storage medium storing program for executing
CN111611148A (en) * 2019-02-22 2020-09-01 上海哔哩哔哩科技有限公司 Compatibility concurrent testing method and system for iOS system application software
CN111611148B (en) * 2019-02-22 2023-08-29 上海哔哩哔哩科技有限公司 Compatibility concurrent test method and system for iOS system application software
CN110502437A (en) * 2019-07-31 2019-11-26 惠州市德赛西威汽车电子股份有限公司 A kind of test macro and its method of on-vehicle Bluetooth application program
CN111488275B (en) * 2020-04-03 2023-08-25 携程旅游网络技术(上海)有限公司 UI (user interface) automatic testing method and device, storage medium and electronic equipment
CN111488275A (en) * 2020-04-03 2020-08-04 携程旅游网络技术(上海)有限公司 UI automation test method and device, storage medium and electronic equipment
CN112000581A (en) * 2020-08-31 2020-11-27 威创集团股份有限公司 Testing method and tool for Cocos2D framework software
CN113014996A (en) * 2021-02-18 2021-06-22 上海哔哩哔哩科技有限公司 Video generation method and device
CN113176959A (en) * 2021-04-29 2021-07-27 上海云扩信息科技有限公司 Universal RPA mobile phone automatic design system
CN113220569A (en) * 2021-05-10 2021-08-06 中金金融认证中心有限公司 Multi-process-based iOS compatibility automatic testing method and device
CN115842884A (en) * 2022-12-27 2023-03-24 润芯微科技(江苏)有限公司 Method for completing mobile phone test based on recording mobile phone interface coordinates

Also Published As

Publication number Publication date
CN104407980B (en) 2017-07-11

Similar Documents

Publication Publication Date Title
CN104407980A (en) Mobile application automated testing device and method
CN103425574B (en) A kind of method and device of test application program
US20130132933A1 (en) Automated compliance testing during application development
US20130117855A1 (en) Apparatus for automatically inspecting security of applications and method thereof
CN101706753B (en) Unit testing framework and method based on Perl
CN103377120B (en) A kind of applied program testing method and device
CN105912473A (en) BDD-based mobile APP automatic testing platform and testing method
CN105338110A (en) Remote debugging method, platform and server
CN109408105A (en) Acquisition method, device, computing device and the storage medium of user behavior data
CN105094783A (en) Method and device for testing Android application stability
CN107832207A (en) Interface performance test method, apparatus, storage medium and computer equipment
CN105608012A (en) Automatic test method and automatic test system
CN104731566B (en) Integrated Development Environment test device, method and system
CN105653438B (en) The striding course automated testing method and device of Android device
CN102375778A (en) Method and system for automatically testing digital signal processor (DSP)
CN104281520A (en) Tracking and debugging method, device and system
CN103049363B (en) Verification method of NAND (neither agree not disagree) Flash controller
CN103544100A (en) Method, system and client side for testing APP of portable data processing equipment
EP2706459B1 (en) Apparatus and method for validating a compiler for a reconfigurable processor
CN102479123A (en) System and method for testing chip operating system (COS)
US20200050534A1 (en) System error detection
CN110321292A (en) Chip detecting method, device, electronic equipment and computer readable storage medium
Holl et al. Mobile application quality assurance
CN103186463B (en) Determine the method and system of the test specification of software
US9477582B2 (en) Executable software specification generation

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 100094 Beijing city Haidian District North Road No. 68, UFIDA Software Park

Applicant after: Yonyou Network Technology Co., Ltd.

Address before: 100094 Beijing city Haidian District North Road No. 68, UFIDA Software Park

Applicant before: UFIDA Software Co., Ltd.

COR Change of bibliographic data
GR01 Patent grant
GR01 Patent grant