CN109308259A - The test method and device of application - Google Patents

The test method and device of application Download PDF

Info

Publication number
CN109308259A
CN109308259A CN201810955121.XA CN201810955121A CN109308259A CN 109308259 A CN109308259 A CN 109308259A CN 201810955121 A CN201810955121 A CN 201810955121A CN 109308259 A CN109308259 A CN 109308259A
Authority
CN
China
Prior art keywords
test
component
instruction
target elements
several
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
CN201810955121.XA
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 Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo 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 Qihoo Technology Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201810955121.XA priority Critical patent/CN109308259A/en
Publication of CN109308259A publication Critical patent/CN109308259A/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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses the test method of application and devices.The described method includes: calling directly the designation method in system ancillary service, at least partly component shown in current screen is obtained;Several target elements are chosen from the component according to test instruction;Corresponding operation is executed to complete to test to several described target elements according to test instruction.The technical solution does not need one APK of installation, without being authorized, it can realizes and gets required component, to complete to test, simplifies testing process, saved resource and improved efficiency.

Description

The test method and device of application
Technical field
The present invention relates to apply testing field, and in particular to the test method and device of application.
Background technique
It include the test of multiple dimensions using test, such as manual test and automation survey can be divided by test mode Examination, can be divided into functional test, performance test etc. by test target.By taking an automatic test as an example, need to click application In certain components, may be implemented to get these components using the miscellaneous function of system at present, but still ask there are some Topic, such as permission needed for relying on an APK and stating is needed, and user is required to go actively to open authorization, it is very inconvenient.
Summary of the invention
In view of the above problems, it proposes on the present invention overcomes the above problem or at least be partially solved in order to provide one kind State the test method and device of the application of problem.
According to one aspect of the present invention, a kind of test method of application is provided, comprising:
The designation method in system ancillary service is called directly, at least partly component shown in current screen is obtained;
Several target elements are chosen from the component according to test instruction;
Corresponding operation is executed to complete to test to several described target elements according to test instruction.
Optionally, the system is Android system, and the designation method called directly in system ancillary service includes:
It is provided based on test frame UiAutomator, calling system ancillary service Accessibility GetUiAutomationBrige () method.
Optionally, the method also includes:
Android debugging bridge ADB is established with controlling terminal to connect, and the test is received by the ADB connection and is instructed.
Optionally, at least partly component shown in current screen that obtains includes:
When getting the interface change events on screen, at least partly component shown in current screen is obtained.
Optionally, described to choose several target elements according to test instruction from the component and include:
The reading assembly information from test profile, if being selected from the component matched with the module information Dry target element.
Optionally, the reading assembly information from test profile selects and the component from the component Several target elements of information matches include:
The module information that XML format or JSON format are read out from the test profile believes the component of reading Breath is converted to object set;
The object set is traversed, selects and distinguishes matched target element with each object in the object set.
Optionally, the target element corresponds to pop-up, described to be held according to test instruction to several described target elements Row corresponding operation includes: to eliminate the pop-up to complete test.
Optionally, described that corresponding operation is executed to several described target elements to complete test bag according to test instruction It includes:
Method name and/or parameter list are parsed from test instruction, according to parsing result to several described mesh It marks component and executes corresponding operation to complete to test.
Optionally, the method is realized by test member.
Optionally, the test member is Jar packet.
Another aspect according to the present invention provides a kind of test device of application, comprising:
Component acquiring unit is obtained and is shown in current screen suitable for calling directly the designation method in system ancillary service At least partly component shown;
Component selection unit, suitable for choosing several target elements from the component according to test instruction;
Test cell, suitable for executing corresponding operation to several described target elements according to test instruction to complete to survey Examination.
Optionally, the system is Android system,
The component acquiring unit is suitable for being based on test frame UiAutomator, calling system ancillary service GetUiAutomationBrige () method that Accessibility is provided.
13, device as claimed in claim 11, wherein described device further include:
Connection unit is connect, by described in ADB connection reception suitable for establishing Android debugging bridge ADB with controlling terminal Test instruction.
Optionally, the component acquiring unit, suitable for obtaining current when getting the interface change events on screen At least partly component shown in screen.
Optionally, the component selection unit is suitable for the reading assembly information from test profile, from the component It selects and several matched target elements of the module information.
Optionally, the component selection unit, suitable for reading out XML format or JSON lattice from the test profile The module information of reading is converted to object set by the module information of formula;The object set is traversed, is selected and the object Each object in set distinguishes matched target element.
Optionally, the target element corresponds to pop-up, and the test cell is suitable for eliminating the pop-up.
Optionally, the test cell, suitable for parsing method name and/or parameter list, root from test instruction Corresponding operation is executed to complete to test to several described target elements according to parsing result.
Optionally, described device is realized by test member.
Optionally, the test member is Jar packet.
Another aspect according to the present invention, provides a kind of electronic equipment, comprising: processor;And it is arranged to store The memory of computer executable instructions, the executable instruction execute the processor such as any of the above-described institute The method stated.
According to the present invention in another aspect, providing a kind of computer readable storage medium, wherein it is described computer-readable Storage medium stores one or more programs, and one or more of programs when being executed by a processor, are realized as any of the above-described The method.
It can be seen from the above, technical solution of the present invention, calls directly the designation method in system ancillary service, acquisition is being worked as At least partly component shown in forth screen is chosen several target elements according to test instruction from component, is referred to according to test It enables and corresponding operation is executed to complete to test to several target elements.The technical solution does not need one APK of installation, without It is authorized, it can realization gets required component, to complete to test, simplifies testing process, has saved resource and mentioned High efficiency.
The above description is only an overview of the technical scheme of the present invention, in order to better understand the technical means of the present invention, And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can It is clearer and more comprehensible, the followings are specific embodiments of the present invention.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the present invention Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 shows a kind of flow diagram of the test method of application according to an embodiment of the invention;
Fig. 2 shows a kind of structural schematic diagrams of the test device of application according to an embodiment of the invention;
Fig. 3 shows the structural schematic diagram of electronic equipment according to an embodiment of the invention;
Fig. 4 shows the structural schematic diagram of computer readable storage medium according to an embodiment of the invention.
Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure 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 It is 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 It is fully disclosed to those skilled in the art.
Fig. 1 shows a kind of flow diagram of the test method of application according to an embodiment of the invention.Such as Fig. 1 institute Show, this method comprises:
Step S110, calls directly the designation method in system ancillary service, and acquisition is shown at least in current screen Members.
The step only needs to call designation method, do not need to obtain whole miscellaneous functions, is different from the prior art It needs to install an APK and obtains the mode of authorization, it is very convenient.
Step S120 chooses several target elements according to test instruction from component.For example, shown on current screen Application interface includes multiple controls, and actually each control can correspond to a View component, according to testing requirement, Ke Yixuan It selects using some of which component as target element.
Step S130 executes corresponding operation to several target elements according to test instruction to complete to test.
As it can be seen that method shown in FIG. 1, calls directly the designation method in system ancillary service, obtain in current screen At least partly component of display chooses several target elements according to test instruction, according to test instruction to several from component A target element executes corresponding operation to complete to test.The technical solution does not need one APK of installation, without being awarded Power, it can realization gets required component, to complete to test, simplifies testing process, has saved resource and improved effect Rate.
In one embodiment of the invention, in the above method, system is Android system, calls directly system ancillary service In designation method include: based on test frame UiAutomator, what calling system ancillary service Accessibility was provided GetUiAutomationBrige () method.
Accessibility is the corresponding service of miscellaneous function that Android system provides, it is however generally that, make in the prior art With miscellaneous function, also require to utilize the service.UiAutomator is then the test frame that Android system provides, by debugging It was found that the getUiAutomationBrige () method of calling is realized by UiAutomator, it is available to View component, and Application system ancillary service Accessibility authorization is not needed.
In one embodiment of the invention, the above method further include: establish Android debugging bridge ADB with controlling terminal and connect It connects, test instruction is received by ADB connection.
For example, a JAVA program is set in PC terminal, and one Jar packet of operation on mobile terminal (test machine), two Person establishes ADB connection.Test instruction is received by ADB connection, such as clicks some button, inputs certain information etc..JAVA Program can also receive issuing for task by long connection, be converted to the order that a rule has parameter, be transferred to survey by ADB In test-run a machine.
In one embodiment of the invention, in the above method, at least partly component shown in current screen is obtained It include: to obtain at least partly component shown in current screen when getting the interface change events on screen.
Interface change events can be the switching of application interface, be also possible to illustrate push or advertisement etc..It is general and Speech, when interface variation, the component currently shown is also changed, therefore the opportunity that will acquire component in the present embodiment sets When being set to the interface change events got on screen, to realize this point, the interface variation thing obtained on screen can be monitored Part.
In one embodiment of the invention, in the above method, several targets are chosen from component according to test instruction Component includes: the reading assembly information from test profile, is selected from component and several matched mesh of module information Mark component.
Test profile can be it is pre-configured be stored in it is local, be also possible to issue during the test or Content therein is directly transmitted, wherein preserving module information, actually namely description is needed at which component Reason.
In one embodiment of the invention, in the above method, the reading assembly information from test profile, from component In select with several matched target elements of module information include: read out from test profile XML format or The module information of reading is converted to object set by the module information of JSON format;Traverse object set, selects and object set Each object in conjunction distinguishes matched target element.
For example, reading local XML file, or the JSON data that distal end is sent are received, is read into memory, by component Information is converted to object set, that is, forms an internal storage data set.It is matched by way of traversal later, just The target element of the condition of satisfaction can be found.
In one embodiment of the invention, in the above method, target element corresponds to pop-up, if according to test instruction pair It includes: elimination pop-up that dry target element, which executes corresponding operation to complete test,.
As previously mentioned, when being possible to accident in test process, such as testing certain game application, pop-up The prompting message of weather application, it is likely that interfere with normal test process, accident should at this time be excluded. In the present embodiment, when determining target element is a pop-up, it is eliminated, avoids interfering subsequent test.
In one embodiment of the invention, in the above method, phase is executed to several target elements according to test instruction The operation answered includes: to parse method name and/or parameter list from test instruction to complete test, if according to parsing result pair Dry target element executes corresponding operation to complete to test.
It is to be excluded to the component being not belonging in test assignment, and the present embodiment is then described to category in a upper embodiment The realization of some operations of component to be tested is needed in test assignment, for example, wrapping in the test instruction sent by ADB connection Method name and/or parameter list are included, can be determined according to these contents to which component executes which operation, such as click, is defeated Access customer name password etc..
In one embodiment of the invention, the above method is realized by test member.Specifically, at of the invention one In embodiment, test member is Jar packet.
Fig. 2 shows a kind of structural schematic diagrams of the test device of application according to an embodiment of the invention.Such as Fig. 2 institute Show, the test device 200 of application includes:
Component acquiring unit 210 obtains in current screen suitable for calling directly the designation method in system ancillary service At least partly component of display.Here it only needs to call designation method, does not need to obtain whole miscellaneous functions, be different from existing There is the mode for needing to install an APK in technology and obtaining authorization, it is very convenient.
Component selection unit 220, suitable for choosing several target elements from component according to test instruction.For example, current The application interface shown on screen includes multiple controls, and actually each control can correspond to a View component, according to survey Examination demand can choose using some of which component as target element.
Test cell 230, suitable for executing corresponding operation to several target elements according to test instruction to complete to test.
As it can be seen that device shown in Fig. 2 is called directly specified in system ancillary service by the mutual cooperation of each unit Method obtains at least partly component shown in current screen, several target groups are chosen from component according to test instruction Part executes corresponding operation to several target elements according to test instruction to complete to test.The technical solution does not need to install One APK, without being authorized, it can realization gets required component, to complete to test, simplifies testing process, It has saved resource and has improved efficiency.
In one embodiment of the invention, in above-mentioned apparatus, system is Android system, and component acquiring unit 210 is suitable for It is provided based on test frame UiAutomator, calling system ancillary service Accessibility GetUiAutomationBrige () method.
Accessibility is the corresponding service of miscellaneous function that Android system provides, it is however generally that, make in the prior art With miscellaneous function, also require to utilize the service.UiAutomator is then the test frame that Android system provides, by debugging It was found that the getUiAutomationBrige () method of calling is realized by UiAutomator, it is available to View component, and Application system ancillary service Accessibility authorization is not needed.
In one embodiment of the invention, above-mentioned apparatus further include: connection unit, suitable for establishing Android with controlling terminal Bridge ADB connection is debugged, test instruction is received by ADB connection.
For example, a JAVA program is set in PC terminal, and one Jar packet of operation on mobile terminal (test machine), two Person establishes ADB connection.Test instruction is received by ADB connection, such as clicks some button, inputs certain information etc..JAVA Program can also receive issuing for task by long connection, be converted to the order that a rule has parameter, be transferred to survey by ADB In test-run a machine.
In one embodiment of the invention, in above-mentioned apparatus, component acquiring unit 210, suitable on getting screen Interface change events when, obtain at least partly component that shows in current screen.
Interface change events can be the switching of application interface, be also possible to illustrate push or advertisement etc..It is general and Speech, when interface variation, the component currently shown is also changed, therefore the opportunity that will acquire component in the present embodiment sets When being set to the interface change events got on screen, to realize this point, the interface variation thing obtained on screen can be monitored Part.
In one embodiment of the invention, in above-mentioned apparatus, component selection unit 220 is suitable for from test profile Middle reading assembly information selects and several matched target elements of module information from component.
Test profile can be it is pre-configured be stored in it is local, be also possible to issue during the test or Content therein is directly transmitted, wherein preserving module information, actually namely description is needed at which component Reason.
In one embodiment of the invention, in above-mentioned apparatus, component selection unit 220 is suitable for from test profile In read out the module information of XML format or JSON format, the module information of reading is converted into object set;Traverse object collection It closes, selects and distinguish matched target element with each object in object set.
For example, reading local XML file, or the JSON data that distal end is sent are received, is read into memory, by component Information is converted to object set, that is, forms an internal storage data set.It is matched by way of traversal later, just The target element of the condition of satisfaction can be found.
In one embodiment of the invention, in above-mentioned apparatus, target element corresponds to pop-up, and test cell 230 is suitable for Eliminate pop-up.
As previously mentioned, when being possible to accident in test process, such as testing certain game application, pop-up The prompting message of weather application, it is likely that interfere with normal test process, accident should at this time be excluded. In the present embodiment, when determining target element is a pop-up, it is eliminated, avoids interfering subsequent test.
In one embodiment of the invention, in above-mentioned apparatus, test cell 230, suitable for being parsed from test instruction Method name and/or parameter list execute corresponding operation to several target elements according to parsing result to complete to test.
It is to be excluded to the component being not belonging in test assignment, and the present embodiment is then described to category in a upper embodiment The realization of some operations of component to be tested is needed in test assignment, for example, wrapping in the test instruction sent by ADB connection Method name and/or parameter list are included, can be determined according to these contents to which component executes which operation, such as click, is defeated Access customer name password etc..
In one embodiment of the invention, in above-mentioned apparatus, device is realized by test member.Specifically, in this hair In bright one embodiment, in above-mentioned apparatus, test member is Jar packet.
In conclusion technical solution of the present invention, calls directly the designation method in system ancillary service, obtain current At least partly component shown in screen is chosen several target elements according to test instruction from component, is instructed according to test Corresponding operation is executed to complete to test to several target elements.The technical solution does not need one APK of installation, without obtaining It must authorize, it can realization gets required component, to complete to test, simplifies testing process, has saved resource and improved Efficiency.
It should be understood that
Algorithm and display be not inherently related to any certain computer, virtual bench or other equipment provided herein. Various fexible units can also be used together with teachings based herein.As described above, it constructs required by this kind of device Structure be obvious.In addition, the present invention is also not directed to any particular programming language.It should be understood that can use various Programming language realizes summary of the invention described herein, and the description done above to language-specific is to disclose this hair Bright preferred forms.
In the instructions provided here, numerous specific details are set forth.It is to be appreciated, however, that implementation of the invention Example can be practiced without these specific details.In some instances, well known method, structure is not been shown in detail And technology, so as not to obscure the understanding of this specification.
Similarly, it should be understood that in order to simplify the disclosure and help to understand one or more of the various inventive aspects, Above in the description of 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 disclosed method should not be interpreted as reflecting the following intention: i.e. required to protect Shield the present invention claims features more more than feature expressly recited in each claim.More precisely, as following Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore, Thus the claims for following specific embodiment are expressly incorporated in the specific embodiment, wherein each claim itself All as a separate embodiment of the present invention.
Those skilled in the art will understand that can be carried out adaptively to the module in the equipment in embodiment Change and they are arranged in one or more devices different from this embodiment.It can be the module or list in embodiment Member or component are combined into a module or unit or component, and furthermore they can be divided into multiple submodule or subelement or Sub-component.Other than such feature and/or at least some of process or unit exclude each other, it can use any Combination is to all features disclosed in this specification (including adjoint claim, abstract and attached drawing) and so disclosed All process or units of what method or apparatus are combined.Unless expressly stated otherwise, this specification is (including adjoint power Benefit require, abstract and attached drawing) disclosed in each feature can carry out generation with an alternative feature that provides the same, equivalent, or similar purpose It replaces.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments In included certain features rather than other feature, but the combination of the feature of different embodiments mean it is of the invention Within the scope of and form different embodiments.For example, in the following claims, embodiment claimed is appointed Meaning one of can in any combination mode come using.
Various component embodiments of the invention can be implemented in hardware, or to run on one or more processors Software module realize, or be implemented in a combination thereof.It will be understood by those of skill in the art that can be used in practice It is some in the test device of microprocessor or digital signal processor (DSP) to realize application according to an embodiment of the present invention Or some or all functions of whole components.The present invention is also implemented as one for executing method as described herein Partly or completely device or device program (for example, computer program and computer program product).Such realization is originally The program of invention can store on a computer-readable medium, or may be in the form of one or more signals.In this way Signal can be downloaded from an internet website to obtain, be perhaps provided on the carrier signal or be provided in any other form.
For example, Fig. 3 shows the structural schematic diagram of electronic equipment according to an embodiment of the invention.The electronic equipment packet It includes processor 310 and is arranged to the memory 320 of storage computer executable instructions (computer readable program code).Storage Device 320 can be such as flash memory, EEPROM (electrically erasable programmable read-only memory), EPROM, hard disk or ROM etc Electronic memory.Memory 320 has the computer-readable program stored for executing any method and step in the above method The memory space 330 of code 331.For example, the memory space 330 for storing computer readable program code may include difference For realizing each computer readable program code 331 of the various steps in above method.Computer readable program code 331 can read or be written to the production of this one or more computer program from one or more computer program product In product.These computer program products include such as hard disk, and the program code of compact-disc (CD), storage card or floppy disk etc carries Body.Such computer program product is usually computer readable storage medium described in such as Fig. 4.Fig. 4 is shown according to this A kind of structural schematic diagram of the computer readable storage medium of invention one embodiment.The computer readable storage medium 400 is deposited The computer readable program code 331 for executing steps of a method in accordance with the invention is contained, it can be by the place of electronic equipment 300 It manages device 310 to read, when computer readable program code 331 is run by electronic equipment 300, the electronic equipment 300 is caused to execute Each step in method described above, specifically, the computer-readable journey of the computer-readable recording medium storage Sequence code 331 can execute method shown in any of the above-described embodiment.Computer readable program code 331 can be with appropriate shape Formula is compressed.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and ability Field technique personnel can be designed alternative embodiment without departing from the scope of the appended claims.In the claims, Any reference symbol between parentheses 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" located in front of the element does not exclude the presence of multiple such Element.The present invention can be by means of including the hardware of several different elements and being come by means of properly programmed computer real It is existing.In the unit claims listing several devices, several in these devices can be through the same hardware branch To embody.The use of word first, second, and third does not indicate any sequence.These words can be explained and be run after fame Claim.
Embodiment of the invention discloses A1, a kind of test method of application, comprising:
The designation method in system ancillary service is called directly, at least partly component shown in current screen is obtained;
Several target elements are chosen from the component according to test instruction;
Corresponding operation is executed to complete to test to several described target elements according to test instruction.
A2, method as described in a1, wherein the system is Android system, described to call directly in system ancillary service Designation method include:
It is provided based on test frame UiAutomator, calling system ancillary service Accessibility GetUiAutomationBrige () method.
A3, method as described in a1, wherein the method also includes:
Android debugging bridge ADB is established with controlling terminal to connect, and the test is received by the ADB connection and is instructed.
A4, method as described in a1, wherein at least partly component that shows in current screen of obtaining includes:
When getting the interface change events on screen, at least partly component shown in current screen is obtained.
A5, method as described in a1, wherein described that several target elements are chosen from the component according to test instruction Include:
The reading assembly information from test profile, if being selected from the component matched with the module information Dry target element.
A6, method as described in a5, wherein the reading assembly information from test profile, from the component It selects and includes: with several matched target elements of the module information
The module information that XML format or JSON format are read out from the test profile believes the component of reading Breath is converted to object set;
The object set is traversed, selects and distinguishes matched target element with each object in the object set.
A7, method as described in a1, wherein the target element corresponds to pop-up, described to be instructed according to test to described It includes: to eliminate the pop-up that several target elements, which execute corresponding operation to complete test,.
A8, method as described in a1, wherein described that several described target elements are executed accordingly according to test instruction It operates to complete test and include:
Method name and/or parameter list are parsed from test instruction, according to parsing result to several described mesh It marks component and executes corresponding operation to complete to test.
A9, method as described in a1, wherein the method is realized by test member.
A10, the method as described in A9, wherein the test member is Jar packet.
The embodiment of the present invention also discloses B11, a kind of test device of application, comprising:
Component acquiring unit is obtained and is shown in current screen suitable for calling directly the designation method in system ancillary service At least partly component shown;
Component selection unit, suitable for choosing several target elements from the component according to test instruction;
Test cell, suitable for executing corresponding operation to several described target elements according to test instruction to complete to survey Examination.
B12, device as described in b11, wherein the system is Android system,
The component acquiring unit is suitable for being based on test frame UiAutomator, calling system ancillary service GetUiAutomationBrige () method that Accessibility is provided.
B13, device as described in b11, wherein described device further include:
Connection unit is connect, by described in ADB connection reception suitable for establishing Android debugging bridge ADB with controlling terminal Test instruction.
B14, device as described in b11, wherein
The component acquiring unit, suitable for obtaining in current screen when getting the interface change events on screen At least partly component of display.
B15, device as described in b11, wherein
The component selection unit is suitable for the reading assembly information from test profile, selects from the component With several matched target elements of the module information.
B16, the device as described in B15, wherein
The component selection unit, suitable for reading out the group of XML format or JSON format from the test profile The module information of reading is converted to object set by part information;Traverse the object set, select in the object set Each object distinguish matched target element.
B17, device as described in b11, wherein the target element corresponds to pop-up, and the test cell is suitable for eliminating The pop-up.
B18, device as described in b11, wherein
The test cell is tied suitable for parsing method name and/or parameter list from test instruction according to parsing Fruit executes corresponding operation to several described target elements to complete to test.
B19, device as described in b11, wherein described device is realized by test member.
B20, the device as described in B19, wherein the test member is Jar packet.
The embodiment of the present invention also discloses C21, a kind of electronic equipment, wherein the electronic equipment includes: processor;With And it is arranged to the memory of storage computer executable instructions, the executable instruction when executed holds the processor Method of the row as described in any one of A1-A10.
The embodiment of the present invention also discloses D22, a kind of computer readable storage medium, wherein described computer-readable Storage medium stores one or more programs, and one or more of programs when being executed by a processor, are realized as in A1-A10 Described in any item methods.

Claims (10)

1. a kind of test method of application, comprising:
The designation method in system ancillary service is called directly, at least partly component shown in current screen is obtained;
Several target elements are chosen from the component according to test instruction;
Corresponding operation is executed to complete to test to several described target elements according to test instruction.
2. the method for claim 1, wherein the system is Android system, described to call directly system ancillary service In designation method include:
It is provided based on test frame UiAutomator, calling system ancillary service Accessibility GetUiAutomationBrige () method.
3. the method for claim 1, wherein the method also includes:
Android debugging bridge ADB is established with controlling terminal to connect, and the test is received by the ADB connection and is instructed.
4. the method for claim 1, wherein at least partly component shown in current screen that obtains includes:
When getting the interface change events on screen, at least partly component shown in current screen is obtained.
5. a kind of test device of application, comprising:
Component acquiring unit, suitable for calling directly the designation method in system ancillary service, what acquisition was shown in current screen At least partly component;
Component selection unit, suitable for choosing several target elements from the component according to test instruction;
Test cell, suitable for executing corresponding operation to several described target elements according to test instruction to complete to test.
6. device as claimed in claim 5, wherein the system is Android system,
The component acquiring unit is suitable for being based on test frame UiAutomator, calling system ancillary service GetUiAutomationBrige () method that Accessibility is provided.
7. device as claimed in claim 5, wherein described device further include:
Connection unit connect suitable for establishing Android debugging bridge ADB with controlling terminal, receives the test by the ADB connection Instruction.
8. device as claimed in claim 5, wherein
The component acquiring unit, suitable for when getting the interface change events on screen, acquisition is shown in current screen At least partly component.
9. a kind of electronic equipment, wherein the electronic equipment includes: processor;And it is arranged to the executable finger of storage computer The memory of order, the executable instruction execute the processor as described in any one of claim 1-5 Method.
10. a kind of computer readable storage medium, wherein the computer-readable recording medium storage one or more program, One or more of programs when being executed by a processor, realize method according to any one of claims 1 to 5.
CN201810955121.XA 2018-08-21 2018-08-21 The test method and device of application Pending CN109308259A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810955121.XA CN109308259A (en) 2018-08-21 2018-08-21 The test method and device of application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810955121.XA CN109308259A (en) 2018-08-21 2018-08-21 The test method and device of application

Publications (1)

Publication Number Publication Date
CN109308259A true CN109308259A (en) 2019-02-05

Family

ID=65223718

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810955121.XA Pending CN109308259A (en) 2018-08-21 2018-08-21 The test method and device of application

Country Status (1)

Country Link
CN (1) CN109308259A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110299941A (en) * 2019-05-23 2019-10-01 广东瑞谷光网通信股份有限公司 The accurate test method of optical module IIC Ready Time, electronic equipment and computer readable storage medium
CN111897606A (en) * 2019-05-06 2020-11-06 北京奇虎科技有限公司 Method and device for processing bullet frame
JP2022020541A (en) * 2020-06-29 2022-02-01 バイドゥ オンライン ネットワーク テクノロジー(ペキン) カンパニー リミテッド Test method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1851667A (en) * 2006-02-15 2006-10-25 华为技术有限公司 Graphic user interface test method and system
CN101488085A (en) * 2008-01-17 2009-07-22 中兴通讯股份有限公司 Software interface test method and apparatus
CN104142793A (en) * 2014-07-26 2014-11-12 珠海市君天电子科技有限公司 Method and device for simulating click on terminal control
CN105786687A (en) * 2014-12-22 2016-07-20 博雅网络游戏开发(深圳)有限公司 Mobile application test method and device
US9600401B1 (en) * 2016-01-29 2017-03-21 International Business Machines Corporation Automated GUI testing

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1851667A (en) * 2006-02-15 2006-10-25 华为技术有限公司 Graphic user interface test method and system
CN101488085A (en) * 2008-01-17 2009-07-22 中兴通讯股份有限公司 Software interface test method and apparatus
CN104142793A (en) * 2014-07-26 2014-11-12 珠海市君天电子科技有限公司 Method and device for simulating click on terminal control
CN105786687A (en) * 2014-12-22 2016-07-20 博雅网络游戏开发(深圳)有限公司 Mobile application test method and device
US9600401B1 (en) * 2016-01-29 2017-03-21 International Business Machines Corporation Automated GUI testing

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111897606A (en) * 2019-05-06 2020-11-06 北京奇虎科技有限公司 Method and device for processing bullet frame
CN110299941A (en) * 2019-05-23 2019-10-01 广东瑞谷光网通信股份有限公司 The accurate test method of optical module IIC Ready Time, electronic equipment and computer readable storage medium
CN110299941B (en) * 2019-05-23 2022-04-12 广东瑞谷光网通信股份有限公司 Accurate testing method for IICReady Time of optical module, electronic equipment and computer readable storage medium
JP2022020541A (en) * 2020-06-29 2022-02-01 バイドゥ オンライン ネットワーク テクノロジー(ペキン) カンパニー リミテッド Test method and device
JP7030177B2 (en) 2020-06-29 2022-03-04 バイドゥ オンライン ネットワーク テクノロジー(ペキン) カンパニー リミテッド Test method and equipment

Similar Documents

Publication Publication Date Title
CN109308259A (en) The test method and device of application
CN105573755B (en) A kind of application Activity render time acquisition methods and device
CN105224456B (en) A kind of test script generation method, device and system
CN110134386A (en) A kind of program editing method and device
CN106021102B (en) The generation method and device of automatic test file
CN108124187A (en) The generation method and device of interactive video
CN106483860B (en) For the automatic data collection middleware and its application method of PLC
CN105608000B (en) Obtain the method and device of code coverage data
CN106155907B (en) A kind of automated testing method, device and calculate equipment
CN104484223B (en) A kind of Android system application method for closing and device
CN108647141A (en) Automatic test approach, device, computer-readable medium and electronic equipment
CN106227649B (en) A kind of method and apparatus that the test application page excessively renders
CN108200643A (en) A kind of method, apparatus of positioning intelligent terminal
CN106649114B (en) The method and apparatus that application crash is positioned
CN110543420B (en) Software testing method, system, terminal and storage medium
CN104915239B (en) The method and device of multi-process startup is carried out using container
CN109117208A (en) Information sharing method, device, user terminal and readable storage medium storing program for executing
CN106708528A (en) Script generating method and device
CN108846264A (en) Code reinforcement means, device, intelligent terminal and computer readable storage medium
CN108132876B (en) Embedded software object code unit testing method based on injection mode
CN109933326A (en) Rewrite Compilation Method, device and the corresponding terminal of code
CN108920384A (en) The test method and device of application
CN106547425A (en) A kind of method and apparatus of the informing message of processing intelligent terminal
CN106126425B (en) Function traversal method and system based on Android automated test frame
CN110865941A (en) Interface test case generation method, device and system

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: 20190205

RJ01 Rejection of invention patent application after publication