CN108614775A - Automated testing method, device, terminal device and computer readable storage medium - Google Patents

Automated testing method, device, terminal device and computer readable storage medium Download PDF

Info

Publication number
CN108614775A
CN108614775A CN201810413307.2A CN201810413307A CN108614775A CN 108614775 A CN108614775 A CN 108614775A CN 201810413307 A CN201810413307 A CN 201810413307A CN 108614775 A CN108614775 A CN 108614775A
Authority
CN
China
Prior art keywords
interface
test
interface data
application program
presented
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
CN201810413307.2A
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.)
Shenzhen TCL New Technology Co Ltd
Original Assignee
Shenzhen TCL New 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 Shenzhen TCL New Technology Co Ltd filed Critical Shenzhen TCL New Technology Co Ltd
Priority to CN201810413307.2A priority Critical patent/CN108614775A/en
Publication of CN108614775A publication Critical patent/CN108614775A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Abstract

The invention discloses a kind of automated testing method, device, terminal device and computer readable storage mediums.The present invention is when application program to be measured carries out automatic test in android system,By startup for the test case of application program to be measured,And utilize test case analog subscriber button operation,Then the interface data to be presented for being shown in the view interface of application program to be measured generated based on user key-press operation that system layer in android system reports is received,Obtain current interface data shown in the view interface of application program to be measured simultaneously,Then according to interface data to be presented and current interface data,Determine and show the test mode of test result,Efficiently solve the technical issues of white-box testing in the prior art applied to android system cannot achieve automatic detection View interface datas,So that test result is more accurate,And pass through above-mentioned test mode,Greatly reduce the work of tester.

Description

Automated testing method, device, terminal device and computer readable storage medium
Technical field
The present invention relates to field of communication technology more particularly to a kind of automated testing method, device, terminal device and calculating Machine readable storage medium storing program for executing.
Background technology
Android platform (Android platform, also referred to as:Android system) be Google (Google) company exploitation based on Linux Mobile terminal operating system of increasing income, be mainly used on the terminal devices such as mobile phone, tablet computer, television set, wrist-watch.In recent years Come, with the fast development of Android technologies, application program based on Android platform exploitation and has android system Terminal device each methods such as production, life it is different degrees of meet the needs of people.
But it is more using crowd due to the use of Android device, such as child, the elderly, teenager, adult etc., Often there is the groups not being familiar with to the operation of android system, such as child, the elderly among these.Therefore, in order to make Application program has good guided bone and interactivity, is issuing new application program, or the liter of the original application program of publication Before grade version, tester needs frequent to the progress of the application program to be issued and thin trivial test white-box testing (also known as to tie Structure is tested or Logic-driven test), such as using black coffee (Espresso) automated test frame of Google releases, inspection Whether the data that get of system layer for surveying android system are complete, and can show, for example system layer is from server or net Whether the data got in network are complete, if can show and whether format is correct etc..
However, in practical applications, often existing, the data obtained from system layer are correct, but are shown in the interfaces View Show the situation of mistake.And current white-box testing mode, it is the data that can not be realized automatically in view interface (interfaces View) It is detected.If it is intended to ensureing the accuracy of test result, it is also necessary to traditional manual testing is carried out by tester, but It is the defects of traditional manual testing has covering surface narrow again, and the period is long, high labor cost.
In summary, the measuring technology of existing Android platform there will naturally be inconvenient and defect, institute in actual use With it is necessary to be improved.
The above is only used to facilitate the understanding of the technical scheme, and is not represented and is recognized that the above is existing skill Art.
Invention content
The main purpose of the present invention is to provide a kind of automated testing method, device, terminal devices and computer-readable Storage medium, it is intended to which the white-box testing for solving to be applied in the prior art android system cannot achieve automatic detection View circle The technical issues of face data.
To achieve the above object, it the present invention provides a kind of automated testing method, the described method comprises the following steps:
In the test case of application program to be measured in starting to android system, pressed by test case analog subscriber Key operation, receive that system layer in the android system reports for being shown in the view interface of application program to be measured Interface data to be presented, the interface data to be presented are based on user key-press operation and generate;
Obtain current interface data shown in the view interface of the application program to be measured;
According to the interface data to be presented and the current interface data, determines and show test result.
Preferably, described according to the interface data to be presented and the current interface data, it determines and shows test knot Fruit specifically includes:
Judge whether the current interface data are consistent with the interface data to be presented;
If the current interface data are consistent with the interface data to be presented, it is determined that the test result be test at Work(, and show the information being successfully tested;
If the current interface data and the interface data to be presented are inconsistent, it is determined that the test result is test Failure, and show the information of test crash.
Preferably, the determination test result is test crash, and after showing the information of test crash, the side Method further includes:
According to the interface data to be presented and the current interface data, determine inconsistent data content and it is described not The location of consistent data content information;
According to the location of the inconsistent data content and the inconsistent data content information, test is generated The log information of failure, and show the log information.
Preferably, described in the test case of application program to be measured in starting to android system, pass through test case Analog subscriber button operation, receive that system layer in the android system reports for being shown in regarding for application program to be measured Interface data to be presented in figure interface, specifically includes:
In the test case of application program to be measured in starting to android system, pressed by test case analog subscriber Key operation calls preset component manager interface, passes through system in android system described in the assembly management interface The interface data to be presented for being shown in the view interface of application program to be measured that layer reports.
Preferably, current interface data shown in the view interface for obtaining the application program to be measured are specific to wrap It includes:
Preset adaptor interface is called, the view interface of the application program to be measured is obtained by the adaptor interface Shown in current interface data.
Preferably, described to call preset adaptor interface, it is obtained by the adaptor interface described to be measured using journey Before current interface data shown in the view interface of sequence, the method includes:
When the assembly management interface is to the interface data to be presented, the interface data to be presented is sent To the adaptor interface;
The interface data to be presented is added to view circle of the application program to be measured by the adaptor interface In face.
Preferably, the test case is generated based on Espresso automated test frames.
In addition, to achieve the above object, the present invention also provides a kind of automatic test device, described device includes:
Receiving module, in the test case of application program to be measured in starting to android system, being used by testing Example analog subscriber button operation, receive that system layer in the android system reports for being shown in application program to be measured Interface data to be presented in view interface, the interface data to be presented are based on user key-press operation and generate;
Acquisition module, for obtaining current interface data shown in the view interface of the application program to be measured;
Determining module, for according to the interface data to be presented and the current interface data, determining test result;
Display module, for showing the test result.
In addition, to achieve the above object, the present invention also provides a kind of terminal device, the terminal device includes:Storage Device, processor and it is stored in the automatic test program that can be run on the memory and on the processor, it is described automatic Change the step of test program is arranged for carrying out the automated testing method.
In addition, to achieve the above object, the present invention also provides a kind of computer readable storage medium, the computer can It reads to be stored with automatic test program on storage medium, the automatic test program is realized described automatic when being executed by processor The step of changing test method.
The present invention is when application program to be measured carries out automatic test in android system, by starting for be measured The test case of application program, and test case analog subscriber button operation is utilized, then receive system layer in android system The interface number to be presented for being shown in the view interface of application program to be measured generated based on user key-press operation reported According to, while current interface data shown in the view interface of application program to be measured are obtained, then according to interface data to be presented With current interface data, the test mode of test result is determined and shown, efficiently solve and be applied to Android in the prior art The white-box testing of system cannot achieve the technical issues of automatic detection View interface datas so that and test result is more accurate, and And by above-mentioned test mode, greatly reduce the work of tester.
Description of the drawings
Fig. 1 is the structural schematic diagram of the terminal device for the hardware running environment that the embodiment of the present invention is related to;
Fig. 2 is the flow diagram of automated testing method first embodiment of the present invention;
Fig. 3 is the flow diagram of automated testing method second embodiment of the present invention;
Fig. 4 is the high-level schematic functional block diagram of automatic test device of the present invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific implementation mode
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
Referring to Fig.1, Fig. 1 is the structural representation of the terminal device for the hardware running environment that the embodiment of the present invention is related to Figure.
As shown in Figure 1, the terminal device may include:Processor 1001, such as central processing unit (Central Processing Unit, CPU), communication bus 1002, user interface 1003, network interface 1004, memory 1005.Wherein, Communication bus 1002 is for realizing the connection communication between these components.User interface 1003 may include display screen (Display), input unit such as keyboard (Keyboard), optional user interface 1003 can also connect including the wired of standard Mouth, wireless interface.Network interface 1004 may include optionally standard wireline interface and wireless interface (such as WI-FI interface).It deposits Reservoir 1005 can be high-speed RAM memory, can also be stable memory (non-volatile memory), such as magnetic Disk storage.Memory 1005 optionally can also be the storage device independently of aforementioned processor 1001.
It will be understood by those skilled in the art that structure shown in Fig. 1 does not constitute the restriction to terminal device, can wrap It includes than illustrating more or fewer components, either combines certain components or different components arrangement.
As shown in Figure 1, as may include that operating system, network are logical in a kind of memory 1005 of computer storage media Believe module, Subscriber Interface Module SIM and automatic test program.
In terminal device shown in Fig. 1, network interface 1004 is mainly used for making the communication connection of terminal device and network, So as to make terminal device access the data of server;User interface 1003 is mainly used for receiving the input of user or test The instruction of simulated operation in journey;The terminal device calls the automatic test stored in memory 1005 by processor 1001 Program, and execute following operation:
In the test case of application program to be measured in starting to android system, pressed by test case analog subscriber Key operation, receive that system layer in the android system reports for being shown in the view interface of application program to be measured Interface data to be presented, the interface data to be presented are based on user key-press operation and generate;
Obtain current interface data shown in the view interface of the application program to be measured;
According to the interface data to be presented and the current interface data, determines and show test result.
Further, processor 1001 can call the automatic test program stored in memory 1005, also execute with Lower operation:
Judge whether the current interface data are consistent with the interface data to be presented;
If the current interface data are consistent with the interface data to be presented, it is determined that the test result be test at Work(, and show the information being successfully tested;
If the current interface data and the interface data to be presented are inconsistent, it is determined that the test result is test Failure, and show the information of test crash.
Further, processor 1001 can call the automatic test program stored in memory 1005, also execute with Lower operation:
According to the interface data to be presented and the current interface data, determine inconsistent data content and it is described not The location of consistent data content information;
According to the location of the inconsistent data content and the inconsistent data content information, test is generated The log information of failure, and show the log information.
Further, processor 1001 can call the automatic test program stored in memory 1005, also execute with Lower operation:
In the test case of application program to be measured in starting to android system, pressed by test case analog subscriber Key operation calls preset component manager interface, passes through system in android system described in the assembly management interface The interface data to be presented for being shown in the view interface of application program to be measured that layer reports.
Further, processor 1001 can call the automatic test program stored in memory 1005, also execute with Lower operation:
Preset adaptor interface is called, the view interface of the application program to be measured is obtained by the adaptor interface Shown in current interface data.
Further, processor 1001 can call the automatic test program stored in memory 1005, also execute with Lower operation:
When the assembly management interface is to the interface data to be presented, the interface data to be presented is sent To the adaptor interface;
The interface data to be presented is added to view circle of the application program to be measured by the adaptor interface In face.
The present embodiment through the above scheme, when application program to be measured carries out automatic test in android system, leads to The test case started for application program to be measured is crossed, and utilizes test case analog subscriber button operation, is then received View circle for being shown in application program to be measured generated based on user key-press operation that system layer reports in android system Interface data to be presented in face, while current interface data shown in the view interface of application program to be measured are obtained, then According to interface data to be presented and current interface data, determines and show the test mode of test result, efficiently solve existing The technical issues of automatic detection View interface datas being cannot achieve in technology applied to the white-box testing of android system so that Test result is more accurate, and by above-mentioned test mode, greatly reduces the work of tester.
Based on above-mentioned hardware configuration, automated testing method embodiment of the present invention is proposed.
It is the flow diagram of automated testing method first embodiment of the present invention with reference to Fig. 2, Fig. 2.
In the first embodiment, the automated testing method includes the following steps:
S10:In the test case of application program to be measured in starting to android system, is simulated and used by test case Family button operation receives the view interface for being shown in application program to be measured that system layer in the android system reports In interface data to be presented.
Specifically, receive that system layer in the android system reports in the present embodiment for being shown in be measured answer Operation with the interface data to be presented in the view interface of program is realized by preset assembly management interface, realization side Formula is specific as follows:
In the test case of application program to be measured in starting to android system, pressed by test case analog subscriber Key operation calls preset component manager interface, passes through system in android system described in the assembly management interface The interface data to be presented for being shown in the view interface of application program to be measured that layer reports.
It should be noted that preset assembly management interface described in the present embodiment, specially tester are writing Customized one interface for all application programs on management terminal device when test case executes in subsequent step S30 Operation, and realized in the interface, concrete implementation mode, those skilled in the art can be arranged as required to, It is not limited herein.
In addition, the above-mentioned interface data to be presented received is specifically to be generated based on user key-press operation, that is, exist After starting test case, when the jump method for hitting operating method or a certain interface of certain point button in test case is performed Afterwards, the interface in the automatic calling system layer of meeting obtains data from server or network.
In addition, the test case started in the present embodiment is specifically to be generated based on Espresso automated test frames.
It should be understood that a concrete mode for above-mentioned only kind of the generation test case provided, in practical applications, ability The technical staff in domain can choose suitable automated test frame as needed, for example, Robotium automated test frames and UIAutomator automated test frames etc., the automated test frame for being then based on selection write suitable test case, tool The realization method of body, is not limited herein.
S20:Obtain current interface data shown in the view interface of the application program to be measured.
Specifically, current interface data shown in the view interface of the application program to be measured are obtained in the present embodiment Operation realize that realization method is specific as follows by preset adaptor interface:
Call getText () function in preset adaptor interface, such as preset adaptor interface (in the description Other than the method for protection, other contents also try not to be indicated with method), then pass through the getText () method Obtain current interface data shown in the view interface of the application program to be measured.
It should be noted that preset adaptor interface described in the present embodiment, is similarly tester and is writing survey Customized interface when example on probation, specifically, the customized adaptor interface can be based in android system Primary adaptor interface (such as BaseAdapter) is realized, concrete implementation mode, those skilled in the art can basis It needs to be arranged, not be limited herein.
S30:According to the interface data to be presented and the current interface data, determines and show test result.
In order to make it easy to understand, a kind of determination is given below and shows the specific implementation of test result, it is specific as follows:
For example, being tied by judging whether the current interface data are consistent with the interface data to be presented to determine to test Fruit.
If specifically, the current interface data are consistent with the interface data to be presented, it is determined that the test result To be successfully tested, and show the information being successfully tested;If the current interface data and the interface data to be presented are inconsistent, It then determines that the test result is test crash, and shows the information of test crash
In addition, after determining test crash, the position that is abnormal in order to facilitate tester's orienting promptly and accurately It sets, and error reason, can determine that test result is test crash, and after showing the information of test crash, further Show the log information of test crash.
Book for convenience of description gives a kind of concrete implementation mode in this example, such as:
First, according to the interface data to be presented and the current interface data, determine inconsistent data content and The location of inconsistent data content information.
Then, raw according to the location of the inconsistent data content and the inconsistent data content information At the log information of test crash.
Finally, the obtained log information for recording failure information is illustrated in user interface, or directly generates one Text file, and this article this document is sent in specified equipment or in specified storage region, it is checked for tester.
It should be noted that being given above by way of example only, any limit is not constituted to technical scheme of the present invention Fixed, in practical applications, those skilled in the art can be arranged as required to, and not be limited herein.
In addition, it is necessary to illustrate, the automated testing method provided in the present embodiment, mainly it is applied to support On the terminal device of android system, such as the television set of android system, mobile phone, tablet computer, wearable device, herein It will not enumerate, any restrictions are also done not to this.
By foregoing description it is not difficult to find that automated testing method provided in this embodiment, is waited in android system When surveying application program progress automatic test, by startup for the test case of application program to be measured, and test case is utilized Analog subscriber button operation, then receive android system in system layer report based on user key-press operation generate be used for The interface data to be presented being shown in the view interface of application program to be measured, while obtaining the view interface of application program to be measured Shown in current interface data determine then according to interface data to be presented and current interface data and simultaneously show test result Test mode, efficiently solve in the prior art be applied to android system white-box testing cannot achieve automatic detection The technical issues of View interface datas so that test result is more accurate, and by above-mentioned test mode, greatly reduces survey The work of examination personnel.
Further, as shown in figure 3, propose automated testing method of the present invention based on first embodiment second implements Example before the current interface data shown in the view interface for obtaining the application program to be measured, needs in the present embodiment First judge whether the adaptor interface is added to the interface data to be presented the view interface of the application program to be measured In, subsequent operation is then carried out according to judging result.
For convenience of description, step S20 is refined as two sub-steps in the present embodiment, refers to Fig. 3.
In step s 201, it is described to be measured to judge whether the adaptor interface is added to the interface data to be presented In the view interface of application program.
Specifically, the interface data to be presented is added in the judgement adaptor interface described to be measured using journey When in the view interface of sequence, S202 is entered step, is executed current shown in the view interface for obtaining the application program to be measured The operation of interface data;Otherwise, step S201 is continued to execute, until judging the adaptor interface whether by the boundary to be presented Face data is added in the view interface of the application program to be measured, or until end automatic test operation.
It should be understood that in the concrete realization, in order to ensure that step S201 and S202 can be executed smoothly, needing in institute When stating assembly management interface to the interface data to be presented, the interface data to be presented is sent to the adapter Then the interface data to be presented is added to view circle of the application program to be measured by interface by the adaptor interface In face.
In step S202, current interface data shown in the view interface of the application program to be measured are obtained.
By foregoing description it is not difficult to find that the automated testing method provided in the present embodiment, to be measured answer is obtained executing Before current interface data shown in view interface with program, by judging whether preset adaptor interface has received Interface data to be presented, and perform the interface data to be presented that will be received and be added in the view interface of application program to be measured Operation, only determining that preset adaptor interface has received interface data to be presented, and perform and waited for what is received Displaying interface data is added to after the operation in the view interface of application program to be measured, just goes to execute acquisition application program to be measured View interface shown in current interface data operation, so as to avoid data to be shown are needed in for view interface After having loaded, data are just obtained from view interface, lead to the interface data to be presented got and current interface number According to unmatched situation, the accuracy of test result ensure that.
In addition, the embodiment of the present invention also provides a kind of automatic test device.As shown in figure 4, the automatic test fills It sets and may include:Receiving module 4001, acquisition module 4002, determining module 4003 and display module 4004.
Wherein, receiving module 4001 are used in the test case of application program to be measured in starting to android system, By test case analog subscriber button operation, receive that system layer in the android system reports is to be measured for being shown in Interface data to be presented in the view interface of application program.
It should be noted that the interface data to be presented received in this example is to be operated based on the user key-press It generates.
Acquisition module 4002, with for obtaining current interface number shown in the view interface of the application program to be measured According to.
Determining module 4003, for according to the interface data to be presented and the current interface data, determining test knot Fruit.
Display module 4004, for showing the test result.
It should be understood that in practical applications, those skilled in the art, which can be arranged as required to test result, is The no interface for being directly displayed at terminal device is uniformly checked if tester needs after the completion of entire Application testing Test result, then display module 4004 could alternatively be text generation module and output module, i.e., after determining test result, directly It delivers a child into test log, and test log is sent to specified equipment or the specified catalogue of preservation, concrete implementation mode, The present embodiment is not restricted.
The automatic test device of the present embodiment, the application program progress automatic test to be measured in android system When, by startup for the test case of application program to be measured, and test case analog subscriber button operation is utilized, then received View circle for being shown in application program to be measured generated based on user key-press operation that system layer reports in android system Interface data to be presented in face, while current interface data shown in the view interface of application program to be measured are obtained, then According to interface data to be presented and current interface data, determines and show the test mode of test result, efficiently solve existing The technical issues of automatic detection View interface datas being cannot achieve in technology applied to the white-box testing of android system so that Test result is more accurate, and by above-mentioned test mode, greatly reduces the work of tester.
It should be noted that the apparatus embodiments described above are merely exemplary, not to the protection of the present invention Range constitute limit, in practical applications, those skilled in the art can select according to the actual needs part therein or Person's whole module achieves the purpose of the solution of this embodiment, and is not limited herein.
In addition, the not technical detail of detailed description in the present embodiment, reference can be made to what any embodiment of the present invention was provided The information source switching method of Android TVs, details are not described herein again.
In addition, the embodiment of the present invention also proposes a kind of computer readable storage medium, the computer readable storage medium On be stored with automatic test program, following operation is realized when the automatic test program is executed by processor:
In the test case of application program to be measured in starting to android system, pressed by test case analog subscriber Key operation, receive that system layer in the android system reports for being shown in the view interface of application program to be measured Interface data to be presented, the interface data to be presented are based on user key-press operation and generate;
Obtain current interface data shown in the view interface of the application program to be measured;
According to the interface data to be presented and the current interface data, determines and show test result.
Further, following operation is also realized when the automatic test program is executed by processor:
Judge whether the current interface data are consistent with the interface data to be presented;
If the current interface data are consistent with the interface data to be presented, it is determined that the test result be test at Work(, and show the information being successfully tested;
If the current interface data and the interface data to be presented are inconsistent, it is determined that the test result is test Failure, and show the information of test crash.
Further, following operation is also realized when the automatic test program is executed by processor:
According to the interface data to be presented and the current interface data, determine inconsistent data content and it is described not The location of consistent data content information;
According to the location of the inconsistent data content and the inconsistent data content information, test is generated The log information of failure, and show the log information.
Further, following operation is also realized when the automatic test program is executed by processor:
In the test case of application program to be measured in starting to android system, pressed by test case analog subscriber Key operation calls preset component manager interface, passes through system in android system described in the assembly management interface The interface data to be presented for being shown in the view interface of application program to be measured that layer reports.
Further, following operation is also realized when the automatic test program is executed by processor:
Preset adaptor interface is called, the view interface of the application program to be measured is obtained by the adaptor interface Shown in current interface data.
Further, following operation is also realized when the automatic test program is executed by processor:
When the assembly management interface is to the interface data to be presented, the interface data to be presented is sent To the adaptor interface;
The interface data to be presented is added to view circle of the application program to be measured by the adaptor interface In face.
It should be noted that herein, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that process, method, article or system including a series of elements include not only those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or system institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including this There is also other identical elements in the process of element, method, article or system.
The embodiments of the present invention are for illustration only, can not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical scheme of the present invention substantially in other words does the prior art Going out the part of contribution can be expressed in the form of software products, which is stored in one as described above In storage medium (such as ROM/RAM, magnetic disc, CD), including some instructions use so that a station terminal equipment (can be mobile phone, Computer, server, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
It these are only the preferred embodiment of the present invention, be not intended to limit the scope of the invention, it is every to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of automated testing method, which is characterized in that the described method comprises the following steps:
In the test case of application program to be measured in starting to android system, grasped by test case analog subscriber button Make, receive that system layer in the android system reports waits opening up for being shown in the view interface of application program to be measured Show that interface data, the interface data to be presented are based on user key-press operation and generate;
Obtain current interface data shown in the view interface of the application program to be measured;
According to the interface data to be presented and the current interface data, determines and show test result.
2. the method as described in claim 1, which is characterized in that described according to the interface data to be presented and described to work as prezone Face data determines and shows test result, specifically includes:
Judge whether the current interface data are consistent with the interface data to be presented;
If the current interface data are consistent with the interface data to be presented, it is determined that the test result is to be successfully tested, And show the information being successfully tested;
If the current interface data and the interface data to be presented are inconsistent, it is determined that the test result is that test is lost It loses, and shows the information of test crash.
3. method as claimed in claim 2, which is characterized in that the determination test result is test crash, and is shown After the information of test crash, the method further includes:
According to the interface data to be presented and the current interface data, inconsistent data content and described inconsistent is determined The location of data content information;
According to the location of the inconsistent data content and the inconsistent data content information, test crash is generated Log information, and show the log information.
4. method as described in any one of claims 1 to 3, which is characterized in that described to be measured in starting to android system When the test case of application program, by test case analog subscriber button operation, system layer in the android system is received The interface data to be presented for being shown in the view interface of application program to be measured reported, specifically includes:
In the test case of application program to be measured in starting to android system, grasped by test case analog subscriber button Make, preset component manager interface is called, by system layer in android system described in the assembly management interface The interface data to be presented for being shown in the view interface of application program to be measured of report.
5. method as claimed in claim 4, which is characterized in that opened up in the view interface for obtaining the application program to be measured The current interface data shown, specifically include:
Preset adaptor interface is called, is obtained by the adaptor interface and is opened up in the view interface of the application program to be measured The current interface data shown.
6. method as claimed in claim 5, which is characterized in that it is described to call preset adaptor interface, pass through the adaptation Before device interface obtains current interface data shown in the view interface of the application program to be measured, the method includes:
When the assembly management interface is to the interface data to be presented, the interface data to be presented is sent to institute State adaptor interface;
The interface data to be presented is added in the view interface of the application program to be measured by the adaptor interface.
7. method as described in any one of claims 1 to 3, which is characterized in that it is automatic that the test case is based on Espresso Change test frame to generate.
8. a kind of automatic test device, which is characterized in that described device further includes:
Receiving module, in the test case of application program to be measured in starting to android system, passing through test case mould Quasi- user key-press operation receives the view for being shown in application program to be measured that system layer in the android system reports Interface data to be presented in interface, the interface data to be presented are based on user key-press operation and generate;
Acquisition module, for obtaining current interface data shown in the view interface of the application program to be measured;
Determining module, for according to the interface data to be presented and the current interface data, determining test result;
Display module, for showing the test result.
9. a kind of terminal device, which is characterized in that the terminal device includes:Memory, processor and it is stored in the storage On device and the automatic test program that can run on the processor, the automatic test program are arranged for carrying out such as right It is required that the step of automated testing method described in any one of 1 to 7.
10. a kind of computer readable storage medium, which is characterized in that be stored with automation on the computer readable storage medium Test program is realized automatic as described in any one of claim 1 to 7 when the automatic test program is executed by processor The step of changing test method.
CN201810413307.2A 2018-05-03 2018-05-03 Automated testing method, device, terminal device and computer readable storage medium Pending CN108614775A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810413307.2A CN108614775A (en) 2018-05-03 2018-05-03 Automated testing method, device, terminal device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810413307.2A CN108614775A (en) 2018-05-03 2018-05-03 Automated testing method, device, terminal device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN108614775A true CN108614775A (en) 2018-10-02

Family

ID=63661923

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810413307.2A Pending CN108614775A (en) 2018-05-03 2018-05-03 Automated testing method, device, terminal device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN108614775A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109840212A (en) * 2019-02-19 2019-06-04 百度在线网络技术(北京)有限公司 Function test method, device, equipment and the readable storage medium storing program for executing of application program
CN110597584A (en) * 2019-08-15 2019-12-20 香港乐蜜有限公司 Page adaptation testing method and device, electronic equipment and storage medium
CN112035336A (en) * 2019-06-04 2020-12-04 北京京东尚科信息技术有限公司 Test method, test device and readable storage medium
CN112699017A (en) * 2019-10-23 2021-04-23 拉扎斯网络科技(上海)有限公司 Sound testing method and device, electronic equipment and computer readable storage medium
CN113468069A (en) * 2021-07-22 2021-10-01 腾讯科技(成都)有限公司 Application testing method and device, computer equipment and storage medium
CN114636571A (en) * 2020-12-16 2022-06-17 北京配天技术有限公司 White box testing method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101067799A (en) * 2007-06-15 2007-11-07 华为技术有限公司 Terminal user interface testing method and device
CN102053911A (en) * 2010-12-30 2011-05-11 东莞宇龙通信科技有限公司 Automated testing method and system based on Android and mobile terminal
CN103151021A (en) * 2013-02-22 2013-06-12 广州视源电子科技股份有限公司 Data display method and test method of display device
US20160283072A1 (en) * 2013-03-19 2016-09-29 Nec Solution Innovators, Ltd. User-interface consistency-checking method, device and program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101067799A (en) * 2007-06-15 2007-11-07 华为技术有限公司 Terminal user interface testing method and device
CN102053911A (en) * 2010-12-30 2011-05-11 东莞宇龙通信科技有限公司 Automated testing method and system based on Android and mobile terminal
CN103151021A (en) * 2013-02-22 2013-06-12 广州视源电子科技股份有限公司 Data display method and test method of display device
US20160283072A1 (en) * 2013-03-19 2016-09-29 Nec Solution Innovators, Ltd. User-interface consistency-checking method, device and program

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109840212A (en) * 2019-02-19 2019-06-04 百度在线网络技术(北京)有限公司 Function test method, device, equipment and the readable storage medium storing program for executing of application program
CN109840212B (en) * 2019-02-19 2022-11-11 百度在线网络技术(北京)有限公司 Function test method, device and equipment of application program and readable storage medium
CN112035336A (en) * 2019-06-04 2020-12-04 北京京东尚科信息技术有限公司 Test method, test device and readable storage medium
CN110597584A (en) * 2019-08-15 2019-12-20 香港乐蜜有限公司 Page adaptation testing method and device, electronic equipment and storage medium
CN112699017A (en) * 2019-10-23 2021-04-23 拉扎斯网络科技(上海)有限公司 Sound testing method and device, electronic equipment and computer readable storage medium
CN114636571A (en) * 2020-12-16 2022-06-17 北京配天技术有限公司 White box testing method and device, electronic equipment and storage medium
CN113468069A (en) * 2021-07-22 2021-10-01 腾讯科技(成都)有限公司 Application testing method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN108614775A (en) Automated testing method, device, terminal device and computer readable storage medium
US7519864B2 (en) Automation test systems
CN104407980B (en) Mobile solution automatic test device and method
CN108255729B (en) Mobile phone game automatic testing method and system based on Unity platform
CN103377120B (en) A kind of applied program testing method and device
CN104166610B (en) Mobile terminal detection method and detection system
CN106844204B (en) Method and system for generating defect report by using mobile terminal
US8555253B2 (en) System and method for monitoring exploratory testing by a plurality of testers
CN105677571B (en) Mobile terminal software device for testing compatibility and method
CN103631703B (en) Software performance testing method and device in Android device
CN105183630B (en) Applied program testing method and device
KR20140038381A (en) Systems and methods for testing content of mobile communication devices
CN107908551A (en) Terminal software test method, device, terminal and computer-readable storage medium
CN103338129A (en) Method and apparatus for testing and displaying test results
CN106547687A (en) Application testing method, apparatus and system
CN107656872A (en) Method for testing software, device, equipment and computer-readable storage medium
CN110716853A (en) Test script recording method, application program testing method and related device
CN107967209A (en) It is a kind of to detect method, detection device and server wrong in the web page code of front end
CN105279067B (en) A kind of method and device of information reporting
CN108287789A (en) Batch-automated test method, device and electronic equipment
CN105868100A (en) Android system-based automatic test method and device
US8538987B1 (en) Care agent call classification
Widyanti et al. Usability evaluation of online transportation'user interface
CN110688173B (en) Positioning method and device of components in cross-platform interface framework and electronic equipment
Kulesovs iOS applications testing

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

Application publication date: 20181002