CN107402877A - APP method of testings and system based on Android ends - Google Patents
APP method of testings and system based on Android ends Download PDFInfo
- Publication number
- CN107402877A CN107402877A CN201610334848.7A CN201610334848A CN107402877A CN 107402877 A CN107402877 A CN 107402877A CN 201610334848 A CN201610334848 A CN 201610334848A CN 107402877 A CN107402877 A CN 107402877A
- Authority
- CN
- China
- Prior art keywords
- interface
- control
- module
- app
- log
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The present invention provides a kind of APP method of testings and system based on Android ends, and wherein method includes:S1:Into tested APP main interface;S2:Obtain the control that current interface includes;S3:Attribute information according to the control establishes the cloth office class for including control and the list of weight, and sorts;S4:Chosen according to the list and be laid out the control that weight is minimum described in elementary control;S5:Operated accordingly according to type corresponding to the control chosen;S6:Into next interface, the operating result of the control is recorded, and the weight of the control of the selection is added 1 in lists, while is labeled as having traveled through;S2 is returned to, until reaching the default testing time.The present invention carries out orderly traversal to control by being laid out grade and weight sequencing to the control included in interface, and according to the sequence, so as to carry out Function detection to control in an orderly manner.
Description
Technical field
The present invention relates to software test field, more particularly to a kind of APP method of testings based on Android ends
And system.
Background technology
With the development of intelligent terminal, being installed on the software of intelligent terminal turns into the emphasis of research and development, and then accordingly
Software test also turn into the technology that receives much concern.Existing method for testing software is varied, such as
Monkey is tested, Monkey tests be a kind of stability for test software, robustness it is fast and effective
Method;To the pseudorandom customer incident stream of system transmission, (such as the input of key-press input, touch-screen, gesture are defeated for it
Enter), realize and pressure test is carried out to the application program developed.
However, there is following defect in Monkey tests:1st, application can not be logged in, simply analog subscriber event
Stream, the login interface of None- identified application and the corresponding account number cipher of input;And all there is account in most of applications
Log in, profound can not test the stability applied, only rest on before login interface.2nd, it can not position and collapse
Burst, flow of event is sent using pseudorandom, applied when collapsing, it is that user can not accurately know for which boundary
Which collapsed caused by the button of face, the collapse reproduction and check to tester can not produce help.3rd, can not
Extension, and present test is multifarious, Monkey is the command-line tool in Android, Wu Fajin
Row extension, with reference to other test-types, do not reach the requirement of various test.4th, it is not easy to use, Monkey
It is the command-line tool in Android, general method of calling is called by PC ends, it is necessary to mobile phone and PC
End connection, can not be tested whenever and wherever possible.5th, test scope is not comprehensive enough, and Monkey is pseudorandom hair
Customer incident stream is sent, easily omits important test point.
The content of the invention
The technical problems to be solved by the invention are:A kind of APP method of testings based on Android ends are provided
And system, the control function in tested APP can be detected in a certain order.
In order to solve the above-mentioned technical problem, the technical solution adopted by the present invention is:
A kind of APP method of testings based on Android ends, including:
S1:Into tested APP main interface;
S2:Obtain the control that current interface includes;
S3:Attribute information according to the control establishes the cloth office class for including control and the list of weight, and
Sequence;
S4:Chosen according to the list and be laid out the control that weight is minimum described in elementary control;
S5:Operated accordingly according to type corresponding to the control chosen;
S6:Into next interface, the operating result of the control is recorded, and in lists by the selection
The weight of control adds 1, while is labeled as having traveled through;S2 is returned to, until reaching the default testing time.
Another technical scheme provided by the invention is:
First jump module, for entering tested APP main interface;
Acquisition module, the control included for obtaining current interface;
Module is established in list, for established according to the attribute information of the control include the cloth office class of control with
The list of weight, and sort;
Module is chosen, it is minimum for choosing weight described in the elementary control of layout according to the list
Control;
Components testing module, for being operated accordingly according to type corresponding to the control chosen;
Second jump module, for entering next interface;Logging modle, for recording the operation of the control
As a result, the weight of the control of the selection and is in lists added 1, while is labeled as having traveled through;Return to module,
For returning to the acquisition module, until reaching the default testing time.
The beneficial effects of the present invention are:Since tested APP main interface, often into a new interface,
Just all controls in new interface are obtained, the attribute according to control in itself establishes layout to all controls in real time
The list of grade and weight, a control detection ordering relation based on cloth office class and weight is obtained, due to
The weight and cloth office class that big functionality controls generally correspond to are all than relatively low, therefore from being laid out elementary control
Begin stepping through, operation corresponding with the control type is carried out to the control traversed, to complete the work(of the control
Can detection;Cloth office class is identical, and preferentially the control relatively low to weight detects, and ensures that big functionality controls are excellent
First travel through;The weight of the control in list is added 1 after the completion of one control detection, and is labeled as having traveled through, from
And the control that traversal can be avoided to have stepped through in ergodic process as far as possible below, and ensure first traversal operation time
The minimum control of number, greatly accelerates test speed, improves testing efficiency.
Brief description of the drawings
Fig. 1 is the flow chart of the APP method of testings based on Android ends of one embodiment of the invention;
Fig. 2 is the flow chart of the APP method of testings based on Android ends of the embodiment of the present invention one;
Fig. 3 is the structure chart of the APP test systems based on Android ends of one embodiment of the invention;
Fig. 4 is the structure chart of the APP test systems based on Android ends of the embodiment of the present invention three;
Fig. 5 is the interface tree schematic diagram of the APP method of testings based on Android ends of the embodiment of the present invention one;
Fig. 6 is the postal of the setting association of the APP method of testings based on Android ends of the embodiment of the present invention one
The schematic diagram of case;
Fig. 7 is the setting screenshotss of the APP method of testings based on Android ends of the embodiment of the present invention one and weak
The schematic diagram of network test;
Fig. 8 is the setting testing time of the APP method of testings based on Android ends of the embodiment of the present invention one
Schematic diagram;
Fig. 9 is that survey is checked in the mobile terminal of the APP method of testings based on Android ends of the embodiment of the present invention one
Test result schematic diagram;
Figure 10 is that report is checked at the PC ends of the APP method of testings based on Android ends of the embodiment of the present invention one
Bulletin is intended to.
Label declaration:
01st, identification module;02nd, automated log on module;1st, the first jump module;11st, interface type judges
Module;2nd, acquisition module;3rd, module is established in list;4th, module is chosen;5th, components testing module;
6th, the second jump module;7th, report generation module.
Embodiment
To describe the technology contents of the present invention, the objects and the effects in detail, below in conjunction with embodiment simultaneously
Accompanying drawing is coordinated to be explained.
The design of most critical of the present invention is:Often enter an interface, just to the control in the interface according to cloth
Office class and weight sequencing, orderly traversal is carried out to the control in the interface according to the sequence, is realized each
The Function detection of control.
Fig. 1 is refer to, the present invention provides
A kind of APP method of testings based on Android ends, including:
S1:Into tested APP main interface;
S2:Obtain the control that current interface includes;
S3:Attribute information according to the control establishes the cloth office class for including control and the list of weight, and
Sequence;
S4:Chosen according to the list and be laid out the control that weight is minimum described in elementary control;
S5:Operated accordingly according to type corresponding to the control chosen;
S6:Into next interface, the operating result of the control is recorded, and in lists by the selection
The weight of control adds 1, while is labeled as having traveled through;S2 is returned to, until reaching the default testing time.
Further, further comprise after the S1:
S11:Current interface is compared with the interface tree established in real time according to interface jump information, prezone is worked as in judgement
Noodles type, the interface type include new interface, have traveled through interface, collapse interface and dead interface;
If current interface is new interface, current interface is added into interface tree, carries out the S2;
If current interface carries out the S4 to have traveled through interface;
If current interface is collapse interface, crash info is recorded, restarts tested APP, returns to the S1;
If current interface is dead interface, an interface is back to, carries out the S2.
It was found from foregoing description, by judging the type of current interface, emerging interface can be added in time
Enter interface tree, it is ensured that the integrality of interface tree, the interface that and can effectively avoids having stepped through is added again leads
Cause repeats, moreover it is possible to finds the abnormal conditions such as collapse, deadlock in time.
Further, before the S1, in addition to:
S01:The tested APP of identification startup page component, the type according to the startup page component are accordingly grasped
Make, into next interface;
S02:Automated log on is carried out according to default account number cipher.
It was found from foregoing description, after starting test, it is identified to starting page component, is carried out after identification first
Such as the corresponding operation such as slide, click on, so as into login interface, then according to the account pre-set
Number password carries out automated log on, without carrying out being manually entered account number cipher again, realizes one-touch test.
Further, the S02 is specially:
S021:Judge whether current interface is login interface;
S022:If so, the account number cipher input frame of the account number cipher pre-established and login interface is matched
Carry out automated log on;
If it is not, into next interface, the S021 is returned.
It was found from foregoing description, login interface is not necessarily immediately entered to starting after page control operates, than
Such as it is probably main survey interface, therefore first the interface after entrance is judged, for example detects whether there are two
Input frame, if printed words such as " login " " login " be present;Default account is used after being determined as login interface
Password match input frame corresponding to completes automated log on.
Further, screenshotss are often carried out into an interface.
It was found from foregoing description, by screenshotss can real time recording interface situation about redirecting, and being capable of basis
The picture analyzing interface of screenshotss redirects the reason for abnormal.
Further, ergodic process generates dynamic log in real time, and carries out real time parsing to the dynamic log.
It was found from foregoing description, dynamic log is that all operations of foundation ergodic process generate in real time, therefore
Real time parsing dynamic log is that can obtain concrete operations and the corresponding result that ergodic process is carried out, such as bottom
Code and control location of layer etc., existing exception is tested out so as to which the content parsed according to dynamic log may know that
When the reason for, such as when tested APP collapses, crash, anr and native caused by capture in time
Crash, the specific code line number of collapse is produced for development and location, wherein, crash is by SDK, uses Java
Collapsed caused by exploitation;Anr is Application Not Responding, i.e. program does not respond;native crash
By Android NDK, to be collapsed caused by being developed using C/C++.
Further, further comprise after the S6:
S7:Content generation second-level directory knot according to operating result, screenshotss and the dynamic log parsing of control
The report of structure, crash log and collapse control location of the report also including code level.
It was found from foregoing description, after the completion of control visiting, the report of generation includes the Function detection knot of control
Fruit and it is abnormal when screenshot picture and abnormal cause, therefore user can intuitively find out tested APP survey very much
The reason for examination situation and abnormal appearance, so as to correspondingly take solution.
Fig. 3 is refer to, another technical scheme provided by the invention is:
A kind of APP test systems based on Android ends, including:
First jump module 1, for entering tested APP main interface;
Acquisition module 2, the control included for obtaining current interface;
Module 3 is established in list, for established according to the attribute information of the control include the cloth office class of control with
The list of weight, and sort;
Module 4 is chosen, it is minimum for choosing weight described in the elementary control of layout according to the list
Control
Components testing module 5, for being operated accordingly according to type corresponding to the control chosen;
Second jump module 6, for entering next interface;Logging modle, for recording the operation of the control
As a result, the weight of the control of the selection and is in lists added 1, while is labeled as having traveled through;Return to module,
For returning to the acquisition module, until reaching the default testing time.
Further, in addition to:
Interface type determination module 11, for the boundary established in real time by current interface and according to interface jump information
Face tree compares, and judges current interface type, and the interface type includes new interface, traveled through interface, collapse
Interface and dead interface;If current interface is new interface, current interface is added into interface tree, obtained into described
Modulus block;If current interface is has traveled through interface, into the selection module;If current interface is
Interface is collapsed, then records crash info, restarts tested APP, return to the S1;If current interface is dead
Interface, then an interface is back to, into the acquisition module;
Identification module 01, for identifying tested APP startup page component, the class according to the startup page component
Type carries out corresponding operating, into next interface;
Automated log on module 02, for carrying out automated log on according to default account number cipher;
Screen capture module, for often carrying out screenshotss into an interface;
Dynamic log generation module, for generating dynamic log in real time in ergodic process;
Dynamic log parsing module, for carrying out real time parsing to the dynamic log;
Report generation module 7, the content for operating result, screenshotss and the dynamic log parsing according to control
Generate the report of second-level directory structure, crash log and collapse control location of the report also including code level.
It was found from foregoing description, the interface for judging newly to enter by interface type determination module belongs to any type,
So as to which emerging interface is added into interface tree in time, it is ensured that the integrality of interface tree, and can are effectively kept away
The interface for exempting to have stepped through is added again to cause to repeat, moreover it is possible to finds the abnormal conditions such as collapse, deadlock in time;
Tested APP startup page component is identified by identification module, so as to according to class corresponding to the startup page component
Type is for example slided the operation of click, hence into login interface;Again by automated log on module according in advance
The account number cipher of setting carries out automated log on, without carrying out being manually entered account number cipher again, realizes one-touch survey
Examination;Screen capture module, dynamic log generation module and dynamic log parsing module can be carried out to ergodic process
Monitoring in real time, so as to note abnormalities in time, and exception is analyzed according to the picture and dynamic log of screenshotss
Reason.
Embodiment one
Fig. 2, Fig. 5-10 is refer to, embodiments of the invention one provide a kind of APP based on Android ends
Method of testing, can be to detecting the control function in tested APP in a certain order.In order to preferably say
The scheme of bright the present embodiment, the first concept to interface tree, cloth office class, weight and several interface types
Illustrate:
Interface tree is recorded using tree form, and each interface has one or more controls, each control
Corresponding interface can be jumped to, each control has the attribute information of its own, contained in the attribute information of control
Have and cloth office class and the attribute needed for weight are set, control can be carried out according to cloth office class and weight orderly
Traversal test;The lower control of cloth office class is more preferentially traveled through in the present invention, and cloth office class is identical, weighs
Lower control more first traversal again, one of control is randomly selected if weight and cloth office class all same
Traveled through.During into first interface, interface tree is directly established, and to the control in first interface
Part establishes the list of the cloth office class comprising the control and weight, and the list is ranked up;It is every afterwards
An interface is jumped to, interface tree and the list are updated in real time according to the control at the interface.
New interface is not recorded in the interface in interface tree before being;
Interface is traveled through and has been divided into same interface and similar interface, same interface i.e. with being recorded in interface tree before
The identical interface in a certain interface;Similar interface is then some interface with being already recorded on interface tree
In the presence of the interface of a small amount of control difference, specifically, will be identical with the Activity titles at some interface on interface tree
And interface definition of the identical control number more than 80% is similar interface, the Acitivty is android system four
One of big component, the interface that user interacts with Android application programs, can be regarded as a control container;
Collapse interface:Before some interface redirects there is collapse in the control of operation, then the interface is collapse interface;
Dead interface:Some interface is without operable control or has traveled through all controls, is during which jumped without generation interface
Turn, remain in the interface, then the interface is dead interface.
Here is the specific steps of the present embodiment:
Before test:
Set association mailbox, and select the APP to be tested, set the testing time, account number cipher, whether
Screenshotss and vulnerable network (for example, limiting network speed in below 20kb/s) are opened, as shown in Figure 6 to 8,
The present embodiment is opening screenshotss and vulnerable network.
Start to test:
Start tested APP, into an interface, the interface after is current interface, and it is current to scan this
The control included in interface, judge in the interface with the presence or absence of start page component (such as:
android.support.v4.view.ViewPager、android.widget.ImageSwitcher、
Android.widget.ViewFlipper, android.widget.HorizontalScrollView, this four are all
Android components, effect are provided to realize switching or wheel multicast function between picture) and control number whether be less than 6,
If so, the interface is then judged to start page;(conventional startup page control is typically present in other interfaces, because
This is easy to arrive these controls in the scanning of non-start up page, and it is typically fewer to start page control number;Therefore, such as
Fruit meets to have startup page component simultaneously and control number illustrates the interface to start page at least);According to the startup page
The type of component is operated accordingly, for example is slide assemblies, then carries out slide, clicks on component then
Clicking operation is carried out, into next interface;Sometimes start the more than one page of page, then return it is above-mentioned " scanning should
The control included in current interface, judge in the interface with the presence or absence of startup page component ", until starting page processing
Finish, into login interface;
S1:Automated log on is carried out using the account number cipher that is set before above-mentioned test, into the interface after login,
I.e. tested APP main interface;
S11:Current interface is compared with the interface tree established in real time, judges current interface type, the interface
Type includes new interface, has traveled through interface, collapse interface and dead interface;If current interface is new interface,
Current interface is added into interface tree, carries out following S2;If current interface is carried out down to have traveled through interface
The S4 in face;If current interface is collapse interface, crash info is recorded, restarts tested APP, returns to institute
State S1;If current interface is dead interface, an interface is back to, carries out following S2;
S2:Obtain the control that current interface includes;
S3:Attribute information according to the control establishes the cloth office class for including control and the list of weight, and
Sequence;The control for being ordered as more first traversal is come before more;
S4:Chosen according to the list and be laid out the control that weight is minimum described in elementary control;
S5:Operated accordingly according to type corresponding to the control chosen;
S6:Into next interface, the operating result of the control is recorded, and in lists by the selection
The weight of control adds 1, while is labeled as having traveled through;S2 is returned to, until reaching the default testing time;
In said process, screenshotss are often carried out into an interface, and ergodic process generates dynamic day in real time
Will, and real time parsing is carried out to the dynamic log;
S7:The content that operating result, screenshotss and dynamic log according to all controls parse generates two level mesh
The report of directory structures, crash log and collapse control location of the report also including code level;And by described in
The mailbox of the link push of report association to before testing, so as to which user can directly check the test knot in mobile terminal
Fruit, as shown in figure 9, also the report can be checked by clicking on the link at PC ends, as shown in Figure 10.
The ergodic process into after main interface is illustrated with a specific example below:
As shown in fig. 5, it is assumed that main interface is first interface, then it is obvious that main interface belongs to new interface,
Interface tree is established, main interface is added into interface tree;During subsequently into interface 1, interface 1 is current interface,
Judge the interface type at interface 1;If interface 1 is new interface, interface 1 is added to above-mentioned interface tree,
If interface 1 is same or similar with main interface, interface has as been traveled through, then has no longer been added interface 1 above-mentioned
Interface tree, if interface 1 is collapse interface, tested APP is restarted, and record crash info, control
Number mark plus 1 are collapsed, interface 1 collapses number mark plus 1, if interface 1 is dead interface, returns to main interface;
Assuming that main interface includes control 1, control 2, control 3, the control 1, control 2, control 3 are obtained;To control
Part 1, control 2, control 3 are established the list for including cloth office class and weight, and sorted, wherein cloth office class
The minimum control of weight comes the foremost in list section corresponding to current interface in minimum control, represents most
First travel through;Assuming that control 1, control 2, control 3 have cloth office class and weight as shown in Figure 5, then very
Substantially, control 1 comes the foremost of list;Choose above-mentioned control 1;Assuming that control 1 is scroll bar control,
After then carrying out rolling operation to control 1, into interface 1, and the weight of control 1 is added 1 in above-mentioned list,
Mark control 1 is to have traveled through control;By that analogy, continue to carry out the steps such as interface type judgement to interface 1,
Until reaching preset time, traversal terminates.If it is noted that into interface 1, it is assumed that interface 1 includes control
Part 1.1, control 1.2 and control 1.3, as shown in figure 5, to control 1.1, control 1.2 in above-mentioned list
Established with control 1.3 and include cloth office class and weight;And its parent control is associated to each control, it is recorded in this
In list;For example, it can be seen that control 1 is the parent control of control 1.1, therefore by control
1.1 associate with control 1, are recorded in above-mentioned list;The rest may be inferred, and his father is associated upwards to each control
Level control, until the position of each control is unique;In addition, the control that each interface includes in actual scene is not
Certain only 3, merely just illustrate.
Embodiment two
The embodiment of the present invention two is the foundation of the APP method of testings based on Android ends of above-described embodiment one
Default account number cipher carries out automatic logging method, including:
Into after an interface, judge whether current interface is login interface;Specifically, judge current interface
Whether contain more than two input frames and exist containing " login ", the text of " login " printed words or login
Control;The login control is control text containing printed words or the resource tag such as " login ", " entrance " " login "
Attribute contains the control of " login " printed words;
If so, the account number cipher input frame of the account number cipher pre-established and login interface is matched into progress certainly
It is dynamic to log in;Specifically, there are following several situations:(1) by default account and input frame transcription comparison, judge
Whether account has deposited, and is then direct passwords input frame;(2) there was only two input frame controls, by defeated
The ispassword determined properties for entering frame are which is password box, and another is then account frame;It is specific defeated
Enter frame and contain the printed words such as account, account, mailbox, mobile phone, number, QQ, Email and ispassword=false,
Then the input frame is account frame;Input box properties ispassword=true is Password Input frame, or input frame
Text contains password, password printed words are Password Input frame;
If it is not, into next interface, continue to judge whether the interface is login interface according to the method described above.
Embodiment three:
As shown in figure 4, present embodiments provide a kind of be applied in above-described embodiment one based on Android ends
The system of APP method of testings, including:
Setup module, for setting the mailbox of association, and the APP to be tested is selected, the setting testing time,
Account number cipher, whether open screenshotss and vulnerable network (for example, limiting network speed in below 20kb/s);
Identification module 01, for identifying tested APP startup page component, the class according to the startup page component
Type carries out corresponding operating, into next interface;
Automated log on module 02, for using stepping on automatically in above-described embodiment two according to default account number cipher
Recording method carries out automated log on;
First jump module 1, for entering tested APP main interface;
Interface type determination module 11, for current interface to be compared with the interface tree established in real time, judge to work as
Front interface type, the interface type include new interface, have traveled through interface, collapse interface and dead interface;Such as
Fruit current interface is new interface, and current interface is added into interface tree, into following acquisition modules 2;It is if current
Interface then enters following selection modules 4 to have traveled through interface;If current interface is collapse interface, record
Crash info, restart tested APP, return to first jump module;If current interface is dead interface,
An interface is then back to, into following acquisition modules 2;
Acquisition module 2, the control included for obtaining current interface;
Module 3 is established in list, for established according to the attribute information of the control include the cloth office class of control with
The list of weight, and sort;
Module 4 is chosen, it is minimum for choosing weight described in the elementary control of layout according to the list
Control;
Components testing module 5, for being operated accordingly according to type corresponding to the control chosen;
Second jump module 6, for entering next interface;Logging modle, for recording the operation of the control
As a result, the weight of the control of the selection and is in lists added 1, while is labeled as having traveled through;Return to module,
For returning to the acquisition module, until reaching the default testing time;
Screen capture module, for often carrying out screenshotss into an interface;
Dynamic log generation module, for generating dynamic log in real time in ergodic process;
Dynamic log parsing module, for carrying out real time parsing to the dynamic log;
Report generation module 7, for operating result, screenshotss and the dynamic log parsing according to all controls
Content generates the report of second-level directory structure, crash log and collapse control of the report also including code level
Position;
Pushing module, for the report to be pushed to the mailbox of above-mentioned association.
In summary, APP method of testings and system provided by the invention based on Android ends, during test
Default account number cipher can be used to carry out automated log on, into APP main interfaces, realize one-touch test,
Automaticity is high;And often enter an interface, establish the cloth office class and power of control in the interface automatically
Reorder, control is traveled through in an orderly manner according to the sequence, realize the Function detection of each control, ensure big
Functionality controls first traversal;The control weight adds 1 after each control visiting, ensures that first traversal is not traversed
Control, improve traversal efficiency;Screenshotss can be carried out when interface redirects, and are generated in real time in ergodic process
Dynamic log, and real time parsing is carried out to the dynamic log, so as to the Function detection result according to control, cut
Shield picture and the corresponding report of dynamic log parsing content generation, therefore can intuitively be obtained from this report
Test result, abnormal conditions and abnormal cause.
Embodiments of the invention are the foregoing is only, are not intended to limit the scope of the invention, every profit
The equivalents made with description of the invention and accompanying drawing content, or directly or indirectly it is used in the technology of correlation
Field, it is included within the scope of the present invention.
Claims (9)
- A kind of 1. APP method of testings based on Android ends, it is characterised in that including:S1:Into tested APP main interface;S2:Obtain the control that current interface includes;S3:Attribute information according to the control establishes the cloth office class for including control and the list of weight, and Sequence;S4:Chosen according to the list and be laid out the control that weight is minimum described in elementary control;S5:Operated accordingly according to type corresponding to the control chosen;S6:Into next interface, the operating result of the control is recorded, and in lists by the selection The weight of control adds 1, while is labeled as having traveled through;S2 is returned to, until reaching the default testing time.
- 2. the APP method of testings according to claim 1 based on Android ends, it is characterised in that Further comprise after the S1:S11:Current interface is compared with the interface tree established in real time according to interface jump information, prezone is worked as in judgement Noodles type, the interface type include new interface, have traveled through interface, collapse interface and dead interface;If current interface is new interface, current interface is added into interface tree, carries out the S2;If current interface carries out the S4 to have traveled through interface;If current interface is collapse interface, crash info is recorded, restarts tested APP, returns to the S1;If current interface is dead interface, an interface is back to, carries out the S2.
- 3. the APP method of testings according to claim 1 based on Android ends, it is characterised in that Before the S1, in addition to:S01:The tested APP of identification startup page component, the type according to the startup page component are accordingly grasped Make, into next interface;S02:Automated log on is carried out according to default account number cipher.
- 4. the APP method of testings according to claim 3 based on Android ends, it is characterised in that The S02 is specially:S021:Judge whether current interface is login interface;S022:If so, the account number cipher input frame of the account number cipher pre-established and login interface is matched Carry out automated log on;If it is not, into next interface, the S021 is returned.
- 5. the APP method of testings according to claim 1 based on Android ends, it is characterised in that Often screenshotss are carried out into an interface.
- 6. the APP method of testings according to claim 5 based on Android ends, it is characterised in that Ergodic process generates dynamic log in real time, and carries out real time parsing to the dynamic log.
- 7. the APP method of testings according to claim 6 based on Android ends, it is characterised in that Further comprise after the S6:S7:Content generation second-level directory knot according to operating result, screenshotss and the dynamic log parsing of control The report of structure, crash log and collapse control location of the report also including code level.
- A kind of 8. APP test systems based on Android ends, it is characterised in that including:First jump module, for entering tested APP main interface;Acquisition module, the control included for obtaining current interface;Module is established in list, for established according to the attribute information of the control include the cloth office class of control with The list of weight, and sort;Module is chosen, it is minimum for choosing weight described in the elementary control of layout according to the list Control;Components testing module, for being operated accordingly according to type corresponding to the control chosen;Second jump module, for entering next interface;Logging modle, for recording the operation of the control As a result, the weight of the control of the selection and is in lists added 1, while is labeled as having traveled through;Return to module, For returning to the acquisition module, until reaching the default testing time.
- 9. the APP test systems according to claim 8 based on Android ends, it is characterised in that Also include:Interface type determination module, for the interface established in real time by current interface and according to interface jump information Tree compares, and judges current interface type, and the interface type includes new interface, traveled through interface, collapse circle Face and dead interface;If current interface is new interface, current interface is added into interface tree, into the acquisition Module;If current interface is has traveled through interface, into the selection module;If current interface is to collapse Routed interface, then record crash info, restarts tested APP, returns to first jump module;It is if current Interface is dead interface, then is back to an interface, into the acquisition module;Identification module, for identifying tested APP startup page component, the type according to the startup page component Corresponding operating is carried out, into next interface;Automated log on module, for carrying out automated log on according to default account number cipher;Screen capture module, for often carrying out screenshotss into an interface;Dynamic log generation module, for generating dynamic log in real time in ergodic process;Dynamic log parsing module, for carrying out real time parsing to the dynamic log;Report generation module, the content for operating result, screenshotss and the dynamic log parsing according to control Generate the report of second-level directory structure, crash log and collapse control location of the report also including code level.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610334848.7A CN107402877B (en) | 2016-05-19 | 2016-05-19 | Android-terminal-based APP test method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610334848.7A CN107402877B (en) | 2016-05-19 | 2016-05-19 | Android-terminal-based APP test method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107402877A true CN107402877A (en) | 2017-11-28 |
CN107402877B CN107402877B (en) | 2020-08-18 |
Family
ID=60394071
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610334848.7A Active CN107402877B (en) | 2016-05-19 | 2016-05-19 | Android-terminal-based APP test method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107402877B (en) |
Cited By (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108038059A (en) * | 2017-12-22 | 2018-05-15 | 广州酷狗计算机科技有限公司 | Interface traversal method and device |
CN108572913A (en) * | 2018-02-26 | 2018-09-25 | 挖财网络技术有限公司 | Method, apparatus and the application of App homepages are positioned in Android client UI automation processes |
CN108595330A (en) * | 2018-04-23 | 2018-09-28 | 北京潘达互娱科技有限公司 | A kind of application testing method and device |
CN108763097A (en) * | 2018-06-06 | 2018-11-06 | 上海携程国际旅行社有限公司 | Automated testing method, device, electronic equipment, storage medium |
CN108881585A (en) * | 2018-05-08 | 2018-11-23 | 北京五八信息技术有限公司 | Built-in application program test processing method, device, electronic equipment and storage medium |
CN109062807A (en) * | 2018-09-14 | 2018-12-21 | 口碑(上海)信息技术有限公司 | The method and device of test application program, storage medium, electronic device |
CN109669798A (en) * | 2018-12-25 | 2019-04-23 | 北京金山安全软件有限公司 | Crash analysis method, crash analysis device, electronic equipment and storage medium |
CN109857636A (en) * | 2018-12-25 | 2019-06-07 | 杭州茂财网络技术有限公司 | A kind of methods and applications positioning App homepage in Android client UI automation process |
CN111045913A (en) * | 2018-10-11 | 2020-04-21 | 福建天泉教育科技有限公司 | Method and terminal for automatically logging in to-be-tested application |
CN111125654A (en) * | 2019-12-20 | 2020-05-08 | 珠海金山网络游戏科技有限公司 | Method and device for automatically logging in client based on log file and readable medium |
CN112532966A (en) * | 2019-08-27 | 2021-03-19 | 中兴通讯股份有限公司 | Set top box testing method and device, set top box and computer readable storage medium |
CN112559721A (en) * | 2020-12-25 | 2021-03-26 | 北京百度网讯科技有限公司 | Method, apparatus, device, medium and program product for adjusting man-machine dialog system |
CN112612698A (en) * | 2020-12-17 | 2021-04-06 | 平安普惠企业管理有限公司 | Application program crash test method and related product |
CN112988304A (en) * | 2021-03-25 | 2021-06-18 | 腾讯科技(深圳)有限公司 | Recording method and device of operation mode, electronic equipment and storage medium |
CN113626301A (en) * | 2020-05-06 | 2021-11-09 | 北京字节跳动网络技术有限公司 | Method and device for generating test script |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080221860A1 (en) * | 2007-03-09 | 2008-09-11 | William Eugene Jacobus | Hardware interface board for connecting an emulator to a network |
CN104035867A (en) * | 2014-06-04 | 2014-09-10 | 重庆泰凯科技有限公司 | Android-based application function traverse test method |
CN104598380A (en) * | 2015-01-16 | 2015-05-06 | 广东欧珀移动通信有限公司 | Method and system for automatic testing based on control |
CN104834600A (en) * | 2015-04-28 | 2015-08-12 | 南京邮电大学 | Method for testing Android application controls |
CN105550101A (en) * | 2015-12-02 | 2016-05-04 | 北京奇虎科技有限公司 | Test method for application program, electronic device and system |
-
2016
- 2016-05-19 CN CN201610334848.7A patent/CN107402877B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080221860A1 (en) * | 2007-03-09 | 2008-09-11 | William Eugene Jacobus | Hardware interface board for connecting an emulator to a network |
CN104035867A (en) * | 2014-06-04 | 2014-09-10 | 重庆泰凯科技有限公司 | Android-based application function traverse test method |
CN104598380A (en) * | 2015-01-16 | 2015-05-06 | 广东欧珀移动通信有限公司 | Method and system for automatic testing based on control |
CN104834600A (en) * | 2015-04-28 | 2015-08-12 | 南京邮电大学 | Method for testing Android application controls |
CN105550101A (en) * | 2015-12-02 | 2016-05-04 | 北京奇虎科技有限公司 | Test method for application program, electronic device and system |
Cited By (20)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108038059A (en) * | 2017-12-22 | 2018-05-15 | 广州酷狗计算机科技有限公司 | Interface traversal method and device |
CN108572913A (en) * | 2018-02-26 | 2018-09-25 | 挖财网络技术有限公司 | Method, apparatus and the application of App homepages are positioned in Android client UI automation processes |
CN108595330A (en) * | 2018-04-23 | 2018-09-28 | 北京潘达互娱科技有限公司 | A kind of application testing method and device |
CN108881585B (en) * | 2018-05-08 | 2020-11-10 | 北京五八信息技术有限公司 | Built-in application program test processing method and device, electronic equipment and storage medium |
CN108881585A (en) * | 2018-05-08 | 2018-11-23 | 北京五八信息技术有限公司 | Built-in application program test processing method, device, electronic equipment and storage medium |
CN108763097A (en) * | 2018-06-06 | 2018-11-06 | 上海携程国际旅行社有限公司 | Automated testing method, device, electronic equipment, storage medium |
CN109062807A (en) * | 2018-09-14 | 2018-12-21 | 口碑(上海)信息技术有限公司 | The method and device of test application program, storage medium, electronic device |
CN111045913A (en) * | 2018-10-11 | 2020-04-21 | 福建天泉教育科技有限公司 | Method and terminal for automatically logging in to-be-tested application |
CN111045913B (en) * | 2018-10-11 | 2023-07-07 | 福建天泉教育科技有限公司 | Method and terminal for automatically logging in application to be tested |
CN109669798A (en) * | 2018-12-25 | 2019-04-23 | 北京金山安全软件有限公司 | Crash analysis method, crash analysis device, electronic equipment and storage medium |
CN109857636A (en) * | 2018-12-25 | 2019-06-07 | 杭州茂财网络技术有限公司 | A kind of methods and applications positioning App homepage in Android client UI automation process |
CN109669798B (en) * | 2018-12-25 | 2022-09-16 | 北京金山安全软件有限公司 | Crash analysis method, crash analysis device, electronic equipment and storage medium |
CN112532966A (en) * | 2019-08-27 | 2021-03-19 | 中兴通讯股份有限公司 | Set top box testing method and device, set top box and computer readable storage medium |
CN111125654A (en) * | 2019-12-20 | 2020-05-08 | 珠海金山网络游戏科技有限公司 | Method and device for automatically logging in client based on log file and readable medium |
CN113626301A (en) * | 2020-05-06 | 2021-11-09 | 北京字节跳动网络技术有限公司 | Method and device for generating test script |
CN112612698A (en) * | 2020-12-17 | 2021-04-06 | 平安普惠企业管理有限公司 | Application program crash test method and related product |
CN112559721A (en) * | 2020-12-25 | 2021-03-26 | 北京百度网讯科技有限公司 | Method, apparatus, device, medium and program product for adjusting man-machine dialog system |
CN112559721B (en) * | 2020-12-25 | 2023-10-20 | 北京百度网讯科技有限公司 | Method, device, equipment, medium and program product for adjusting man-machine dialogue system |
CN112988304B (en) * | 2021-03-25 | 2022-04-29 | 腾讯科技(深圳)有限公司 | Recording method and device of operation mode, electronic equipment and storage medium |
CN112988304A (en) * | 2021-03-25 | 2021-06-18 | 腾讯科技(深圳)有限公司 | Recording method and device of operation mode, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN107402877B (en) | 2020-08-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107402877A (en) | APP method of testings and system based on Android ends | |
KR101791623B1 (en) | Visualizing realationships between a transaction trace graph and a map of logical subsystems | |
CN101620564A (en) | Method for automatically testing recording playback mode of terminal system | |
US10459830B2 (en) | Executable code abnormality detection | |
KR20120115477A (en) | Visualizing transaction traces as flows through a map of logical subsystems | |
CN110659349A (en) | Log query method, device, equipment and computer readable storage medium | |
CN106648864B (en) | Method and device for opening and/or switching multiple applications | |
JP5942009B1 (en) | Software test apparatus, software test method, and software test program | |
CN109829092B (en) | Method for directionally monitoring webpage | |
CN108595343A (en) | The test method and device of application program | |
WO2018036529A1 (en) | Method for generating visual test report | |
CN113792341B (en) | Automatic detection method, device, equipment and medium for privacy compliance of application program | |
CN113946833A (en) | Asset management method based on SOAR automatic arrangement and response | |
CN110717184A (en) | Distributed safety test system | |
CN104123397A (en) | Automatic test device and method for Web page | |
CN111723515A (en) | Method, device and system for operating operator | |
CN110543429A (en) | Test case debugging method and device and storage medium | |
CN107430590B (en) | System and method for data comparison | |
CN111131002B (en) | Method, system and storage medium for tracing chat records | |
CN104471531A (en) | Capturing an application state in a conversation | |
US11641421B2 (en) | System and method of embedding and launching a form from third-party knowledge content | |
US20090172714A1 (en) | Method and apparatus for collecting metadata during session recording | |
WO2018036528A1 (en) | Automatic testing method | |
CN115328366A (en) | Million-level tree node searching and displaying method and system based on full path calculation | |
CN115481025A (en) | Script recording method and device for automatic test, computer equipment and medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |