CN107977306A - Method and apparatus for testing Android application stability - Google Patents
Method and apparatus for testing Android application stability Download PDFInfo
- Publication number
- CN107977306A CN107977306A CN201610937726.7A CN201610937726A CN107977306A CN 107977306 A CN107977306 A CN 107977306A CN 201610937726 A CN201610937726 A CN 201610937726A CN 107977306 A CN107977306 A CN 107977306A
- Authority
- CN
- China
- Prior art keywords
- test
- information
- application
- window
- control
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
Abstract
This application discloses the method and apparatus for testing Android application stability.One embodiment of the method includes:Obtain application message, test result record position information, the test-types information of application to be tested, wherein, the second test-types that the first test-types tested are tested with the definite position click based on test case after first random site click test are clicked in definite position after test-types include elder generation's random site click test;According to the test-types information, the application to be tested indicated by the application message is tested and generates test result information, and the test result information is stored to the storage region indicated by the test result record position information.This embodiment improves Android application stability test testing efficiency and improve the reusing degree of test case and test script.
Description
Technical field
This application involves using technical field of measurement and test, and in particular to terminal applies technical field of measurement and test, more particularly, to
The method and apparatus for testing Android application stability.
Background technology
The stability test of Android application be it is a kind of by repeatedly (thousands of times) for a long time (continuous work) to Android
Using being operated, to detect Android application whether can the still test of normal operation after repeatedly prolonged operation.Base at present
This realizes the stability test of Android application using two methods:
(1) random site clicks on test:Random enumerates coordinate in Android application interface, and triggering is clicked on or input operation,
Move in circles successively, the stability of test Android application.Existing conventionally test instrument to Android system by sending pseudorandom
Customer incident stream (such as clicking operation), realize to Android application carry out random site click on test.However, due to Android application
Interface in have substantial amounts of inactive area (i.e. there is no can click on the region of control), therefore the random clicking operation for enumerating coordinate
In there is the substantial amounts of clicking operation to be invalid, such test mode effectively to click on number of operations very little, can trigger and collapse
The routed time used duration, occupy a large amount of stability tests, reduces the efficiency of stability test.In addition, random site point
Hit to test can not achieve and the programmed logic of Android application is tested.
(2) determine that test is clicked in position:Respectively controlling in test script is performed by writing test script, and by android terminal
System instruction operates the control on Android application interface based on coordinate data simulation human hand.Surveyed however, determining that position is clicked on
Examination still remains following two point defect:First, when user interface (UI, User Interface) is changed, test case
In original coordinate data be required for changing, cause the reusing degree of test case to reduce, the increase of the maintenance cost of test case;The
Two, the resolution ratio difference of different mobile phones causes with after the application installation of a Android, and the coordinate of identical control can also change, and lead
Cause test script cannot be general on the type of different resolution, the reusing degree of test script is low, increases the cost of code maintenance.
Therefore, there are testing efficiency is low or test script and test case for the stability test of existing Android application
Maintenance cost it is high the problem of.
The content of the invention
The purpose of the application is to propose a kind of improved method and apparatus for testing Android application stability, to solve
The technical problem that certainly background section above is mentioned.
In a first aspect, this application provides a kind of method for testing Android application stability, the described method includes:Obtain
Application message, test result record position information, the test-types information of application to be tested are taken, wherein, test-types are included first
Definite position clicks on the first test-types tested and is based on surveying after first random site click test after random site clicks on test
Click on the second test-types of test in the definite position of example on probation;According to the test-types information, to the application message institute
The application to be tested indicated is tested and generates test result information, and the test result information is stored to the survey
Storage region indicated by test result record position information.
Second aspect, this application provides a kind of device for being used to test Android application stability, described device includes:The
One acquiring unit, is configured to obtain the application message of application to be tested, test result record position information, test-types letter
Breath, wherein, test-types include first random site click on determine after test position click on test the first test-types and first with
The second test-types tested are clicked in the definite position based on test case after click test is put in seat in the plane;Test cell, configuration are used
According to the test-types information, the application to be tested indicated by the application message is tested and generates test result
Information, and the test result information is stored to the storage region indicated by the test result record position information.
The method and apparatus for testing Android application stability that the application provides, by obtaining answering for application to be tested
It is signified to application message then according to test-types information with information, test result record position information, test-types information
The application to be tested shown is tested and generates test result information, and test result information storage is recorded to test result
Storage region indicated by positional information, so as to improve the testing efficiency of Android application stability test and improve test
The reusing degree of use-case and test script.
Brief description of the drawings
By reading the detailed description made to non-limiting example made with reference to the following drawings, the application's is other
Feature, objects and advantages will become more apparent upon:
Fig. 1 is the flow chart for being used to test one embodiment of the method for Android application stability according to the application;
Fig. 2 is the flow chart for being used to test another embodiment of the method for Android application stability according to the application;
Fig. 3 is the flow chart for being used to test another embodiment of the method for Android application stability according to the application;
Fig. 4 is the structural representation for being used to test one embodiment of the device of Android application stability according to the application
Figure;
Fig. 5 is adapted for the structure diagram of the computer system of the electronic equipment for realizing the embodiment of the present application.
Embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to
It illustrate only easy to describe, in attached drawing and invent relevant part with related.
It should be noted that in the case where there is no conflict, the feature in embodiment and embodiment in the application can phase
Mutually combination.Describe the application in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 shows the flow for being used to test one embodiment of the method for Android application stability according to the application
100.The method for testing Android application stability, comprises the following steps:
Step 101, application message, test result record position information, the test-types information of application to be tested are obtained.
In the present embodiment, can be local for testing the electronic equipment that the method for Android application stability is run thereon
Or remotely obtain the application message of application to be tested, test result record position information, test-types information.Wherein, survey
Trying type includes determining that the first test-types of test are clicked in position and first random site is clicked on after first random site clicks on test
The second test-types of test are clicked in the definite position based on test case after test.
In some optional implementations of the present embodiment, the application message of application to be tested, test result record position
Confidence breath, test-types information can be stored in above-mentioned electronic equipment local or its with above-mentioned electronic equipment network connection
The information in the first nominative testing configuration file in his electronic equipment.In this way, above-mentioned electronic equipment can be locally or remote
Journey from above-mentioned nominative testing with obtained in configuration file the application message of application to be tested, test result record position information,
Test-types information.
In the present embodiment, above-mentioned electronic equipment can be the equipment for being mounted with Android operation system.Application to be tested can
To be mounted in the Android application on above-mentioned electronic equipment.Application to be tested can include at least one window (also crying interface),
Here window can be the Activity objects in Android operation system.Method for testing Android application stability can be with
It is to be used to carry out stability test to the Android application installed on above-mentioned electronic equipment by operating on above-mentioned electronic equipment
Using realizing.Therefore the method for being used to test Android application stability of the application need not be by Android application to be tested
The terminal at place is connected with computer or other electronic equipments can realize test.
In some optional implementations of the present embodiment, the application message of application to be tested can include application mark
Know, Apply Names and application take up space size.
In the present embodiment, test result record position information is to treat test application for characterization and tested to be generated
Test result by the positional information of the storage region of storage.
Step 102, according to test-types information, the application to be tested indicated by application message is tested and generates survey
Test result information, and test result information is stored to the storage region indicated by test result record position information.
In the present embodiment, can be obtained first based on the test-types information obtained in step 101, above-mentioned electronic equipment
Application indicated by application message is used as application to be tested;Then, above-mentioned electronic equipment can be according to test-types information, to upper
State application to be tested to be tested and generate test result information, and test result information storage is recorded into position to test result
The indicated storage region of confidence breath.
In some optional implementations of the present embodiment, test result information can include at least one of following:CPU
(Central Processing Unit, central processing unit) occupancy rate information, memory usage information.
In the present embodiment, the storage region indicated by test result record position information can be on above-mentioned electronic equipment
Some file below some file, for example, it may be journal file;Depositing indicated by test result record position information
Storage area domain can also be some database on above-mentioned electronic equipment;Storage region indicated by test result record position information
It can also be and some file or some database on other electronic equipments of above-mentioned electronic equipment network connection.
It should be noted that above-mentioned application to be tested is tested according to test-types information in above-mentioned electronic equipment
Before, it is necessary to first start the application to be tested installed on above-mentioned electronic equipment.
By combining, random site clicks on test to the method that above-described embodiment of the application provides and definite position is clicked on and surveyed
Examination, improves the efficiency of Android application stability test.
With continued reference to Fig. 2, it illustrates the flow of another embodiment of the method for testing Android application stability
200.This is used for the flow 200 for testing the method for Android application stability, comprises the following steps:
Step 201, application message, test result record position information, the test-types information of application to be tested are obtained.
In the present embodiment, the operation of the step 101 in the concrete operations of step 201 embodiment corresponding with Fig. 1 is basic
Identical, details are not described herein.
Step 202, judge whether the test-types indicated by test-types information are the first test-types, if so, turning
To step 203.
In the present embodiment, test may determine that based on the test-types information obtained in step 201, above-mentioned electronic equipment
Whether the test-types indicated by type information are the first test-types, if so, going to step 203.
In some optional implementations of the present embodiment, test-types information can be character string.As an example, can
To represent the first test-types and the second test-types respectively using two different character strings, such as use character string
" FirstType " represents the first test-types, and the second test-types are represented with character string " SecondType ".
In some optional implementations of the present embodiment, test-types information can also be numerical value.As an example, can
To represent the first test-types and the second test-types respectively using two different numerical value.Such as represent first with numerical value 1
Test-types, the second test-types are represented with numerical value 2.
In some optional implementations of the present embodiment, test-types information can also be Boolean type data.As
Example, can use 1/True is (true) to represent the first test-types, and the second test-types are represented with 0/False (vacation).
Step 203, it is each in control set to obtain clicking on for each window at least one window of application to be tested
The control property information of control can be clicked on.
In the present embodiment, above-mentioned electronic equipment can be first in the test-types indicated by exact p-value type information
After test-types, obtaining each clicking in control set for window at least one window of application to be tested can each click on
The control property information of control.
In some optional implementations of the present embodiment, this step can be carried out as follows:
First, the window attribute information of each window and each window at least one window of application to be tested are obtained
At least one control in each control control property information, wherein, window attribute information can include window ID, window
Title and window size, control property information can include control mark, control title, whether can click on attribute information and control
Positional information.As an example, it is to be measured to be based on existing common testing tool (such as Uiautomator testing tools) acquisition
Try at least one window of application each in each window attribute information of window and at least one control of each window
The control property information of control;It can also be in advance based on existing common testing tool (such as Uiautomator testing tools)
Obtain each window attribute information of window and at least one control of each window at least one window of application to be tested
The control property information of each control in part, and be stored in default XML (Extensible Markup Language, it is expansible
Markup language) in file, so above-mentioned electronic equipment can obtain at least the one of application to be tested from above-mentioned default XML file
In a window in the window attribute information of each window and at least one control of each window each control control property
Information.
Then, each window at least one window of test application is treated, according to whether may be used for the control of the window
Attribute information is clicked on, control forms the window clicks on control set with clicking at least one control of the window.
Finally, obtain at least one window of application to be tested that clicking on for each window each can point in control set
Hit the control property information of control.
Step 204, current time is obtained as the first initial time.
Step 205, test application is treated within second scheduled time to carry out random site click test and generate the first survey
Test result information, and the first test result information is stored to the storage region indicated by test result record position information.
In the present embodiment, above-mentioned electronic equipment can treat test application within second scheduled time and carry out random site
Click on and test and generate the first test result information, and the storage of the first test result information is believed to test result record position
The indicated storage region of breath.Here, it is exactly working as in application to be tested to treat test application to carry out random site to click on test
Coordinate points are enumerated in front interface at random, and simulates human hand clicking operation and clicks on the above-mentioned coordinate points enumerated at random, are treated so as to trigger
The function of test application, realizes the test for treating test application.As an example, above-mentioned electronic equipment can be based on existing commonly use
Testing tool (such as Monkey testing tools) treats test application and carries out random site click test.
Step 206, first is performed within the 3rd scheduled time and determines that test operation is clicked in position.
In the present embodiment, above-mentioned electronic equipment it is true can to perform first after step 205 within the 3rd scheduled time
Click test operation is put in positioning.Here, first determine that the concrete operations of position click test operation are as follows:
It is possible, firstly, to obtain the current window of application to be tested and current window clicks on control set.
It is then possible to clicking on random selection in control set and can click on control in current window, according to selected
Can click on the position indicated by the control location information of control treat test application carry out click on test and generate second test knot
Fruit information.Here it can be all coordinate points that this can click on control that the position indicated by the control location information of control, which can be clicked on,
In can trigger the corresponding function that can click on control point coordinate., can be with as an example, click on control for rectangle
The geometric center point coordinates of the corresponding rectangle of control can be clicked on using this can click on indicated by the control location information of control as this
Position.
Finally, the second test result information can be stored to the memory block indicated by test result record position information
Domain.
Step 207, current time is obtained.
In the present embodiment, when above-mentioned electronic equipment can obtain current after step 205 and step 206 are finished
Between.
Step 208, judge whether have passed through for first scheduled time from the first initial time to current time, if it is,
Terminate;Continued to execute if it is not, then going to step 205.
In some optional implementations of the present embodiment, first scheduled time, second scheduled time and the 3rd are predetermined
Time can be pre-set by the designer of the method for testing Android application stability.
In some optional implementations of the present embodiment, first scheduled time, second scheduled time and the 3rd are predetermined
Time can also be stored in above-mentioned electronic equipment it is local or with other electronic equipments of above-mentioned electronic equipment network connection
The second nominative testing configuration file in temporal information.In this way, above-mentioned electronic equipment can be locally or remotely from upper
The second nominative testing is stated with obtaining first scheduled time, second scheduled time and the 3rd scheduled time in configuration file.
In the present embodiment, first scheduled time was more than or equal to the sum of second scheduled time and the 3rd scheduled time.
From figure 2 it can be seen that compared with the corresponding embodiments of Fig. 1, it is used to test Android application surely in the present embodiment
Qualitatively the flow 200 of method is highlighted when test-types are the first test-types, how to be treated test application and is tested
And the execution time for performing time and the click test of definite position and limitation that limitation random site clicks on test are had more
The execution time of integrated testability.Thus, the scheme of the present embodiment description can improve the efficiency of test Android application stability.
With further reference to Fig. 3, it illustrates the stream of another embodiment of the method for testing Android application stability
Journey 300.This is used for the flow 300 for testing the method for Android application stability, comprises the following steps:
Step 301, application message, test result record position information, the test-types information of application to be tested are obtained.
In the present embodiment, the operation of the step 101 in the concrete operations of step 301 embodiment corresponding with Fig. 1 is basic
Identical, details are not described herein.
Step 302, judge whether the test-types indicated by test-types information are the second test-types, if so, turning
To step 303.
In the present embodiment, test may determine that based on the test-types information obtained in step 301, above-mentioned electronic equipment
Whether the test-types indicated by type information are the second test-types, if so, going to step 303.
Step 303, the test case for being used for testing application to be tested is obtained.
In the present embodiment, above-mentioned electronic equipment can be second in the test-types indicated by exact p-value type information
After test-types, the test case for being used for testing application to be tested is obtained.Wherein, at least one click is stored in test case
Test path, clicking on test path includes at least one window and/or control and each window and/or the control of application to be tested
The attribute information of the attribute information of part and click order, window and/or control includes the positional information of window and/or control.
In some optional implementations of the present embodiment, the test case for testing application to be tested can be logical
Cross what the step of establishing test case as follows generated:
It is possible, firstly, to the window attribute information of each window and each in obtaining at least one window of application to be tested
The control property information of each control at least one control of window, wherein, window attribute information can include window ID,
Window name and window size, control property information can include control mark, control title, whether can click on attribute information and
Control location information.
As an example, it is to be measured to be based on existing common testing tool (such as Uiautomator testing tools) acquisition
Try at least one window of application each in each window attribute information of window and at least one control of each window
The control property information of control.
Then, with the window that can perform the application to be tested clicked on needed for the execution flow of click event of application to be tested
The click of mouth and/or control and the window and/or control of each required application to be tested clicked on sequentially forms test case
Click test path, so as to form test case.
In some optional implementations of the present embodiment, the topological structure of the test case of Android application to be tested can
Think tree topology.The root node of the tree topology of test case corresponds to application to be tested, each height of root node
Node is window node, and each window node and each window of application to be tested correspond, and the child node of window node is
Control node, each control of each control node window corresponding with window node of window node correspond.
Step 304, current time is obtained as the second initial time.
Step 305, test application is treated within the 5th scheduled time to carry out random site click test and generate the 3rd survey
Test result information, and the 3rd test result information is stored to the storage region indicated by test result record position information.
In the present embodiment, above-mentioned electronic equipment can treat test application within the 5th scheduled time and carry out random site
Click on and test and generate the 3rd test result information, and the storage of the 3rd test result information is believed to test result record position
The indicated storage region of breath.Here, it is exactly working as in application to be tested to treat test application to carry out random site to click on test
Coordinate points are enumerated in front interface at random, and simulates human hand clicking operation and clicks on the above-mentioned coordinate points enumerated at random, are treated so as to trigger
The function of test application, realizes the test for treating test application.As an example, above-mentioned electronic equipment can be based on existing commonly use
Testing tool (such as Monkey testing appliances) treats test application and carries out random site click test.
Step 306, second is performed within the 6th scheduled time and determines that test operation is clicked in position.
In the present embodiment, above-mentioned electronic equipment it is true can to perform second after step 305 within the 6th scheduled time
Click test operation is put in positioning.Here, second determine that the concrete operations of position click test operation are as follows:
It is possible, firstly, to test path is clicked in random selection in the test case obtained in step 303.
It is then possible to the click order according to each window and/or control in selected click test path, according to
Treat test application and perform click test and generate the 4th test knot in position indicated by the positional information of the window and/or control
Fruit information.
Finally, the 4th test result information can be stored to the memory block indicated by test result record position information
Domain.
Step 307, current time is obtained.
In the present embodiment, when above-mentioned electronic equipment can obtain current after step 305 and step 306 are finished
Between.
Step 308, judge whether have passed through for the 4th scheduled time from the second initial time to current time, if it is,
Terminate;Continued to execute if it is not, then going to step 305.
In some optional implementations of the present embodiment, the 4th scheduled time, the 5th scheduled time and the 6th are predetermined
Time can be pre-set by the designer of the method for testing Android application stability.
In some optional implementations of the present embodiment, the 4th scheduled time, the 5th scheduled time and the 6th are predetermined
Time can also be stored in above-mentioned electronic equipment it is local or with other electronic equipments of above-mentioned electronic equipment network connection
The 3rd nominative testing configuration file in temporal information.In this way, above-mentioned electronic equipment can be locally or remotely from upper
State and the 4th scheduled time, the 5th scheduled time and the 6th scheduled time are obtained in the 3rd nominative testing configuration file.
In the present embodiment, the 4th scheduled time was more than or equal to the sum of the 5th scheduled time and the 6th scheduled time.
From figure 3, it can be seen that compared with the corresponding embodiments of Fig. 1, it is used to test Android application surely in the present embodiment
Qualitatively the flow 300 of method is highlighted when test-types are the second test-types, how to be treated test application and is tested
And have more that limitation random site clicks on the executions time of test and holding of testing is clicked in definite position based on test case
Row time and the execution time for limiting integrated testability.Thus, the scheme of the present embodiment description can improve test Android application
The efficiency of stability.
With further reference to Fig. 4, as the realization to method shown in above-mentioned each figure, it is used to test peace this application provides one kind
One embodiment of the device of Zhuo Yingyong stability, the device embodiment is corresponding with the embodiment of the method shown in Fig. 1, the device
Specifically it can be applied in various electronic equipments.
As shown in figure 4, the device 400 for being used to test Android application stability described in the present embodiment includes:First obtains
Unit 401 and test cell 402.Wherein, first acquisition unit 401, are configured to obtain the application message of application to be tested, survey
Test result record position information, test-types information, wherein, test-types include determining position after first random site clicks on test
The first test-types and the definite position based on test case after first random site click test for clicking on test click on what is tested
Second test-types;Test cell 402, is configured to according to above-mentioned test-types information, to indicated by above application information
Application to be tested is tested and generates test result information, and above-mentioned test result information is stored to above-mentioned test result
Storage region indicated by record position information.
In the present embodiment, for the first acquisition unit 401 and test list of the device 400 for testing Android application stability
The specific processing of member 402 and its caused technique effect can correspond to step 101 and step 102 in embodiment with reference to figure 1 respectively
Related description, details are not described herein.
In the optional implementation of some of the present embodiment, above-mentioned test cell 402 can include:First judgment module
4021, it is configured to judge whether the test-types indicated by above-mentioned test-types information are the first test-types;First obtains
Module 4022, is configured to, in the case where the test-types indicated by above-mentioned test-types information are the first test-types, obtain
Take each window at least one window of above-mentioned application to be tested clicks on the control that control can be each clicked in control set
Part attribute information, wherein, above-mentioned control property information includes control location information;First test module 4023, is configured to
In the case that test-types indicated by above-mentioned test-types information are the first test-types, perform following first and click on test step
Suddenly:Carry out random site to above-mentioned application to be tested and click on to test and generating the first test result information, and by above-mentioned first
Test result information is stored to the storage region indicated by above-mentioned test result record position information;Perform following first and determine position
Put click test operation:The current window and above-mentioned current window for obtaining above-mentioned application to be tested click on control set;
Clicking on random selection in control set and can click on control in above-mentioned current window, according to the selected control for clicking on control
Position indicated by part positional information carries out clicking on test and generates the second test result information to above-mentioned application to be tested;And
By above-mentioned second test result information storage to the storage region indicated by above-mentioned test result record position information.First judges
Module 4021, the first acquisition module 4022 and the specific processing of the first test module 4023 and its caused technique effect can divide
Other reference chart 2 corresponds to the related description of step 202, step 203 and step 205 and step 206 in embodiment, no longer superfluous herein
State.
In the optional implementation of some of the present embodiment, above-mentioned first acquisition module 4021 can include:First obtains
Submodule (not shown), is configured to obtain the window category of each window at least one window of above-mentioned application to be tested
Property information and each window at least one control in each control control property information, above-mentioned control property information includes
Whether attribute information and control location information can be clicked on;Submodule (not shown) is formed, is configured to above-mentioned to be measured
Each window at least one window of application is tried, whether attribute information can be clicked on according to the control of the window, with the window
Mouthful at least one control in click on that control forms the window click on control set;Second acquisition submodule is (in figure
It is not shown), it is configured to obtain clicking in control set for each window at least one window of above-mentioned application to be tested
The control property information of control can each be clicked on.First acquisition submodule, form the specific of submodule and the second acquisition submodule
Processing and its caused technique effect refer to the related description that Fig. 2 corresponds to step 203 in embodiment, and details are not described herein.
In the optional implementation of some of the present embodiment, the above-mentioned device 400 for being used to test Android application stability is gone back
It can include:Second acquisition unit 403, is configured to obtain current time as the first initial time;First judging unit
404, it is configured to judge whether have passed through for first scheduled time to current time from above-mentioned first initial time;First terminates list
Member 405, be configured in the case where have passed through for first scheduled time to current time from above-mentioned first initial time, terminate on
State the first click testing procedure;First continues to execute unit 406, is configured to from above-mentioned first initial time to current time
In the case of not passing through for first scheduled time, continue to execute above-mentioned first and click on testing procedure.Second acquisition unit 403,
One judging unit 404, the first end unit 405 and first continue to execute the specific processing of unit 406 and its caused technology
Effect can correspond to the related description of step 204, step 207 and step 208 in embodiment with reference to figure 2 respectively, and details are not described herein.
In some optional implementations of the present embodiment, above-mentioned first test module 4023 can further configure use
In:Random site is carried out to above-mentioned application to be tested within second scheduled time to click on test and generate the first test result letter
Breath, and above-mentioned first test result information is stored to the storage region indicated by above-mentioned test result record position information,
Wherein, above-mentioned second scheduled time is less than above-mentioned first scheduled time.The specific processing of first test module 4023 and its institute's band
The technique effect come refers to the related description that Fig. 2 corresponds to step 205 in embodiment, and details are not described herein.
In some optional implementations of the present embodiment, above-mentioned first test module 4023 can further configure use
In:Above-mentioned first is performed within the 3rd scheduled time and determines that test operation is clicked in position, wherein, above-mentioned first scheduled time is more than
Equal to the sum of above-mentioned second scheduled time and above-mentioned 3rd scheduled time.The specific processing of first test module 4023 and its institute's band
The technique effect come refers to the related description that Fig. 2 corresponds to step 206 in embodiment, and details are not described herein.
In some optional implementations of the present embodiment, above-mentioned test cell 402 can include:Second judgment module
4024, it is configured to judge whether the test-types indicated by above-mentioned test-types information are the second test-types;Second obtains
Module 4025, is configured to, in the case where the test-types indicated by above-mentioned test-types information are the second test-types, obtain
Take in the test case for testing above-mentioned application to be tested, wherein, at least one click test is stored in above-mentioned test case
Path, at least one window and/or control and each window of above-mentioned click test path including above-mentioned application to be tested and/
Or the attribute information of control and click order, the attribute information of above-mentioned window and/or control include the position of window and/or control
Information;Second test module 4026, it is the second test class to be configured in the test-types indicated by above-mentioned test-types information
In the case of type, perform following second and click on testing procedure:Random site is carried out to above-mentioned application to be tested and clicks on test and life
Stored into the 3rd test result information, and by above-mentioned 3rd test result information to above-mentioned test result record position information institute
The storage region of instruction;Perform following second and determine that test operation is clicked in position:Randomly choose and click in above-mentioned test case
Test path;According to the click order of each window and/or control in selected click test path, according to the window
And/or the position indicated by the positional information of control clicks on above-mentioned application execution to be tested and tests and generate the 4th test result
Information;And above-mentioned 4th test result information is stored to the memory block indicated by above-mentioned test result record position information
Domain.Second judgment module 4024, the specific processing of the second acquisition module 4025 and the second test module 4026 and its caused
Technique effect can correspond to mutually speaking on somebody's behalf for step 302, step 303 and step 305 and step 306 in embodiment with reference to figure 2 respectively
Bright, details are not described herein.
In some optional implementations of the present embodiment, the device 400 for testing Android application stability may be used also
With including:3rd acquiring unit 407, is configured to obtain current time as the second initial time;Second judging unit 408,
It is configured to judge whether have passed through for the 4th scheduled time to current time from above-mentioned second initial time;Second end unit
409, being configured in the case where have passed through for the 4th scheduled time to current time from above-mentioned second initial time, terminating above-mentioned
Second clicks on testing procedure;Second continues to execute unit 410, is configured to current time not have from above-mentioned second initial time
In the case of having by the 4th scheduled time, continue to execute above-mentioned second and click on testing procedure.3rd acquiring unit 407, second
Judging unit 408, the second end unit 409 and second continue to execute specific processing and its caused technology effect of unit 410
Fruit can correspond to the related description of step 304, step 307 and step 308 in embodiment with reference to figure 3 respectively, and details are not described herein.
In some optional implementations of the present embodiment, above-mentioned second test module 4026 can further configure use
In:Random site is carried out to above-mentioned application to be tested within the 5th scheduled time to click on test and generate the 3rd test result letter
Breath, and above-mentioned 3rd test result information is stored to the storage region indicated by above-mentioned test result record position information,
Wherein, above-mentioned 5th scheduled time is less than above-mentioned 4th scheduled time.The specific processing of second test module 4026 and its institute's band
The technique effect come refers to the related description that Fig. 3 corresponds to step 305 in embodiment, and details are not described herein.
In some optional implementations of the present embodiment, above-mentioned second test module 4026 can further configure use
In:Above-mentioned second is performed within the 6th scheduled time and determines that test operation is clicked in position, wherein, above-mentioned 4th scheduled time is more than
Equal to the sum of above-mentioned 5th scheduled time and above-mentioned 6th scheduled time.The specific processing of second test module 4026 and its institute's band
The technique effect come refers to the related description that Fig. 3 corresponds to step 306 in embodiment, and details are not described herein.
Below with reference to Fig. 5, it illustrates suitable for for realizing the computer system 500 of the electronic equipment of the embodiment of the present application
Structure diagram.
As shown in figure 5, computer system 500 includes central processing unit (CPU, Central Processing Unit)
501, its can according to the program being stored in read-only storage (ROM, Read Only Memory) 502 or from storage part
508 programs being loaded into random access storage device (RAM, Random Access Memory) 503 and perform it is various appropriate
Action and processing.In RAM 503, also it is stored with system 500 and operates required various programs and data.CPU 501、ROM
502 and RAM 503 is connected with each other by bus 504.Input/output (I/O) interface 505 is also connected to bus 504.
I/O interfaces 505 are connected to lower component:Importation 506 including keyboard, mouse etc.;Penetrated including such as cathode
The output par, c 507 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage part 508 including hard disk etc.;
And the communications portion 509 of the network interface card including LAN card, modem etc..Communications portion 509 via such as because
The network of spy's net performs communication process.Driver 510 is also according to needing to be connected to I/O interfaces 505.Detachable media 511, such as
Disk, CD, magneto-optic disk, semiconductor memory etc., are installed on driver 510, in order to read from it as needed
Computer program be mounted into as needed storage part 508.
Especially, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description
Software program.For example, embodiment of the disclosure includes a kind of computer program product, it includes being tangibly embodied in machine readable
Computer program on medium, the computer program include the program code for being used for the method shown in execution flow chart.At this
In the embodiment of sample, which can be downloaded and installed by communications portion 509 from network, and/or from removable
Medium 511 is unloaded to be mounted.When the computer program is performed by central processing unit (CPU) 501, perform in the present processes
The above-mentioned function of limiting.
Flow chart and block diagram in attached drawing, it is illustrated that according to the system of the various embodiments of the application, method and computer journey
Architectural framework in the cards, function and the operation of sequence product.At this point, each square frame in flow chart or block diagram can generation
The part of one module of table, program segment or code, a part for the module, program segment or code include one or more
The executable instruction of logic function as defined in being used for realization.It should also be noted that some as replace realization in, institute in square frame
The function of mark can also be with different from the order marked in attached drawing generation.For example, two square frames succeedingly represented are actual
On can perform substantially in parallel, they can also be performed in the opposite order sometimes, this is depending on involved function.Also
It is noted that the combination of each square frame and block diagram in block diagram and/or flow chart and/or the square frame in flow chart, Ke Yiyong
The dedicated hardware based systems of functions or operations as defined in execution is realized, or can be referred to specialized hardware and computer
The combination of order is realized.
Being described in unit involved in the embodiment of the present application can be realized by way of software, can also be by hard
The mode of part is realized.Described unit can also be set within a processor, for example, can be described as:A kind of processor bag
Include first acquisition unit and test cell.Wherein, the title of these units is not formed to the unit in itself under certain conditions
Restriction, for example, first acquisition unit is also described as the unit of information " obtain ".
As on the other hand, present invention also provides a kind of nonvolatile computer storage media, the non-volatile calculating
Machine storage medium can be nonvolatile computer storage media included in device described in above-described embodiment;Can also be
Individualism, without the nonvolatile computer storage media in supplying terminal.Above-mentioned nonvolatile computer storage media is deposited
One or more program is contained, when one or more of programs are performed by an equipment so that the equipment:Obtain
Application message, test result record position information, the test-types information of application to be tested, wherein, test-types include first with
Definite position clicks on the first test-types tested and is based on testing after first random site click test after click test is put in seat in the plane
Click on the second test-types of test in the definite position of use-case;It is signified to above application information according to above-mentioned test-types information
The application to be tested shown is tested and generates test result information, and above-mentioned test result information is stored to above-mentioned test
As a result the storage region indicated by record position information.
Above description is only the preferred embodiment of the application and the explanation to institute's application technology principle.People in the art
Member should be appreciated that invention scope involved in the application, however it is not limited to the technology that the particular combination of above-mentioned technical characteristic forms
Scheme, while should also cover in the case where not departing from the inventive concept, carried out by above-mentioned technical characteristic or its equivalent feature
The other technical solutions for being combined and being formed.Such as features described above has similar work(with (but not limited to) disclosed herein
The technical solution that the technical characteristic of energy is replaced mutually and formed.
Claims (20)
- A kind of 1. method for testing Android application stability, it is characterised in that the described method includes:Application message, test result record position information, the test-types information of application to be tested are obtained, wherein, test-types Determine that the first test-types of position click test and first random site are clicked on after testing after clicking on test including first random site Click on the second test-types of test in definite position based on test case;According to the test-types information, the application to be tested indicated by the application message is tested and generates test knot Fruit information, and the test result information is stored to the storage region indicated by the test result record position information.
- 2. according to the method described in claim 1, it is characterized in that, described according to the test-types information, to the application Application to be tested indicated by information is tested and generates test result information, and the test result information storage is arrived Storage region indicated by the test result record position information, including:Judge whether the test-types indicated by the test-types information are the first test-types;If it is,:Control can each be clicked on by obtaining each clicking on for window at least one window of the application to be tested in control set The control property information of part, wherein, the control property information includes control location information;Perform following first and click on testing procedure:Random site is carried out to the application to be tested to click on test and generate the first survey Test result information, and by first test result information storage to depositing indicated by the test result record position information Storage area domain;Perform following first and determine that test operation is clicked in position:Obtain the current window of the application to be tested and described Current window clicks on control set;Clicking on random selection in control set and can click on control in the current window, Click test is carried out to the application to be tested according to the position indicated by the selected control location information for clicking on control And generate the second test result information;And second test result information storage is believed to the test result record position The indicated storage region of breath.
- 3. the according to the method described in claim 2, it is characterized in that, at least one window for obtaining the application to be tested In each window click on the control property information that control can be each clicked in control set, including:Obtain at least one window of the application to be tested the window attribute information of each window and each window extremely The control property information of each control in a few control, the control property information include whether to click on attribute information and Control location information;To each window at least one window of the application to be tested, whether category can be clicked on according to the control of the window Property information, with clicking at least one control of the window, control forms the window clicks on control set;Control can each be clicked on by obtaining each clicking on for window at least one window of the application to be tested in control set The control property information of part.
- 4. according to the method described in claim 2, it is characterized in that, it is described perform it is described first click on testing procedure before, The method further includes:Current time is obtained as the first initial time;AndAfter the first click testing procedure is performed, the method further includes:Judge whether have passed through for first scheduled time to current time from first initial time;If so, then terminating described first clicks on testing procedure;If it is not, then continuing to execute described first clicks on testing procedure.
- 5. according to the method described in claim 4, it is characterized in that, described carry out random site click to the application to be tested Test and generate the first test result information, and first test result information storage is recorded into position to the test result The indicated storage region of confidence breath, including:Random site is carried out to the application to be tested within second scheduled time to click on test and generate the first test result letter Breath, and first test result information is stored to the storage region indicated by the test result record position information, Wherein, second scheduled time is less than first scheduled time.
- 6. according to the method described in claim 5, it is characterized in that, test behaviour is clicked in the described first definite position that performs Make, including:Described first is performed within the 3rd scheduled time and determines that test operation is clicked in position, wherein, first scheduled time is big In equal to the sum of second scheduled time and the 3rd scheduled time.
- 7. according to the method described in claim 1, it is characterized in that, described according to the test-types information, to the application Application to be tested indicated by information is tested and generates test result information, and the test result information storage is arrived Storage region indicated by the test result record position information, including:Judge whether the test-types indicated by the test-types information are the second test-types;If it is,:The test case for being used for testing the application to be tested is obtained, wherein, store in the test case at least one point Hit test path, the test path of clicking on includes at least one window and/or control of the application to be tested and each Window and/or the attribute information of control and click order, the attribute information of the window and/or control include window and/or control The positional information of part;Perform following second and click on testing procedure:Random site is carried out to the application to be tested to click on test and generate the 3rd survey Test result information, and by the 3rd test result information storage to depositing indicated by the test result record position information Storage area domain;Perform following second and determine that test operation is clicked in position:Test path is clicked in random selection in the test case; According to the click order of each window and/or control in selected click test path, according to the window and/or control The application execution to be tested is clicked in position indicated by positional information tests and generates the 4th test result information;And will 4th test result information is stored to the storage region indicated by the test result record position information.
- 8. the method according to the description of claim 7 is characterized in that perform it is described second click on testing procedure before, it is described Method further includes:Current time is obtained as the second initial time;AndAfter the second click testing procedure is performed, the method further includes:Judge whether have passed through for the 4th scheduled time to current time from second initial time;If so, then terminating described second clicks on testing procedure;If it is not, then continuing to execute described second clicks on testing procedure.
- 9. according to the method described in claim 8, it is characterized in that, described carry out random site click to the application to be tested Test and generate the 3rd test result information, and the 3rd test result information storage is recorded into position to the test result The indicated storage region of confidence breath, including:Random site is carried out to the application to be tested within the 5th scheduled time to click on test and generate the 3rd test result letter Breath, and the 3rd test result information is stored to the storage region indicated by the test result record position information, Wherein, the 5th scheduled time is less than the 4th scheduled time.
- 10. according to the method described in claim 9, it is characterized in that, test behaviour is clicked in the described second definite position that performs Make, including:Described second is performed within the 6th scheduled time and determines that test operation is clicked in position, wherein, the 4th scheduled time is big In equal to the sum of the 5th scheduled time and the 6th scheduled time.
- 11. a kind of device for being used to test Android application stability, it is characterised in that described device includes:First acquisition unit, is configured to obtain the application message of application to be tested, test result record position information, test class Type information, wherein, test-types include first random site click on determine after test position click on test the first test-types and The second test-types tested are clicked in the definite position based on test case after first random site clicks on test;Test cell, is configured to according to the test-types information, to be tested indicated by the application message is applied into Row is tested and generates test result information, and the test result information is stored to the test result record position information Indicated storage region.
- 12. according to the devices described in claim 11, it is characterised in that the test cell includes:First judgment module, is configured to judge whether the test-types indicated by the test-types information are the first test class Type;First acquisition module, is configured in the feelings that the test-types indicated by the test-types information are the first test-types Under condition, control can each be clicked on by obtaining each clicking on for window at least one window of the application to be tested in control set The control property information of part, wherein, the control property information includes control location information;First test module, is configured in the feelings that the test-types indicated by the test-types information are the first test-types Under condition, perform following first and click on testing procedure:The application progress random site to be tested is clicked on and tests and generate first Test result information, and by indicated by first test result information storage to the test result record position information Storage region;Perform following first and determine that test operation is clicked in position:Obtain current window and the institute of the application to be tested That states current window clicks on control set;Clicking on random selection in control set and can click on control in the current window Part, click survey is carried out according to the position indicated by the selected control location information for clicking on control to the application to be tested Try and generate the second test result information;And second test result information is stored to the test result record position Storage region indicated by information.
- 13. device according to claim 12, it is characterised in that first acquisition module includes:First acquisition submodule, is configured to obtain the window category of each window at least one window of the application to be tested Property information and each window at least one control in each control control property information, the control property information includes Whether attribute information and control location information can be clicked on;Form submodule, each window being configured at least one window to the application to be tested, according to the window Control whether can click on attribute information, with clicking at least one control of the window control forms the window can Click on control set;Second acquisition submodule, is configured to obtain clicking on for each window at least one window of the application to be tested The control property information of control can be each clicked in control set.
- 14. device according to claim 12, it is characterised in that described device further includes:Second acquisition unit, is configured to obtain current time as the first initial time;First judging unit, is configured to judge whether have passed through the first pre- timing from first initial time to current time Between;First end unit, is configured to have passed through the feelings of first scheduled time from first initial time to current time Under condition, terminate described first and click on testing procedure;First continues to execute unit, is configured to do not passing through the first pre- timing from first initial time to current time Between in the case of, continue to execute it is described first click on testing procedure.
- 15. device according to claim 14, it is characterised in that first test module is further configured to:Random site is carried out to the application to be tested within second scheduled time to click on test and generate the first test result letter Breath, and first test result information is stored to the storage region indicated by the test result record position information, Wherein, second scheduled time is less than first scheduled time.
- 16. device according to claim 15, it is characterised in that first test module is further configured to:Described first is performed within the 3rd scheduled time and determines that test operation is clicked in position, wherein, first scheduled time is big In equal to the sum of second scheduled time and the 3rd scheduled time.
- 17. according to the devices described in claim 11, it is characterised in that the test cell includes:Second judgment module, is configured to judge whether the test-types indicated by the test-types information are the second test class Type;Second acquisition module, is configured in the feelings that the test-types indicated by the test-types information are the second test-types Under condition, the test case for being used for testing the application to be tested is obtained, wherein, store in the test case at least one point Hit test path, the test path of clicking on includes at least one window and/or control of the application to be tested and each Window and/or the attribute information of control and click order, the attribute information of the window and/or control include window and/or control The positional information of part;Second test module, is configured in the feelings that the test-types indicated by the test-types information are the second test-types Under condition, perform following second and click on testing procedure:The application progress random site to be tested is clicked on and tests and generate the 3rd Test result information, and by indicated by the 3rd test result information storage to the test result record position information Storage region;Perform following second and determine that test operation is clicked in position:Test road is clicked in random selection in the test case Footpath;According to the click order of each window and/or control in selected click test path, according to the window and/or control The application execution to be tested is clicked in position indicated by the positional information of part tests and generates the 4th test result information;With And the 4th test result information is stored to the storage region indicated by the test result record position information.
- 18. device according to claim 17, it is characterised in that described device further includes:3rd acquiring unit, is configured to obtain current time as the second initial time;Second judging unit, is configured to judge whether have passed through the 4th pre- timing from second initial time to current time Between;Second end unit, is configured to have passed through the feelings of the 4th scheduled time from second initial time to current time Under condition, terminate described second and click on testing procedure;Second continues to execute unit, is configured to do not passing through the 4th pre- timing from second initial time to current time Between in the case of, continue to execute it is described second click on testing procedure.
- 19. device according to claim 18, it is characterised in that second test module is further configured to:Random site is carried out to the application to be tested within the 5th scheduled time to click on test and generate the 3rd test result letter Breath, and the 3rd test result information is stored to the storage region indicated by the test result record position information, Wherein, the 5th scheduled time is less than the 4th scheduled time.
- 20. device according to claim 19, it is characterised in that second test module is further configured to:Described second is performed within the 6th scheduled time and determines that test operation is clicked in position, wherein, the 4th scheduled time is big In equal to the sum of the 5th scheduled time and the 6th scheduled time.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610937726.7A CN107977306A (en) | 2016-10-25 | 2016-10-25 | Method and apparatus for testing Android application stability |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610937726.7A CN107977306A (en) | 2016-10-25 | 2016-10-25 | Method and apparatus for testing Android application stability |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107977306A true CN107977306A (en) | 2018-05-01 |
Family
ID=62004130
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610937726.7A Pending CN107977306A (en) | 2016-10-25 | 2016-10-25 | Method and apparatus for testing Android application stability |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107977306A (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6260113B1 (en) * | 1998-11-12 | 2001-07-10 | International Business Machines Corporation | Method and apparatus defining a miss list and producing dial-in hit ratios in a disk storage benchmark |
CN103019923A (en) * | 2011-09-22 | 2013-04-03 | 腾讯科技(深圳)有限公司 | Method and system of simulated click test |
CN104516812A (en) * | 2013-09-27 | 2015-04-15 | 腾讯科技(深圳)有限公司 | Method and device for testing software |
CN104899146A (en) * | 2015-06-19 | 2015-09-09 | 安一恒通(北京)科技有限公司 | Image matching technology based software stability test method and device |
CN105094783A (en) * | 2014-05-19 | 2015-11-25 | 腾讯科技(深圳)有限公司 | Method and device for testing Android application stability |
CN105468529A (en) * | 2015-12-15 | 2016-04-06 | 北京奇虎科技有限公司 | Accurate traversal method and apparatus for UI controls of android application |
-
2016
- 2016-10-25 CN CN201610937726.7A patent/CN107977306A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6260113B1 (en) * | 1998-11-12 | 2001-07-10 | International Business Machines Corporation | Method and apparatus defining a miss list and producing dial-in hit ratios in a disk storage benchmark |
CN103019923A (en) * | 2011-09-22 | 2013-04-03 | 腾讯科技(深圳)有限公司 | Method and system of simulated click test |
CN104516812A (en) * | 2013-09-27 | 2015-04-15 | 腾讯科技(深圳)有限公司 | Method and device for testing software |
CN105094783A (en) * | 2014-05-19 | 2015-11-25 | 腾讯科技(深圳)有限公司 | Method and device for testing Android application stability |
CN104899146A (en) * | 2015-06-19 | 2015-09-09 | 安一恒通(北京)科技有限公司 | Image matching technology based software stability test method and device |
CN105468529A (en) * | 2015-12-15 | 2016-04-06 | 北京奇虎科技有限公司 | Accurate traversal method and apparatus for UI controls of android application |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10303581B2 (en) | Graphical transaction model | |
US7913230B2 (en) | Computer-implemented methods and systems for generating software testing documentation and test results management system using same | |
US7987445B2 (en) | Comparing a configuration diagram to an actual system | |
Paiva et al. | A model-to-implementation mapping tool for automated model-based GUI testing | |
CN110286897A (en) | API Visual Dynamic configuration method, device, equipment and storage medium | |
EP2572294B1 (en) | System and method for sql performance assurance services | |
US20060168183A1 (en) | Determining differences between configuration diagrams | |
US8225140B2 (en) | Method and system for graphical user interface testing | |
US20130298110A1 (en) | Software Visualization Using Code Coverage Information | |
CN109408357A (en) | A kind of automatic interface testing method and device | |
CN103744680B (en) | Method and device for business process processing | |
US20100138268A1 (en) | Progress management platform | |
EP1679601A2 (en) | Method for automatic graphical profiling of a dialog system | |
CN105302706B (en) | Applied program testing method and device | |
US10235477B2 (en) | Prototyping an image processing algorithm and emulating or simulating execution on a hardware accelerator to estimate resource usage or performance | |
WO2002037340A2 (en) | System and method for test generation with dynamic constraints using static analysis | |
CN107992427A (en) | Create method, apparatus, equipment and its storage medium of operational trials scene | |
CN108959059A (en) | A kind of test method and test platform | |
EP1361446A3 (en) | Method and apparatus for generating electronic test programs and data structure | |
US8103914B2 (en) | Test file generation device and test file generation method | |
CN110032519A (en) | Cloud function adjustment method, device, computer equipment and storage medium | |
CN106776165A (en) | Server performance method of testing and system | |
Lei et al. | Performance and scalability testing strategy based on kubemark | |
CN114610639A (en) | Method, device and equipment for testing graphical user interface and storage medium | |
CN105653445B (en) | A kind of implementation method for meeting DO 178C test results |
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 |