Summary of the invention
In view of above-mentioned the deficiencies in the prior art, the object of the present invention is to provide a kind of intelligent terminal application compatibility test method and system, be intended to solve the problem that existing application testing method testing efficiency is low, test mass is low.
Technical scheme of the present invention is as follows:
An application compatibility test method, wherein, comprises step:
A, receive after the installation order of application, intelligent terminal is installed the application that needs test, and exports the mount message of described application;
B, according to described mount message, judge whether successful installation of described application, after successful installation, to described intelligent terminal, send action command, move described application;
C, obtain intelligent terminal current C PU information, EMS memory occupation information and application operation sectional drawing information in application running, and the current C PU information of obtaining, EMS memory occupation information and application operation sectional drawing information are sent in server;
D, server carry out data analysis by the current C PU information getting, EMS memory occupation information and application operation sectional drawing information, and show test result.
Described intelligent terminal application compatibility test method, wherein, described steps A specifically comprises:
A1, read application and place the application under catalogue, by debugging bridger, to intelligent terminal, send the installation order of the application that needs test;
A2, intelligent terminal receive after described installation order, and described application is installed;
A3, by the mount message output of described application.
Described intelligent terminal application compatibility test method, wherein, described step B specifically comprises:
B1, the form by the mount message of output with document flow read, and the document flow reading is filtered, and filter out the identification information in mount message;
B2, the standard information of the identification information filtering out and successful installation is compared, judge that described application installs whether success;
B3, when judgement is during described application successful installation, record the information of successful installation and move described application, otherwise recording the mount message of described application, and sending described mount message to the database of server.
Described intelligent terminal application compatibility test method, wherein, described step C specifically comprises:
C1, by monkey test simulation user, operate the described application of operation, and arrange one for automatically stopping the execution number of times restriction of running;
C2, in application running, every scheduled time intercepting application operation picture, obtain application operation sectional drawing information, and obtain intelligent terminal current C PU information, EMS memory occupation information, installation log and running log;
C3, application operation sectional drawing information, intelligent terminal current C PU information, EMS memory occupation information, installation log and running log are sent in the database of server.
Described intelligent terminal application compatibility test method, wherein, described method also comprises step e:
When described application reaches automatically performing after number of times of setting, by debugging bridger, to described intelligent terminal, send unloading order, unload described application.
Described intelligent terminal application compatibility test method, wherein, in described step D, described test result is shown with form web page.
An application compatibility test system, wherein, comprising:
Installation module, for receiving after the installation order of application, is arranged on the application of need test on intelligent terminal, and exports mount message;
Operation module, for judge whether successful installation of described application according to described mount message, after successful installation, sends action command to described intelligent terminal, moves described application;
Acquisition of information module, be used for obtaining application running intelligent terminal current C PU information, EMS memory occupation information and application operation sectional drawing information, and the current C PU information of obtaining, EMS memory occupation information and application operation sectional drawing information are sent in server;
Data analysis and display module, for the current C PU information getting, EMS memory occupation information and application operation sectional drawing information are carried out to data analysis, and show test result.
Described intelligent terminal application compatibility test system, wherein, described installation module comprises:
Installation order transmitting element, places the application under catalogue for reading application, by debugging bridger, sends the installation order of the application that needs test to intelligent terminal;
Application installation unit, for receiving after described installation order, installs described application;
Mount message output unit, for exporting the mount message of described application.
Described intelligent terminal application compatibility test system, wherein, described operation module comprises:
Identification information filter element, for by the mount message of output, the form with document flow reads, filters the document flow reading, and filters out the identification information in mount message;
Comparison judgment unit, for the standard information of the identification information filtering out and successful installation is compared, judges whether successful described application installs;
Application operation and record cell, for when judging described application successful installation, record the information of successful installation and move described application, otherwise recording the mount message of described application, and sending described mount message to the database of server.
Described intelligent terminal application compatibility test system, wherein, described acquisition of information module comprises:
Monkey test cell, for operate the described application of operation by monkey test simulation user, and arranges one for automatically stopping the execution number of times restriction of running;
Information acquisition unit, at application running, obtains application operation sectional drawing information every scheduled time intercepting application operation picture, and obtains intelligent terminal current C PU information, EMS memory occupation information, installation log and running log;
Information transmitting unit, for being sent to application operation sectional drawing information, intelligent terminal current C PU information, EMS memory occupation information, installation log and running log the database of server.
Beneficial effect: the present invention is by carrying out the test of automation to application, realized the compatibility of batch testing application program on intelligent terminal, greatly alleviated tester's workload, improved testing efficiency, reduced testing cost, and the application testing in the present invention improved the validity of test mass, test result, the present invention is guaranteeing that software reliability and validity conveniently brought into play important function, avoid the waste of human and material resources, controlled software cost.
Embodiment
The invention provides a kind of intelligent terminal application compatibility test method and system, for making object of the present invention, technical scheme and effect clearer, clear and definite, below the present invention is described in more detail.Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
Refer to Fig. 1, Fig. 1 is the flow chart of intelligent terminal application compatibility test method of the present invention preferred embodiment, and as shown in the figure, it comprises:
S101, receive after the installation order of application, intelligent terminal is installed the application that needs test, and exports the mount message of described application;
S102, according to described mount message, judge whether successful installation of described application, after successful installation, to described intelligent terminal, send action command, move described application;
S103, obtain intelligent terminal current C PU information, EMS memory occupation information and application operation sectional drawing information etc. in application running, and the current C PU information of obtaining, EMS memory occupation information and application operation sectional drawing information are sent in server;
Sectional drawing when S104, server move the current C PU information getting, EMS memory occupation information and application carries out data analysis, and shows test result.
In step S101, first be first application to be installed on intelligent terminal, specifically can be by using Android adb(Android Debug Bridge, debugging bridger) technology connects Test Host (PC) and tested equipment (intelligent terminal), then by PC, carry out operative intelligence terminal, for example, by adb install<apk filename>application that the application in PC is placed under catalogue of such installation order is installed on intelligent terminal, as shown in Figure 2, it comprises step:
S201, read application and place the application under catalogue, by debugging bridger, to intelligent terminal, send the installation order of the application that needs test; First be to read application to place the application under catalogue, then user selects to need the application of test, can be to select to need in batches the application of test, then test successively, thereby reach the object of the Test Application compatibility of automation, selected to need after the application of test, can send installation order by debugging bridger, follow-uply carried out use test.Described debugging bridger is existing system debug instrument, is the instrument for management simulation device or prototype state.
S202, intelligent terminal receive after described installation order, and described application is installed;
S203, by the mount message output of described application.Intelligent terminal, when application is installed, can be exported mount message, now needs to export mount message to Test Host, reads.
In step S102, when some is applied in and installs on intelligent terminal, due to incompatible problem, can cause unsuccessful situation is installed, thus only application successful installation after, be just necessary to carry out ensuing operation test, this step is exactly that the mount message of application is read, then whether judgement applies successful installation, and as shown in Figure 3, it specifically comprises step:
S301, the form by the mount message of output with document flow read, and the document flow reading is filtered, and filter out the identification information in mount message;
S302, the standard information of the identification information filtering out and successful installation is compared, judge that described application installs whether success;
S303, when judgement is during described application successful installation, record the information of successful installation and move described application;
S304, when the described application of judgement is while installing unsuccessfully, end installation, and record the mount message of described application, and be sent in the database of server.
Said process is that first by mount message, the form with document flow reads, then filter out the needed information in document flow, it is identification information, whether the state table of this identification information understands application successful installation, when application successful installation, this identification information should be identical with the standard information of exporting after successful installation, if identical, successful installation is described, otherwise illustrate and install unsuccessfully, after installing unsuccessfully, mount message record can be sent in the database of server, for tester, check.After successful installation, can carry out ensuing operation test.
The operation test that step S103 applies, this step need to be obtained intelligent terminal current C PU information in application running, EMS memory occupation information and application operation sectional drawing information etc., the various problems that may occur in the time of can analyzing application operation from these information, then the information of obtaining is sent in server, specifically, as shown in Figure 4, it comprises step:
S401, by monkey test simulation user, operate the described application of operation, and arrange one for automatically stopping the execution number of times restriction of running; If application moves successfully, can from movable contact, send out intelligent terminal by transmission am order (the capable instrument of Android system command, for starting application program) and start described application.After startup, by monkey, testing to realize random selection tests, monkey test (monkey test) is a kind of automatic test means in Android system, and it can send pseudorandom customer incident stream, stochastic simulation user's operation to system, the for example key-press input of analog subscriber, touch-screen input, gesture input etc., to check tested machine operation, in this step, need to set one and automatically perform number of times, to be performed in application after this number of times, automatically stop operation.
S402, in application running, every scheduled time intercepting application operation picture, obtain application operation sectional drawing information, and obtain intelligent terminal current C PU information, EMS memory occupation information, installation log and running log; In application running, need to intercept every the scheduled time picture in when operation application, i.e. application operation sectional drawing information also sends the order of obtaining intelligent terminal current C PU information, EMS memory occupation information to intelligent terminal simultaneously, obtains corresponding information.In addition, also apply in installation and operation process, also can intercept the installation log of application and running log as the reference of test.
S403, application operation sectional drawing information, intelligent terminal current C PU information, EMS memory occupation information, installation log and running log are sent in the database of server, obtain after above-mentioned information, these information can be sent in the database of server and retain, when data analysis, use, the transmission of these information is also real-time, after obtaining, be sent at once in server, improve testing efficiency.In addition, server and Test Host (being PC) are before carrying out transfer of data, server can be opened socket and monitor, wait for the connection request of Test Host, when Test Host receives after user's test command, can to server, send socket connection request at once, last and server connects, and to carry out the transmission that writes of data, operates.
In step S104, server can be to reading the data that are sent in database, and these data are showed to user according to certain rule, for example with the form of webpage, offering the user that can access web server shows test results, its data read and processing procedure is mainly these data to be carried out to the processing of logical relation, then generate html code can show on common browser.
In addition, it should be noted that, the tested equipment in the present invention is the Android operating system of carrying, and the implementation method in the present invention also all realizes based on this operating system.The present invention is not limited to the compatibility test that the intelligent terminal of Android operating system is applied, can also be to other similar smart machines that application software need to be installed, for example at present popular IOS, electronic product smart mobile phone and the Intelligent flat of windows operating system, the compatibility test that can apply according to method of the present invention.
Based on said method, the present invention also provides a kind of intelligent terminal application compatibility test system, and as shown in Figure 5, it comprises:
Installation module 100, for receiving after the installation order of application, is arranged on the application of need test on intelligent terminal, and exports mount message;
Operation module 200, for judge whether successful installation of described application according to described mount message, after successful installation, sends action command to described intelligent terminal, moves described application;
Acquisition ofinformation module 300, be used for obtaining application running intelligent terminal current C PU information, EMS memory occupation information and application operation sectional drawing information, and the current C PU information of obtaining, EMS memory occupation information and application operation sectional drawing information are sent in server;
Data analysis anddisplay module 400, for the current C PU information getting, EMS memory occupation information and application operation sectional drawing information are carried out to data analysis, and show test result.
Further, as shown in Figure 6, describedinstallation module 100 comprises:
Installationorder transmitting element 110, places the application under catalogue for reading application, by debugging bridger, sends the installation order of the application that needs test to intelligent terminal;
Application installation unit 120, for receiving after described installation order, installs described application;
Mountmessage output unit 130, for exporting the mount message of described application.
Further, as shown in Figure 7, describedoperation module 200 comprises:
Identificationinformation filter element 210, for by the mount message of output, the form with document flow reads, filters the document flow reading, and filters out the identification information in mount message;
Comparison judgment unit 220, for the standard information of the identification information filtering out and successful installation is compared, judges whether successful described application installs;
Application operation andrecord cell 230, for when judging described application successful installation, record the information of successful installation and move described application, otherwise recording the mount message of described application, and sending described mount message to the database of server.
Further, as shown in Figure 8, described acquisition ofinformation module 300 comprises:
Monkey test cell 310, for operate the described application of operation by monkey test simulation user, and arranges one for automatically stopping the execution number of times restriction of running;
Information acquisition unit 320, at application running, obtains application operation sectional drawing information every scheduled time intercepting application operation picture, and obtains intelligent terminal current C PU information, EMS memory occupation information, installation log and running log;
Information transmitting unit 330, for being sent to application operation sectional drawing information, intelligent terminal current C PU information, EMS memory occupation information, installation log and running log the database of server.About function existing detailed description in detail in method above of above-mentioned modular unit, therefore repeat no more.
In sum, the present invention is by carrying out the test of automation to application, realized the compatibility of batch testing application program on intelligent terminal, the workload that has greatly alleviated tester, has improved testing efficiency, has reduced testing cost, and application testing in the present invention has improved the validity of test mass, test result, the present invention has conveniently brought into play important function in assurance software reliability and validity, has avoided the waste of human and material resources, has controlled software development cost.
Should be understood that, application of the present invention is not limited to above-mentioned giving an example, and for those of ordinary skills, can be improved according to the above description or convert, and all these improvement and conversion all should belong to the protection range of claims of the present invention.