CN104407980B - Mobile solution automatic test device and method - Google Patents
Mobile solution automatic test device and method Download PDFInfo
- Publication number
- CN104407980B CN104407980B CN201410782404.0A CN201410782404A CN104407980B CN 104407980 B CN104407980 B CN 104407980B CN 201410782404 A CN201410782404 A CN 201410782404A CN 104407980 B CN104407980 B CN 104407980B
- Authority
- CN
- China
- Prior art keywords
- application program
- measured
- mobile phone
- recorded
- test
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Telephone Function (AREA)
- Stored Programmes (AREA)
Abstract
The invention provides a kind of Mobile solution automatic test device, including:Terminal connection unit, for installing application program to be measured at PC ends, mobile phone connects PC ends by USB line, and mobile phone connection is recognized under USB debugging modes;Test script recording elements, for being recorded, being translated and playback process to application program to be measured using Android system, and/or, application program to be measured is recorded using iOS system and playback process;Task test cell, for adding corresponding check post in automatized script, is verified, and export the result to application program to be measured.Present invention also offers a kind of Mobile solution automated testing method.By technical scheme, on the basis of existing application test mode simple object type can be made full use of to complete the application test of complex object type, set up general, the unified test thinking for the application test that many object types are participated in.
Description
Technical field
The present invention relates to technical field of data processing, in particular it relates to a kind of Mobile solution automatic test device and one
Plant Mobile solution automated testing method.
Background technology
The automatic test of software is a kind of process that machine execution is converted into the behavioral test artificially driven.Test
Personnel write automatic test script according to test case, then perform normal condition and exception that checking is pre-set by machine
Condition.Automatized script just can operation when engineers are slept, and record test result;Automatic test is also
Some action can be repeated continuously without feeling tired;After it with the addition of New function, some original work(can also be returned
Can test to ensure that its is unaffected.Manpower, time and hardware resource are saved in the process, improve testing efficiency and standard
True rate.
It is that smart mobile phone application program is write automatically due to the particularity of operation system of smart phone and UI compared with computer
It is an extremely complex thing to change test script, and it is difficult to ensure that correctness.
Current smart mobile phone has almost spread to the degree of human hand one, Mobile solution automatic test be the field not
An avoidable problem.
Accordingly, it would be desirable to which a kind of new application measuring technology, can make full use of on the basis of existing application test mode
Simple object type completes the application test of complex object type, sets up general, the system of the application test that many object types are participated in
One test thinking.
The content of the invention
The present invention is based on above mentioned problem, it is proposed that a kind of new application measuring technology, can be surveyed in existing application
On the basis of examination mode, make full use of simple object type to complete the application test of complex object type, set up many object type ginsengs
With application test general, unified test thinking.
In view of this, the present invention proposes a kind of Mobile solution automatic test device, including:Terminal connection unit, is used
In installing application program to be measured at PC ends, mobile phone connects PC ends by USB line, and mobile phone connection is recognized under USB debugging modes;
Test script recording elements, for when having recognized mobile phone connection, being recorded using Android system to application program to be measured
System, translation and playback process, and/or, application program to be measured is recorded using iOS system and playback process;Task is tested
Unit, for based on the result to application program to be measured, corresponding check post to be added in automatized script, to application to be measured
Program is verified, and exports the result.In the technical scheme, automatized script can be conveniently generated so that test
Input of the personnel in terms of script is write is substantially reduced.
In the above-mentioned technical solutions, it is preferable that the test script recording elements, specifically include:Recording engine handles mould
Block, for when having recognized mobile phone connection, application program to be measured being recorded, being translated and being played back using Android system
Processing;And/or, engine processing module is automated, for when having recognized mobile phone connection, using iOS system to application to be measured
Program is recorded and playback process.In the technical scheme, it can be called by continuous integrating, it is laggard compiling automatically, making disk
Row Black-box Testing, continuous integration system reading represents test result again, exploitation whole process is realized closed loop.
In the above-mentioned technical solutions, it is preferable that the recording engine processing module is using Android system to application to be measured
The operation that program is recorded, further comprises:The adb order getevent carried using Android system, user is in mobile phone
Upper operation, action is sent in the way of flow of event on PC ends, and parsing lid flow of event obtains click of the user on mobile phone screen
Position;And/or, using adb order sectional drawing functions, in the interface that mobile phone screen sectional drawing is sent to instrument PC ends, user uses mouse
The mobile phone sectional drawing that punctuate is hit in interface, obtains the click location on mobile phone screen;Simultaneously with the use of sendkey orders to mobile phone
Send instructions, mobile phone screen can be consistent with the sectional drawing screen in the interface of PC ends;Obtain behavior act of the user on mobile phone
And/or after coordinate information, the coordinate comprising all objects, shared screen cover in current screen are obtained using uiautomator
Long-pending information;And/or, the behaviour that the recording engine processing module is translated using Android system to application program to be measured
Make, further comprise:Using the Robotium frameworks increased income as playback engine, the script recorded is read using java language
Xml document, its content, which is translated, turns into the test case used by Robotium frameworks;And/or, the recording engine processing module
The operation played back using Android system to application program to be measured, is further comprised:Preset playback environment, is answered to be measured
To be unpacked sign again with the apk bags of program and pack again, reinstalled on mobile phone so that translated use-case can be in mobile phone
The action recorded before upper playback;And/or, the automation engine processing module is entered using iOS system to application program to be measured
The operation that row is recorded, further comprises:Using UI Automation are to the Developer application programs signed or operate in
Application program in simulator is recorded, and is obtained the behavior act of user, is preserved with object form;And/or, the automation
The operation that engine processing module is played back using iOS system to application program to be measured, further comprises:By application program to be measured
Carry out after Developer signatures, take the certificate that upper developer is configured after source code, be directly installed to by Xcode compilings true
In real equipment, playback UI Automation automatic test script.In the technical scheme, testing efficiency can be improved, is made
Tester focuses more on the foundation and exploitation of new test module, so as to improve test coverage.
In the above-mentioned technical solutions, it is preferable that the task test cell, specifically include:Test assignment authentication module, is used
In based on the result to application program to be measured, corresponding check post is added in automatized script, energy is translated into check post
The checking sentence being played, is verified to application program to be measured;The result output module, after the completion of checking, is checked
Corresponding playback result, configures email address, and daily record timing is sent into corresponding personnel., can be in order in the technical scheme
Test the digital management of assets so that test assets can be multiplexed in whole software test lifecycle.
In the above-mentioned technical solutions, it is preferable that what the test assignment authentication module was verified to application program to be measured
Operation, further comprises:Checking to the expectation function of application program to be measured, normal condition and exceptional condition;And/or, it is described
The playback result that the result output module is checked, including perform use-case sum, by number, unsuccessfully number, skip number, failure mistake
Stack information, failure sectional drawing.In the technical scheme, the test activity development of mechanism can be made more proceduring, meet CMMI
The improved thought of process.
According to a further aspect of the invention, it is also proposed that a kind of Mobile solution automated testing method, including:Step
202:Application program to be measured is installed at PC ends, mobile phone connects PC ends by USB line, mobile phone company is recognized under USB debugging modes
Connect;Step 204:When having recognized mobile phone connection, application program to be measured is recorded using Android system, translate and
Playback process, and/or, application program to be measured is recorded using iOS system and playback process;Step 206:Based on to be measured
The result of application program, adds corresponding check post in automatized script, and application program to be measured is verified, and exports
The result.In the technical scheme, automatized script can be conveniently generated so that tester is in terms of script is write
Input is substantially reduced.
In the above-mentioned technical solutions, it is preferable that the step 204, specifically include:Step 302:When having recognized mobile phone company
When connecing, application program to be measured is recorded using Android system, translated and playback process;And/or, step 304:Work as knowledge
When being clipped to mobile phone connection, application program to be measured is recorded using iOS system and playback process.In the technical scheme,
It can be called by continuous integrating, Black-box Testing be carried out after compiling automatically, making disk, continuous integration system reads exhibition to test result again
It is existing, exploitation whole process is realized closed loop.
In the above-mentioned technical solutions, it is preferable that the step 302 is carried out using Android system to application program to be measured
The operation of recording, further comprises:The adb order getevent carried using Android system, user in hand hands- operation,
Action is sent in the way of flow of event on PC ends, and parsing lid flow of event obtains click location of the user on mobile phone screen;With/
Or, using adb order sectional drawing functions, in the interface that mobile phone screen sectional drawing is sent to instrument PC ends, user clicks on boundary with mouse
Mobile phone sectional drawing in face, obtains the click location on mobile phone screen;Send instructions simultaneously with the use of sendkey orders to mobile phone,
Mobile phone screen can be consistent with the sectional drawing screen in the interface of PC ends;Obtain behavior act and/or seat of the user on mobile phone
Mark after information, the letter of the coordinate comprising all objects, shared screen area in current screen is obtained using uiautomator
Breath;And/or, the operation that the step 302 is translated using Android system to application program to be measured further comprises:Make
With the Robotium frameworks increased income as playback engine, the script xml document recorded is read using java language, its content is turned
It is translated into as the test case used by Robotium frameworks;And/or, the step 302 is using Android system to application journey to be measured
The operation that sequence is played back, further comprises:Preset playback environment, is unpacked to the apk bags of application program to be measured and is signed again
Pack, reinstalled on mobile phone again so that the action that translated use-case is recorded before being played back on mobile phone;And/or,
The operation that the step 304 is recorded using iOS system to application program to be measured, further comprises:Utilize UI
Automation is recorded to the Developer application programs signed or the application program operated in simulator, is obtained
The behavior act of user, is preserved with object form;And/or, the step 304 is carried out using iOS system to application program to be measured
The operation of playback, further comprises:Application program to be measured is carried out after Developer signatures, taken after source code in configuration
Developer certificate, is directly installed in real equipment by Xcode compilings, and playback UI Automation automation is surveyed
Training sheet.In the technical scheme, testing efficiency can be improved, tester is focused more on the foundation of new test module
And exploitation, so as to improve test coverage.
In the above-mentioned technical solutions, it is preferable that the step 206, specifically include:Step 402 is based on to application journey to be measured
The result of sequence, adds corresponding check post in automatized script, and check post is translated into the checking sentence that can be played, right
Application program to be measured is verified;After the completion of step 404 checking, corresponding playback result is checked, email address is configured, by daily record
Timing is sent to corresponding personnel., can be in order to testing the digital managements of assets so that test assets exist in the technical scheme
It can be multiplexed in whole software test lifecycle.
In the above-mentioned technical solutions, it is preferable that the operation that the step 402 is verified to application program to be measured, one is entered
Step includes:Checking to the expectation function of application program to be measured, normal condition and exceptional condition;And/or, the step 404 is looked into
The playback result seen, including perform use-case sum, by number, unsuccessfully number, skip number, failure error stack information, failure sectional drawing.
In the technical scheme, the test activity development of mechanism can be made more proceduring, meet the improved thought of CMMI processes.
By above technical scheme, simple object type can be made full use of on the basis of existing application test mode
The application test of complex object type is completed, general, the unified test thinking for the application test that many object types are participated in is set up.
Brief description of the drawings
Fig. 1 shows the block diagram of Mobile solution automatic test device according to an embodiment of the invention;
Fig. 2 shows the flow chart of Mobile solution automated testing method according to an embodiment of the invention;
Fig. 3 shows the flow chart of test script recording elements according to an embodiment of the invention;
Fig. 4 shows the flow chart 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
It is below in conjunction with the accompanying drawings and specific real in order to be more clearly understood that the above objects, features and advantages of the present invention
Mode is applied the present invention is further described in detail.It should be noted that in the case where not conflicting, the implementation of the application
Feature in example and embodiment can be mutually combined.
Many details are elaborated in the following description in order to fully understand the present invention, and still, the present invention may be used also
Implemented with being different from other modes described here using other, therefore, protection scope of the present invention is not by described below
Specific embodiment limitation.
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, including:Terminal is connected
Unit 102, for installing application program to be measured at PC ends, mobile phone connects PC ends by USB line, is recognized under USB debugging modes
To mobile phone connection;Test script recording elements 104, for when having recognized mobile phone connection, using Android system to be measured
Application program is recorded, translated and playback process, and/or, application program to be measured is recorded and played back using iOS system
Processing;Task test cell 106, for based on the result to application program to be measured, being added in automatized script corresponding
Check post, is verified, and export the result to application program to be measured.In the technical scheme, it can be conveniently generated certainly
Dynamicization script so that input of the tester in terms of script is write is substantially reduced.
In the above-mentioned technical solutions, it is preferable that test script recording elements 104, specifically include:Recording engine processing module
1042, for when having recognized mobile phone connection, application program to be measured being recorded, being translated and being returned using Android system
Put processing;And/or, automation engine processing module 1044, for when having recognized mobile phone connection, being treated using iOS system
Application program is surveyed to be recorded and playback process.It in the technical scheme, can be called by continuous integrating, compile, doing automatically
Black-box Testing is carried out after disk, continuous integration system reading represents test result again, exploitation whole process is realized closed loop.
In the above-mentioned technical solutions, it is preferable that recording engine processing module 1042 is using Android system to application to be measured
The operation that program is recorded, further comprises:The adb order getevent carried using Android system, user is in mobile phone
Upper operation, action is sent in the way of flow of event on PC ends, and parsing lid flow of event obtains click of the user on mobile phone screen
Position;And/or, using adb order sectional drawing functions, in the interface that mobile phone screen sectional drawing is sent to instrument PC ends, user uses mouse
The mobile phone sectional drawing that punctuate is hit in interface, obtains the click location on mobile phone screen;Simultaneously with the use of sendkey orders to mobile phone
Send instructions, mobile phone screen can be consistent with the sectional drawing screen in the interface of PC ends;Obtain behavior act of the user on mobile phone
And/or after coordinate information, the coordinate comprising all objects, shared screen cover in current screen are obtained using uiautomator
Long-pending information;And/or, the behaviour that recording engine processing module 1042 is translated using Android system to application program to be measured
Make, further comprise:Using the Robotium frameworks increased income as playback engine, the script recorded is read using java language
Xml document, its content, which is translated, turns into the test case used by Robotium frameworks;And/or, recording engine processing module 1042
The operation played back using Android system to application program to be measured, is further comprised:Preset playback environment, is answered to be measured
To be unpacked sign again with the apk bags of program and pack again, reinstalled on mobile phone so that translated use-case can be in mobile phone
The action recorded before upper playback;And/or, automation engine processing module 1044 is entered using iOS system to application program to be measured
The operation that row is recorded, further comprises:Using UI Automation are to the Developer application programs signed or operate in
Application program in simulator is recorded, and is obtained the behavior act of user, is preserved with object form;And/or, automate engine
The operation that processing module 1044 is played back using iOS system to application program to be measured, further comprises:By application program to be measured
Carry out after Developer signatures, take the certificate that upper developer is configured after source code, be directly installed to by Xcode compilings true
In real equipment, playback UI Automation automatic test script.In the technical scheme, testing efficiency can be improved, is made
Tester focuses more on the foundation and exploitation of new test module, so as to improve test coverage.
In the above-mentioned technical solutions, it is preferable that task test cell 106, specifically include:Test assignment authentication module
1062, for based on the result to application program to be measured, corresponding check post being added in automatized script, check post is turned over
The checking sentence that can be played is translated into, application program to be measured is verified;The result output module 1064, for having verified
Cheng Hou, checks corresponding playback result, configures email address, and daily record timing is sent into corresponding personnel.In the technical scheme,
Can be in order to testing the digital managements of assets so that test assets can be multiplexed in whole software test lifecycle.
In the above-mentioned technical solutions, it is preferable that test assignment authentication module 1062 is verified to application program to be measured
Operation, further comprises:Checking to the expectation function of application program to be measured, normal condition and exceptional condition;And/or, checking
As a result the playback result that output module 1064 is checked, including perform use-case sum, by number, unsuccessfully number, skip number, failure mistake
Stack information, failure sectional drawing.In the technical scheme, the test activity development of mechanism can be made more proceduring, meet CMMI
The improved thought of process.
Fig. 2 shows the flow chart of Mobile solution automated testing method according to an embodiment of the invention.
As shown in Fig. 2 Mobile solution automated testing method according to an embodiment of the invention, including:Step 202:
Application program to be measured is installed at PC ends, and mobile phone connects PC ends by USB line, and mobile phone connection is recognized under USB debugging modes;Step
204:When having recognized mobile phone connection, application program to be measured is recorded using Android system, translate and playback at
Reason, and/or, application program to be measured is recorded using iOS system and playback process;Step 206:Based on to application journey to be measured
The result of sequence, adds corresponding check post in automatized script, and application program to be measured is verified, and exports checking knot
Really.In the technical scheme, automatized script can be conveniently generated so that input of the tester in terms of script is write is big
Big reduction.
In the above-mentioned technical solutions, it is preferable that as shown in figure 3, step 204, is specifically included:Step 302:When having recognized
When mobile phone is connected, application program to be measured is recorded using Android system, translated and playback process;And/or, step
304:When having recognized mobile phone connection, application program to be measured is recorded using iOS system and playback process.In the technology
It in scheme, can be called by continuous integrating, carry out Black-box Testing after compiling automatically, making disk, test result continuous integrating system again
System reading represents, and exploitation whole process is realized closed loop.
In the above-mentioned technical solutions, it is preferable that step 302 is recorded using Android system to application program to be measured
Operation, further comprise:The adb order getevent carried using Android system, user is in hand hands- operation, action
It is sent in the way of flow of event on PC ends, parsing lid flow of event obtains click location of the user on mobile phone screen;And/or,
Using adb order sectional drawing functions, in the interface that mobile phone screen sectional drawing is sent to instrument PC ends, user is clicked in interface with mouse
Mobile phone sectional drawing, obtain mobile phone screen on click location;Send instructions simultaneously with the use of sendkey orders to mobile phone, mobile phone
Screen can be consistent with the sectional drawing screen in the interface of PC ends;Obtain behavior act and/or coordinate letter of the user on mobile phone
After breath, the information of the coordinate comprising all objects, shared screen area in current screen is obtained using uiautomator;With/
Or, the operation that step 302 is translated using Android system to application program to be measured, further comprises:Use what is increased income
Robotium frameworks read the script xml document recorded using java language as playback engine, and the translation of its content is turned into
Test case used by Robotium frameworks;And/or, step 302 is played back using Android system to application program to be measured
Operation, further comprise:Preset playback environment, to be unpacked sign again and pack again to the apk bags of application program to be measured, again
It is installed on mobile phone so that the action that translated use-case is recorded before being played back on mobile phone;And/or, step 304 is utilized
The operation that iOS system is recorded to application program to be measured, further comprises:Developer is signed using UI Automation
The application program of name or the application program operated in simulator are recorded, and the behavior act of user are obtained, with to pictograph
Formula is preserved;And/or, the operation that step 304 is played back using iOS system to application program to be measured further comprises:Will be to be measured
Application program is carried out after Developer signatures, is taken the certificate that upper developer is configured after source code, is directly compiled by Xcode
It is installed in real equipment, playback UI Automation automatic test script.In the technical scheme, survey can be improved
Efficiency is tried, tester is focused more on the foundation and exploitation of new test module, so as to improve test coverage.
In the above-mentioned technical solutions, it is preferable that as shown in figure 4, step 206, is specifically included:Step 402 is based on to be measured
The result of application program, adds corresponding check post in automatized script, and check post is translated into the checking that can be played
Sentence, is verified to application program to be measured;After the completion of step 404 checking, corresponding playback result is checked, with configuring mailbox
Location, corresponding personnel are sent to by daily record timing., can be in order to testing the digital managements of assets in the technical scheme so that
Test assets can be multiplexed in whole software test lifecycle.
In the above-mentioned technical solutions, it is preferable that the operation that step 402 is verified to application program to be measured, further wrap
Include:Checking to the expectation function of application program to be measured, normal condition and exceptional condition;And/or, the playback that step 404 is checked
As a result, including perform use-case sum, by number, unsuccessfully number, skip number, failure error stack information, failure sectional drawing.In the technology
In scheme, the test activity development of mechanism can be made more proceduring, meet the improved thought of CMMI processes.
Technical scheme, is surveyed precisely in order to solving application program automation on main flow smart mobile phone in the prior art
The instrument why inscribed;In view of the operation system of smart phone overwhelming majority is occupied by android and iOS, technical scheme
Support is provided to android and iOS two systems.
Technical scheme is there is provided a kind of Mobile solution automated test tool, in android, iOS main flow intelligence
The automatic test being applied to can be realized on mobile phone operating system.The technical scheme technical issues that need to address are such as
Under:
1st, automatized script is generated.Script is generated in the way of recording, instead of the mode of conventional manual compiling script.
2nd, script portability and durability.The automatized script that instrument is recorded out is preserved with static text, and file is in itself
Independent of instrument.
3rd, support of the script to playback environment.Behavior act is preserved in automatic test script in the form of object.As long as
Object is present in tested program, and the factor such as resolution ratio, setting regardless of playback apparatus can play back checking.
4th, playback script is combined with playback framework.Script is played back from the playback framework of excellent performance, saved
System resource.
Solve the technical scheme of present invention problem:
(i) instrument schematic diagram.Referring to Fig. 5.
(ii) the UI of instrument and operation.
The instrument is write using java language, and interface is generated by swt, succinct understandable.Its operating process is, in PC ends peace
Fill and open instrument, mobile phone connects computer and USB debugging modes of performing fighting by USB line, at this moment instrument can recognize mobile phone connection
(IOS system mobile phone needs the operating system that PC ends are also apple when connecting).Open tested application program again, by record use-case-
The step of translation use-case-playback use-case, is carried out.
(iii) use-case is recorded
1.android systems record use-case:
In Android system, there is the mode of two kinds of collection user behavior actions, first way uses android systems
United the adb order getevent carried, and user can be sent on computer in hand hands- operation, action in the way of flow of event, solved
Analyse this flow of event and can obtain click location of the user on mobile phone screen.The second way uses adb order sectional drawing functions,
In the interface that mobile phone screen sectional drawing is sent to instrument PC ends, user clicks on the mobile phone sectional drawing in interface, instrument with mouse
Obtain the click location on mobile phone screen.Send instructions simultaneously with the use of sendkey orders to mobile phone, mobile phone screen just can be with
Sectional drawing screen in the interface of PC ends is consistent.
Have been obtained for behavior act of the user on mobile phone, that is, some coordinate informations now.Such as click (200,
105), slip (100,600,230,100) so actions and the combination of coordinate, but such information is in the mobile phone of different resolution
Upper playback has problem.The coordinate of all objects in current screen, shared screen area can be obtained using uiautomator
Etc. information, click (200,105) can be thus converted into click (objectName).
2.iOS systems record use-case:
UI Automation can be to the Developer application programs signed or the application journey operated in simulator
Sequence is recorded.The instrument encapsulates UI Automation, and the behavior act of user can be obtained using its recording function.With
Example action is as follows:
Var target = UITarget.localTarget();
Such script is also to be preserved with object form, and this is consistent with the design original intention of our instruments.
(iv) use-case is translated
1.android systems are used as playback engine using the Robotium frameworks increased income.Read during translation using java language
The script xml document of system is enrolled, its content, which is translated, turns into the test case used by Robotium frameworks.Because hand hands- operation
Limitednumber, we only need to be concerned about click on, double-click, amplification, reduce, slide, dragging etc. action.
The use-case of 2.iOS systems need not be translated again, because the script that UI Automation are recorded out has been available
Test case.
(v) use-case is played back
Played back in 1.android systems:
Playback action meeting display on mobile phone screen of use-case, but, it is necessary to the preset playback of preset instrument before playback is performed
Environment.For the application program of Android system, it could be recognized only sign again after by Robotium frameworks, so
The instrument will unpacked sign again and pack again to the apk bags of tested program, reinstalled on mobile phone, so translated to use
The action that example is recorded before can just being played back on mobile phone.
Played back in 2.iOS systems:
Tested program needs also exist for Developer signatures, and we take the certificate that upper developer is configured after source code, directly
Connected Xcode compilings to be installed in real equipment, it is possible to play back UI Automation automatic test script.
(vi) result verification
It not is final purpose to remember that the behavior act of user reappears, and we will realize the checking to program function.Automatic
The checking to expectation function, condition can be realized by adding some check posts in change script.Assert is used using instrument
Form as (object, value) inserts check post into script, and check post, which can be translated into, can be played framework execution
Checking sentence, realize judgement to program normal condition and exceptional condition.
(vii) daily record
Automation use-case is often what is run in the way of nobody holds and kept, and its operation result will be looked into by complete daily record
See.After the completion of playback task, playback result can be checked in the tool, including perform use-case sum, by number, unsuccessfully number,
Skip number, failure error stack information, failure sectional drawing etc..Email address can also be configured simultaneously, daily record timing is sent to
Responsible person concerned.
(viii), business process map, referring to Fig. 6.
Compared with prior art, technical scheme, can at least reach following beneficial effect:
(1) automatized script can be generated easily so that input of the tester in terms of script is write is substantially reduced.
It also simultaneously two kinds of main flow mobile phone operating systems of compatibility Android and iOS so that focal point be placed in operation flow rather than
Frequently switching, configuration testing environment.
(2) it can be called by continuous integrating, carry out Black-box Testing after compiling automatically, making disk, test result continuous integrating again
System, which is read, to be represented, and exploitation whole process is realized closed loop.
(3) automatic test can improve testing efficiency, make tester focus more on new test module foundation and
Exploitation, so as to improve test coverage, secondly automatic test is more convenient for testing the digital management of assets so that test assets
It can be multiplexed in whole software test lifecycle, this feature is particularly relevant in functional test and regression test.
In addition, testing process automatic management can make the test activity development of mechanism more proceduring, meet CMMI processes improved
Thought.
Technical scheme is described in detail above in association with accompanying drawing, it is contemplated that there is no simplicity, system in correlation technique
One solution for complicated type application test.Existing application test can not complete the application of complicated type participation
Test process.Therefore, the present invention proposes a kind of Mobile solution automatic test device and a kind of Mobile solution automatic test
Method, can make full use of simple object type to complete answering for complex object type on the basis of existing application test mode
With test, general, the unified test thinking for the application test that many object types are participated in is set up.
The preferred embodiments of the present invention are the foregoing is only, are not intended to limit the invention, for the skill of this area
For art personnel, the present invention can have various modifications and variations.Within the spirit and principles of the invention, that is made any repaiies
Change, equivalent, improvement etc., should be included within the scope of the present invention.
Claims (6)
1. a kind of Mobile solution automatic test device, it is characterised in that including:
Terminal connection unit, for installing application program to be measured at PC ends, mobile phone connects PC ends by USB line, and mould is debugged in USB
Mobile phone connection is recognized under formula;
Test script recording elements, for when having recognized mobile phone connection, being entered using Android system to application program to be measured
Row is recorded, translated and playback process, and/or, application program to be measured is recorded using iOS system and playback process;
Task test cell, for based on the result to application program to be measured, corresponding checking to be added in automatized script
Point, is verified to application program to be measured, and exports the result, and the test script recording elements are specifically included:
Recording engine processing module, for when having recognized mobile phone connection, being entered using Android system to application program to be measured
Row is recorded, translated and playback process;
And/or,
Engine processing module is automated, for when having recognized mobile phone connection, being carried out using iOS system to application program to be measured
Record and playback process, the behaviour that the recording engine processing module is recorded using Android system to application program to be measured
Make, further comprise:
The adb order getevent carried using Android system, user is acted in the way of flow of event in hand hands- operation
It is sent on PC ends, parsing lid flow of event obtains click location of the user on mobile phone screen;And/or, use adb order sectional drawings
In function, the interface that mobile phone screen sectional drawing is sent to instrument PC ends, user clicks on the mobile phone sectional drawing in interface with mouse, obtains
Click location on mobile phone screen;Send instructions simultaneously with the use of sendkey orders to mobile phone, mobile phone screen can be with PC ends circle
Sectional drawing screen in face is consistent;
Obtain after behavior act and/or coordinate information of the user on mobile phone, obtained in current screen and wrapped using uiautomator
The information of coordinate containing all objects, shared screen area;
And/or,
The operation that the recording engine processing module is translated using Android system to application program to be measured, is further wrapped
Include:
Using the Robotium frameworks increased income as playback engine, the script xml document recorded is read using java language, by it
Content translation turns into the test case used by Robotium frameworks;
And/or,
The operation that the recording engine processing module is played back using Android system to application program to be measured, is further wrapped
Include:
Preset playback environment, to be unpacked sign again and pack again to the apk bags of application program to be measured, is reinstalled on mobile phone,
The action that translated use-case is recorded before being played back on mobile phone;
And/or,
The operation that the automation engine processing module is recorded using iOS system to application program to be measured, further comprises:
The Developer application programs signed or the application program operated in simulator are entered using UI Automation
Row is recorded, and is obtained the behavior act of user, is preserved with object form;
And/or,
The operation that the automation engine processing module is played back using iOS system to application program to be measured, further comprises:
Application program to be measured is carried out after Developer signatures, the certificate that upper developer is configured after source code is taken, directly leads to
Cross Xcode compilings to be installed in real equipment, playback UI Automation automatic test script.
2. Mobile solution automatic test device according to claim 1, it is characterised in that the task test cell,
Specifically include:
Test assignment authentication module, for based on the result to application program to be measured, being added in automatized script corresponding
Check post, check post is translated into the checking sentence that can be played, application program to be measured is verified;
The result output module, after the completion of checking, checks corresponding playback result, configures email address, daily record is determined
When be sent to corresponding personnel.
3. Mobile solution automatic test device according to claim 2, it is characterised in that the test assignment verifies mould
The operation that block is verified to application program to be measured, further comprises:
Checking to the expectation function of application program to be measured, normal condition and exceptional condition;
And/or,
The playback result that the result output module is checked, including perform use-case sum, by number, unsuccessfully number, skip number,
Failure error stack information, failure sectional drawing.
4. a kind of Mobile solution automated testing method, it is characterised in that including:
Step 202:Application program to be measured is installed at PC ends, mobile phone connects PC ends by USB line, is recognized under USB debugging modes
To mobile phone connection;
Step 204:When having recognized mobile phone connection, application program to be measured is recorded using Android system, translate and
Playback process, and/or, application program to be measured is recorded using iOS system and playback process;
Step 206:Based on the result to application program to be measured, corresponding check post is added in automatized script, to be measured
Application program is verified, and exports the result, and the step 204 is specifically included:
Step 302:When having recognized mobile phone connection, application program to be measured is recorded using Android system, translate and
Playback process;
And/or,
Step 304:When having recognized mobile phone connection, application program to be measured is recorded using iOS system and playback process,
The operation that the step 302 is recorded using Android system to application program to be measured, further comprises:
The adb order getevent carried using Android system, user is acted in the way of flow of event in hand hands- operation
It is sent on PC ends, parsing lid flow of event obtains click location of the user on mobile phone screen;And/or, use adb order sectional drawings
In function, the interface that mobile phone screen sectional drawing is sent to instrument PC ends, user clicks on the mobile phone sectional drawing in interface with mouse, obtains
Click location on mobile phone screen;Send instructions simultaneously with the use of sendkey orders to mobile phone, mobile phone screen can be with PC ends circle
Sectional drawing screen in face is consistent;
Obtain after behavior act and/or coordinate information of the user on mobile phone, obtained in current screen and wrapped using uiautomator
The information of coordinate containing all objects, shared screen area;
And/or,
The operation that the step 302 is translated using Android system to application program to be measured, further comprises:
Using the Robotium frameworks increased income as playback engine, the script xml document recorded is read using java language, by it
Content translation turns into the test case used by Robotium frameworks;
And/or,
The operation that the step 302 is played back using Android system to application program to be measured, further comprises:
Preset playback environment, to be unpacked sign again and pack again to the apk bags of application program to be measured, is reinstalled on mobile phone,
The action that translated use-case is recorded before being played back on mobile phone;
And/or,
The operation that the step 304 is recorded using iOS system to application program to be measured, further comprises:
The Developer application programs signed or the application program operated in simulator are entered using UI Automation
Row is recorded, and is obtained the behavior act of user, is preserved with object form;
And/or,
The operation that the step 304 is played back using iOS system to application program to be measured, further comprises:
Application program to be measured is carried out after Developer signatures, the certificate that upper developer is configured after source code is taken, directly leads to
Cross Xcode compilings to be installed in real equipment, playback UI Automation automatic test script.
5. Mobile solution automated testing method according to claim 4, it is characterised in that the step 206, specific bag
Include:
Step 402 adds corresponding check post based on the result to application program to be measured in automatized script, by check post
The checking sentence that can be played is translated into, application program to be measured is verified;
After the completion of step 404 checking, corresponding playback result is checked, email address is configured, daily record timing is sent to corresponding human
Member.
6. Mobile solution automated testing method according to claim 5, it is characterised in that the step 402 is to be measured
The operation that application program is verified, further comprises:
Checking to the expectation function of application program to be measured, normal condition and exceptional condition;
And/or,
The playback result that the step 404 is checked, including perform use-case sum, by number, unsuccessfully number, skip number, failure mistake
Stack information, failure sectional drawing.
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 CN104407980A (en) | 2015-03-11 |
CN104407980B true 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) |
Families Citing this family (24)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104699610A (en) * | 2015-03-12 | 2015-06-10 | 安一恒通(北京)科技有限公司 | Test method and device |
CN104899046B (en) * | 2015-06-26 | 2018-01-30 | 上海斐讯数据通信技术有限公司 | A kind of multi-functional script operation method and system |
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 |
CN105183647A (en) * | 2015-09-01 | 2015-12-23 | 北京瑞汛世纪科技有限公司 | Application testing method, apparatus and system |
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 |
CN106021101B (en) * | 2016-05-16 | 2019-05-28 | 北京奇虎科技有限公司 | The method and device that mobile terminal is tested |
CN106155863A (en) * | 2016-07-25 | 2016-11-23 | 北京小米移动软件有限公司 | Terminal anticipatory behavior control method and terminal |
CN106383765B (en) * | 2016-08-31 | 2019-04-26 | 北京百分点信息科技有限公司 | A kind of data monitoring method and device |
CN106528404B (en) | 2016-09-30 | 2019-03-29 | 腾讯科技(深圳)有限公司 | Mobile applications test method and device |
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 |
CN109684196B (en) * | 2018-11-01 | 2024-01-09 | 北京中清龙图网络技术有限公司 | Test method and device |
CN109582566A (en) * | 2018-11-01 | 2019-04-05 | 苏州蜗牛数字科技股份有限公司 | A kind of script method for recording |
CN110046009B (en) * | 2019-02-19 | 2022-08-23 | 创新先进技术有限公司 | Recording method, recording device, server and readable storage medium |
CN111611148B (en) * | 2019-02-22 | 2023-08-29 | 上海哔哩哔哩科技有限公司 | Compatibility concurrent test method and system for iOS system application software |
CN110502437B (en) * | 2019-07-31 | 2023-07-28 | 惠州市德赛西威汽车电子股份有限公司 | Test system and method for vehicle-mounted Bluetooth application program |
CN111488275B (en) * | 2020-04-03 | 2023-08-25 | 携程旅游网络技术(上海)有限公司 | UI (user interface) automatic testing method and device, storage medium and electronic equipment |
CN112000581B (en) * | 2020-08-31 | 2022-05-03 | 威创集团股份有限公司 | Testing method and tool for Cocos2D framework software |
CN113014996B (en) * | 2021-02-18 | 2022-07-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 (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
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 |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB201018991D0 (en) * | 2010-11-10 | 2010-12-22 | Net Magnus Ltd | Opus |
-
2014
- 2014-12-17 CN CN201410782404.0A patent/CN104407980B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
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)
Title |
---|
基于Android自动化平台的研究与实现;林小捷;《中国优秀硕士学位论文全文数据库》;20140515;正文第18-32页 * |
Also Published As
Publication number | Publication date |
---|---|
CN104407980A (en) | 2015-03-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104407980B (en) | Mobile solution automatic test device and method | |
CN106844217B (en) | Method and device for embedding point of applied control and readable storage medium | |
CN103425574B (en) | A kind of method and device of test application program | |
CN103377120B (en) | A kind of applied program testing method and device | |
CN110442511B (en) | Visual embedded point testing method and device | |
US20130132933A1 (en) | Automated compliance testing during application development | |
US20130117855A1 (en) | Apparatus for automatically inspecting security of applications and method thereof | |
CN106681912A (en) | Method and device for automatic testing of code coverage rate, applied to Android system | |
CN105912473A (en) | BDD-based mobile APP automatic testing platform and testing method | |
CN110309071A (en) | Test the generation method and module, test method and system of code | |
Gerpheide et al. | Assessing and improving quality of QVTo model transformations | |
Griebe et al. | A model-based approach to test automation for context-aware mobile applications | |
CN104035873A (en) | Method and device for generating testing codes | |
CN103049371A (en) | Testing method and testing device of Android application programs | |
CN104731566B (en) | Integrated Development Environment test device, method and system | |
CN107832207A (en) | Interface performance test method, apparatus, storage medium and computer equipment | |
CN103678115B (en) | The apparatus and method of the position of source code mistake are detected in mixed mode program | |
CN109871312B (en) | Interface testing method, device, equipment and readable storage medium | |
CN107273250B (en) | Testing method and device of electronic insurance policy automatic underwriting system | |
US9477582B2 (en) | Executable software specification generation | |
CN107038120A (en) | A kind of method for testing software and equipment | |
CN110134596A (en) | The generation method and terminal device of test document | |
CN114915643B (en) | Configuration method, device, equipment and medium of railway signal centralized monitoring system | |
CN106528429A (en) | UI testing method and device | |
CN112860556A (en) | Coverage rate statistical method, coverage rate statistical device, computer system and readable storage medium |
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 |