[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN109446080A - APP test method and device - Google Patents

APP test method and device Download PDF

Info

Publication number
CN109446080A
CN109446080A CN201811230269.3A CN201811230269A CN109446080A CN 109446080 A CN109446080 A CN 109446080A CN 201811230269 A CN201811230269 A CN 201811230269A CN 109446080 A CN109446080 A CN 109446080A
Authority
CN
China
Prior art keywords
app
tested
test
log
memory block
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
Application number
CN201811230269.3A
Other languages
Chinese (zh)
Inventor
黄学兰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wangsu Science and Technology Co Ltd
Original Assignee
Wangsu Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wangsu Science and Technology Co Ltd filed Critical Wangsu Science and Technology Co Ltd
Priority to CN201811230269.3A priority Critical patent/CN109446080A/en
Publication of CN109446080A publication Critical patent/CN109446080A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present embodiments relate to computer automated testing technical field, a kind of APP test method and device are disclosed.In the present invention, APP test method is applied to APP test device, and the APP test device and tested APP are installed in terminal device, and APP test method includes: to obtain the tested corresponding configuration information of APP from server;Configuration information is parsed, and obtains the tested corresponding configuration item of APP;Wherein configuration item includes at least test script;Test script is executed, and tested APP is tested.The embodiment of the present invention also provides a kind of APP test device.The embodiment of the present invention realizes the automatic test of APP, and since the automatic test supports server-side to issue the different tested corresponding configuration informations of APP, therefore flexibly different APP can be tested, with higher adaptivity, to save human cost, cumbersome repeatability is more avoided.

Description

APP test method and device
Technical field
The present embodiments relate to computer automated testing technical fields, in particular to APP test method and device.
Background technique
Existing Android Android set-top box is all kinds of, and the set-top-box chip of different model is different, even together The set-top box of one model, Android version, rom version may also be different, so as to cause same application app in each set-top box There are various incompatibility problems in upper operation.Especially this kind of APP of player, and set-top-box chip are even more closely bound up, thus Need to do a series of cumbersome compatibility tests.
Current compatibility test requires manually operated, for some probability problems or performance pressure is needed to survey App requires to go clicking operation to realize manually repeatedly.If tested app goes wrong, it will usually pass through Android Studio carrys out orientation problem, or passes through logcat crawl log.
At least there are the following problems in the prior art for inventor's discovery: the compatibility test of APP is all using survey manually at present Examination, more consumption manpower, and repeatability is too high;Especially for this kind of APP of player, the testing time is longer, manual test It is especially laborious.
Summary of the invention
Embodiment of the present invention is designed to provide a kind of APP test method and device, and the automation for realizing APP is surveyed Examination, and since the automatic test supports server-side to issue the different tested corresponding configuration informations of APP, it can be flexibly to not It is tested with APP, there is higher adaptivity more to avoid cumbersome repeatability to save human cost.
In order to solve the above technical problems, embodiments of the present invention provide a kind of APP test method, it is applied to APP and surveys Trial assembly is set, and the APP test device and tested APP are installed in terminal device, and the APP test method includes: from service Device obtains the corresponding configuration information of the tested APP;The configuration information is parsed, and it is corresponding to obtain the tested APP Configuration item;Wherein the configuration item includes at least test script;The test script is executed, and the tested APP is carried out Test.
Embodiments of the present invention additionally provide a kind of APP test device, are installed in terminal device, the APP test Device includes: acquisition module, for obtaining the corresponding configuration information of tested APP installed in the terminal device from server; Parsing module for parsing to the configuration information, and obtains the corresponding configuration item of the tested APP;It is wherein described to match Item is set including at least test script;Script execution module is surveyed for executing the test script, and to the tested APP Examination.
Embodiment of the present invention obtains the tested corresponding configuration information of APP in terms of existing technologies, from server, and APP is tested to this according to the test script parsed from configuration information to test, and realizes the automatic test of APP, from And human cost has been saved, more avoid cumbersome repeated labor;And since the automatic test supports server to issue not With the tested corresponding configuration information of APP, therefore flexibly different APP can be tested, there is higher adaptivity.
In addition, the configuration item further includes the local maximum storage of log crawl, log upload and log;It is described APP test method further include: the log that the crawl tested APP is generated during the test, and the log of crawl is stored in Preset local log memory block;When the currently stored amount for judging log in the local log memory block reaches the maximum When amount of storage, the log of the maximum storage, and the day that will be partitioned into are partitioned into from the local log memory block Will is uploaded to the server;The log for being uploaded to the server is deleted from the local log memory block. In the present embodiment, the log that the tested APP is generated during the test is grabbed, it can be for subsequent tested according to log analysis The compatibility performance of APP;Also, when the currently stored amount of log in local log memory block reaches maximum storage, from described It is partitioned into the log of the maximum storage in local log memory block, and the log being partitioned into is uploaded to the service Device, and the log for being uploaded to the server is deleted from the local log memory block, institute can be saved in time Some logs when avoiding log excessive, since local log capacity is limited, lead to the most newly generated day when log capacity has been expired Will can override before log, and terminal device can be allowed to have sufficient memory use space.
In addition, the configuration item further includes that application program is monitored without response dialogue ANR;The APP test method is also wrapped It includes: ANR monitoring being carried out to the tested APP during the test, and when listening to ANR, by preset local abnormal storage ANR exception information in area copies to the local log memory block;Wherein, the tested APP is different by ANR when generating ANR Normal information preservation is into the local abnormal memory block.It is in the present embodiment, ANR exception information is multiple from local abnormal memory block The local log memory block is made, the log of ANR exception information and crawl can be made to be uploaded server, Ke Yifang together Just the relevant information quickly collected in test process (otherwise needs tester manually from local abnormal memory block by ANR Exception information is taken out).
In addition, copying to the local log storage in the ANR exception information by the local abnormal memory block After area, further includes: store the ANR exception information for having copied to the local log memory block from the local exception It is deleted in area.The present embodiment may insure the ANR exception information stored in local abnormal memory block be all it is most newly generated, often Secondary can be convenient rapidly obtains most newly generated ANR exception information and is copied into local log memory block, without every It is secondary all to inquire newest generation ANR information in many ANR exception information kinds, it is simple and fast, processing load can be reduced.
In addition, the configuration item further includes the update cycle, the test script is executed described, and to the tested APP After being tested, further includes: when detecting that the preset update cycle arrives, obtained again from the server described tested The corresponding configuration information of APP;Judge the version of the configuration information reacquired and the version of the current configuration information It is whether consistent;If inconsistent, the configuration information of reacquisition is parsed and obtains that the tested APP is corresponding to be matched Item is set, execution retrieves the test script, and tests the tested APP;If consistent, reacquisition is abandoned The configuration information simultaneously continues current test.In the present embodiment, by the update cycle of setting, after update being obtained automatically Configuration information, (tester may root after being modified so as to the tested corresponding configuration information of APP in the server Configuration information is flexibly modified according to test case), modified version is obtained in time is tested.
In addition, the configuration item further includes survival monitoring;The APP test method further include: during the test to institute It states tested APP and carries out survival monitoring, and when monitoring the tested APP and being in non-viable state, restart the tested APP, And the test assignment not completed in the test script is executed, and test the tested APP;Wherein, the APP test The test that device records the tested APP not yet to be completed in the test script when becoming the non-viable state from existing state Task.The problem of the present embodiment can be unable to complete entire test due to being closed extremely to avoid tested APP.
Detailed description of the invention
One or more embodiments are illustrated by the picture in corresponding attached drawing, these exemplary theorys The bright restriction not constituted to embodiment, the element in attached drawing with same reference numbers label are expressed as similar element, remove Non- to have special statement, composition does not limit the figure in attached drawing.
Fig. 1 is the flow chart of the APP test method of first embodiment according to the present invention;
Fig. 2 is the flow chart of the APP test method of second embodiment according to the present invention;
Fig. 3 is the flow chart of the APP test method of third embodiment according to the present invention;
Fig. 4 is the flow chart of the APP test method of the 4th embodiment according to the present invention;
Fig. 5 is the flow chart of the APP test method of the 5th embodiment according to the present invention;
Fig. 6 is the flow chart of the APP test method of sixth embodiment according to the present invention;
Fig. 7 is the flow chart of the APP test method of the 7th embodiment according to the present invention;
Fig. 8 is the block diagram of the APP test device of the 8th embodiment according to the present invention;
Fig. 9 is the block diagram of the APP test device of the 9th embodiment according to the present invention;
Figure 10 is the block diagram of the APP test device of the tenth embodiment according to the present invention;
Figure 11 is the block diagram of the APP test device of the 11st embodiment according to the present invention;
Figure 12 is the block diagram of the APP test device of the 12nd embodiment according to the present invention;
Figure 13 is the block diagram of the APP test device of the 13rd embodiment according to the present invention;
Figure 14 is the block diagram of the APP test device of the 14th embodiment according to the present invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with attached drawing to the present invention Each embodiment be explained in detail.However, it will be understood by those skilled in the art that in each embodiment party of the present invention In formula, in order to make the reader understand this application better, many technical details are proposed.But even if without these technical details And various changes and modifications based on the following respective embodiments, the application technical solution claimed also may be implemented.
The first embodiment of the present invention is related to a kind of APP test methods, are applied to APP test device, APP test device It is installed in terminal device with tested APP,;It is as shown in Figure 1 the flow chart of the APP test method of first embodiment.
Step S101 obtains the tested corresponding configuration information of APP from server;
Step S102, parses configuration information, and obtains the tested corresponding configuration item of APP;Wherein configuration item is at least Including test script;
Step S103 executes test script, and tests tested APP.
Present embodiment in terms of existing technologies, obtains from server and is tested the corresponding configuration information of APP, and according to The test script parsed from configuration information is tested APP to this and tests, and realizes the automatic test of APP, to save About human cost, more avoids cumbersome repeated labor;And since the automatic test supports server to issue different quilts The corresponding configuration information of APP is surveyed, therefore flexibly different APP can be tested, there is higher adaptivity.
The realization details of the APP test method of present embodiment is specifically described below, the following contents is only side The realization details of offer is just provided, the necessary of this programme is not implemented.
A kind of APP test device of automation is provided in present embodiment, which can be with the shape of APP Formula exists, and is referred to as the APP test device in present embodiment to test APP;Before formally starting test, need first survey Examination APP and tested APP is mounted on terminal device;Tested APP can be any one that the subsequent terminal device may be installed APP, such as player class APP (such as iqiyi.com, youku.com).Wherein, in the test process of APP, test APP needs to locate always In operating status, especially for player class APP, the testing time would generally continue longer;Therefore, when APP is tested in installation, If the terminal device has opened system permission to user, terminal device is mounted on using test APP as system application It is interior, if the terminal device not to user's open system permission, in such a way that dual-thread is guarded, so as to avoid Test APP is fallen because the system resource of terminal device is insufficient by system kill, and test APP operation can be made more stable.
Wherein, terminal device for example can be set-top box, mobile phone etc., and present embodiment is not intended to be limited in any this.Terminal There is communication connection between equipment and server, can be wired connection, is also possible to be wirelessly connected;It is recited above in terminal Installation test APP and tested APP, can be tester and installs manually, be also possible in terminal device and server in equipment After establishing communication connection, test APP and the tested APP are obtained from server automatically, and installed automatically.Present embodiment In, (test APP, which can be, is installed rear automatic starting, is also possible to be triggered by operator and open after testing APP and being activated It is dynamic, or can also be and start automatically in restarting terminal device), in running background, terminal device in the form of service thread The compatibility test to tested APP is realized by test APP.
In step s101, when test APP is activated, terminal device can pass through the access that test APP initiates server Request, server will issue the corresponding configuration information of tested APP after receiving the access request.In general, terminal device is every It is secondary to obtain the corresponding configuration information of a tested APP, to test a tested APP;That is tester is by current quilt It surveys APP and is installed to terminal device, and the tested corresponding configuration information of APP is set in the server;Then starting test APP, Start to execute APP test method, at this point, due to being only provided with the tested corresponding configuration information of APP, access request in server In can not include the title of tested APP, it is the tested corresponding configuration of APP that server, which receive issue after the access request, Information.So without being limited thereto, tester can set configuration information in advance for different tested APP, and each tested APP is corresponding Configuration information prestore in the server, at this point, access request may include title of at least one tested APP, service every time Device issues the corresponding configuration information of tested APP according to the title of tested APP.
Wherein, one or more configuration items be may include in configuration information, matching in the corresponding configuration information of each tested APP The value volume and range of product for setting item can need to set according to test, wherein configuration item includes at least test script, pre- in test script First it is written with the various operations of required execution when tested APP test.
In one example, the template of configuration information is prestored in server, may include different tested APP in the template All configuration items and the corresponding state of each configuration item that may relate to;Tester is when setting configuration information, as long as will The corresponding state of configuration item needed for tested APP test is set as permission state;Wherein, the corresponding state of test script In can insert the storage path of the test script, to characterize permission state, server, can be according to should when issuing configuration information Path obtains the test script, and is handed down to terminal device.
In a step 102, test APP parses configuration information, and obtains the tested corresponding configuration item of APP.One In a example, the configuration information of the tested APP that server issues is only comprising state be permission state configuration item, at this point, solution Analysing the obtained corresponding configuration item of tested APP indicates to need the configuration item for test.In another example, under server The configuration information of the tested APP of hair may include the state of all configuration item and each configuration item;At this point it is possible to parse each Each configuration item and its state, and selected state is the configuration item of permission state as the tested corresponding configuration item of APP, after being used for Continuous test.
The various operations of required execution when in step s 103, due to being previously written tested APP test in test script, Therefore test script is executed, the test to tested APP can be realized.
During the test, if the case where application program is without response dialogue ANR occurs in tested APP, tested APP can be incited somebody to action ANR exception information is stored in local abnormal memory block.After being completed, tester can inquire local abnormal memory block In whether there is ANR exception information, if it is present obtaining the ANR exception information to be analyzed.Wherein, local exception is deposited Storage area is that system is set automatically, dedicated for storing the tested self registering exception information of APP.More than it should be noted that It is only illustrated by taking ANR as an example, different tested APP may automatically record different exception informations, and by the exception of record Information is stored in local abnormal memory block, so that tester inquires after being completed.
Second embodiment of the present invention is related to a kind of APP test method.Second embodiment is big with first embodiment It causes identical, is in place of the main distinction: in second embodiment of the invention, also comprising in log crawl, log in configuration item Biography and the local maximum storage of log;The log generated in tested APP test process can be grabbed, by log from this ground Server is reached, and the log uploaded is deleted from local.
It is illustrated in figure 2 the flow chart of the APP test method of second embodiment;Wherein, in step 201~203 and Fig. 1 Step 101~103 it is roughly the same, details are not described herein again;The difference is that further including step 204~step 206, specifically It is as follows.
Step 204, the log that tested APP is generated during the test is grabbed, and the log of crawl is stored in local day Will memory block.
Step 204, which embodies log and grabs, executes movement corresponding to this configuration item.Specifically, can parse respectively After configuration item and before executing test script, first opens log and grab thread, such as the logcat thread in Android system, and And one local log memory block of setting;To grab the log that tested APP is generated during the test, and by the day of crawl Will is stored in local log memory block.
Step 205, when the currently stored amount for judging log in local log memory block reaches maximum storage, from this It is partitioned into the log of maximum storage in ground log memory block, and the log being partitioned into is uploaded to server;
Step 206, the log for being uploaded to server is deleted from local log memory block.
Step 205, step 206 embody corresponding to log upload, the local maximum storage of log the two configuration items Execute movement.Specifically, the log of crawl is stored in local log memory block, and test APP can periodically inquire this The currently stored amount of log in ground log memory block;If currently stored amount reaches maximum storage, according to the successive of storage Sequentially, the log of the maximum storage stored at first is split as a daily record data packet, and by the daily record data It wraps and reaches server;If currently stored amount is not up to maximum storage, with no treatment.For example, the maximum of setting Amount of storage is 5M, then creating the file named with current time, such as 2018-10-09- when starting crawl log 15-30-00.log then should when the size that this document is written in log reaches 5M (size of file is greater than or equal to 5M) File is uploaded to server-side, and local 2018-10-09-15-30-00.log is deleted, then create another file, such as 2018-10-09-16-30-00.log;And so on, until test terminates to generate there is no log.It should be noted that The above is only for example, specific storage mode to local log memory block and test APP to the currently stored amount of log Inquiry mode be not intended to be limited in any.
It is emphasized that step 205~206 and step 204 execute parallel, that is, crawl log in step 204 The movement that log uploads in movement and step 205, step 206, is that complete parallel executes, is independent of each other.
For first embodiment, second embodiment can grab the day that tested APP is generated in test process Will, for the subsequent compatibility performance for being tested APP according to log analysis.Also, when the current of log is deposited in local log memory block When reserves reach maximum storage, it is partitioned into the log of the maximum storage from the local log memory block, and will divide The log cut out is uploaded to the server, and the log for being uploaded to server is deleted from local log memory block Fall, all logs can be saved in time, when avoiding log excessive, since local log capacity is limited, causes in log capacity (especially tested APP is this kind of APP of player, is tested for log before most newly generated log can override when having expired Journey is longer, can generate more log, if it is easy to appear most newly generated logs without enough log memory spaces The phenomenon that log before is override), and terminal device can be allowed to have sufficient memory use space.
It in addition, can also only include step 204 in other examples, i.e., only include the movement of crawl log, without By log upload server;At this point, all logs are stored in local log memory block, it can wait and be tested after being completed Personnel obtain manually;In this right scheme, for it can generate the tested APP of more log in test process, local log is deposited The memory space needs of storage area are sufficiently large, could store complete log.
Third embodiment of the present invention is related to a kind of APP test method.Third embodiment and second embodiment are big Cause identical, be in place of the main distinction: in third embodiment of the invention, configuration item further includes application program without response dialog Frame ANR is monitored, and carries out ANR monitoring to tested APP during the test, the ANR exception information listened to is copied to local day Will memory block, so that ANR exception information and log are uploaded to server together.
It is illustrated in figure 3 the flow chart of the APP test method of third embodiment;Wherein, in step 301~306 and Fig. 2 Step 201~206 it is roughly the same, details are not described herein again;The difference is that further include step 307, it is specific as follows.
Step 307, ANR monitoring is carried out to tested APP during the test, and when listening to ANR, local exception is deposited ANR exception information in storage area copies to local log memory block.
Specifically, ANR listening thread can be first opened after parsing each configuration item and before executing test script, And monitor whether tested APP ANR occurs during the test.Wherein, monitor whether tested APP ANR occurs during the test, It is specifically as follows, whether have new ANR exception information generate, if so, then if periodically inquiring in the abnormal memory block in the local Expression listens to ANR.
When listening to ANR, the ANR exception information from by local abnormal memory block copies to local log memory block; Therefore, ANR exception information can be uploaded to server with the log by log crawl thread crawl together.Wherein, ANR is abnormal Information can be understood as a kind of by being tested the self registering log of APP.
It is emphasized that step 307 in ANR monitoring movement, the log grasping movement in step 304, step 305~ Log upload movement in 306, executes parallel, is independent of each other.
For second embodiment, third embodiment is multiple from local abnormal memory block by ANR exception information Local log memory block is made, the log of ANR exception information and crawl can be made to be uploaded server together, can be convenient fast The relevant information collected in test process promptly (otherwise needs tester manually from local abnormal memory block by ANR exception Information is taken out).
4th embodiment of the invention is related to a kind of APP test method.4th embodiment and third embodiment are big It causes identical, is in place of the main distinction: in four embodiment of the invention, the ANR of local log memory block will have been copied to Exception information is deleted from local abnormal memory block.
It is illustrated in figure 4 the flow chart of the APP test method of the 4th embodiment;Wherein, in step 401~407 and Fig. 2 Step 301~307 it is roughly the same, details are not described herein again;The difference is that further include step 408, it is specific as follows.
Step 408, the ANR exception information for having copied to local log memory block is deleted from local abnormal memory block Fall.
For third embodiment, the 4th embodiment may insure the ANR stored in local abnormal memory block Exception information be all it is most newly generated, can be convenient every time and rapidly obtain most newly generated ANR exception information and replicated It is simple and fast without inquiring newest generation ANR information in many ANR exception information kinds every time to local log memory block, Processing load can be reduced.
5th embodiment of the invention is related to a kind of APP test method.5th embodiment and first embodiment are big Cause identical, be in place of the main distinction: in fifth embodiment of the invention, configuration item further includes the update cycle;It can be with the period Property obtain the tested corresponding configuration information of APP from server, and be newest in the version for determining the configuration information reacquired It is tested when version according to the configuration information of the latest edition.
It is illustrated in figure 5 the flow chart of the APP test method of the 5th embodiment;Wherein, in step 501~503 and Fig. 1 Step 101~103 it is roughly the same, details are not described herein again;The difference is that further include step 504~506, it is specific as follows.
Step 504: when detecting that the update cycle arrives, obtaining the tested corresponding configuration information of APP from server again;
Step 505: judging whether the version of the configuration information reacquired is consistent with the version of current configuration information.
If inconsistent (i.e. judging result is no), the configuration information of reacquisition is parsed and obtains tested APP Corresponding configuration item, execution retrieves test script, and tests the tested APP;Wherein, to return to step in Fig. 5 Rapid 502 are parsed the configuration information that indicates to reacquisition and obtain the tested corresponding configuration item of APP;Then entering step Rapid 503.At this point, it is the configuration item reacquired that the corresponding configuration item of APP is tested in step 502, the test script in step 503 For the test script of reacquisition.
If consistent (i.e. judging result is yes), enters step 506, abandons the configuration information reacquired and continue current Test.
Wherein, the update cycle can be set as needed, for example, half a minute or one minute;Update cycle in the present embodiment It is to be configured as a configuration item in configuration information by tester, so without being limited thereto, the update cycle can also be preparatory It is set in test APP, i.e., APP tested for difference can use the same update cycle.
Specifically, whenever detecting update cycle arrival confidence can be matched from the tested APP of server acquisition is corresponding again Breath.Then, whether the version for the configuration information that judgement obtains again is consistent with the version of current configuration information;If different It causes, indicates that the tested corresponding configuration information of APP has been tested personnel and modified, then the configuration information based on reacquisition is again Return step 502;If consistent, indicate that the tested corresponding configuration information of APP is not modified, then, it abandons reacquiring Configuration information, and continue current test.Wherein, the configuration information for abandoning reacquiring can be understood as the reacquisition Configuration information is deleted.Therefore, when the version of the configuration information of reacquisition is consistent with the version of current configuration information ( The judging result of step 505 is yes), configuration information is reacquired in step 504~506 and carries out the movement and step of version judgement The movement that test script is executed in rapid 503 executes parallel, does not interfere with each other;Only when the version of the configuration information of reacquisition When inconsistent with the version of current configuration information (judging result of step 505 is no), test script is executed in step 503 Movement can just be interrupted, and enter step 502 again.
In present embodiment, the corresponding configuration information of tested APP can be adjusted flexibly according to test case in tester, It is reasonably tested in order to more acurrate;By the setting update cycle, updated configuration information can be obtained automatically, so as to After the tested corresponding configuration information of APP is modified in the server, modified version is obtained in time and is tested.
It should be noted that the 5th embodiment is also possible to improvement on the basis of second to four any embodiments.
Sixth embodiment of the invention is related to a kind of APP test method.Sixth embodiment is big with first embodiment Cause identical, be in place of the main distinction: in sixth embodiment of the invention, configuration item further includes survival monitoring;It was testing Cheng Zhonghui carries out survival monitoring to tested APP, when tested APP is in non-viable state, restarts tested APP, and continue to execute Unfinished test.
It is illustrated in figure 6 the flow chart of the APP test method of sixth embodiment;Wherein, in step 601~603 and Fig. 1 Step 101~103 it is roughly the same, details are not described herein again;The difference is that further include step 604~605, it is specific as follows.
Step 604, survival monitoring is carried out to tested APP during the test, and is in non-viable monitoring tested APP When state, tested APP is restarted;
Step 605, the test assignment not completed in test script is executed, and tested APP is tested.
Wherein, it is tested APP and is in existing state in normal test process, when occurring abnormal, not such as system space Tested APP is enough caused to cause tested APP to be closed by some test operation in kill (being closed) or test process It closes, is tested APP at this time and is in non-viable state, tested APP can not continue to test.
Specifically, can first open survival monitoring line after parsing each configuration item and before executing test script Journey, to carry out survival monitoring to tested APP.When monitoring tested APP and being in non-viable state, tested APP is restarted;Then it holds The test assignment not completed in row test script, and tested APP is tested.Wherein, test APP will record tested APP quilt Close moment, i.e., when becoming non-viable state from existing state, the test assignment not yet completed in test script.
For first embodiment, sixth embodiment can to avoid tested APP because extremely be closed due to can not The problem of completing entire test.
It should be noted that sixth embodiment is also possible to improvement on the basis of second to five any embodiments.
7th embodiment of the invention is related to a kind of APP test method.7th embodiment and second embodiment are big Cause identical, be in place of the main distinction: in seventh embodiment of the invention, configuration item further includes system time calibration, can be with The system time of terminal device is calibrated before executing test script.
It is illustrated in figure 7 the flow chart of the APP test method of the 7th embodiment;Wherein, step 701~702, step Step 201~206 in 705~708 and Fig. 2 are roughly the same, and details are not described herein again;The difference is that further including step 703 ~704, it is specific as follows.
Step 703, judge whether the system time of terminal device is accurate;If inaccurate (i.e. judging result is no), into Enter step 704, enters step 705 after calibrating to system time;If accurate (i.e. judging result is yes), is directly entered Step 705.
Wherein, terminal device can use network time to calibrate to the system time of oneself.Specifically, terminal is set It is standby to be connect with server communication, network time can be obtained from server, and judge that the system time of network time and oneself is It is no consistent, if it is inconsistent, completing the calibration to system time with the system time of network time synchronization oneself.This reality The system time calibration applied in example is to be configured as a configuration item in configuration information by tester, is so not limited to This, what system time calibration can also be set in test APP in advance, i.e., APP tested for difference is applicable in.
For second embodiment, the present embodiment can be calibrated the system time of terminal device;Due to grabbing The log having time record taken, therefore the present embodiment mistake can occur to avoid the crawl time of log, be convenient for log analysis.
It should be noted that the 7th embodiment is also possible on the basis of first, third to six any embodiments It improves.
The step of various methods divide above, be intended merely to describe it is clear, when realization can be merged into a step or Certain steps are split, multiple steps are decomposed into, as long as including identical logical relation, all in the protection scope of this patent It is interior;To adding inessential modification in algorithm or in process or introducing inessential design, but its algorithm is not changed Core design with process is all in the protection scope of the patent.
Eighth embodiment of the invention is related to a kind of APP test device, is illustrated in figure 8 the APP test of present embodiment The block diagram of device, APP test device 80 is mounted in terminal device, and includes:
Module 801 is obtained, for obtaining the corresponding configuration information of tested APP installed in terminal device from server 11;
Parsing module 802 for parsing to configuration information, and obtains the tested corresponding configuration item of APP;Wherein configure Item includes at least test script;
Script execution module 803 is tested for executing test script, and to tested APP.
It is not difficult to find that present embodiment is system embodiment corresponding with first embodiment, present embodiment can be with First embodiment is worked in coordination implementation.The relevant technical details mentioned in first embodiment still have in the present embodiment Effect, in order to reduce repetition, which is not described herein again.Correspondingly, the relevant technical details mentioned in present embodiment are also applicable in In first embodiment.
It is noted that each module involved in present embodiment is logic module, and in practical applications, one A logic unit can be a physical unit, be also possible to a part of a physical unit, can also be with multiple physics lists The combination of member is realized.In addition, in order to protrude innovative part of the invention, it will not be with solution institute of the present invention in present embodiment The technical issues of proposition, the less close unit of relationship introduced, but this does not indicate that there is no other single in present embodiment Member.
Ninth embodiment of the invention is related to a kind of APP test device.9th embodiment and the 8th embodiment are substantially Identical, be in place of the main distinction: in the 9th embodiment, configuration item further includes log crawl, log upload and log Local maximum storage;It is illustrated in figure 9 the block diagram of the APP test device of present embodiment, APP test device 80 is also wrapped It includes:
Log handling module 804, the log generated during the test for grabbing tested APP, and by the log of crawl It is stored in preset local log memory block 21;Wherein, in Android system, log handling module 804 can be logcat line Journey.
First judgment module 805, for judge in local log memory block 21 amount of storage of local log whether be greater than or Equal to maximum storage;
Uploading module 806, for judging the amount of storage of log in local log memory block 21 in first judgment module 805 When more than or equal to maximum storage, it is partitioned into the log of maximum storage from local log memory block 21, and will be partitioned into Log be uploaded to server;
First removing module 807, for deleting the log for being uploaded to server 11 from local log memory block 21.
Since second embodiment is corresponded to each other with present embodiment, present embodiment can be mutual with second embodiment Match implementation.The relevant technical details mentioned in second embodiment are still effective in the present embodiment, implement second The attainable technical effect of institute similarly may be implemented in the present embodiment in mode, no longer superfluous here in order to reduce repetition It states.Correspondingly, the relevant technical details mentioned in present embodiment are also applicable in second embodiment.
Tenth embodiment of the invention is related to a kind of APP test device, and the tenth embodiment and the 9th embodiment are substantially Identical, be in place of the main distinction: in the tenth embodiment, configuration item further includes that ANR is monitored;It is as shown in Figure 10 this implementation The block diagram of the APP test device of mode, APP test device 80 further include:
ANR monitoring unit 808, for carrying out ANR monitoring to tested APP during the test, and when listening to ANR, ANR exception information in preset local abnormal memory block 22 is copied into local log memory block 21;Wherein, APP is tested to exist ANR exception information is saved into local abnormal memory block 22 when generating ANR.
Since third embodiment is corresponded to each other with present embodiment, present embodiment can be mutual with third embodiment Match implementation.The relevant technical details mentioned in third embodiment are still effective in the present embodiment, implement in third The attainable technical effect of institute similarly may be implemented in the present embodiment in mode, no longer superfluous here in order to reduce repetition It states.Correspondingly, the relevant technical details mentioned in present embodiment are also applicable in third embodiment.
Eleventh embodiment of the invention is related to a kind of APP test device, the 11st embodiment and the tenth embodiment It is roughly the same, it is in place of the main distinction: is as shown in figure 11 the block diagram of the APP test device of present embodiment, APP test Device 80 further include:
Second removing module 809, for depositing the ANR exception information for having copied to local log memory block from local exception It is deleted in storage area.
Since the 4th embodiment is corresponded to each other with present embodiment, present embodiment can be mutual with the 4th embodiment Match implementation.The relevant technical details mentioned in 4th embodiment are still effective in the present embodiment, implement the 4th The attainable technical effect of institute similarly may be implemented in the present embodiment in mode, no longer superfluous here in order to reduce repetition It states.Correspondingly, the relevant technical details mentioned in present embodiment are also applicable in the 4th embodiment.
Twelveth embodiment of the invention is related to a kind of APP test device, the 12nd embodiment and the 8th embodiment Roughly the same, be in place of the main distinction: in the 12nd embodiment, configuration item further includes the update cycle;As shown in figure 12 For the block diagram of the APP test device of present embodiment, APP test device 80 further include:
Timing module 810, for when timing to update cycle arrives, notice to obtain module 801 again from server 21 Obtain the tested corresponding configuration information of APP;
Second judgment module 811, the version of the configuration information for judging to reacquire and the version of current configuration information Whether this is consistent;Parsing module 802 is used for when the judging result of the second judgment module 811 is inconsistent, to reacquisition Configuration information parsed and parsed after the corresponding configuration item of tested APP;Script execution module 803 is also used to execute weight The test script newly parsed, and tested APP is tested.
It should be noted that the 12nd embodiment is also possible to changing on the basis of the 9th to 11 any embodiment Into.
Since the 5th embodiment is corresponded to each other with present embodiment, present embodiment can be mutual with the 5th embodiment Match implementation.The relevant technical details mentioned in 5th embodiment are still effective in the present embodiment, implement the 5th The attainable technical effect of institute similarly may be implemented in the present embodiment in mode, no longer superfluous here in order to reduce repetition It states.Correspondingly, the relevant technical details mentioned in present embodiment are also applicable in the 5th embodiment.
Thirteenth embodiment of the invention is related to a kind of APP test device, the 13rd embodiment and the 8th embodiment Roughly the same, be in place of the main distinction: in the 13rd embodiment, configuration item further includes the update cycle;As shown in figure 13 For the block diagram of the APP test device of present embodiment, APP test device 80 further include:
Survival monitoring module 812, for carrying out survival monitoring to tested APP during the test, and it is tested monitoring When APP is in non-viable state, tested APP is restarted;
Script execution module 803 is also used to after tested APP is restarted, and is executed the test not completed in test script and is appointed Business, and tested APP is tested.
It should be noted that the 13rd embodiment is also possible to changing on the basis of the 9th to 12 any embodiment Into.
Since sixth embodiment is corresponded to each other with present embodiment, present embodiment can be mutual with sixth embodiment Match implementation.The relevant technical details mentioned in sixth embodiment are still effective in the present embodiment, implement the 6th The attainable technical effect of institute similarly may be implemented in the present embodiment in mode, no longer superfluous here in order to reduce repetition It states.Correspondingly, the relevant technical details mentioned in present embodiment are also applicable in sixth embodiment.
Fourteenth embodiment of the invention is related to a kind of APP test device, the 14th embodiment and the 9th embodiment Roughly the same, be in place of the main distinction: in the 14th embodiment, configuration item further includes the update cycle;As shown in figure 14 For the block diagram of the APP test device of present embodiment, APP test device 80 further include:
Whether time calibration module 813, the system time for judging terminal device are accurate;And judging system time When inaccurate, system time is calibrated;
Script execution module 803 is also used to after time calibration module 813 calibrates system time or in the time When calibration unit judges that system time is accurate, test script is executed, and test tested APP.
It should be noted that the 14th embodiment is also possible on the eight, the tenth to the 13rd any embodiments basis On improvement.
Since the 7th embodiment is corresponded to each other with present embodiment, present embodiment can be mutual with the 7th embodiment Match implementation.The relevant technical details mentioned in 7th embodiment are still effective in the present embodiment, implement the 7th The attainable technical effect of institute similarly may be implemented in the present embodiment in mode, no longer superfluous here in order to reduce repetition It states.Correspondingly, the relevant technical details mentioned in present embodiment are also applicable in the 7th embodiment.
It will be understood by those skilled in the art that the respective embodiments described above are to realize specific embodiments of the present invention, And in practical applications, can to it, various changes can be made in the form and details, without departing from the spirit and scope of the present invention.

Claims (14)

1. a kind of APP test method, which is characterized in that be applied to APP test device, the APP test device and tested APP are equal It is mounted in terminal device, the APP test method includes:
The corresponding configuration information of the tested APP is obtained from server;
The configuration information is parsed, and obtains the corresponding configuration item of the tested APP;Wherein the configuration item at least wraps Include test script;
The test script is executed, and the tested APP is tested.
2. APP test method according to claim 1, which is characterized in that the configuration item further includes log crawl, log The local maximum storage of upload and log;The APP test method further include:
The log that the tested APP is generated during the test is grabbed, and the log of crawl is stored in preset local log Memory block;
When the currently stored amount for judging log in the local log memory block reaches the maximum storage, from described It is partitioned into the log of the maximum storage in ground log memory block, and the log being partitioned into is uploaded to the service Device;
The log for being uploaded to the server is deleted from the local log memory block.
3. APP test method according to claim 2, which is characterized in that the configuration item further includes application program without sound Dialog box ANR is answered to monitor;The APP test method further include:
ANR monitoring is carried out to the tested APP during the test, and when listening to ANR, by preset local abnormal storage ANR exception information in area copies to the local log memory block;Wherein, the tested APP is different by ANR when generating ANR Normal information preservation is into the local abnormal memory block.
4. APP test method according to claim 3, which is characterized in that it is described will be in the local abnormal memory block ANR exception information copy to after the local log memory block, further includes:
The ANR exception information for having copied to the local log memory block is deleted from the local abnormal memory block Fall.
5. APP test method according to claim 1, which is characterized in that the configuration item further includes the update cycle, in institute It states and executes the test script, and after testing the tested APP, further includes:
When detecting that the update cycle arrives, the corresponding configuration information of the tested APP is obtained from the server again;
Judge whether version and the version of the current configuration information of the configuration information reacquired are consistent;If different It causes, then the corresponding configuration item of the tested APP is parsed and obtained to the configuration information of reacquisition, execute and obtain again It is tested to the test script, and to the tested APP;If consistent, the configuration information reacquired is abandoned simultaneously Continue current test.
6. APP test method according to claim 1, which is characterized in that the configuration item further includes survival monitoring;It is described APP test method further include:
Survival monitoring is carried out to the tested APP during the test, is in non-viable state monitoring the tested APP When, restart the tested APP, and execute the test assignment not completed in the test script, and survey to the tested APP Examination;Wherein, APP test device test when becoming the non-viable state from existing state that records the tested APP The test assignment not yet completed in script.
7. APP test method according to any one of claim 1 to 6, which is characterized in that the configuration item further includes being It unites time calibration;The APP test method further include:
When judging the system time inaccuracy of the terminal device, the system time is calibrated;And in the system After the system time is calibrated or when judging that the system time is accurate, the test script is executed into described, and to institute State the step of tested APP is tested.
8. a kind of APP test device, which is characterized in that be installed in terminal device, the APP test device includes:
Module is obtained, for obtaining the corresponding configuration information of tested APP installed in the terminal device from server;
Parsing module for parsing to the configuration information, and obtains the corresponding configuration item of the tested APP;Wherein institute Configuration item is stated including at least test script;
Script execution module is tested for executing the test script, and to the tested APP.
9. APP test device according to claim 8, which is characterized in that the configuration item further includes log crawl, log The local maximum storage of upload and log;The APP test device further include:
Log handling module, the log generated during the test for grabbing the tested APP, and the log of crawl is stored In preset local log memory block;
First judgment module, for judge the amount of storage of log in the local log memory block whether be greater than or equal to it is described most Large buffer memory;
Uploading module, for judging that the amount of storage of log in the local log memory block is greater than in the first judgment module Or when being equal to the maximum storage, the log of the maximum storage is partitioned into from the local log memory block, and will The log being partitioned into is uploaded to the server;
First removing module, for deleting the log for being uploaded to the server from the local log memory block Fall.
10. APP test device according to claim 9, which is characterized in that the configuration item further includes that ANR is monitored, described APP test device further include:
ANR monitoring unit will be pre- for carrying out ANR monitoring to the tested APP during the test, and when listening to ANR If local abnormal memory block in ANR exception information copy to the local log memory block;Wherein, the tested APP exists ANR exception information is saved into the local abnormal memory block when generating ANR.
11. APP test device according to claim 10, which is characterized in that further include:
Second removing module, for the ANR exception information of the local log memory block will to have been copied to from the local It is deleted in abnormal memory block.
12. APP test device according to claim 8, which is characterized in that the configuration item further includes the update cycle, institute State APP test device further include:
Timing module, for notifying the acquisition module again from the server when timing arrives to the update cycle Obtain the corresponding configuration information of the tested APP;
Second judgment module, the version of the version of the configuration information for judging to reacquire and the current configuration information Whether this is consistent;The parsing module is used for when the judging result of second judgment module is inconsistent, to reacquisition The configuration information parsed and parsed after the corresponding configuration item of the tested APP;The script execution module It is also used to execute the test script parsed again, and the tested APP is tested.
13. APP test device according to claim 8, which is characterized in that the configuration item further includes survival monitoring;Institute State APP test device further include:
Survival monitoring module, for carrying out survival monitoring to the tested APP during the test, and it is described tested monitoring When APP is in non-viable state, the tested APP is restarted;
The script execution module is also used to after the tested APP is restarted, and executes the survey not completed in the test script Trial business, and the tested APP is tested.
14. the APP test device according to any one of claim 8 to 13, which is characterized in that the configuration item further includes System time calibration;The APP test device further include:
Whether time calibration module, the system time for judging the terminal device are accurate;And when judging the system Between inaccuracy when, the system time is calibrated;
The script execution module is also used to after the time calibration module calibrates the system time or in institute State time calibration unit judges go out the system time it is accurate when, execute the test script, and survey to the tested APP Examination.
CN201811230269.3A 2018-10-22 2018-10-22 APP test method and device Pending CN109446080A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811230269.3A CN109446080A (en) 2018-10-22 2018-10-22 APP test method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811230269.3A CN109446080A (en) 2018-10-22 2018-10-22 APP test method and device

Publications (1)

Publication Number Publication Date
CN109446080A true CN109446080A (en) 2019-03-08

Family

ID=65547114

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811230269.3A Pending CN109446080A (en) 2018-10-22 2018-10-22 APP test method and device

Country Status (1)

Country Link
CN (1) CN109446080A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115048307A (en) * 2022-06-17 2022-09-13 平安普惠企业管理有限公司 Weak network testing method, device, equipment and storage medium of application software

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104063305A (en) * 2013-03-18 2014-09-24 腾讯科技(深圳)有限公司 Pressure testing method, device and system for intelligent terminal software
CN104978263A (en) * 2014-04-09 2015-10-14 腾讯科技(深圳)有限公司 Mobile terminal application program test method and mobile terminal application program test system
CN106155885A (en) * 2015-03-31 2016-11-23 展讯通信(上海)有限公司 A kind of full-automatic test system and method for testing
CN106502905A (en) * 2016-10-26 2017-03-15 腾讯科技(深圳)有限公司 A kind of method of testing of application program, apparatus and system
US20180067845A1 (en) * 2016-09-08 2018-03-08 Fmr Llc Automated quality assurance testing of browser-based applications

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104063305A (en) * 2013-03-18 2014-09-24 腾讯科技(深圳)有限公司 Pressure testing method, device and system for intelligent terminal software
CN104978263A (en) * 2014-04-09 2015-10-14 腾讯科技(深圳)有限公司 Mobile terminal application program test method and mobile terminal application program test system
CN106155885A (en) * 2015-03-31 2016-11-23 展讯通信(上海)有限公司 A kind of full-automatic test system and method for testing
US20180067845A1 (en) * 2016-09-08 2018-03-08 Fmr Llc Automated quality assurance testing of browser-based applications
CN106502905A (en) * 2016-10-26 2017-03-15 腾讯科技(深圳)有限公司 A kind of method of testing of application program, apparatus and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115048307A (en) * 2022-06-17 2022-09-13 平安普惠企业管理有限公司 Weak network testing method, device, equipment and storage medium of application software

Similar Documents

Publication Publication Date Title
CN108667725B (en) Industrial soft gateway based on multiple accesses and edge calculation and implementation method
CN109460349B (en) Test case generation method and device based on log
CN112714047B (en) Industrial control protocol flow based test method, device, equipment and storage medium
CN106681913A (en) Application not responding positioning system and method
CN106155907B (en) A kind of automated testing method, device and calculate equipment
CN110069572A (en) HIVE method for scheduling task, device, equipment and storage medium based on big data platform
CN110334126A (en) Timed task processing method, device and computer equipment based on Spring MVC
CN108334370A (en) A kind of software auto-increment update upgrade method of distributed test system
CN107302476B (en) Automatic testing method and system for testing asynchronous interactive system
EP2902908A1 (en) System operation trace method in distributed system
CN107066390A (en) A kind of Dram leakage detection method and system
CN106452975A (en) Method and system for testing router
CN106897207A (en) Ui testing method and apparatus
CN104281488B (en) The method and system of server engine
CN110532184B (en) Method, device, computer equipment and storage medium for multi-scene simulation response
WO2016188077A1 (en) Burn-in test method and device
CN109388671A (en) Data processing method, device, equipment and storage medium
CN109697112A (en) Distributed intensive one-stop operating system and implementation method
CN109446080A (en) APP test method and device
CN104424099A (en) Software testing method and system
CN112965912B (en) Interface test case generation method and device and electronic equipment
CN109857672A (en) A kind of formation gathering method, device, equipment and storage medium
CN106911730A (en) A kind of cloud disk service device accesses moving method and device
CN113839991A (en) Method and device for confirming equipment information, storage medium and electronic device
CN106452905A (en) Message processing method and device

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20190308

RJ01 Rejection of invention patent application after publication