CN105224457B - A kind of test frame implementation method and device - Google Patents

A kind of test frame implementation method and device Download PDF

Info

Publication number
CN105224457B
CN105224457B CN201510633970.XA CN201510633970A CN105224457B CN 105224457 B CN105224457 B CN 105224457B CN 201510633970 A CN201510633970 A CN 201510633970A CN 105224457 B CN105224457 B CN 105224457B
Authority
CN
China
Prior art keywords
test
application
agent
interface
calling
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.)
Active
Application number
CN201510633970.XA
Other languages
Chinese (zh)
Other versions
CN105224457A (en
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 Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing 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 Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201510633970.XA priority Critical patent/CN105224457B/en
Publication of CN105224457A publication Critical patent/CN105224457A/en
Application granted granted Critical
Publication of CN105224457B publication Critical patent/CN105224457B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a kind of test frame implementation method and device, this method to include:Agent is injected into the Android operation system of test intelligent terminal;Application to be measured is run on the intelligent terminal, and the test program by encapsulating test logic tests the application to be measured;The test program tests the application according to the related content by calling the Agent to obtain the related content of the application;There is provided expansion interface so that user can be extended by test logic of the expansion interface to the test program.Method of this programme by being injected into Agent in operating system, get the operating right of system level, application to be measured can not only be operated, also other non-applications to be measured can be obtained to be operated, so that the test frame that this programme provides is not bound with application to be measured, there is striding course.

Description

A kind of test frame implementation method and device
Technical field
The present invention relates to internet technical field of measurement and test, and in particular to a kind of test frame implementation method and device.
Background technology
In the prior art, Android system is applied mostly to the test frame of the application on intelligent terminal An object of Instrumentation, limitation caused by this object are:When application to be measured starts, which treats with this Survey application to be directly bound, the operation of the related content to application to be measured is realized by this binding so that the operation only office It is limited to application to be measured in itself, if there is the execution logic interacted with other application in application to be measured, in the prior art This test frame can not test to such execution logic test.
However, with the continuous development of Internet technology, more and more applications have interactive function, therefore, how real It is current urgent problem to be solved now across the test frame of application.
The content of the invention
In view of the above problems, it is proposed that the present invention overcomes the above problem in order to provide one kind or solves at least in part State a kind of test frame implementation method and device of problem.
According to one aspect of the present invention, there is provided a kind of test frame implementation method, this method include:
Agent is injected into the Android operation system of test intelligent terminal;
Run application to be measured on the intelligent terminal, and by encapsulate the test program of test logic to it is described it is to be measured should With being tested;
The test program is by calling the Agent to obtain the related content of the application, according to the related content The application is tested;
There is provided expansion interface so that user can be expanded by test logic of the expansion interface to the test program Exhibition.
Alternatively, this method further comprises:
When the operation logic of the application with another using associating when, the test program is by calling the generation Reason program starts another application, and by calling the Agent to obtain the related implementing result of another application, To realize the test that associated operation logic occurs with another application to the application.
Alternatively, the Agent includes Hook functions, is obtained by Hook functions and operates in the test intelligence The related content of application in terminal.
Alternatively, for the test program by calling the Agent to obtain the related content of the application, foundation should Related content carries out test to the application to be included:
The test program verifies that this specifies text by calling the Agent to intercept and capture the specified file in the application It whether there is given content in part.
Alternatively, for the test program by calling the Agent to obtain the related content of the application, foundation should Related content carries out test to the application to be included:
The test program is by calling the Agent to intercept and capture the interface information of the application, according to the interface information Trigger the control on the interface.
Alternatively, it is described control on the interface is triggered according to the interface information to include:
The primary triggering function of the control on the interface is called to trigger the control;
Alternatively,
Simulation triggers the behavior of the control on the interface, and the triggering command of the control is sent to the application.
Alternatively, this method further comprises:
The test result of the application is recorded, generates test report;
Test report is sent to the user for submitting test.
According to another aspect of the present invention, there is provided a kind of test frame realization device, the device include:
Injection unit, suitable for Agent is injected into the Android operation system of test intelligent terminal;
Test cell, is suitably packaged test logic, when it is to be measured apply run on the intelligent terminal when, according to encapsulation Test logic tests the application to be measured;During the test, by calling the Agent to obtain the application Related content, the application is tested according to the related content;
Extended interface unit, receives extended instruction of the user to the test logic, according to extended instruction to test cell In test logic be extended.
Alternatively, the test cell, is further adapted for operation logic when the application with another using closing During connection, start this another application by calling the Agent, and by calling the Agent to obtain this another The related implementing result of application, to realize the test that associated operation logic occurs with another application to the application.
Alternatively, the Agent includes Hook functions, is obtained by Hook functions and operates in the test intelligence The related content of application in terminal.
Alternatively, the test cell, suitable for by calling the Agent to intercept and capture the specified file in the application, Verify and whether there is given content in the specified file.
Alternatively, the test cell, suitable for by calling the Agent to intercept and capture the interface information of the application, root The control on the interface is triggered according to the interface information.
Alternatively, the test cell, suitable for calling the primary triggering function of the control on the interface to trigger the control; Alternatively, triggering the behavior of the control on the interface suitable for simulation, the triggering command of the control is sent to the application.
Alternatively, which further comprises:
Reporting unit, suitable for being recorded to the test result of the application, generates test report;Test report is sent To the user for submitting test.
It can be seen from the above, for operating in the application to be measured on intelligent terminal, technical solution provided by the invention passes through envelope The cooperation for having filled the test program of test logic and being injected between the Agent in the operating system of intelligent terminal, realizes A kind of test frame tested application to be measured;Wherein, survey of the expansion interface to being encapsulated in test program can also be passed through Examination logic is defined.Compared with prior art, method of this programme by being injected into Agent in operating system, obtains To the operating right of system level, application to be measured can not only be operated, can also obtain other non-applications to be measured and carry out Operation so that the test frame that this programme provides is not bound with application to be measured, is had the characteristics that striding course, can not only be tested and treat The operation logic using therein is surveyed, the operation logic to be measured applied and interacted with other application can also be tested.
Described above is only the general introduction of technical solution of the present invention, in order to better understand the technological means of the present invention, And can be practiced according to the content of specification, and in order to allow above and other objects of the present invention, feature and advantage can Become apparent, below especially exemplified by the embodiment of the present invention.
Brief description of the drawings
By reading the detailed description of hereafter preferred embodiment, it is various other the advantages of and benefit it is common for this area Technical staff will be clear understanding.Attached drawing is only used for showing the purpose of preferred embodiment, and is not considered as to the present invention Limitation.And in whole attached drawing, identical component is denoted by the same reference numerals.In the accompanying drawings:
Fig. 1 shows a kind of test frame implementation method flow chart according to an embodiment of the invention;
Fig. 2 shows a kind of test frame realization device schematic diagram according to an embodiment of the invention;
Fig. 3 shows a kind of test frame realization device schematic diagram in accordance with another embodiment of the present invention.
Embodiment
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although the disclosure is shown in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here Limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure Completely it is communicated to those skilled in the art.
Fig. 1 shows a kind of test frame implementation method flow chart according to an embodiment of the invention.As shown in Figure 1, This method includes:
Step S110, Agent is injected into the Android operation system of test intelligent terminal.
In this step, Agent is injected into operating system so that operating system will not only add when starting The primary secondary file of operating system is carried, also to load the content of Agent, realizes that Agent is first under system environments Beginningization environment layout, prepares for follow-up test.For example, the Jar bags in system loads Agent, in loading procedure, Itself environment of the Jar initialization packets, the file for needing to use in operational process is placed under the file path specified.
Step S120, runs application to be measured on intelligent terminal, and by encapsulating the test program of test logic to be measured Using being tested.
Step S130, test program is by calling Agent to obtain the related content of application, according to the related content pair Using being tested.
Step S140, there is provided expansion interface so that user can pass through test logic of the expansion interface to test program It is extended.
As it can be seen that for operating in the application to be measured on intelligent terminal, the method shown in Fig. 1 is by encapsulating test logic Test program and the cooperation being injected between the Agent in the operating system of intelligent terminal, realize one kind to application to be measured The test frame tested;Wherein, the test logic encapsulated in test program can also be defined by expansion interface. Compared with prior art, method of this programme by being injected into Agent in operating system, gets the behaviour of system level Make authority, application to be measured can not only be operated, can also obtain other non-applications to be measured and be operated so that this programme The test frame of offer is not bound with application to be measured, has the characteristics that striding course, can not only be tested and to be measured be applied therein Operation logic, can also test and to be measured apply the operation logic that is interacted with other application.
Specifically, the Agent in the operating system of this programme injection intelligent terminal includes Hook functions, then shown in Fig. 1 Method in by call Agent obtain application related content refer to:Obtained by Hook functions and operate in the test With the related content of the application on intelligent terminal.And by calling Agent to obtain this another in the method shown in Fig. 1 The related implementing result of application refers to:The related implementing result of another application is obtained by Hook functions.Wherein, due to Play a role afterwards with operation before the process normal operation that Hook functions can be in systems, therefore injection includes in systems Hook functions and pass through the embodiment of the related content that Hook functions obtain application can't normal procedure in influence system Operation;For example, obtaining the execution method A of application by Hook functions, which is before executive mode A is performed or holds Carried out after row, do not interfere with the normal execution of executive mode A.
The method shown in Fig. 1 has been previously mentioned by the way that Agent is injected into operating system, has obtained system level Operating right, can be operated to running all applications in an operating system, so can both test application to be measured from The operation logic of body, can also test the operation logic to be measured applied and interacted with other application.Wherein, in the reality of the present invention Apply in example, the method test shown in Fig. 1 is to be measured to apply the operation logic interacted with other application to include:
When the operation logic of the application with another using associating when, the test program is by calling the generation Reason program starts another application, and by calling the Agent to obtain the related implementing result of another application, To realize the test that associated operation logic occurs with another application to the application.
According to actual test demand, the survey provided by the invention tested the application to be measured operated on intelligent terminal The basic function that examination frame should possess includes:Acquisition to the execution method in application to be measured, method is performed according to it, it is right The operation of application to be measured, the verification for the file that application to be measured needs, to some files such as Sqlite files and the Log of application to be measured Analysis of file etc.;As described below:
In one embodiment of the invention, the step S130 of method shown in Fig. 1, test program is by calling the agency Program obtains the related content of the application, and carrying out test to the application according to the related content includes:The test program By calling the Agent to intercept and capture the specified file in the application, verify interior with the presence or absence of specifying in the specified file Hold.
In another embodiment of the present invention, the step S130 of method shown in Fig. 1, test program is by calling the generation The related content that program obtains the application is managed, carrying out test to the application according to the related content includes:The test journey Sequence by calling the Agent to intercept and capture the interface information of application, both including intercepting and capturing treated by the interface information for the application intercepted and captured herein The interface information of application is surveyed, also includes intercepting and capturing the interface information that associated application currently occurs with application to be measured;According to the interface Information triggers the control on the interface.Wherein, it is described control on the interface is triggered according to the interface information to include:Call the boundary Control on face primary triggering function triggers the control;Alternatively, simulation triggers the behavior of the control on the interface, should to this With the triggering command for sending the control.
Based in the various embodiments described above, test result is obtained after testing application to be measured, test should also be tied Fruit feeds back to the user for submitting test so that and user can know the problems of application to be measured by the test result, with Corrected beneficial to further.Then the method shown in Fig. 1 further comprises:The test result of the application is recorded, is generated Test report;Test report is sent to the user for submitting test.
The implementation process of the test frame of this programme offer is be provided with a specific embodiment below:
For one it is to be measured apply A, will be injected comprising the Agent of Hook functions and be for the intelligent terminal tested In system process, system starts the file in further loading Agent when loading itself primary auxiliary dynamic library file, real Show Agent and initially change environment layout under system environments.Run on intelligent terminal it is to be measured apply A, firstly, it is necessary to Obtain the interface of the current screen focus for obtaining intelligent terminal, that is, obtain the first screen interface to be measured using A, the acquisition principle and Process is:Because the GUI (Graphical User Interface, graphic user interface) of Android system be belong to client- Server-side pattern, that is to say, that Android system, can be to one of Android using (client) when an interface is shown SurfaceFlinger (server-side) interface information to be shown is serviced, SurfaceFlinger can be shown in by the synthesis of more re-computations Sent behind area to OpenGL (Open Graphics Library, open graphic library) interface, intelligence is shown to after being handled by the interface On the screen of energy terminal.Based on the principle, in order to obtain interface information, this programme is intercepted and captured application A to be measured by Hook functions and is sent out The interface information on current interface of service SurfaceFlinger is given, and then knows institute on the screen of current intelligent terminal The base attribute of each control on the interface of display.Then, tested for each control in current interface.For example, for A button on interface, on the premise of its base attribute (including coordinate position, display content etc.) has been known, carries out it Click on test, including two ways:The primary click function of this button is directly invoked to realize the effect of the click button, or Person, the mode that analog subscriber is clicked on, the event to being clicked at the coordinate position is sent according to the coordinate position of the button;Tool Body, the coordinate position parameter of the button is sent to a click function by Hook functions so that the click function operation When clicked in the button position.The interface shown on intelligent terminal after clicking on is obtained again by Hook functions to believe Breath, can know whether redirected after clicking on the button, and the interface after redirecting is the information such as what, that is, obtain pair The test result that the button is tested.The test mode of other types control on other interfaces therewith similarly, herein no longer Repeat.In the case of having, need to jump on the interface of other application after clicking on a button, for example, the interface to be measured using A On have " a sharing " button, the login interface using B can be jumped to after clicking on the button, in the prior art, due to test block Frame with it is to be measured using A be binding so that test frame can only obtain to be measured cannot obtain the boundary using B using the interface of A Face, in the case of the interface jumped to using B for this, can not be clicked on as a result, and in the present solution, to this situation, can To intercept and capture the interface information sent using B to service SurfaceFlinger by Hook functions, and then know answering after redirecting With the login interface information of B, that is, the test result of " sharing " button is tested, can also be believed according to the login interface of application B Breath further performs register, then jumps back to using A.
In addition, in other embodiments of the invention, test program applies the phase of A inside the Pass by calling Agent to obtain Rong Zhong, including the part or all of of application A perform method, and the execution logic using A, root are would know that by these execution methods The test logic being encapsulated in test program is defined according to the execution logic of application A, realizes test of the test program to application A.
Fig. 2 shows a kind of test frame realization device schematic diagram according to an embodiment of the invention.As shown in Fig. 2, The test frame realization device includes:
Injection unit 210, suitable for Agent is injected into the Android operation system of test intelligent terminal.
Test cell 220, is suitably packaged test logic, when it is to be measured apply run on the intelligent terminal when, according to envelope The test logic of dress tests the application to be measured;During the test, by calling described in the Agent acquisition The related content of application, tests the application according to the related content.
Extended interface unit 230, receives extended instruction of the user to the test logic, single to test according to extended instruction Test logic in member is extended.
As it can be seen that for operating in the application to be measured on intelligent terminal, the device shown in Fig. 2 is by encapsulating test logic Test program and the cooperation being injected between the Agent in the operating system of intelligent terminal, realize one kind to application to be measured The test frame tested;Wherein, the test logic encapsulated in test program can also be defined by expansion interface. Compared with prior art, method of this programme by being injected into Agent in operating system, gets the behaviour of system level Make authority, application to be measured can not only be operated, can also obtain other non-applications to be measured and be operated so that this programme The test frame of offer is not bound with application to be measured, has the characteristics that striding course, can not only be tested and to be measured be applied therein Operation logic, can also test and to be measured apply the operation logic that is interacted with other application.
In one embodiment of the invention, test cell 220, be further adapted for operation logic when the application with it is another One application is when associating, and starts another application by calling the Agent, and described acts on behalf of journey by calling Sequence obtains the related implementing result of another application, and associated operation occurs to the application and another application to realize The test of logic.
In one embodiment of the invention, Agent includes Hook functions, is obtained by Hook functions and operates in institute State the related content of the application on test intelligent terminal.
In one embodiment of the invention, test cell 220, suitable for by calling the Agent to intercept and capture described answer Specified file in, verifies and whether there is given content in the specified file.
In one embodiment of the invention, test cell 220 is stated, suitable for by calling described in the Agent intercepting and capturing The interface information of application, the control on the interface is triggered according to the interface information.Wherein, test cell 220, suitable for calling the boundary Control on face primary triggering function triggers the control;Alternatively, the behavior of the control on the interface is triggered suitable for simulation, to The application sends the triggering command of the control.
Fig. 3 shows a kind of test frame realization device schematic diagram in accordance with another embodiment of the present invention.Such as Fig. 3 institutes Show, which includes:Injection unit 310, test cell 320, extended interface unit 330 and reporting unit 340。
Injection unit 310, suitable for Agent is injected into the Android operation system of test intelligent terminal.
Test cell 320, is suitably packaged test logic, when it is to be measured apply run on the intelligent terminal when, according to envelope The test logic of dress tests the application to be measured;During the test, by calling described in the Agent acquisition The related content of application, tests the application according to the related content.
Extended interface unit 330, receives extended instruction of the user to the test logic, single to test according to extended instruction Test logic in member is extended.
Reporting unit 340, suitable for being recorded to the test result of the application, generates test report;By test report It is sent to the user for submitting test.
It should be noted that each embodiment pair of each embodiment of Fig. 2 to Fig. 3 shown devices and method shown in figure 1 above Should be identical, describe in detail above, details are not described herein.
In conclusion for operating in the application to be measured on intelligent terminal, technical solution provided by the invention passes through encapsulation The test program of test logic and the cooperation being injected between the Agent in the operating system of intelligent terminal, realize one The test frame that kind tests application to be measured;Wherein, test of the expansion interface to being encapsulated in test program can also be passed through Logic is defined.Compared with prior art, method of this programme by being injected into Agent in operating system, gets The operating right of system level, can not only operate application to be measured, can also obtain other non-applications to be measured and be grasped Make so that the test frame that this programme provides is not bound with application to be measured, is had the characteristics that striding course, can not only be tested to be measured Using the operation logic of therein, the operation logic to be measured applied and interacted with other application can also be tested.Need what is illustrated It is:
Algorithm and display be not inherently related to any certain computer, virtual bench or miscellaneous equipment provided herein. Various fexible units can also be used together with teaching based on this.As described above, required by constructing this kind of device Structure be obvious.In addition, the present invention is not also directed to any certain programmed language.It should be understood that it can utilize various Programming language realizes the content of invention described herein, and the description done above to language-specific is to disclose this hair Bright preferred forms.
In the specification that this place provides, numerous specific details are set forth.It is to be appreciated, however, that the implementation of the present invention Example can be put into practice in the case of these no details.In some instances, known method, structure is not been shown in detail And technology, so as not to obscure the understanding of this description.
Similarly, it will be appreciated that in order to simplify the disclosure and help to understand one or more of each inventive aspect, Above in the description to the exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes In example, figure or descriptions thereof.However, the method for the disclosure should be construed to reflect following intention:I.e. required guarantor The application claims of shield features more more than the feature being expressly recited in each claim.It is more precisely, such as following Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore, Thus the claims for following embodiment are expressly incorporated in the embodiment, wherein each claim is in itself Separate embodiments all as the present invention.
Those skilled in the art, which are appreciated that, to carry out adaptively the module in the equipment in embodiment Change and they are arranged in one or more equipment different from the embodiment.Can be the module or list in embodiment Member or component be combined into a module or unit or component, and can be divided into addition multiple submodule or subelement or Sub-component.In addition at least some in such feature and/or process or unit exclude each other, it can use any Combination is disclosed to all features disclosed in this specification (including adjoint claim, summary and attached drawing) and so to appoint Where all processes or unit of method or equipment are combined.Unless expressly stated otherwise, this specification (including adjoint power Profit requires, summary and attached drawing) disclosed in each feature can be by providing the alternative features of identical, equivalent or similar purpose come generation Replace.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments In included some features rather than further feature, but the combination of the feature of different embodiments means in of the invention Within the scope of and form different embodiments.For example, in the following claims, embodiment claimed is appointed One of meaning mode can use in any combination.
The all parts embodiment of the present invention can be with hardware realization, or to be run on one or more processor Software module realize, or realized with combinations thereof.It will be understood by those of skill in the art that it can use in practice Microprocessor or digital signal processor (DSP) are realized in a kind of test frame realization device according to embodiments of the present invention Some or all components some or all functions.The present invention is also implemented as being used to perform side as described herein The some or all equipment or program of device (for example, computer program and computer program product) of method.It is such Realizing the program of the present invention can store on a computer-readable medium, or can have the shape of one or more signal Formula.Such signal can be downloaded from internet website and obtained, and either be provided or with any other shape on carrier signal Formula provides.
It should be noted that the present invention will be described rather than limits the invention for above-described embodiment, and ability Field technique personnel can design alternative embodiment without departing from the scope of the appended claims.In the claims, Any reference symbol between bracket should not be configured to limitations on claims.Word "comprising" does not exclude the presence of not Element or step listed in the claims.Word "a" or "an" before element does not exclude the presence of multiple such Element.The present invention can be by means of including the hardware of some different elements and being come by means of properly programmed computer real It is existing.In if the unit claim of equipment for drying is listed, several in these devices can be by same hardware branch To embody.The use of word first, second, and third does not indicate that any order.These words can be explained and run after fame Claim.
The invention discloses A1, a kind of test frame implementation method, wherein, this method includes:
Agent is injected into the Android operation system of test intelligent terminal;
Run application to be measured on the intelligent terminal, and by encapsulate the test program of test logic to it is described it is to be measured should With being tested;
The test program is by calling the Agent to obtain the related content of the application, according to the related content The application is tested;
There is provided expansion interface so that user can be expanded by test logic of the expansion interface to the test program Exhibition.
A2, the method as described in A1, wherein, this method further comprises:
When the operation logic of the application with another using associating when, the test program is by calling the generation Reason program starts another application, and by calling the Agent to obtain the related implementing result of another application, To realize the test that associated operation logic occurs with another application to the application.
A3, the method as described in A1, wherein,
The Agent includes Hook functions, is obtained and is operated on the test intelligent terminal by Hook functions The related content of application.
A4, the method as described in A1, wherein, the test program is by calling the Agent to obtain the application Related content, carrying out test to the application according to the related content includes:
The test program verifies that this specifies text by calling the Agent to intercept and capture the specified file in the application It whether there is given content in part.
A5, the method as described in A1, wherein, the test program is by calling the Agent to obtain the application Related content, carrying out test to the application according to the related content includes:
The test program is by calling the Agent to intercept and capture the interface information of the application, according to the interface information Trigger the control on the interface.
A6, the method as described in A5, wherein, it is described control on the interface is triggered according to the interface information to include:
The primary triggering function of the control on the interface is called to trigger the control;
Alternatively,
Simulation triggers the behavior of the control on the interface, and the triggering command of the control is sent to the application.
A7, the method as any one of A1-A6, this method further comprise:
The test result of the application is recorded, generates test report;
Test report is sent to the user for submitting test.
The invention also discloses B8, a kind of test frame realization device, wherein, which includes:
Injection unit, suitable for Agent is injected into the Android operation system of test intelligent terminal;
Test cell, is suitably packaged test logic, when it is to be measured apply run on the intelligent terminal when, according to encapsulation Test logic tests the application to be measured;During the test, by calling the Agent to obtain the application Related content, the application is tested according to the related content;
Extended interface unit, receives extended instruction of the user to the test logic, according to extended instruction to test cell In test logic be extended.
B9, the device as described in B8, wherein,
The test cell, be further adapted for when the operation logic of the application with another using associating when, lead to Cross and call the Agent to start another application, and by calling the Agent to obtain the phase of another application Implementing result is closed, to realize the test that associated operation logic occurs with another application to the application.
B10, the device as described in B8, wherein,
The Agent includes Hook functions, is obtained and is operated on the test intelligent terminal by Hook functions The related content of application.
B11, the device as described in B8, wherein,
The test cell, suitable for by calling the Agent to intercept and capture the specified file in the application, verification should It whether there is given content in specified file.
B12, the device as described in B8, wherein,
The test cell, suitable for the interface information by calling the Agent intercepting and capturing application, according to the boundary Face information triggers the control on the interface.
B13, the device as described in B12, wherein,
The test cell, suitable for calling the primary triggering function of the control on the interface to trigger the control;It is alternatively, suitable The behavior of the control on the interface is triggered in simulation, the triggering command of the control is sent to the application.
B14, the device as any one of B8-B13, the device further comprise:
Reporting unit, suitable for being recorded to the test result of the application, generates test report;Test report is sent To the user for submitting test.

Claims (12)

1. a kind of test frame implementation method, wherein, this method includes:
Agent is injected into the Android operation system of test intelligent terminal;
Run application to be measured on the intelligent terminal, and by encapsulate the test program of test logic to it is described it is to be measured apply into Row test;
The test program is by calling the Agent to obtain the related content of the application, according to the related content to institute State to apply and tested;
There is provided expansion interface so that user can be extended by test logic of the expansion interface to the test program;
This method further comprises:
When the operation logic of the application with another using associating when, the test program described acts on behalf of journey by calling Sequence starts another application, and by calling the Agent to obtain the related implementing result of another application, with reality Now to the test that associated operation logic occurs with another application of the application.
2. the method for claim 1, wherein
The Agent includes Hook functions, and the application operated on the test intelligent terminal is obtained by Hook functions Related content.
3. the method for claim 1, wherein the test program is by calling the Agent to obtain the application Related content, carrying out test to the application according to the related content includes:
The test program is verified in the specified file by calling the Agent to intercept and capture the specified file in the application With the presence or absence of given content.
4. the method for claim 1, wherein the test program is by calling the Agent to obtain the application Related content, carrying out test to the application according to the related content includes:
The test program is triggered by calling the Agent to intercept and capture the interface information of the application according to the interface information Control on the interface.
5. method as claimed in claim 4, wherein, it is described control on the interface is triggered according to the interface information to include:
The primary triggering function of the control on the interface is called to trigger the control;
Alternatively,
Simulation triggers the behavior of the control on the interface, and the triggering command of the control is sent to the application.
6. such as the method any one of claim 1-5, this method further comprises:
The test result of the application is recorded, generates test report;
Test report is sent to the user for submitting test.
7. a kind of test frame realization device, wherein, which includes:
Injection unit, suitable for Agent is injected into the Android operation system of test intelligent terminal;
Test cell, is suitably packaged test logic, when it is to be measured apply run on the intelligent terminal when, according to the test of encapsulation Logic tests the application to be measured;During the test, by calling the Agent to obtain the phase of the application Hold inside the Pass, the application is tested according to the related content;
Extended interface unit, receives extended instruction of the user to the test logic, according to extended instruction in test cell Test logic is extended;
The test cell, be further adapted for when the operation logic of the application with another using associating when, pass through tune Start another application with the Agent, and the correlation by calling the Agent to obtain another application is held Row is as a result, to realize the test that associated operation logic occurs with another application to the application.
8. device as claimed in claim 7, wherein,
The Agent includes Hook functions, and the application operated on the test intelligent terminal is obtained by Hook functions Related content.
9. device as claimed in claim 7, wherein,
The test cell, suitable for by calling the Agent to intercept and capture the specified file in the application, verifying that this is specified It whether there is given content in file.
10. device as claimed in claim 7, wherein,
The test cell, suitable for by calling the Agent to intercept and capture the interface information of the application, being believed according to the interface Breath triggers the control on the interface.
11. device as claimed in claim 10, wherein,
The test cell, suitable for calling the primary triggering function of the control on the interface to trigger the control;Alternatively, it is suitable for mould Intend triggering the behavior of the control on the interface, the triggering command of the control is sent to the application.
12. such as the device any one of claim 7-11, which further comprises:
Reporting unit, suitable for being recorded to the test result of the application, generates test report;Test report is sent to and is carried Hand over the user of test.
CN201510633970.XA 2015-09-29 2015-09-29 A kind of test frame implementation method and device Active CN105224457B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510633970.XA CN105224457B (en) 2015-09-29 2015-09-29 A kind of test frame implementation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510633970.XA CN105224457B (en) 2015-09-29 2015-09-29 A kind of test frame implementation method and device

Publications (2)

Publication Number Publication Date
CN105224457A CN105224457A (en) 2016-01-06
CN105224457B true CN105224457B (en) 2018-04-17

Family

ID=54993442

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510633970.XA Active CN105224457B (en) 2015-09-29 2015-09-29 A kind of test frame implementation method and device

Country Status (1)

Country Link
CN (1) CN105224457B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107368406A (en) * 2016-05-11 2017-11-21 阿里巴巴集团控股有限公司 The method, apparatus and equipment of test application program
CN106126415B (en) * 2016-06-15 2018-12-04 百度在线网络技术(北京)有限公司 A kind of application adjustment method in Android system and apply debugging apparatus
CN110139302B (en) * 2019-05-17 2022-12-06 广州品唯软件有限公司 App business type positioning method and device
CN110286958B (en) * 2019-06-20 2021-10-29 腾讯科技(深圳)有限公司 Node information acquisition method, device and storage medium
CN112835758A (en) * 2021-03-22 2021-05-25 四川酷比通信设备有限公司 Method for self-starting and automatically running test software and terminal equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7165191B1 (en) * 2004-01-29 2007-01-16 Sun Microsystems, Inc. Automated verification of user interface tests on low-end emulators and devices
CN102855184A (en) * 2012-07-24 2013-01-02 北京播思软件技术有限公司 Android automatic test cross application device and method
CN102890652A (en) * 2012-11-07 2013-01-23 武汉光迅信息技术有限公司 Method for constructing testing software and testing system employing method
CN104536889A (en) * 2014-12-26 2015-04-22 北京奇虎科技有限公司 Method and system for testing user interface, use case management platform and operating terminal
CN104679644A (en) * 2013-11-28 2015-06-03 比亚迪股份有限公司 Testing method and system for application program in mobile terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7165191B1 (en) * 2004-01-29 2007-01-16 Sun Microsystems, Inc. Automated verification of user interface tests on low-end emulators and devices
CN102855184A (en) * 2012-07-24 2013-01-02 北京播思软件技术有限公司 Android automatic test cross application device and method
CN102890652A (en) * 2012-11-07 2013-01-23 武汉光迅信息技术有限公司 Method for constructing testing software and testing system employing method
CN104679644A (en) * 2013-11-28 2015-06-03 比亚迪股份有限公司 Testing method and system for application program in mobile terminal
CN104536889A (en) * 2014-12-26 2015-04-22 北京奇虎科技有限公司 Method and system for testing user interface, use case management platform and operating terminal

Also Published As

Publication number Publication date
CN105224457A (en) 2016-01-06

Similar Documents

Publication Publication Date Title
CN105224457B (en) A kind of test frame implementation method and device
CN108345535A (en) Mock test methods, device and equipment
US20150074647A1 (en) Testing system for an integrated software system
US20130298110A1 (en) Software Visualization Using Code Coverage Information
US10482001B2 (en) Automated dynamic test case generation
CN105608000B (en) Obtain the method and device of code coverage data
CN105224456B (en) A kind of test script generation method, device and system
CN105159832B (en) A kind of methods, devices and systems collected in application is tested using exception information
CN105701005B (en) Application framework test method based on OSGI and system
US20100153780A1 (en) Techniques for generating a reusable test script for a multiple user performance test
CN107832207A (en) Interface performance test method, apparatus, storage medium and computer equipment
CN104281518A (en) Terminal application test method, device, system and platform and mobile terminal
CN110275822A (en) Performance test methods, device, equipment and the storage medium of application programming interfaces
CN104820640A (en) Webpage testing method and device
US20100153087A1 (en) Techniques for generating a reusable test script for a single user performance test
CN108763009A (en) Server stress test method, system, equipment and computer readable storage medium
CN110058990A (en) Performance test methods and device, computer equipment, storage medium
CN110515848A (en) Automatization test system and automated testing method
CN109765860A (en) Verification method, verifying device and the verifying system of nuclear reactor DCS
CN109739704A (en) A kind of interface test method, server-side and computer readable storage medium
CN109558313A (en) Construct the method and device of abnormality test scene
US20170010951A1 (en) Application screen mapping for mobile analytics
CN106557411B (en) Method and system for testing Hybrid application in Android system
CN109947642A (en) Automated hierarchical test method based on case classification, apparatus and system
CN105893235A (en) Simulation testing method and apparatus, and server

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20220715

Address after: Room 801, 8th floor, No. 104, floors 1-19, building 2, yard 6, Jiuxianqiao Road, Chaoyang District, Beijing 100015

Patentee after: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Patentee before: Qizhi software (Beijing) Co.,Ltd.

TR01 Transfer of patent right