CN109522201A - A kind of method and apparatus of application program stability test - Google Patents

A kind of method and apparatus of application program stability test Download PDF

Info

Publication number
CN109522201A
CN109522201A CN201710841138.8A CN201710841138A CN109522201A CN 109522201 A CN109522201 A CN 109522201A CN 201710841138 A CN201710841138 A CN 201710841138A CN 109522201 A CN109522201 A CN 109522201A
Authority
CN
China
Prior art keywords
activity
application program
tested
case
open
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
CN201710841138.8A
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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information 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 Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201710841138.8A priority Critical patent/CN109522201A/en
Publication of CN109522201A publication Critical patent/CN109522201A/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/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
    • 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/3696Methods or tools to render software testable

Abstract

The invention discloses a kind of method and apparatus of application program stability test, are related to field of computer technology.One specific embodiment of this method includes: the source code for obtaining application program;Pre-set user's operation stream is obtained according to the source code of the application program;The application program is tested according to the user's operation stream.The problem of the problem of embodiment tests to the application program according to pre-set user's operation stream, is able to solve the test leakage page and certain pages are caught in, improves the validity of test and the coverage of test.

Description

A kind of method and apparatus of application program stability test
Technical field
The present invention relates to field of computer technology more particularly to a kind of method and apparatus of application program stability test.
Background technique
In the stability test of application program, the test side of single analog subscriber stochastic inputs is mainly used at present Formula sends pseudorandom customer incident stream to application program, realizes to application program stability test.Tester is for tested The user interface UI of application program is laid out, and designs all types of percentage of pseudorandom customer incident stream, after easy configuration parameter Start to test.
In realizing process of the present invention, at least there are the following problems in the prior art for inventor's discovery:
1. the interface deeper for path: these interfaces need precondition (such as inputting correct password) that could be interviewed It asks, and the precondition can not occur for random customer incident stream, therefore can not access the interface, cause to go out in test process The problem of existing test leakage page;
2. interface lesser for entrance: these interfaces could be accessed after needing sequence of events successively to occur, and Pseudorandom customer incident stream is it is difficult to ensure that this series of event successively occurs, therefore these interfaces of test leakage during the test Probability is very big, the problem of test leakage page occurs;
3. interface lesser for outlet: these interfaces could be accessed after needing sequence of events successively to occur, and Random customer incident stream is it is difficult to ensure that this series of event successively occurs, therefore is easy to be trapped in during the test certain In interface.
Summary of the invention
In view of this, the embodiment of the present invention provides a kind of method and apparatus of application program stability test, it is able to solve The problem of the problem of test leakage page and certain pages are caught in, improves the validity of test and the coverage of test.
To achieve the above object, according to an aspect of an embodiment of the present invention, a kind of application program stability survey is provided The method of examination, comprising:
Obtain the source code of application program;
Pre-set user's operation stream is obtained according to the source code of the application program;
The application program is tested according to the user's operation stream.
Optionally, the user's operation stream includes: home court scape use-case;The home court scape use-case includes: the application program Movable Activity access path;It is described that the application program is tested according to the user's operation stream, comprising: root According to the home court scape use-case, start the tested interface of the Activity;The tested interface is tested;Wherein, described Activity is open.
Optionally, after the source code for obtaining application program further include: pre-process, sentence to the Activity Whether the Activity that breaks is open, if it is not, then setting open for the Activity.
Optionally, if the pretreated step includes: that export exported attribute value is explicitly arranged in the Activity, Also, if exported attribute value is true true, the Activity is open, if exported attribute value is false False, then the Activity is non-open type;If the not set exported attribute value of Activity, described in judgement The whether intentional filter intent-filter of Activity, if also, the Activity have intent-filter, institute It is open for stating Activity;If it is non-open type that the Activity, which does not have intent-filter, the Activity,; True is explicitly set by the exported attribute value of the Activity of non-open type.
Optionally, the user's operation stream includes: fine scene use-case;The fine scene use-case includes: for tested The customer incident stream that interface is prerecorded;It is described that the application program is tested according to the user's operation stream, comprising: to obtain Take the movable Activity title at the tested interface;It is corresponding with the tested interface according to the Activity name acquiring Fine scene use-case;The application program is tested based on the fine scene use-case.
Optionally, the method includes testing within the scope of setting time the application program, if test process In there is application program sudden strain of a muscle and move back or application program is without response condition, then terminate to test.
Optionally, the method includes using testing tool Monkey to test the application program.
Optionally, the user's operation stream are as follows: analog subscriber flow of event and/or real user flow of event;The user behaviour Making stream includes at least one of: key-press input, touch screen input, gesture input.
To achieve the above object, according to another aspect of an embodiment of the present invention, a kind of application program stability survey is provided The device of examination, comprising: preprocessing module, data acquisition module, test module, wherein
Preprocessing module, for obtaining application source code;
Data acquisition module, for obtaining pre-set user's operation stream according to the source code of the application program;
Test module, for being tested according to the user's operation stream the application program.
Optionally, the data acquisition module is used for: obtaining home court scape use-case;The home court scape use-case includes: described answers With the access path of the movable Activity of program;It is described that the application program is tested according to the user's operation stream, It include: that the tested interface of the Activity is started according to the home court scape use-case;The tested interface is tested;Its In, the Activity is open.
Optionally, the preprocessing module is used for: after the source code for obtaining application program, being carried out to the Activity Pretreatment, judges whether the Activity is open, if it is not, then setting open for the Activity.
Optionally, the preprocessing module is used for: if export exported attribute value is explicitly arranged in the Activity, and And if exported attribute value is true true, the Activity be it is open, if exported attribute value is false false, Then the Activity is non-open type;If the not set exported attribute value of Activity, described in judgement The whether intentional filter intent-filter of Activity, if also, the Activity have intent-filter, institute It is open for stating Activity;If it is non-open type that the Activity, which does not have intent-filter, the Activity,; True is explicitly set by the exported attribute value of the Activity of non-open type.
Optionally, the data acquisition module is used for: obtaining fine scene use-case;The fine scene use-case includes: needle The real user flow of event that tested interface is prerecorded;It is described that the application program is surveyed according to the user's operation stream Examination, comprising: obtain the movable Activity title at the tested interface;It is tested according to the Activity name acquiring with described The corresponding fine scene use-case in interface;The application program is tested based on the fine scene use-case.
Optionally, the test module is used for: being tested within the scope of setting time the application program, if test Occur application program sudden strain of a muscle in the process to move back or application program is without response condition, then terminates to test.
Optionally, the test module is used for: being tested using testing tool Monkey the application program.
Optionally, the user's operation stream are as follows: analog subscriber flow of event and/or real user flow of event;The user behaviour Making stream includes at least one of: key-press input, touch screen input, gesture input.
To achieve the above object, according to an embodiment of the present invention in another aspect, providing a kind of electronic equipment, comprising: extremely A few processor;And the memory being connect at least one described processor communication;Wherein, the memory is stored with The instruction that can be executed by one processor, described instruction are executed by least one described processor, so that described at least one The method that a processor is able to carry out application program stability test provided by the embodiment of the present invention.
To achieve the above object, according to an embodiment of the present invention in another aspect, providing a kind of computer-readable storage medium Matter, the computer-readable recording medium storage computer instruction, the computer instruction is for making the computer execute sheet The method of application program stability test provided by inventing.
According to the technique and scheme of the present invention, one embodiment in foregoing invention has the following advantages that or the utility model has the advantages that root The problem of application program is tested, is able to solve the test leakage page according to pre-set user's operation stream and certain pages The problem of being caught in improves the validity of test and the coverage of test.
Detailed description of the invention
Attached drawing for a better understanding of the present invention, does not constitute an undue limitation on the present invention.Wherein:
Fig. 1 is the schematic diagram of the main flow of the method for application program stability test according to an embodiment of the present invention;
Fig. 2 is that pretreated main flow is shown in the method for application program stability test according to an embodiment of the present invention It is intended to;
Fig. 3 is the payment flow schematic diagram in application program;
Fig. 4 is the flow diagram for carrying out being trapped in WebView using the prior art in test process;
Fig. 5 is the main flow according to an embodiment of the present invention tested according to home court scape use-case the application program Schematic diagram;
Fig. 6 is the main stream that the fine scene use-case of basis according to an embodiment of the present invention tests the application program The schematic diagram of journey;
Fig. 7 is the schematic diagram of the main modular of the device of application program stability test according to an embodiment of the present invention;
Fig. 8 is that the embodiment of the present invention can be applied to exemplary system architecture figure therein;
Fig. 9 is adapted for the structural representation of the computer system for the terminal device or server of realizing the embodiment of the present invention Figure.
Specific embodiment
Below in conjunction with attached drawing, an exemplary embodiment of the present invention will be described, including the various of the embodiment of the present invention Details should think them only exemplary to help understanding.Therefore, those of ordinary skill in the art should recognize It arrives, it can be with various changes and modifications are made to the embodiments described herein, without departing from scope and spirit of the present invention.Together Sample, for clarity and conciseness, descriptions of well-known functions and structures are omitted from the following description.
Fig. 1 is the schematic diagram of the main flow of the method for application program stability test according to an embodiment of the present invention;
As shown in Figure 1, a kind of method of application program stability test of the embodiment of the present invention includes:
Step S101: the source code of application program is obtained;
Step S102: pre-set user's operation stream is obtained according to the source code of the application program;
Step S103: the application program is tested according to the user's operation stream.
The problem of application program is tested, is able to solve the test leakage page according to pre-set user's operation stream The problem of being caught in certain pages improves the validity of test and the coverage of test.
In the embodiment of the present invention, after the source code for obtaining application program further include: carried out to the Activity Pretreatment, judges whether the Activity is open, if it is not, being then set on the Activity of the application program Put formula.
If Activity is non-open type, it is likely that lead to the Activity since the Activity can not be accessed Corresponding tested interface is by test leakage.In the present embodiment, by setting open for Activity, allow Activity straight It connects accessed, avoids the generation of above situation.
Fig. 2 is that pretreated main flow is shown in the method for application program stability test according to an embodiment of the present invention It is intended to;
If as shown in Fig. 2, the pretreated step includes: that export exported attribute is explicitly arranged in the Activity Value, if also, exported attribute value is true true, the Activity is open, if exported attribute value is false False, then the Activity is non-open type;If the not set exported attribute value of Activity, described in judgement The whether intentional filter intent-filter of Activity, if also, the Activity have intent-filter, institute It is open for stating Activity;If it is non-open type that the Activity, which does not have intent-filter, the Activity,; True is explicitly set by the exported attribute value of the Activity of non-open type.
By explicitly setting true for the exported attribute value of the Activity of non-open type, efficient can reach To pretreated purpose, Activity is open after pretreatment.
Following illustrate can be carried out about export exported: exporting the attribute of exported for describing one Can Activity be called directly by the external world.Under normal circumstances, or it is in security consideration, Activity generally cannot be by the external world It calls, it can only program intrinsic call.True is explicitly set by the exported attribute value of Activity, other programs are just in this way This Activity can directly be accessed.
Can carry out following illustrate about filter intent-filter is intended to: intent-filter defines this Activity can receive and which Intent responded;The Intent is a system component, and number can be transmitted between program According to.
The preprocessing process can also include: compiling source code, coverage rate statistics codes, test information collect code with And other codes for helping to test information collection.
The interface deeper for path needs precondition (such as inputting correct password) that could be accessed, and random Customer incident stream the precondition can not occur, therefore the interface can not be accessed, lead to occur test leakage page in test process The problem of face.As shown in figure 3, paying the successful page is the page just occurred after actually placing an order and paying successfully, and In the test of the prior art, since delivery operation (payment needs payment cipher) can not occur, so paying successful page Face may never be tested and arrive.
Interface lesser for entrance, could be accessed after needing sequence of events successively to occur, and pseudorandom use Family flow of event is it is difficult to ensure that this series of event successively occurs, therefore the probability at these interfaces of test leakage is very during the test Greatly, there is the problem of test leakage page.For example, to enter " microblogging personal homepage ", it is necessary to which " I "-for successively clicking microblogging homepage be left " user's head portrait " at upper angle, and due to the randomness of pseudorandom customer incident stream, the probability in the two places in continuity point Very little, thus test to interface " microblogging personal homepage " probability also with regard to very little or even the test leakage page.
In the embodiment of the present invention, the user's operation stream includes: home court scape use-case;The home court scape use-case includes: described The access path of the movable Activity of application program;It is described that the application program is surveyed according to the user's operation stream Examination, comprising: according to the home court scape use-case, start the tested interface of the Activity;The tested interface is tested; The Activity is open.
The corresponding tested interface Activity is started according to home court scape use-case in the embodiment of the present invention, is able to solve test leakage page The problem of face, improves the validity of test and the coverage of test.
Wherein, can carry out following illustrate about movable Activity: Activity is responsible and user in application program Interactive component provides an interface, it can show some controls above or monitor and handle the event of user and make Response.
Interface lesser for outlet, could be accessed after needing sequence of events successively to occur, and random user Flow of event is it is difficult to ensure that this series of event successively occurs, therefore is easy to be trapped in certain interfaces during the test.Such as Shown in Fig. 4, the probability of the close button " X " of webpage clicking view WebView is very small, and test process is caused to be trapped in this In WebView;When in the WebView including the link of other WebView, during pseudorandom customer incident stream is probably put The link of other WebView, so on circulate, so that test process is trapped in WebView always.
In the embodiment of the present invention, the user's operation stream may include: fine scene use-case;The fine scene use-case packet It includes: the customer incident stream prerecorded for tested interface;It is described that the application program is carried out according to the user's operation stream Test, comprising: obtain the movable Activity title at the tested interface;According to the Activity name acquiring and the quilt Survey the corresponding fine scene use-case in interface;The application program is tested based on the fine scene use-case.
The application program is tested based on the fine scene use-case in the embodiment of the present invention, is able to solve and is surveying The problem of being caught in certain pages of appearance, improves the validity of test and the coverage of test during examination.
The granularity of home court scape use-case is thicker, can open tested interface by home court scape use-case, can be, but not limited to directly Adb (adb shell am start) order in call instruction row tool opens tested interface by setting path.It is led with electric business For domain, it is assumed that certain electric business software app has several interfaces: homepage, commodity details, shopping cart, clearing, and home court scape use-case can be by It is configured according to such as under type:
Home court scape use-case 1: enter homepage (app being opened, into homepage);
Home court scape use-case 2: enter commodity details (app being opened, into homepage, into commodity details);
Home court scape use-case 3: enter shopping cart (app being opened, into homepage, into commodity details, into cart page);
Home court scape use-case 4: shopping cart (opening app, into homepage, open cart page) is directly entered from homepage.
Fine scene is for home court scape use-case, and operation granularity is thinner.Fine scene use-case is by a system Column customer incident stream composition does some fine operations on tested interface.By taking electric business field as an example, for certain electric business software Following fine scene use-case can be set in the item detail page of app: color, the specification of commodity are chosen, selection purchase commodity Quantity clicks " shopping cart is added ", into cart page.For another example some webpage view WebView can be set Following fine scene use-case: the close button " X " in the upper right corner webpage clicking view WebView closes WebView.
In the embodiment of the present invention, the method includes testing within the scope of setting time the application program.It is logical Test result can be obtained within reasonable time by crossing setting time range, more effectively achieve the purpose that test, improve test Efficiency.
In the embodiment of the present invention, the method includes using testing tool Monkey to test the application program. The embodiment of the present invention is used in combination Monkey and is tested, and can more effectively achieve the purpose that test, improve the efficiency of test.
Can carry out following illustrate about Monkey: Monkey is the tool for being used for stability test, and Monkey is surveyed The key-press input of analog subscriber, touch screen input, the operation behaviors such as gesture input are tried, and send these operation rows to application program For.
Fig. 5 is the main flow according to an embodiment of the present invention tested according to home court scape use-case the application program Schematic diagram.As shown in figure 5, obtaining home court scape use-case;Current home court scape use-case is traversed, into tested interface;To tested interface It is tested, can be, but not limited to operation testing tool Monkey10 minutes;Next home court scape use-case is obtained, until having traversed All home court scape use-cases.
Fig. 6 is the main stream that the fine scene use-case of basis according to an embodiment of the present invention tests the application program The schematic diagram of journey.As shown in fig. 6, obtaining tested interface;Obtain the movable Activity title at the tested interface;According to described Activity name acquiring fine scene use-case corresponding with the tested interface;Based on fine scene use-case to tested interface into Row test, can be, but not limited to operation testing tool Monkey5 minutes.
The embodiment of the present invention can be, but not limited to that MonkeyRunner is called to execute fine scene use-case;About MonkeyRunner can be carried out following illustrate: MonkeyRunner is that a kind of automated test tool can carry out user's operation The recording and playback of event.
The user's operation stream are as follows: analog subscriber flow of event and/or real user flow of event;The user's operation stream includes At least one of: key-press input, touch screen input, gesture input.
The flow of event that the analog subscriber flow of event is made of random simulated operation behavior;
The flow of event that the real user flow of event is made of true operation behavior.
After test process, test data can be collected and be analyzed, is better understood by the effect of test, helps to understand The stability of application program.If occur in test process application program sudden strain of a muscle move back or application program without response the case where, terminate survey Examination, and the situation is sent to client.
Test data includes following one or more: executing the log information exported during analog subscriber flow of event, answers The interface screenshot of the log information, coverage rate, application program that are exported when being run with program;Wherein, analog subscriber flow of event is executed The log information exported in the process can be with but including being not limited to following one or more: the type of the analog subscriber event of execution, The execution state of analog subscriber flow of event;Coverage rate is pretreated using journey for what is after the completion of entire test process, run The percentage of sequence source code;The log information that application program exports when running can include but is not limited to: the operation of application program Status information.
Fig. 7 is the schematic diagram of the main modular of the device of application program stability test according to an embodiment of the present invention.
As shown in fig. 7, a kind of device 700 of application program stability test of the embodiment of the present invention includes: pretreatment mould Block 701, data acquisition module 702, test module 703, wherein
Preprocessing module 701, for obtaining application source code;
Data acquisition module 702, for obtaining pre-set user's operation stream according to the source code of the application program;
Test module 703, for being tested according to the user's operation stream the application program.
The problem of application program is tested, is able to solve the test leakage page according to pre-set user's operation stream The problem of being caught in certain pages improves the validity of test and the coverage of test.
In the present embodiment, the data acquisition module 702 is used for: obtaining home court scape use-case;The home court scape use-case includes: The access path of the movable Activity of the application program;The test module 703 is used for: according to the home court scape use-case, Start the tested interface of the Activity;The tested interface is tested;Wherein, the Activity is open.
Start the tested interface of Activity according to home court scape use-case and the tested interface is tested, is able to solve The problem of test leakage page, improves the validity of test and the coverage of test.
In the present embodiment, the preprocessing module 701 is used for: after the source code for obtaining application program, to described Activity is pre-processed, and judges whether the Activity is open, if it is not, then setting the Activity to It is open.
By setting open for Activity, the external world can directly access Activity.
In the present embodiment, the preprocessing module 701 is used for: if export is explicitly arranged in the Activity, exported belongs to Property value, if also, exported attribute value is true true, the Activity be it is open, if exported attribute value is False false, then the Activity is non-open type;If the not set exported attribute value of Activity, judges institute State the whether intentional filter intent-filter of Activity, if also, the Activity have intent-filter, The Activity is open;If it is non-opening that the Activity, which does not have intent-filter, the Activity, Formula;True is explicitly set by the exported attribute value of the Activity of non-open type.
By explicitly setting true for the exported attribute value of the Activity of non-open type, efficient can reach To pretreated purpose, Activity is open after pretreatment.
In the present embodiment, the data acquisition module 702 is used for: obtaining fine scene use-case;The fine scene use-case It include: the customer incident stream prerecorded for tested interface;The test module 703 is used for: obtaining the tested interface Movable Activity title;According to the Activity name acquiring fine scene use-case corresponding with the tested interface;Base The application program is tested in the fine scene use-case.
Based on the fine scene use-case application program is tested, is able to solve and occurs during the test The problem of being caught in certain pages improves the validity of test and the coverage of test.
In the present embodiment, the test module 703 is used for: being surveyed within the scope of setting time to the application program Examination.Test result can be obtained within reasonable time by setting time range, more effectively achievees the purpose that test, improved The efficiency of test.
In the present embodiment, the test module 703 is used for: being surveyed using testing tool Monkey to the application program Examination.Monkey is used in combination to be tested, can more effectively achieve the purpose that test, improve the efficiency of test.
Fig. 8 is shown can be using the exemplary of the method or apparatus of the application program stability test of the embodiment of the present invention System architecture 800.
As shown in figure 8, system architecture 800 may include terminal device 801,802,803, network 804 and server 805. Network 804 between terminal device 801,802,803 and server 805 to provide the medium of communication link.Network 804 can be with Including various connection types, such as wired, wireless communication link or fiber optic cables etc..
User can be used terminal device 801,802,803 and be interacted by network 804 with server 805, to receive or send out Send message etc..Various telecommunication customer end applications, such as the application of shopping class, net can be installed on terminal device 801,802,803 The application of page browsing device, searching class application, instant messaging tools, mailbox client, social platform software etc..
Terminal device 801,802,803 can be the various electronic equipments with display screen and supported web page browsing, packet Include but be not limited to smart phone, tablet computer, pocket computer on knee and desktop computer etc..
Server 805 can be to provide the server of various services, such as utilize terminal device 801,802,803 to user The shopping class website browsed provides the back-stage management server supported.Back-stage management server can believe the product received The data such as breath inquiry request carry out the processing such as analyzing, and processing result is fed back to terminal device.
It should be noted that application program stability test method is generally by server provided by the embodiment of the present invention 805 execute, and correspondingly, application program stability test device is generally positioned in server 805.
It should be understood that the number of terminal device, network and server in Fig. 8 is only schematical.According to realization need It wants, can have any number of terminal device, network and server.
According to an embodiment of the invention, the present invention also provides a kind of electronic equipment and a kind of readable storage medium storing program for executing.
Electronic equipment of the invention includes: at least one processor;And it is connect at least one described processor communication Memory;Wherein, the memory is stored with the instruction that can be executed by one processor, described instruction by it is described at least One processor executes, so that at least one described processor executes the side of application program stability test provided by the present invention Method.
Computer readable storage medium of the invention, the computer-readable recording medium storage computer instruction are described The method that computer instruction is used to that the computer to be made to execute application program stability test provided by the present invention.
Below with reference to Fig. 9, it illustrates the computer systems 900 for the terminal device for being suitable for being used to realize the embodiment of the present invention Structural schematic diagram.Terminal device shown in Fig. 9 is only an example, function to the embodiment of the present invention and should not use model Shroud carrys out any restrictions.
As shown in figure 9, computer system 900 includes central processing module (CPU) 901, it can be read-only according to being stored in Program in memory (ROM) 902 or be loaded into the program in random access storage device (RAM) 903 from storage section 908 and Execute various movements appropriate and processing.In RAM903, also it is stored with system 900 and operates required various programs and data. CPU901, ROM902 and RAM903 are connected with each other by bus 904.Input/output (I/O) interface 905 is also connected to bus 904。
I/O interface 905 is connected to lower component: the importation 906 including keyboard, mouse etc.;It is penetrated including such as cathode The output par, c 907 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 908 including hard disk etc.; And the communications portion 909 of the network interface card including LAN card, modem etc..Communications portion 909 via such as because The network of spy's net executes communication process.Driver 910 is also connected to I/O interface 905 as needed.Detachable media 911, such as Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 910, in order to read from thereon Computer program be mounted into storage section 908 as needed.
Particularly, disclosed embodiment, the process described above with reference to flow chart may be implemented as counting according to the present invention Calculation machine software program.For example, embodiment disclosed by the invention includes a kind of computer program product comprising be carried on computer Computer program on readable medium, the computer program include the program code for method shown in execution flow chart.? In such embodiment, which can be downloaded and installed from network by communications portion 909, and/or from can Medium 911 is dismantled to be mounted.When the computer program is executed by central processing module (CPU) 901, system of the invention is executed The above-mentioned function of middle restriction.
It should be noted that computer-readable medium shown in the present invention can be computer-readable signal media or meter Calculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but not Be limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.Meter The more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, just of one or more conducting wires Taking formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only storage Device (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device, Or above-mentioned any appropriate combination.In the present invention, computer readable storage medium can be it is any include or storage journey The tangible medium of sequence, the program can be commanded execution system, device or device use or in connection.And at this In invention, computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal, Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for By the use of instruction execution system, device or device or program in connection.Include on computer-readable medium Program code can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF etc. are above-mentioned Any appropriate combination.
Flow chart and block diagram in attached drawing are illustrated according to the system of various embodiments of the invention, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of above-mentioned module, program segment or code include one or more Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical On can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it wants It is noted that the combination of each box in block diagram or flow chart and the box in block diagram or flow chart, can use and execute rule The dedicated hardware based systems of fixed functions or operations is realized, or can use the group of specialized hardware and computer instruction It closes to realize.
Being described in module involved in the embodiment of the present invention can be realized by way of software, can also be by hard The mode of part is realized.Described module also can be set in the processor, for example, can be described as: a kind of processor, packet It includes: preprocessing module, data acquisition module, test module.Wherein, the title of these modules under certain conditions constitute pair The restriction of the module itself, for example, preprocessing module is also described as " obtaining the module of application source code ".
As on the other hand, the present invention also provides a kind of computer-readable medium, which be can be Included in equipment described in above-described embodiment;It is also possible to individualism, and without in the supplying equipment.Above-mentioned calculating Machine readable medium carries one or more program, when said one or multiple programs are executed by the equipment, makes Obtaining the equipment includes: the source code that step S101 obtains application program;Step S102 is obtained according to the source code of the application program Take pre-set user's operation stream;Step S103 tests the application program according to the user's operation stream.
The method of application program stability test according to an embodiment of the present invention can be seen that by sending to application program The technical issues of pre-set customer incident stream be accessed directly all interfaces can, overcome test leakage certain pages, Each interface can be tested, and then can achieve the technical effect for improving test method validity.It overcomes and is testing simultaneously Process is trapped in the problem in certain interfaces, reaches the technical effect for improving test program coverage, improves test method Validity.
Above-mentioned specific embodiment, does not constitute a limitation on the scope of protection of the present invention.Those skilled in the art should be bright It is white, design requirement and other factors are depended on, various modifications, combination, sub-portfolio and substitution can occur.It is any Made modifications, equivalent substitutions and improvements etc. within the spirit and principles in the present invention, should be included in the scope of the present invention Within.

Claims (12)

1. a kind of method of application program stability test characterized by comprising
Obtain the source code of application program;
Pre-set user's operation stream is obtained according to the source code of the application program;
The application program is tested according to the user's operation stream.
2. the method according to claim 1, wherein the user's operation stream includes: home court scape use-case;The master Scene use-case includes: the access path of the movable Activity of the application program;
It is described that the application program is tested according to the user's operation stream, comprising:
According to the home court scape use-case, start the tested interface of the Activity;
The tested interface is tested;
Wherein, the Activity is open.
3. according to the method described in claim 2, it is characterized in that, after the source code for obtaining application program further include:
The Activity is pre-processed, judges whether the Activity is open, if it is not, then will be described Activity is set as open.
4. according to the method described in claim 3, it is characterized in that, the pretreated step includes:
If export exported attribute value is explicitly arranged in the Activity, also,
If exported attribute value is true true, the Activity be it is open,
If exported attribute value is false false, the Activity is non-open type;
If the not set exported attribute value of Activity, judges the whether intentional filter of the Activity Intent-filter, also,
If it is open that the Activity, which has intent-filter, the Activity,;
If it is non-open type that the Activity, which does not have intent-filter, the Activity,;
True is explicitly set by the exported attribute value of the Activity of non-open type.
5. method according to claim 1 or 2, which is characterized in that the user's operation stream includes: fine scene use-case; The fine scene use-case includes: the customer incident stream prerecorded for tested interface;
It is described that the application program is tested according to the user's operation stream, comprising:
Start the tested interface, and obtains the movable Activity title at the tested interface;
According to the Activity name acquiring fine scene use-case corresponding with the tested interface;
The tested interface is tested based on the fine scene use-case.
6. a kind of device of application program stability test characterized by comprising preprocessing module, data acquisition module, survey Die trial block, wherein
Preprocessing module, for obtaining application source code;;
Data acquisition module, for obtaining pre-set user's operation stream according to the source code of the application program;
Test module, for being tested according to the user's operation stream the application program.
7. device according to claim 6, which is characterized in that the data acquisition module is used for:
Obtain home court scape use-case;The home court scape use-case includes: the access path of the movable Activity of the application program;
It is described that the application program is tested according to the user's operation stream, comprising:
According to the home court scape use-case, start the tested interface of the Activity;
The tested interface is tested;
Wherein, the Activity is open.
8. device according to claim 7, which is characterized in that the preprocessing module is used for:
Obtain application program source code after, the Activity is pre-processed, judge the Activity whether be It is open, if it is not, then setting open for the Activity of the application program.
9. device according to claim 8, which is characterized in that the preprocessing module is used for:
If export exported attribute value is explicitly arranged in the Activity, also,
If exported attribute value is true true, the Activity be it is open,
If exported attribute value is false false, the Activity is non-open type;
If the not set exported attribute value of Activity, judges the whether intentional filter of the Activity Intent-filter, also,
If it is open that the Activity, which has intent-filter, the Activity,;
If it is non-open type that the Activity, which does not have intent-filter, the Activity,;
True is explicitly set by the exported attribute value of the Activity of non-open type.
10. device according to claim 6 or 7, which is characterized in that the data acquisition module is used for:
Obtain fine scene use-case;The fine scene use-case includes: the customer incident stream prerecorded for tested interface;
It is described that the application program is tested according to the user's operation stream, comprising:
Start the tested interface, and obtains the movable Activity title at the tested interface;
According to the Activity name acquiring fine scene use-case corresponding with the tested interface;
The tested interface is tested based on the fine scene use-case.
11. a kind of electronic equipment characterized by comprising
At least one processor;And
The memory being connect at least one described processor communication, for storing one or more programs;
When one or more of programs are executed by least one described processor, so that one or more of processors are realized Such as method as claimed in any one of claims 1 to 5.
12. a kind of computer-readable medium, is stored thereon with computer program, which is characterized in that described program is held by processor Such as method as claimed in any one of claims 1 to 5 is realized when row.
CN201710841138.8A 2017-09-18 2017-09-18 A kind of method and apparatus of application program stability test Pending CN109522201A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710841138.8A CN109522201A (en) 2017-09-18 2017-09-18 A kind of method and apparatus of application program stability test

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710841138.8A CN109522201A (en) 2017-09-18 2017-09-18 A kind of method and apparatus of application program stability test

Publications (1)

Publication Number Publication Date
CN109522201A true CN109522201A (en) 2019-03-26

Family

ID=65767938

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710841138.8A Pending CN109522201A (en) 2017-09-18 2017-09-18 A kind of method and apparatus of application program stability test

Country Status (1)

Country Link
CN (1) CN109522201A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110245086A (en) * 2019-06-19 2019-09-17 北京字节跳动网络技术有限公司 Application program stability test method, device and equipment
CN111581110A (en) * 2020-04-16 2020-08-25 贝壳技术有限公司 Method, device and system for detecting accuracy of service data and storage medium
CN112241356A (en) * 2019-07-16 2021-01-19 腾讯科技(深圳)有限公司 Page testing method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150178180A1 (en) * 2013-12-23 2015-06-25 International Business Machines Corporation Creating trace data from recent software output and activity
CN104915290A (en) * 2015-05-28 2015-09-16 小米科技有限责任公司 Application testing method and device
CN105740144A (en) * 2016-01-27 2016-07-06 浪潮(北京)电子信息产业有限公司 Automated testing method and system for Android mobile Terminal
CN105868105A (en) * 2016-03-24 2016-08-17 厦门美图移动科技有限公司 Application traversal testing method and device, and mobile terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150178180A1 (en) * 2013-12-23 2015-06-25 International Business Machines Corporation Creating trace data from recent software output and activity
CN104915290A (en) * 2015-05-28 2015-09-16 小米科技有限责任公司 Application testing method and device
CN105740144A (en) * 2016-01-27 2016-07-06 浪潮(北京)电子信息产业有限公司 Automated testing method and system for Android mobile Terminal
CN105868105A (en) * 2016-03-24 2016-08-17 厦门美图移动科技有限公司 Application traversal testing method and device, and mobile terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
GORGLE: "结合源码谈谈Activity的exported属性", 《CSDN博客,HTTPS://BLOG.CSDN.NET/GORGLE/ARTICLE/DETAILS/51420586》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110245086A (en) * 2019-06-19 2019-09-17 北京字节跳动网络技术有限公司 Application program stability test method, device and equipment
CN110245086B (en) * 2019-06-19 2023-05-16 北京字节跳动网络技术有限公司 Application program stability testing method, device and equipment
CN112241356A (en) * 2019-07-16 2021-01-19 腾讯科技(深圳)有限公司 Page testing method, device, equipment and storage medium
CN111581110A (en) * 2020-04-16 2020-08-25 贝壳技术有限公司 Method, device and system for detecting accuracy of service data and storage medium
CN111581110B (en) * 2020-04-16 2023-08-15 贝壳技术有限公司 Service data accuracy detection method, device, system and storage medium

Similar Documents

Publication Publication Date Title
USRE47896E1 (en) System and method for tracking web interactions with real time analytics
CN108322473B (en) User behavior analysis method and device
CN108334449A (en) A kind of method and apparatus of interface automatic test
CN109426593A (en) The method and apparatus of automatic evaluation system performance
CN112559301B (en) Service processing method, storage medium, processor and electronic device
CN109522201A (en) A kind of method and apparatus of application program stability test
CN106911801A (en) The method and information transmission system of association user information
CN109002440A (en) Method, apparatus and system for big data multidimensional analysis
CN109002385A (en) Method for testing pressure and device for data flow system
CN107635001A (en) Web scripts abnormality eliminating method and device
CN107517251A (en) Information-pushing method and device
CN109684571A (en) A kind of collecting method and device, storage medium
CN109284198A (en) A kind of method and apparatus verifying data
CN109558323A (en) For debugging system, the method and apparatus of the page
CN109947811A (en) Generic features library generating method and device, storage medium, electronic equipment
CN109145027A (en) Data statistical approach, device, equipment and computer readable storage medium
CN109992496A (en) A kind of data processing method and device for automatic test
CN108875355A (en) A kind of control method and device of access authority
CN109471976A (en) Processing method, device, electronic equipment and the storage medium of web page operation data
CN108182180A (en) For generating the method and apparatus of information
CN109002389A (en) The method and apparatus of page automatic test
CN110366097A (en) A kind of method, apparatus and electronic equipment based on location information identification risk
CN110457219A (en) The method and apparatus of selection of time when a kind of test script is recorded
CN109685628A (en) Information sharing apparatus and system
CN108959636A (en) Data processing method, device, system, computer-readable medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20190326

RJ01 Rejection of invention patent application after publication