CN108595329A - A kind of application testing method, device and computer storage media - Google Patents

A kind of application testing method, device and computer storage media Download PDF

Info

Publication number
CN108595329A
CN108595329A CN201810367819.XA CN201810367819A CN108595329A CN 108595329 A CN108595329 A CN 108595329A CN 201810367819 A CN201810367819 A CN 201810367819A CN 108595329 A CN108595329 A CN 108595329A
Authority
CN
China
Prior art keywords
test
webpage
intended application
application
information
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.)
Granted
Application number
CN201810367819.XA
Other languages
Chinese (zh)
Other versions
CN108595329B (en
Inventor
高源�
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201810367819.XA priority Critical patent/CN108595329B/en
Publication of CN108595329A publication Critical patent/CN108595329A/en
Application granted granted Critical
Publication of CN108595329B publication Critical patent/CN108595329B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases

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 embodiment of the invention discloses a kind of application testing method, device and computer storage media, wherein method includes:Application to be measured is obtained, and survey application is treated according to test bag data and carries out beating again packet, obtains intended application;The process of intended application includes test bag data;According to the operational order for intended application, test bag data, webpage view is searched in the process of intended application, and control information associated with operational order in webpage view is obtained, and the operation behavior indicated by control information and operational order, generate test script;Load test script, and webpage view is searched in the process of intended application according to test script and test bag data, and the corresponding coordinate information of control information is searched in webpage view, and simulated operation is carried out to being located at the control at coordinate information in intended application, generate test result.Using the present invention, automatic test can be carried out to the mobile terminal web page program based on customized webview kernels.

Description

A kind of application testing method, device and computer storage media
Technical field
The present invention relates to a kind of field of computer technology more particularly to application testing method, device and computer storages to be situated between Matter.
Background technology
The quantity for the application program developed at present is more and more, in order to ensure the performance and quality of application program, is led to The content for often being required for testing application program, and testing is usually all relatively more and harsher, if manually carrying out one Test step by step then needs very high cost of labor, and therefore, automatic test is then particularly important.
Automatic test can also be carried out to mobile terminal web page program at present, current mainstream test mode can be:It is logical Cross the API (Application that Uiautomator (being the tool for user interface automatic test that Google releases) is provided Programming Interface, application programming interface) primary webview (nets in the web page program of mobile terminal can be obtained Page view, is used for the control of webpage) inner content of pages, and then automatic test is realized according to the content of pages of acquisition.But There is also many mobile terminal web page programs at present, and based on customized webview kernels, (such as Tencent develops X5webview it) realizes, at this point, being that can not grab effective page in customized webview by uiautomator Surface element, and then lead to not carry out automatic test to the mobile terminal web page program based on customized webview kernels.
Invention content
A kind of application testing method of offer of the embodiment of the present invention, device and computer storage media, can be to being based on making by oneself The mobile terminal web page program of the webview kernels of justice carries out automatic test.
On the one hand the embodiment of the present invention provides a kind of application testing method, including:
Application to be measured is obtained, and the application to be measured is carried out beating again packet according to test bag data, obtains intended application;Institute The process for stating intended application includes the test bag data;
According to the operational order for the intended application, the test bag data, in the process of the intended application Webpage view is searched, and obtains control information associated with the operational order in the webpage view, and according to the control Operation behavior indicated by part information and the operational order generates test script;
Load the test script, and according to the test script and the test bag data the intended application into The webpage view is searched in journey, and searches the corresponding coordinate information of the control information in the webpage view, and to institute It states the control being located in intended application at the coordinate information and carries out simulated operation, generate test result.
Wherein, further include:
Start the intended application, and initialize the test bag data in the intended application, and is the target The process creation process communication service of the process and test application of application;The process of the test application is for loading the test Script.
Wherein, the basis is directed to the operational order of the intended application, the test bag data, in the intended application Process in search webpage view, and obtain control information associated with the operational order in the webpage view, and root According to the operation behavior indicated by the control information and the operational order, test script is generated, including:
According to the test bag data, the interface that the intended application is read in the process of the intended application is corresponding View structure tree, and the view structure tree is traversed, generate view structure array;
The operational order for the intended application is received, and according to the view structure array in the operational order institute When the operating position of instruction finds webpage view, by inquiring content of pages progress time of the code segment to the webpage view It goes through, obtains traversing result;
The coordinate information of the operating position indicated by the operational order is obtained, and from the traversing result described in acquisition The corresponding control information of coordinate information;
The control information is back to the test application according to the call back function in the intended application, and described It converts the operation behavior indicated by the control information and the operational order to the test script in test application.
Wherein, the basis is directed to the operational order of the intended application, the test bag data, in the intended application Process in search webpage view, and obtain control information associated with the operational order in the webpage view, and root According to the operation behavior indicated by the control information and the operational order, test script is generated, including:
According to the test bag data, the interface that the intended application is read in the process of the intended application is corresponding View structure tree, and the view structure tree is traversed, generate view structure array;
The operational order for the intended application is received, and according to the view structure array in the operational order institute When the operating position of instruction finds webpage view, by loadURL from the content of pages of the webpage view, described in acquisition The control information of operating position indicated by operational order;
The control information got by loadURL is intercepted, and the institute that channel will be intercepted is registered by code speech It states control information and is back to the test application, and by the control information and the operational order in the test application Indicated operation behavior is converted into the test script.
Wherein, the load test script, and according to the test script and the test bag data in the mesh It marks in the process of application and searches the webpage view, and search the corresponding coordinate letter of the control information in the webpage view Breath, and simulated operation is carried out to being located at the control at the coordinate information in the intended application, test result is generated, including:
Load the test script in the process of the test application, and by the process communication service by the survey Test instruction in training sheet is sent to the process of the intended application;
It is instructed according to the test bag data and the test, the target is read in the process of the intended application and is answered The corresponding view structure tree in interface, and the view structure tree is traversed, generate view structure array;
If finding webpage in the indicated object to be operated of the test instruction according to the view structure array to regard Figure is searched then by inquiring code segment in the webpage view corresponding to the control information in the test script Control, and obtain the coordinate information of the control;
The coordinate information of the control is back to system testing frame by call back function;
Based on the system testing frame, carried out to being located at the control at the coordinate information in the intended application Simulated operation generates test result.
Wherein, further include:
Monitoring instruction is obtained, and self-defined webpage callback interface service is arranged according to monitoring instruction;
If detecting, the interface of the intended application includes the webpage view, triggers the self-defined webpage readjustment and connects Webpage monitoring information in mouth service monitoring and the interface for recording the intended application;
The Webpage monitoring information is added to the test result, and the test result after addition is shown Show.
Wherein, the acquisition monitoring instruction, and self-defined webpage callback interface service, packet are arranged according to monitoring instruction It includes:
Obtain monitoring instruction;
If the webpage view includes webpage callback interface service, the webpage is obtained according to monitoring instruction and is adjusted back Interface service, and the power function in the webpage callback interface service is written over, obtain self-defined webpage callback interface Service;
If the webpage view does not include webpage callback interface service, the self-defined webpage callback interface clothes are created Business.
Wherein, it if the interface for detecting the intended application includes the webpage view, triggers described self-defined Webpage monitoring information in webpage callback interface service monitoring and the interface for recording the intended application, including:
If detecting, the interface of the intended application includes the webpage view, triggers the self-defined webpage readjustment and connects Webpage in intended application described in mouth service monitoring;
If detecting that the Webpage is in starts stress state, pass through the self-defined webpage callback interface service In the first power function record webpage load start time information;
If detecting that the Webpage is in terminates stress state, pass through the self-defined webpage callback interface service In the second power function record webpage load end time information;
If detecting, the Webpage is in page jump state, passes through the self-defined webpage callback interface service In third power function record page jump information;
If detecting, the Webpage is in page load abnormality, passes through the self-defined webpage callback interface The 4th power function record page in service loads exception information;
If detecting, the Webpage is in resource request state, passes through the self-defined webpage callback interface service In five-function function statistics resource load quantity;
The webpage is loaded into start time information, webpage load end time information, page jump information, page load Exception information, resource load quantity, are determined as the Webpage monitoring information.
The embodiment of the present invention on the one hand provide it is a kind of apply test device, including:
Weight packetization module carries out beating again packet for obtaining application to be measured, and according to test bag data to the application to be measured, Obtain intended application;The process of the intended application includes the test bag data;
Script generation module, operational order, the test bag data for basis for the intended application, described Webpage view is searched in the process of intended application, and obtains control letter associated with the operational order in the webpage view Breath, and the operation behavior indicated by the control information and the operational order generate test script;
Test module, for loading the test script, and according to the test script and the test bag data in institute It states and searches the webpage view in the process of intended application, and search the corresponding seat of the control information in the webpage view Information is marked, and simulated operation is carried out to being located at the control at the coordinate information in the intended application, generates test result.
Wherein, further include:
Initialization module for starting the intended application, and initializes the test bag number in the intended application According to, and the process creation process communication service of the process and test application for the intended application;The process of the test application For loading the test script.
Wherein, the script generation module includes:
First array generation unit, for according to the test bag data, institute to be read in the process of the intended application The corresponding view structure tree in interface of intended application is stated, and the view structure tree is traversed, generates view structure array;
Page Traversal Unit, for receiving the operational order for the intended application, and according to the view structure number When operating position of the group indicated by the operational order finds webpage view, by inquiring code segment to the webpage view Content of pages traversed, obtain traversing result;
First control acquiring unit, the coordinate information for obtaining the operating position indicated by the operational order, and from The corresponding control information of the coordinate information is obtained in the traversing result;
First script conversion unit, for being back to the control information according to the call back function in the intended application The test application, and by the operation behavior indicated by the control information and the operational order in the test application It is converted into the test script.
Wherein, the script generation module includes:
Second array generation unit, for according to the test bag data, institute to be read in the process of the intended application The corresponding view structure tree in interface of intended application is stated, and the view structure tree is traversed, generates view structure array;
Second control acquiring unit, for receiving the operational order for the intended application, and according to the view knot When operating position of the structure array indicated by the operational order finds webpage view, regarded from the webpage by loadURL In the content of pages of figure, the control information of the operating position indicated by the operational order is obtained;
Second script conversion unit for intercepting the control information got by loadURL, and passes through code speech The control information intercepted is back to the test application by registration channel, and by the control in the test application Operation behavior indicated by information and the operational order is converted into the test script.
Wherein, the test module includes:
Instruction sending unit, for loading the test script in the process of the test application, and by it is described into Test instruction in the test script is sent to the process of the intended application by journey communication service;
Third array generation unit, for being instructed according to the test bag data and the test, in the intended application Process in read the corresponding view structure tree in interface of the intended application, and the view structure tree is traversed, it is raw At view structure array;
Coordinate acquiring unit, if for be operated right indicated by the test instruction according to the view structure array Webpage view is found as in, then by inquiring code segment in the webpage view, is searched described in the test script Control corresponding to control information, and obtain the coordinate information of the control;
Coordinate transmission unit, for the coordinate information of the control to be back to system testing frame by call back function;
Simulated operation unit is believed for being based on the system testing frame being located at the coordinate in the intended application The control at breath carries out simulated operation, generates test result.
Wherein, further include:
Setup module for obtaining monitoring instruction, and is arranged self-defined webpage callback interface according to monitoring instruction and takes Business;
Monitoring module, if for detecting that the interface of the intended application includes the webpage view, triggering is described certainly Webpage monitoring information in definition webpage callback interface service monitoring and the interface for recording the intended application;
Display module, for the Webpage monitoring information to be added to the test result, and to the survey after addition Test result is shown.
Wherein, the setup module includes:
Instruction acquisition unit, for obtaining monitoring instruction;
Function rewriting unit refers to if including webpage callback interface service for the webpage view according to the monitoring It enables and obtains the webpage callback interface service, and the power function in the webpage callback interface service is written over, obtain Self-defined webpage callback interface service;
Creating unit creates the self-defined net if not including webpage callback interface service for the webpage view Page callback interface service.
Wherein, the monitoring module includes:
Trigger element, if for detecting that the interface of the intended application includes the webpage view, triggering is described certainly Define the Webpage in intended application described in webpage callback interface service monitoring;
Monitoring information recording unit, if starting stress state for detecting that the Webpage is in, by described The first power function record webpage in self-defined webpage callback interface service loads start time information;
The monitoring information recording unit is led to if being additionally operable to detect that the Webpage is in end stress state Cross the second power function record webpage load end time information in the self-defined webpage callback interface service;
The monitoring information recording unit is led to if being additionally operable to detect that the Webpage is in page jump state Cross the third power function record page jump information in the self-defined webpage callback interface service;
The monitoring information recording unit, if being additionally operable to detect that the Webpage is in page load abnormality, The page is then recorded by the 4th power function in the self-defined webpage callback interface service and loads exception information;
The monitoring information recording unit is led to if being additionally operable to detect that the Webpage is in resource request state Cross the five-function function statistics resource load quantity in the self-defined webpage callback interface service;
Determination unit, for the webpage to be loaded start time information, webpage load end time information, page jump Information, page load exception information, resource load quantity, are determined as the Webpage monitoring information.
On the one hand the embodiment of the present invention provides a kind of terminal device, including:Processor and memory;
The processor is connected with memory, wherein for storing program code, the processor is used for the memory Said program code is called, to execute such as the method in one side in the embodiment of the present invention.
On the one hand the embodiment of the present invention provides a kind of computer storage media, the computer storage media is stored with meter Calculation machine program, the computer program include program instruction, and described program is instructed when being executed by a processor, executed such as the present invention Method in embodiment in one side.
The embodiment of the present invention treats survey application according to test bag data and carries out beating again packet by obtaining application to be measured, obtains To intended application;The process of intended application includes test bag data;According to operational order, the test bag number for intended application According to, webpage view is obtained in the process of intended application, and obtain control information associated with operational order in webpage view, And the operation behavior indicated by control information and operational order, generate test script;Load test script, and according to survey Training sheet and test bag data obtain webpage view in the process of intended application, and control information pair is searched in webpage view The coordinate information answered, and simulated operation is carried out to being located at the control at coordinate information in intended application, generate test result.It can be seen that By beating again the mechanism of packet, it can so that the process of intended application includes test bag data, and then test bag data can be based on Realize the crawl to the control information in primary webpage view or customized webpage view (such as X5webview) and event mould It is quasi-, so as to realize that recording and the automatic test of test script, package can be not only adapted to based on X5webview's Wechat small routine can be applicable in the application of all X5 kernels, i.e., the embodiment of the present invention can be to based on primary webpage View or applying based on customized webpage view carry out automatic test.
Description of the drawings
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with Obtain other attached drawings according to these attached drawings.
Fig. 1 is a kind of flow diagram of application testing method provided in an embodiment of the present invention;
Fig. 2 is a kind of interface schematic diagram of test application provided in an embodiment of the present invention;
Fig. 3 is the process interaction schematic diagram between a kind of test application and intended application provided in an embodiment of the present invention;
Fig. 4 is a kind of flow diagram of test script method for recording provided in an embodiment of the present invention;
Fig. 5 is a kind of flow diagram of automated testing method provided in an embodiment of the present invention;
Fig. 6 is a kind of flow diagram of page monitoring method provided in an embodiment of the present invention;
Fig. 7 is a kind of structural schematic diagram using test device provided in an embodiment of the present invention;
Fig. 8 is a kind of structural schematic diagram of terminal device provided in an embodiment of the present invention.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art are obtained every other without creative efforts Embodiment shall fall within the protection scope of the present invention.
Fig. 1 is referred to, is a kind of flow diagram of application testing method provided in an embodiment of the present invention, the method can To include:
S101 obtains application to be measured, and carries out beating again packet to the application to be measured according to test bag data, obtains target and answers With;The process of the intended application includes the test bag data;
Specifically, user terminal can obtain application to be measured by test application, answered for example, can be shown in test application With list, which may include multiple Apply Names, and user can click some Apply Names in the list of application, And then user terminal chooses the corresponding application of the Apply Names according to click commands, as application to be measured.Test application can be Refer to the application for being tested application program of installation in the user terminal.The test application may include testing service, The testing service can provide test bag data and beat again packet function, i.e., after test application chooses application to be measured, can pass through Test bag data carries out the application to be measured to beat again packet, i.e. test bag data can be packed into application to be measured by testing service In, then intended application will be referred to as comprising the application to be measured for testing bag data, test bag data can be dex files.Wherein, it surveys It may include test module code to try bag data, which has the work(for obtaining the control information in current page Can, therefore, intended application can make intended application have the control obtained in current page by running the test module code The function of part information.
Application to be measured is carried out after beating again packet, intended application can be started, in start-up course, mesh can also be loaded together Test bag data in mark application, and test bag data is initialized, the process of the initialization may include:Initialization Katapplication, initialization Art Hook.Katapplication is properly termed as customized application initialization class, In android system, each to be first carried out using initialization class using startup, the effects of katapplication herein are Communication service and registration interface interception service will be established when application initializes, i.e., can be based on during the initialization Katapplication is the process creation process communication service of the process and test application of intended application, the process communication service Can be socketserver, socketserver can provide socket communications, i.e., may be implemented by socketserver Data communication between two different application processes.Process communication service is in the process of intended application.Wherein, Art Hook can be referred to as method interception, and effect can be intercepted when system is called to some method, to execute this Front and back execute of method specifies function.Therefore, the embodiment of the present invention, can be after tested application starts by initializing Art Hook It is intercepted based on Art Hook, to open socket communication services.Initialize katapplication, initialization Art Hook Process realized in the process of intended application.
S102, according to the operational order for the intended application, the test bag data, the intended application into Webpage view is searched in journey, and obtains control information associated with the operational order in the webpage view, and according to institute The operation behavior indicated by control information and the operational order is stated, test script is generated;
Specifically, webpage view may include original webview or X5webview.Before executing automatic test, also The test script of intended application need to be generated, the test script to intended application for subsequently carrying out automatic test.At user's end The recording button for recording test script can be shown in the interface of test application in end, the recording when the user clicks is pressed Key, user terminal can trigger test application and send script record command, test application can specifically pass through according to click commands Script record command is sent to intended application by socket communications, and the socketserver in intended application listens to script record , can be based on the function and the script record command that test bag data is provided after system order, start recording user is to target All operation behaviors (including such as intended application is clicked, slides operation) of application, and each operation row can be recorded Information for the information of the middle control operated, control may include the xpath of control (extensible markup language path language) Information.Recording the detailed process of the information of the control operated in each operation behavior can be:Based on the survey in intended application Examination bag data can reflect the views trees for reading current activity (since test bag data is in same with intended application In process, so views trees can be directly obtained based on test bag data, the original in views trees can also be equally got Beginning webview or X5webview), then entire views trees are traversed by the ergodic algorithm of depth-first, then it is stored in list numbers In group, then according to the operational order for intended application in list arrays and recording process (such as clicked, caused by sliding Operational order), whether the indicated coordinate information of search operation instruction has primary webview or X5webview, if so, then Based on JavaScript, (a kind of literal translation formula script, is a kind of regime type, weak type, the language based on prototype, interior for injection Set support type) inquiry code segment, mobile terminal Webpage can be traversed (in such as wechat small routine by the inquiry code segment Webpage) document, searched in document by the coordinate information indicated by operational order qualified Control (control for being located at the coordinate information indicated by operational order), and the control information of the qualified control is obtained, Control information, all operation behaviors recorded are back to finally by the evaluateJavascript call back functions provided Test application, and convert the operation behavior indicated by the control information and the operational order in the test application For the test script, i.e. operation behavior information caused by each operation of user to intended application and the control operated Information can be converted into test script, until user terminates the operation to intended application, then complete entire script and recorded Journey.Wherein, evaluateJavascript is the method name that android system provides, and can also be referred to as Javascript codes execute function.
S103 loads the test script, and is answered in the target according to the test script and the test bag data The webpage view is searched in process, and the corresponding coordinate information of the control information is searched in the webpage view, And simulated operation is carried out to being located at the control at the coordinate information in the intended application, generate test result.
Specifically, after having recorded test script, user terminal can load test script by test application, survey Examination application can generate rule test instruction during the loading process, and one by one communicate every test instruction by socket It is sent in the process communication service of intended application, and then test bag data can be based on and execute every one by one in intended application The indicated content of test instruction.Wherein, the sequence for sending test instruction and each operation during recording test script The sequence consensus of behavior, and for intended application during the as recording test script of the content indicated by a test instruction One operation behavior, and it can also includes control information associated with operational order in recording process to test instruction.Target is answered After receiving test instruction, you can read the corresponding activity's of test instruction based on test bag data reflection Views trees based on test bag data (since test bag data is in intended application in same process, so can be directly acquired To views trees, the original webview or X5webview in views trees can also be equally got), then pass through depth-first Ergodic algorithm traverses entire views trees, then is stored in list arrays, then according to test instruction and list arrays, searches and surveys Examination instructs whether included operation object has primary webview or X5webview, if so, then injection is based on The inquiry code segment of JavaScript includes control information (the xpath information of such as control) in being instructed due to test, so being not necessarily to It is based on the document that the inquiry code segment traverses mobile terminal Webpage (i.e. the Webpage of intended application) again again, only needs By the control corresponding to the control information in inquiry code segment search test instruction, and the control is obtained in Webpage Coordinate information, then by evaluateJavascript provide call back function the coordinate information of control is returned to Instrumentation frames.In instrumentation frames, the operation behavior in being instructed based on test, to acquisition Control at coordinate information carries out simulated operation, and the operation behavior that such as test instruction includes is " carrying out clicking operation to control A ", Simulation click then can be carried out to the control A at coordinate information based on instrumentation frames, and then obtain simulation behaviour Make corresponding output as a result, when completing each test instruction in test script, that is, completes the automation to intended application Test, and then instruct corresponding output result to be determined as test result each test, tester can be by test result It is compared with expected results, to analyze the performance of intended application.
Since test bag data is in the process of intended application, so the test function that test bag data is provided can be straight The content of pages of original webview or X5webview in crawl intended application is connect, therefore, even if intended application uses certainly The X5webview (such as intended application is the small routine in wechat) of definition, the test that can also be provided by testing bag data Function directly grabs the Webpage content of intended application, can be successfully that intended application carries out test script record therefore System can also successfully be based on test script and carry out automatic test to intended application.Since test bag data is answered in target In process, so the test function that test bag data is provided can also directly invoke original webview in intended application Or the evaluateJavascript methods of X5webview, evaluateJavascript methods are system API approaches, so The callback method stability that evaluateJavascript methods provide is relatively high.Therefore, the embodiment of the present invention is by beating again packet Mechanism, can make intended application process include test bag data, and then can be based on test bag data realize control letter The crawl of breath and event simulation, package can not only be adapted to wechat small routine, can for the application of all X5 kernels It is applicable in, solves the problems, such as that test frame can not be adapted to X5webview in the prior art.
Further, illustrate please also refer to the interface that Fig. 2, Fig. 2 are a kind of test applications provided in an embodiment of the present invention Figure.As shown in Fig. 2, showing the interface of test application in the display screen of user terminal 100, the interface of test application may include: List of application 200c, " script recording " button 200a, " test " button 200b, wherein list of application 200c can show multiple The title of application shows the title of A applications, B applications, C applications in list of application 200c as shown in Figure 2.When user is from application Selection A is clicked in list 200c in application, then can A applications be determined as application to be measured, when user continues to click " script record When system " button 200a, then A applications can be carried out beating again package operation, and be determined as intended application by the A applications after wrapping are beaten again, And start and show A applications, and realized to application A progress test script recordings by the test bag data in the process of A applications (detailed process of recording may refer to the S102 in above-mentioned Fig. 1 corresponding embodiments), after having recorded test script, user can be after It is continuous to click " test " button 200b, and then test application can start load test script, and it is again started up and shows that A is applied, The test instruction that load test script is generated is sent to A applications by test application, and passes through the test bag in the process of A applications Data and test instruction realize that (detailed process of automatic test may refer to above-mentioned Fig. 1 to application A progress automatic test S103 in corresponding embodiment).
Further, it is a kind of test application and intended application provided in an embodiment of the present invention please also refer to Fig. 3, Fig. 3 Between process interaction schematic diagram.As shown in figure 3, test application, by taking the xtest that Tencent develops as an example, intended application is with above-mentioned figure For A applications in 2 corresponding embodiments, after starting xtest, if user selects A applications to carry out by above-mentioned interface shown in Fig. 2 Test script is recorded, then the corresponding testing services of xtest (xtestserver) can be by test bag data (i.e. class.dex) It is bundled to again in the process of A applications, and starts A applications, application initialization class is executed according to the test bag data in A application processes (carrying out katapplication initialization), and method interception is initialized and (carries out art hook initialization), Here attach methods are opened and intercept function, after the completion of application initializes, each process can be carried out a side attach Method, when going to this method, the process creation process communication service of the process for being xtest and A applications is (i.e. Socketserver), xtest is waited for send request instruction, i.e. the process of xtest and the process of A applications can pass through socket Communication, and realized by class.dex and the test script that A is applied is recorded.After having recorded test script, if user pass through it is above-mentioned Selection A applications in interface shown in Fig. 2 carry out automatic test, then xtest can be with load test script, and the test that will be generated Instruction is sent to the socketserver in A application processes by socket communications, and then can be answered in A based on class.dex It is instructed (coordinate information of operation behavior and control to be operated as indicated by extraction test instruction) with middle processing test, and Obtained coordinate information after test instruction processing is adjusted back and gives system testing frame (i.e. instrumentation frames), and Simulation behaviour is carried out to the control of coordinate information based on the indicated operation behavior of test instruction by instrumentation frames Make.
The embodiment of the present invention treats survey application according to test bag data and carries out beating again packet by obtaining application to be measured, obtains To intended application;The process of intended application includes test bag data;According to operational order, the test bag number for intended application According to, webpage view is obtained in the process of intended application, and obtain control information associated with operational order in webpage view, And the operation behavior indicated by control information and operational order, generate test script;Load test script, and according to survey Training sheet and test bag data obtain webpage view in the process of intended application, and control information pair is searched in webpage view The coordinate information answered, and simulated operation is carried out to being located at the control at coordinate information in intended application, generate test result.It can be seen that By beating again the mechanism of packet, it can so that the process of intended application includes test bag data, and then test bag data can be based on Realize the crawl to the control information in primary webpage view or customized webpage view (such as X5webview) and event mould It is quasi-, so as to realize that recording and the automatic test of test script, package can be not only adapted to based on X5webview's Wechat small routine can be applicable in the application of all X5 kernels, i.e., the embodiment of the present invention can be to based on primary webpage View or applying based on customized webpage view carry out automatic test.
Fig. 4 is referred to, is a kind of flow diagram of test script method for recording provided in an embodiment of the present invention, the side S201-S206 steps in method are the specific descriptions to S102 steps in above-mentioned Fig. 2 corresponding embodiments, and the method can wrap It includes:
S201 reads the interface of the intended application according to the test bag data in the process of the intended application Corresponding view structure tree, and the view structure tree is traversed, generate view structure array;
Specifically, comprising test bag data in the process of intended application, test bag data is set by way of beating again packet It sets in the process of intended application, the particular content for testing bag data may refer to S101 in above-mentioned Fig. 2 corresponding embodiments. Execute automatic test before, also need generate intended application test script, the test script for subsequently to intended application into Row automatic test.It can show in the interface of test application in the user terminal and be pressed for recording the recording of test script Key, the recording button, user terminal can trigger test application and send script recording life according to click commands when the user clicks It enables, after the test bag data decryptor to the script record command in intended application, which can record according to the script All operation behaviors of the order start recording user processed to intended application.When test script starts to record, user terminal can be with According to the test bag data, the corresponding view structure in interface of the intended application is read in the process of the intended application Tree, and the view structure tree is traversed by the ergodic algorithm of depth-first, and traversing result is stored in view knot In structure array (i.e. list arrays).Wherein, since test bag data is in the process of intended application, so passing through test bag number The views trees at the interface of the intended application can be directly read in the process of intended application according to corresponding test module (i.e. View structure tree).Due to being the views trees directly read in the process of intended application, even if so views trees include webpage View (such as original webview or X5webview), and complete views trees can be read, you can successfully to read Webpage view in views trees.
S202 receives the operational order for the intended application, and according to the view structure array in the operation When the indicated operating position of instruction finds webpage view, by inquire code segment to the content of pages of the webpage view into Row traversal, obtains traversing result;
Specifically, during recording test script, whenever receiving the operational order for intended application (such as by point Hit operational order caused by operation, slide) when, the behaviour indicated by the operational order can be detected according to list arrays Make whether position includes webpage view, if including webpage view, injects the inquiry code segment based on JavaScript, by this Inquiry code segment can traverse the document in the content of pages of webpage view, i.e. traversing result includes the document.
S203 obtains the coordinate information of the operating position indicated by the operational order, and is obtained from the traversing result Take the corresponding control information of the coordinate information;
Specifically, user terminal further obtains the coordinate information of the operating position indicated by operational order, wherein traversal Result may include the corresponding coordinate information of all controls and control information (such as xpath information) in Webpage, therefore, user Terminal can obtain the corresponding control information of the coordinate information according to the coordinate information got in traversing result.
The control information is back to the test application by S204 according to the call back function in the intended application, and It converts the operation behavior indicated by the control information and the operational order to the test in the test application Script;
Specifically, since test bag data is in the process of intended application, so the test that test bag data is provided Function can also directly invoke the evaluateJavascript methods of original webview or X5webview in intended application, EvaluateJavascript methods are system API approaches, so the callback method that evaluateJavascript methods provide Stability is relatively high.And then user terminal can be returned control information by the evaluateJavascript call back functions provided Return test application, i.e. operation behavior information caused by each operation of user to intended application and the control information operated It may return in test application, and will be indicated by the control information and the operational order in the test application Operation behavior be converted into the test script, until user terminates the operation to intended application, then complete entire script and record Process.
Optionally, in above-mentioned S202, the operational order for the intended application is being received, and according to the view structure It, can also be by loadURL from the net when operating position of the array indicated by the operational order finds webpage view In the content of pages of page view, the control information of the operating position indicated by the operational order is obtained, wherein loadURL can To be a kind of script execution, specifically for load scripted code section and execute;Intercept the control got by loadURL Part information, and channel is registered by code speech, the control information intercepted is back to the test application, and in institute It states in test application and converts the operation behavior indicated by the control information and the operational order to the test script. Wherein, although calling the loadUrl methods of X5webview by reflection, the content of Webpage can be also grabbed, LoadUrl methods are no return values, so to return to control information to test lead, it is necessary to utilize hook technical intercepts LoadUrl methods, the bridge for then utilizing addJavaScriptInterface registrations Java to be communicated with Javascript, the bridge Beam is code speech registration channel, and registers the return that control information may be implemented in channel by code speech, and then to reach To the purpose of automatic test.Wherein, addJavaScriptInterface can be referred to as Javascript interfaces registration side Method, and be used for system registry Javascript calling interfaces, after registration, so that it may to utilize loadurl methods in the ends java tune With Javascript methods.
The embodiment of the present invention can so that the process of intended application includes test bag data by beating again the mechanism of packet, into And it can be realized to the control in primary webpage view or customized webpage view (such as X5webview) based on test bag data The crawl of part information, so as to realize that the recording of test script, package can be not only adapted to based on the micro- of X5webview Believe that the test script of small routine is recorded, the application of all X5 kernels can be applicable in.
Fig. 5 is referred to, is a kind of flow diagram of automated testing method provided in an embodiment of the present invention, the method In S301-S305 steps be specific descriptions to S103 steps in above-mentioned Fig. 2 corresponding embodiments, the method may include:
S301 loads the test script in the process of the test application, and being serviced by the process communication will Test instruction in the test script is sent to the process of the intended application;
Specifically, after having recorded test script, user terminal can load test script by test application, survey Examination application can generate rule test instruction during the loading process, and one by one communicate every test instruction by socket It is sent in the process communication service of intended application, and then every can be executed one by one based on test bag data in intended application The indicated content of test instruction.Wherein, the sequence for sending test instruction and each operation during recording test script The sequence consensus of behavior, and for intended application during the as recording test script of the content indicated by a test instruction One operation behavior, and it can also includes control information associated with operational order in recording process to test instruction.
S302 is instructed according to the test bag data and the test, in the process of the intended application described in reading The corresponding view structure tree in interface of intended application, and the view structure tree is traversed, generate view structure array;
Specifically, after intended application receives test instruction, you can read test instruction based on test bag data reflection The views trees of corresponding activity are (since test bag data is in intended application in same process, so based on test Bag data can be directly obtained views trees, can also equally get original webview in views trees or X5webview), the corresponding view structure tree in interface which can be referred to as intended application, then pass through depth-first Ergodic algorithm traverses entire views trees, then traversing result is stored in list arrays (i.e. view structure array).
S303, if finding net in the indicated object to be operated of the test instruction according to the view structure array Page view, then by inquiring code segment in the webpage view, the control information institute searched in the test script is right The control answered, and obtain the coordinate information of the control;
Specifically, user terminal can search test according to test instruction and list arrays instructs included operation pair As if it is no have webpage view (such as primary webview or X5webview), if so, then inject the inquiry based on JavaScript Code segment includes control information (the xpath information of such as control) in being instructed due to test, so no longer needing to be based on the inquiry code Duan Chongxin traverses the document of mobile terminal Webpage, and the control that need to be only tested in instruction by the inquiry code segment search is believed The corresponding control of breath, and obtain coordinate information of the control in Webpage.
The coordinate information of the control is back to system testing frame by S304 by call back function;
Specifically, since test bag data is in the process of intended application, so the corresponding test mould of test bag data Block can also directly invoke the evaluateJavascript methods of original webview or X5webview in intended application, because This, which, which can be returned to the coordinate information of control by the call back function that evaluateJavascript is provided, is System test frame, which can refer to instrumentation frames.
S305 is based on the system testing frame, to being located at the control at the coordinate information in the intended application Part carries out simulated operation, generates test result;
Specifically, based on the operation behavior in instrumentation frames, test instruction, the coordinate of acquisition is believed Control at breath carries out simulated operation, and the operation behavior that such as test instruction includes is " carrying out clicking operation to control A ", then is based on Instrumentation frames can carry out simulation click to the control A at coordinate information, and then obtain simulated operation correspondence Output as a result, when complete test script in each test instruction, that is, complete the automatic test to intended application, into And instruct corresponding output result to be determined as test result each test, which may be displayed on user terminal In interface, tester can compare test result and expected results, to analyze the performance of intended application.Alternatively, Test can also be instructed corresponding output result to be compared with expected results by user terminal, and comparing result is determined as testing As a result.
The embodiment of the present invention can so that the process of intended application includes test bag data by beating again the mechanism of packet, into And it can be realized to the control in primary webpage view or customized webpage view (such as X5webview) based on test bag data The crawl of part information and event simulation, so as to realize the automatic test based on test script, package not only can be with It is adapted to the wechat small routine based on X5webview, the application of all X5 kernels can be applicable in, i.e., the embodiment of the present invention can To carry out automatic test to the application based on primary webpage view or based on customized webpage view.
Fig. 6 is referred to, is a kind of flow diagram of page monitoring method provided in an embodiment of the present invention, the method can To be executed after the S102 steps in above-mentioned Fig. 2 corresponding embodiments, i.e., this method can after generating test script, and It is executed during carrying out automatic test according to test script.The method may include:
S401 obtains monitoring instruction, and self-defined webpage callback interface service is arranged according to monitoring instruction;
Specifically, any moment in carrying out automatic test course to intended application according to test script, it can be with Monitoring instruction is initiated by test script, i.e. monitoring instruction can be encapsulated in test script in advance, and test application is loading During test script, the monitoring in test script can be instructed to be sent in intended application by socket communications and tested In the corresponding test module of bag data, which can also receive test script while receiving monitoring instruction In test instruction, i.e. the test module can be monitored operation according to monitoring instruction simultaneously, and according to test instruction progress Automatic test operates.After the test module receives monitoring instruction, acquisition webpage view can be instructed (such as primary according to monitoring Webview or X5webview), and detect whether the webpage view includes webpage callback interface service, webpage callback interface clothes Business can refer to webviewclient.If webpage view includes webviewclient, which can be right Power function in webviewclient is written over, and obtains self-defined webpage callback interface service, i.e., self-defined webpage readjustment Interface service includes the power function after rewriteeing, and the power function after these rewritings may include the first power function (onPageStarted), the second power function (onPageFinished), third power function (shouldOverrideUrlLoading), the 4th power function (onReceivedError), five-function function (shouldInterceptRequest).OnPageStarted be for monitoring page load at the beginning of, and starting plus It can be adjusted back when contained network page;OnPageFinished is the time completed for monitoring page load, and when terminating to load webpage It can adjust back;ShouldOverrideUrlLoading is to monitor page jump information for redirecting by intercepting url; OnReceivedError is to load exception information for monitoring the page, and can be adjusted back when loading page malfunctions; ShouldInterceptRequest is to load number for counting resource, and can pass through the function when asking resource each time To adjust back.If webpage view does not include webviewclient, which can directly be that webpage view establishment is corresponding Self-defined webpage callback interface service, created self-defined webpage callback interface service equally comprising onPageStarted, onPageFinished、shouldOverrideUrlLoading、onReceivedError、 shouldInterceptRequest。
S402, if detecting, the interface of the intended application includes the webpage view, triggers the self-defined webpage Webpage monitoring information in callback interface service monitoring and the interface for recording the intended application;
If specifically, detecting that the interface of the intended application includes the webpage view, that is, illustrate that intended application redirects To mobile terminal Webpage (Webpage showed when being applied into small routine such as wechat), made by oneself at this point it is possible to trigger this Webpage in adopted webpage callback interface service monitoring intended application;If detecting that the Webpage is in start to load shape State then records webpage by the first power function in the self-defined webpage callback interface service and loads start time information; If detecting that the Webpage is in terminates stress state, pass through second in the self-defined webpage callback interface service Power function records webpage and loads end time information;If detecting, the Webpage is in page jump state, passes through Third power function in the self-defined webpage callback interface service records page jump information;If detecting the webpage page Face is in page load abnormality, then passes through the 4th power function record page in the self-defined webpage callback interface service Face loads exception information;If detecting, the Webpage is in resource request state, is adjusted back by the self-defined webpage Five-function function statistics resource in interface service loads quantity.The webpage is loaded into start time information, webpage load End time information, page jump information, page load exception information, resource load quantity, are determined as the Webpage prison Control information.Wherein, start time information is loaded by webpage and webpage loads end time information, page-out load can be calculated Time.
The Webpage monitoring information is added to the test result by S403, and to the test result after addition into Row display.
Specifically, the Webpage monitoring information is added to the test result so that Webpage monitoring information It can be carried out in the display screen of user terminal in the form of report together with by the obtained test result of automatic test Display.
The embodiment of the present invention can so that the process of intended application includes test bag data by beating again the mechanism of packet, into And it can be realized to the control in primary webpage view or customized webpage view (such as X5webview) based on test bag data The crawl of part information and event simulation, so as to realize that recording and the automatic test of test script, package not only may be used To be adapted to the wechat small routine based on X5webview, the application of all X5 kernels can be applicable in, i.e. the embodiment of the present invention Automatic test can be carried out to the application based on primary webpage view or based on customized webpage view;It simultaneously can also be right It is effectively monitored in Webpage, page load time, page jump information, the abnormal letter of page load can be got Breath, resource load quantity.
Fig. 7 is referred to, is a kind of structural schematic diagram using test device provided in an embodiment of the present invention.The application test Device 1 may include:Weight packetization module 10, initialization module 20, script generation module 30, test module 40, setup module 50, Monitoring module 60, display module 70;
Weight packetization module 10 beats again the application to be measured for obtaining application to be measured, and according to test bag data Packet, obtains intended application;The process of the intended application includes the test bag data;
Initialization module 20 for starting the intended application, and initializes the test bag in the intended application Data, and the process creation process communication service of the process and test application for the intended application;The test application into Journey is for loading the test script;
Script generation module 30, operational order, the test bag data for basis for the intended application, in institute It states and searches webpage view in the process of intended application, and obtain control associated with the operational order in the webpage view Information, and the operation behavior indicated by the control information and the operational order generate test script;
Test module 40 exists for loading the test script, and according to the test script and the test bag data The webpage view is searched in the process of the intended application, and it is corresponding to search in the webpage view control information Coordinate information, and simulated operation is carried out to being located at the control at the coordinate information in the intended application, generate test result.
Wherein, weight packetization module 10, initialization module 20, script generation module 30, the concrete function of test module 40 are real Existing mode may refer to the S101-S103 in above-mentioned Fig. 1 corresponding embodiments, be not discussed here.
Self-defined webpage callback interface is arranged for obtaining monitoring instruction, and according to monitoring instruction in setup module 50 Service;
Monitoring module 60, if for detect the intended application interface include the webpage view, triggering described in Webpage monitoring information in self-defined webpage callback interface service monitoring and the interface for recording the intended application;
Display module 70, for the Webpage monitoring information to be added to the test result, and to addition after Test result is shown.
Wherein, setup module 50, monitoring module 60, display module 70 concrete function realization method may refer to above-mentioned figure S401-S403 in 6 corresponding embodiments, is not discussed here.
Further, then Fig. 7 is referred to, the script generation module 30 may include in the figure 7:First array generation unit 301, page Traversal Unit 302, the first control acquiring unit 303, the first script conversion unit 304, the second array generation unit 305, the second control acquiring unit 306, the second script conversion unit 307;
First array generation unit 301, for according to the test bag data, being read in the process of the intended application The corresponding view structure tree in interface of the intended application, and the view structure tree is traversed, generate view structure number Group;
Page Traversal Unit 302, for receiving the operational order for the intended application, and according to the view structure When operating position of the array indicated by the operational order finds webpage view, the webpage is regarded by inquiring code segment The content of pages of figure is traversed, and traversing result is obtained;
First control acquiring unit 303, the coordinate information for obtaining the operating position indicated by the operational order, and The corresponding control information of the coordinate information is obtained from the traversing result;
First script conversion unit 304, for being returned the control information according to the call back function in the intended application It is back to the test application, and by the operation indicated by the control information and the operational order in the test application Behavior is converted into the test script.
Second array generation unit 305, for according to the test bag data, being read in the process of the intended application The corresponding view structure tree in interface of the intended application, and the view structure tree is traversed, generate view structure number Group;
Second control acquiring unit 306, for receiving the operational order for the intended application, and according to the view When operating position of the structural array indicated by the operational order finds webpage view, by loadURL from the webpage In the content of pages of view, the control information of the operating position indicated by the operational order is obtained;
Second script conversion unit 307 for intercepting the control information got by loadURL, and passes through coding Language registers channel and the control information intercepted is back to the test application, and will be described in the test application Operation behavior indicated by control information and the operational order is converted into the test script.
Wherein, the first array generation unit 301, page Traversal Unit 302, the first control acquiring unit 303, the first script Conversion unit 304, the second array generation unit 305, the second control acquiring unit 306, the second script conversion unit 307 it is specific Function realization method may refer to the S201-S204 in above-mentioned Fig. 4 corresponding embodiments, be not discussed here.Wherein, when One array generation unit 301, page Traversal Unit 302, the first control acquiring unit 303, the first script conversion unit 304 are used for When script is recorded, the second array generation unit 305, the second control acquiring unit 306, the second script conversion unit 307 will stop Operation.When the second array generation unit 305, the second control acquiring unit 306, the second script conversion unit 307 are recorded for script When processed, the first array generation unit 301, page Traversal Unit 302, the first control acquiring unit 303, the first script conversion unit 304 will stop operation.Wherein, the first array generation unit 301 and the second array generation unit 305 can be merged into the same list Member.
Further, then Fig. 7 is referred to, the test module 40 may include in the figure 7:Instruction sending unit 401, third Array generation unit 402, coordinate acquiring unit 403, coordinate transmission unit 404, simulated operation unit 405;
Instruction sending unit 401, for loading the test script in the process of the test application, and by described Test instruction in the test script is sent to the process of the intended application by process communication service;
Third array generation unit 402 is answered for being instructed according to the test bag data and the test in the target The corresponding view structure tree in interface of the intended application is read in process, and the view structure tree is traversed, Generate view structure array;
Coordinate acquiring unit 403, if for waiting grasping indicated by the test instruction according to the view structure array Make to find webpage view in object, then by inquiring code segment in the webpage view, searches in the test script Control corresponding to the control information, and obtain the coordinate information of the control;
Coordinate transmission unit 404, for the coordinate information of the control to be back to system testing frame by call back function Frame;
Simulated operation unit 405, for being based on the system testing frame, to being located at the coordinate in the intended application The control at information carries out simulated operation, generates test result.
Wherein, instruction sending unit 401, third array generation unit 402, coordinate acquiring unit 403, coordinate transmission unit 404, the specific implementation of simulated operation unit 405 may refer to the S301-S305 in above-mentioned Fig. 5 corresponding embodiments, here No longer repeated.
Further, then Fig. 7 is referred to, the setup module 50 in the figure 7 may include:Instruction acquisition unit 502, letter Number rewriting unit 501, creating unit 503;
Instruction acquisition unit 502, for obtaining monitoring instruction;
Function rewriting unit 501, if including webpage callback interface service for the webpage view, according to the monitoring Instruction obtains the webpage callback interface service, and is written over to the power function in the webpage callback interface service, obtains To self-defined webpage callback interface service;
Creating unit 503 creates described self-defined if not including webpage callback interface service for the webpage view Webpage callback interface service.
Wherein, instruction acquisition unit 502, function rewriting unit 501, creating unit 503 specific implementation can join See the S401 in above-mentioned Fig. 6 corresponding embodiments, is not discussed here.
Further, then Fig. 7 is referred to, the monitoring module 60 in the figure 7 may include:Trigger element 601, monitoring letter Cease recording unit 602, determination unit 603;
Trigger element 601, if for detect the intended application interface include the webpage view, triggering described in Webpage in intended application described in self-defined webpage callback interface service monitoring;
Monitoring information recording unit 602 passes through institute if starting stress state for detecting that the Webpage is in State the first power function record webpage load start time information in self-defined webpage callback interface service;
The monitoring information recording unit 602, if being additionally operable to detect that the Webpage is in end stress state, Webpage, which is recorded, by the second power function in the self-defined webpage callback interface service loads end time information;
The monitoring information recording unit 602, if being additionally operable to detect that the Webpage is in page jump state, Page jump information is recorded by the third power function in the self-defined webpage callback interface service;
The monitoring information recording unit 602, if being additionally operable to detect that the Webpage is in the abnormal shape of page load State then records the page by the 4th power function in the self-defined webpage callback interface service and loads exception information;
The monitoring information recording unit 602, if being additionally operable to detect that the Webpage is in resource request state, Resource, which is counted, by the five-function function in the self-defined webpage callback interface service loads quantity;
Determination unit 603, for the webpage to be loaded start time information, webpage load end time information, the page Jump information, page load exception information, resource load quantity, are determined as the Webpage monitoring information.
Wherein, trigger element 601, monitoring information recording unit 602, the specific implementation of determination unit 603 can join See the S402 in above-mentioned Fig. 6 corresponding embodiments, is not discussed here.
The embodiment of the present invention can so that the process of intended application includes test bag data by beating again the mechanism of packet, into And it can be realized to the control in primary webpage view or customized webpage view (such as X5webview) based on test bag data The crawl of part information and event simulation, so as to realize that recording and the automatic test of test script, package not only may be used To be adapted to the wechat small routine based on X5webview, the application of all X5 kernels can be applicable in, i.e. the embodiment of the present invention Automatic test can be carried out to the application based on primary webpage view or based on customized webpage view;It simultaneously can also be right It is effectively monitored in Webpage, page load time, page jump information, the abnormal letter of page load can be got Breath, resource load quantity.
Fig. 8 is referred to, is a kind of structural schematic diagram of terminal device provided in an embodiment of the present invention.As shown in figure 8, described Terminal device 1000 may include:Processor 1001, network interface 1004 and memory 1005, in addition, the terminal device 1000 can also include:User interface 1003 and at least one communication bus 1002.Wherein, communication bus 1002 for realizing Connection communication between these components.Wherein, user interface 1003 may include display screen (Display), keyboard (Keyboard), optional user interface 1003 can also include standard wireline interface and wireless interface.Network interface 1004 is optional May include standard wireline interface and wireless interface (such as WI-FI interfaces).Memory 1004 can be high-speed RAM memory, Can also be non-labile memory (non-volatile memory), for example, at least a magnetic disk storage.Memory 1004 optionally can also be at least one storage device for being located remotely from aforementioned processor 1001.As shown in figure 8, as one kind It may include operating system, network communication module, Subscriber Interface Module SIM in the memory 1004 of computer storage media and set Standby control application program.
In terminal device 1000 shown in Fig. 8, network interface 1004 can provide network communication function;And user interface 1003 are mainly used for providing the interface of input to the user;And processor 1001 can be used for calling what is stored in memory 1004 to set Standby control application program, to realize:
Application to be measured is obtained, and the application to be measured is carried out beating again packet according to test bag data, obtains intended application;Institute The process for stating intended application includes the test bag data;
According to the operational order for the intended application, the test bag data, in the process of the intended application Webpage view is searched, and obtains control information associated with the operational order in the webpage view, and according to the control Operation behavior indicated by part information and the operational order generates test script;
Load the test script, and according to the test script and the test bag data the intended application into The webpage view is searched in journey, and searches the corresponding coordinate information of the control information in the webpage view, and to institute It states the control being located in intended application at the coordinate information and carries out simulated operation, generate test result.
Specifically, terminal device 1000 can obtain application to be measured by test application, for example, can be opened up in test application Show list of application, which may include multiple Apply Names, and user can click some application in the list of application Title, and then terminal device 1000 chooses the corresponding application of the Apply Names according to click commands, as application to be measured.Test is answered With can refer to be mounted on terminal device 1000 in the application for being tested application program.The test application can wrap Testing service is included, which can provide test bag data and beat again packet function, i.e., test application chooses application to be measured Afterwards, the application to be measured can be carried out to beat again packet by testing bag data, i.e. test bag data can be packaged by testing service Extremely in application to be measured, then intended application will be referred to as comprising the application to be measured of test bag data, test bag data can be dex texts Part.Wherein, test bag data may include test module code, which has the control obtained in current page The function of information, therefore, intended application can make intended application have acquisition current page by running the test module code The function of control information in face.
Application to be measured is carried out after beating again packet, intended application can be started, in start-up course, mesh can also be loaded together Test bag data in mark application, and test bag data is initialized, the process of the initialization may include:Initialization Katapplication, initialization Art Hook.Katapplication is properly termed as customized application initialization class, In android system, each to be first carried out using initialization class using startup, the effects of katapplication herein are Communication service and registration interface interception service will be established when application initializes, i.e., can be based on during the initialization Katapplication is the process creation process communication service of the process and test application of intended application, the process communication service Can be socketserver, socketserver can provide socket communications, i.e., may be implemented by socketserver Data communication between two different application processes.Process communication service is in the process of intended application.Wherein, Art Hook can be referred to as method interception, and effect can be intercepted when system is called to some method, to execute this Front and back execute of method specifies function.Therefore, the embodiment of the present invention, can be after tested application starts by initializing Art Hook It is intercepted based on Art Hook, to open socket communication services.Initialize katapplication, initialization Art Hook Process realized in the process of intended application.
Wherein, webpage view may include original webview or X5webview.Before executing automatic test, also need The test script of intended application is generated, the test script to intended application for subsequently carrying out automatic test.In terminal device The recording button for recording test script can be shown in the interface of test application in 1000, the recording when the user clicks is pressed Key, terminal device 1000 can trigger test application and send script record command, test application specifically can be with according to click commands It is communicated by socket and script record command is sent to intended application, the socketserver in intended application listens to the foot It, can be based on the function and the script record command that test bag data is provided, start recording user couple after this record command All operation behaviors (including such as intended application is clicked, slides operation) of intended application, and each behaviour can be recorded Make the information of the control operated in behavior, the information of control may include the xpath of control (extensible markup language path languages Speech) information.Recording the detailed process of the information of the control operated in each operation behavior can be:Based in intended application Test bag data can reflect the views trees for reading current activity (since test bag data is in same with intended application In one process, so views trees can be directly obtained based on test bag data, it can also equally get in views trees Original webview or X5webview), then entire views trees are traversed by the ergodic algorithm of depth-first, then it is stored in list In array, then according to the operational order for intended application in list arrays and recording process (such as clicked, produced by sliding Operational order), whether the indicated coordinate information of search operation instruction has primary webview or X5webview, if so, Then injection based on JavaScript (a kind of literal translation formula script, is a kind of regime type, weak type, the language based on prototype, Built-in support type) inquiry code segment, Webpage (such as wechat small routine in mobile terminal can be traversed by the inquiry code segment In Webpage) document, searched in document by the coordinate information indicated by operational order eligible Control (i.e. be located at operational order indicated by coordinate information control), and obtain the qualified control control letter Breath returns control information, all operation behaviors recorded finally by the evaluateJavascript call back functions provided It is back to test application, and by the operation behavior indicated by the control information and the operational order in the test application It is converted into the test script, i.e., operation behavior information caused by each operation of user to intended application and is operated Control information can be converted into test script, until user terminates the operation to intended application, then complete entire script record Process processed.Wherein, evaluateJavascript is the method name that android system provides, and can also be referred to as Javascript codes execute function.
Wherein, after having recorded test script, terminal device 1000 can load test script by test application, Test application can generate rule test instruction during the loading process, and one by one lead to every test instruction by socket Letter is sent in the process communication service of intended application, and then can be based on test bag data and be executed one by one often in intended application The indicated content of item test instruction.Wherein, the sequence for sending test instruction and each behaviour during recording test script Make the sequence consensus of behavior, and an indicated content of test instruction is to be directed to intended application during recording test script An operation behavior, and test instruction can also include recording process in control information associated with operational order.Target After receiving test instruction, you can read the corresponding activity's of test instruction based on test bag data reflection Views trees based on test bag data (since test bag data is in intended application in same process, so can be directly acquired To views trees, the original webview or X5webview in views trees can also be equally got), then pass through depth-first Ergodic algorithm traverses entire views trees, then is stored in list arrays, then according to test instruction and list arrays, searches and surveys Examination instructs whether included operation object has primary webview or X5webview, if so, then injection is based on The inquiry code segment of JavaScript includes control information (the xpath information of such as control) in being instructed due to test, so being not necessarily to It is based on the document that the inquiry code segment traverses mobile terminal Webpage (i.e. the Webpage of intended application) again again, only needs By the control corresponding to the control information in inquiry code segment search test instruction, and the control is obtained in Webpage Coordinate information, then by evaluateJavascript provide call back function the coordinate information of control is returned to Instrumentation frames.In instrumentation frames, the operation behavior in being instructed based on test, to acquisition Control at coordinate information carries out simulated operation, and the operation behavior that such as test instruction includes is " carrying out clicking operation to control A ", Simulation click then can be carried out to the control A at coordinate information based on instrumentation frames, and then obtain simulation behaviour Make corresponding output as a result, when completing each test instruction in test script, that is, completes the automation to intended application Test, and then instruct corresponding output result to be determined as test result each test, tester can be by test result It is compared with expected results, to analyze the performance of intended application.
Since test bag data is in the process of intended application, so the test function that test bag data is provided can be straight The content of pages of original webview or X5webview in crawl intended application is connect, therefore, even if intended application uses certainly The X5webview (such as intended application is the small routine in wechat) of definition, the test that can also be provided by testing bag data Function directly grabs the Webpage content of intended application, can be successfully that intended application carries out test script record therefore System can also successfully be based on test script and carry out automatic test to intended application.Since test bag data is answered in target In process, so the test function that test bag data is provided can also directly invoke original webview in intended application Or the evaluateJavascript methods of X5webview, evaluateJavascript methods are system API approaches, so The callback method stability that evaluateJavascript methods provide is relatively high.Therefore, the embodiment of the present invention is by beating again packet Mechanism, can make intended application process include test bag data, and then can be based on test bag data realize control letter The crawl of breath and event simulation, package can not only be adapted to wechat small routine, can for the application of all X5 kernels It is applicable in, solves the problems, such as that test frame can not be adapted to X5webview in the prior art.
In one embodiment, following steps can also be performed in processor 1001:
Start the intended application, and initialize the test bag data in the intended application, and is the target The process creation process communication service of the process and test application of application;The process of the test application is for loading the test Script.
In one embodiment, processor 1001 is being executed according to the operational order for the intended application, the survey Bag data is tried, webpage view is searched in the process of the intended application, and obtains in the webpage view and refers to the operation Associated control information, and the operation behavior indicated by the control information and the operational order are enabled, generates and surveys This when of training, specifically execute following steps:
According to the test bag data, the interface that the intended application is read in the process of the intended application is corresponding View structure tree, and the view structure tree is traversed, generate view structure array;
The operational order for the intended application is received, and according to the view structure array in the operational order institute When the operating position of instruction finds webpage view, by inquiring content of pages progress time of the code segment to the webpage view It goes through, obtains traversing result;
The coordinate information of the operating position indicated by the operational order is obtained, and from the traversing result described in acquisition The corresponding control information of coordinate information;
The control information is back to the test application according to the call back function in the intended application, and described It converts the operation behavior indicated by the control information and the operational order to the test script in test application.
In one embodiment, processor 1001 is being executed according to the operational order for the intended application, the survey Bag data is tried, webpage view is searched in the process of the intended application, and obtains in the webpage view and refers to the operation Associated control information, and the operation behavior indicated by the control information and the operational order are enabled, generates and surveys This when of training, specifically execute following steps:
According to the test bag data, the interface that the intended application is read in the process of the intended application is corresponding View structure tree, and the view structure tree is traversed, generate view structure array;
The operational order for the intended application is received, and according to the view structure array in the operational order institute When the operating position of instruction finds webpage view, by loadURL from the content of pages of the webpage view, described in acquisition The control information of operating position indicated by operational order;
The control information got by loadURL is intercepted, and the institute that channel will be intercepted is registered by code speech It states control information and is back to the test application, and by the control information and the operational order in the test application Indicated operation behavior is converted into the test script.
In one embodiment, processor 1001 loads the test script executing, and according to the test script and The test bag data searches the webpage view in the process of the intended application, and institute is searched in the webpage view The corresponding coordinate information of control information is stated, and simulation behaviour is carried out to being located at the control at the coordinate information in the intended application Make, when generating test result, specifically executes following steps:
Load the test script in the process of the test application, and by the process communication service by the survey Test instruction in training sheet is sent to the process of the intended application;
It is instructed according to the test bag data and the test, the target is read in the process of the intended application and is answered The corresponding view structure tree in interface, and the view structure tree is traversed, generate view structure array;
If finding webpage in the indicated object to be operated of the test instruction according to the view structure array to regard Figure is searched then by inquiring code segment in the webpage view corresponding to the control information in the test script Control, and obtain the coordinate information of the control;
The coordinate information of the control is back to system testing frame by call back function;
Based on the system testing frame, carried out to being located at the control at the coordinate information in the intended application Simulated operation generates test result.
In one embodiment, following steps can also be performed in processor 1001:
Monitoring instruction is obtained, and self-defined webpage callback interface service is arranged according to monitoring instruction;
If detecting, the interface of the intended application includes the webpage view, triggers the self-defined webpage readjustment and connects Webpage monitoring information in mouth service monitoring and the interface for recording the intended application;
The Webpage monitoring information is added to the test result, and the test result after addition is shown Show.
In one embodiment, processor 1001 is executing acquisition monitoring instruction, and certainly according to monitoring instruction setting When defining the service of webpage callback interface, following steps can be executed:
Obtain monitoring instruction;
If the webpage view includes webpage callback interface service, the webpage is obtained according to monitoring instruction and is adjusted back Interface service, and the power function in the webpage callback interface service is written over, obtain self-defined webpage callback interface Service;
If the webpage view does not include webpage callback interface service, the self-defined webpage callback interface clothes are created Business.
In one embodiment, if processor 1001 detects that the interface of the intended application includes the webpage in execution View then triggers the self-defined webpage callback interface service monitoring and records the Webpage in the interface of the intended application When monitoring information, following steps can be executed:
If detecting, the interface of the intended application includes the webpage view, triggers the self-defined webpage readjustment and connects Webpage in intended application described in mouth service monitoring;
If detecting that the Webpage is in starts stress state, pass through the self-defined webpage callback interface service In the first power function record webpage load start time information;
If detecting that the Webpage is in terminates stress state, pass through the self-defined webpage callback interface service In the second power function record webpage load end time information;
If detecting, the Webpage is in page jump state, passes through the self-defined webpage callback interface service In third power function record page jump information;
If detecting, the Webpage is in page load abnormality, passes through the self-defined webpage callback interface The 4th power function record page in service loads exception information;
If detecting, the Webpage is in resource request state, passes through the self-defined webpage callback interface service In five-function function statistics resource load quantity;
The webpage is loaded into start time information, webpage load end time information, page jump information, page load Exception information, resource load quantity, are determined as the Webpage monitoring information.
Wherein, self-defined webpage callback interface service may include the first power function (onPageStarted), the second work( It can function (onPageFinished), third power function (shouldOverrideUrlLoading), the 4th power function (onReceivedError), five-function function (shouldInterceptRequest).OnPageStarted is for supervising At the beginning of controlling page load, and it can be adjusted back when starting load webpage;OnPageFinished is added for monitoring the page The time completed is carried, and can be adjusted back when terminating load webpage;ShouldOverrideUrlLoading is intercepted for passing through Url redirects to monitor page jump information;OnReceivedError is to load exception information for monitoring the page, and loading It can be adjusted back when page fault;ShouldInterceptRequest is to load number for counting resource, and ask each time Asking can all be adjusted back when resource by the function.
The embodiment of the present invention can so that the process of intended application includes test bag data by beating again the mechanism of packet, into And it can be realized to the control in primary webpage view or customized webpage view (such as X5webview) based on test bag data The crawl of part information and event simulation, so as to realize that recording and the automatic test of test script, package not only may be used To be adapted to the wechat small routine based on X5webview, the application of all X5 kernels can be applicable in, i.e. the embodiment of the present invention Automatic test can be carried out to the application based on primary webpage view or based on customized webpage view;It simultaneously can also be right It is effectively monitored in Webpage, page load time, page jump information, the abnormal letter of page load can be got Breath, resource load quantity.
In addition, it need to be noted that be:The embodiment of the present invention additionally provides a kind of computer storage media, and the meter Be stored in calculation machine storage medium be mentioned above using the computer program performed by test device 1, and the computer journey Sequence includes program instruction, when the processor executes described program instruction, is able to carry out the corresponding implementations of Fig. 1 to Fig. 6 above Therefore description in example to the application testing method will be repeated no longer here.In addition, to being had using same procedure Beneficial effect description, is also no longer repeated.For undisclosed skill in computer storage media embodiment according to the present invention Art details please refers to the description of the method for the present invention embodiment.
One of ordinary skill in the art will appreciate that realizing all or part of flow in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the program can be stored in a computer read/write memory medium In, the program is when being executed, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, the storage medium can be magnetic Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access Memory, RAM) etc..
The above disclosure is only the preferred embodiments of the present invention, cannot limit the right model of the present invention with this certainly It encloses, therefore equivalent changes made in accordance with the claims of the present invention, is still within the scope of the present invention.

Claims (11)

1. a kind of application testing method, which is characterized in that including:
Application to be measured is obtained, and the application to be measured is carried out beating again packet according to test bag data, obtains intended application;The mesh The process of mark application includes the test bag data;
According to the operational order for the intended application, the test bag data, searched in the process of the intended application Webpage view, and control information associated with the operational order in the webpage view is obtained, and believed according to the control Operation behavior indicated by breath and the operational order generates test script;
The test script is loaded, and according to the test script and the test bag data in the process of the intended application The webpage view is searched, and searches the corresponding coordinate information of the control information in the webpage view, and to the mesh It is located at the control at the coordinate information in mark application and carries out simulated operation, generates test result.
2. the method as described in claim 1, which is characterized in that further include:
Start the intended application, and initialize the test bag data in the intended application, and is the intended application Process and test application process creation process communication service;The process of the test application is for loading the test foot This.
3. method as claimed in claim 2, which is characterized in that the basis is directed to the operational order of the intended application, institute State test bag data, webpage view searched in the process of the intended application, and obtain in the webpage view with the behaviour Make to instruct associated control information, and the operation behavior indicated by the control information and the operational order, it is raw At test script, including:
According to the test bag data, the corresponding view in interface of the intended application is read in the process of the intended application Structure tree, and the view structure tree is traversed, generate view structure array;
The operational order for the intended application is received, and according to the view structure array indicated by the operational order Operating position when finding webpage view, the content of pages of the webpage view is traversed by inquiring code segment, is obtained To traversing result;
The coordinate information of the operating position indicated by the operational order is obtained, and obtains the coordinate from the traversing result The corresponding control information of information;
The control information is back to the test application according to the call back function in the intended application, and in the test It converts the operation behavior indicated by the control information and the operational order to the test script in.
4. method as claimed in claim 2, which is characterized in that the basis is directed to the operational order of the intended application, institute State test bag data, webpage view searched in the process of the intended application, and obtain in the webpage view with the behaviour Make to instruct associated control information, and the operation behavior indicated by the control information and the operational order, it is raw At test script, including:
According to the test bag data, the corresponding view in interface of the intended application is read in the process of the intended application Structure tree, and the view structure tree is traversed, generate view structure array;
The operational order for the intended application is received, and according to the view structure array indicated by the operational order Operating position when finding webpage view, by loadURL from the content of pages of the webpage view, obtain the operation The control information of the indicated operating position of instruction;
The control information got by loadURL is intercepted, and the control that channel will be intercepted is registered by code speech Part information is back to the test application, and in the test application that the control information and the operational order is signified The operation behavior shown is converted into the test script.
5. method as claimed in claim 2, which is characterized in that the load test script, and according to the test foot This and the test bag data search the webpage view in the process of the intended application, and are looked into the webpage view The corresponding coordinate information of the control information is looked for, and mould is carried out to being located at the control at the coordinate information in the intended application Quasi- operation generates test result, including:
Load the test script in the process of the test application, and by the process communication service by the test foot Test instruction in this is sent to the process of the intended application;
It is instructed according to the test bag data and the test, the intended application is read in the process of the intended application The corresponding view structure tree in interface, and the view structure tree is traversed, generate view structure array;
If finding webpage view in the indicated object to be operated of the test instruction according to the view structure array, By inquiry code segment in the webpage view, the control corresponding to the control information in the test script is searched, And obtain the coordinate information of the control;
The coordinate information of the control is back to system testing frame by call back function;
Based on the system testing frame, simulated to being located at the control at the coordinate information in the intended application Operation generates test result.
6. the method as described in claim 1, which is characterized in that further include:
Monitoring instruction is obtained, and self-defined webpage callback interface service is arranged according to monitoring instruction;
If detecting, the interface of the intended application includes the webpage view, triggers the self-defined webpage callback interface clothes Business monitors and records the Webpage monitoring information in the interface of the intended application;
The Webpage monitoring information is added to the test result, and the test result after addition is shown.
7. method as claimed in claim 6, which is characterized in that the acquisition monitoring instruction, and set according to monitoring instruction Self-defined webpage callback interface service is set, including:
Obtain monitoring instruction;
If the webpage view includes webpage callback interface service, the webpage callback interface is obtained according to monitoring instruction Service, and the power function in the webpage callback interface service is written over, obtain self-defined webpage callback interface service;
If the webpage view does not include webpage callback interface service, the self-defined webpage callback interface service is created.
8. method as claimed in claim 6, which is characterized in that if the interface for detecting the intended application includes described Webpage view then triggers the self-defined webpage callback interface service monitoring and records the webpage in the interface of the intended application Page monitoring information, including:
If detecting, the interface of the intended application includes the webpage view, triggers the self-defined webpage callback interface clothes Business monitors the Webpage in the intended application;
If detecting that the Webpage is in starts stress state, by the self-defined webpage callback interface service First power function records webpage and loads start time information;
If detecting that the Webpage is in terminates stress state, by the self-defined webpage callback interface service Second power function records webpage and loads end time information;
If detecting, the Webpage is in page jump state, by the self-defined webpage callback interface service Third power function records page jump information;
If detecting, the Webpage is in page load abnormality, passes through the self-defined webpage callback interface service In the 4th power function record the page load exception information;
If detecting, the Webpage is in resource request state, by the self-defined webpage callback interface service Five-function function counts resource and loads quantity;
The webpage is loaded into start time information, webpage load end time information, page jump information, page load exception Information, resource load quantity, are determined as the Webpage monitoring information.
9. a kind of applying test device, which is characterized in that including:
Weight packetization module is carried out beating again packet, be obtained for obtaining application to be measured, and according to test bag data to the application to be measured Intended application;The process of the intended application includes the test bag data;
Script generation module, operational order, the test bag data for basis for the intended application, in the target Webpage view is searched in the process of application, and obtains control information associated with the operational order in the webpage view, And the operation behavior indicated by the control information and the operational order, generate test script;
Test module, for loading the test script, and according to the test script and the test bag data in the mesh It marks in the process of application and searches the webpage view, and search the corresponding coordinate letter of the control information in the webpage view Breath, and simulated operation is carried out to being located at the control at the coordinate information in the intended application, generate test result.
10. a kind of terminal device, which is characterized in that including:Processor and memory;
The processor is connected with memory, wherein the memory is for storing program code, and the processor is for calling Said program code, to execute such as claim 1-8 any one of them methods.
11. a kind of computer storage media, which is characterized in that the computer storage media is stored with computer program, described Computer program includes program instruction, and described program is instructed when being executed by a processor, executed such as any one of claim 1-8 institutes The method stated.
CN201810367819.XA 2018-04-23 2018-04-23 Application testing method and device and computer storage medium Active CN108595329B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810367819.XA CN108595329B (en) 2018-04-23 2018-04-23 Application testing method and device and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810367819.XA CN108595329B (en) 2018-04-23 2018-04-23 Application testing method and device and computer storage medium

Publications (2)

Publication Number Publication Date
CN108595329A true CN108595329A (en) 2018-09-28
CN108595329B CN108595329B (en) 2022-08-26

Family

ID=63613960

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810367819.XA Active CN108595329B (en) 2018-04-23 2018-04-23 Application testing method and device and computer storage medium

Country Status (1)

Country Link
CN (1) CN108595329B (en)

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109308263A (en) * 2018-09-29 2019-02-05 北京云测信息技术有限公司 A kind of small routine test method, device and equipment
CN109542440A (en) * 2018-11-29 2019-03-29 金蝶软件(中国)有限公司 To the operating method and device of window, computer installation and readable storage medium storing program for executing
CN109815118A (en) * 2018-12-14 2019-05-28 深圳壹账通智能科技有限公司 Data base management method and device, electronic equipment and computer readable storage medium
CN109976973A (en) * 2019-02-19 2019-07-05 深圳点猫科技有限公司 Abnormality monitoring method and electronic equipment on a kind of small routine line
CN110139302A (en) * 2019-05-17 2019-08-16 广州品唯软件有限公司 A kind of app type of service localization method and device
CN110457211A (en) * 2019-07-23 2019-11-15 腾讯科技(深圳)有限公司 Script performance test methods, device and equipment and computer storage medium
CN110618934A (en) * 2019-08-15 2019-12-27 重庆金融资产交易所有限责任公司 Front-end automatic test debugging method and device and computer readable storage medium
CN110750463A (en) * 2019-10-29 2020-02-04 百度在线网络技术(北京)有限公司 Applet testing method, device, system, equipment and medium
CN110865799A (en) * 2019-10-31 2020-03-06 爱钱进(北京)信息科技有限公司 Control information display method and device and storage medium
CN112269746A (en) * 2020-11-10 2021-01-26 京东数科海益信息科技有限公司 Automatic testing method and related equipment
CN112597031A (en) * 2020-12-26 2021-04-02 中国农业银行股份有限公司 Web page test case generation device and method
CN112882933A (en) * 2021-02-09 2021-06-01 京东数科海益信息科技有限公司 Script recording method, device, equipment and storage medium
CN112988597A (en) * 2021-04-27 2021-06-18 北京全路通信信号研究设计院集团有限公司 Automatic test visualization method and system based on state transition
CN113032264A (en) * 2021-03-29 2021-06-25 网易(杭州)网络有限公司 Method and device for detecting page view control
CN113971059A (en) * 2020-07-22 2022-01-25 北京奇虎科技有限公司 Method, device, equipment and storage medium for recovering equipment connection state
CN114064447A (en) * 2020-08-05 2022-02-18 腾讯科技(深圳)有限公司 Interface test method and device, storage medium and terminal
CN114647466A (en) * 2020-12-17 2022-06-21 国信君和(北京)科技有限公司 Page content extraction method, device, equipment and computer readable storage medium
US11500758B2 (en) 2020-09-02 2022-11-15 Coupang Corp. Systems and methods for analyzing application loading times
WO2023225801A1 (en) * 2022-05-23 2023-11-30 北京小米移动软件有限公司 Automated testing method and apparatus for application
CN118349317A (en) * 2024-05-10 2024-07-16 成都玖锦科技有限公司 SCPI instruction recording method and device of instrument

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140298298A1 (en) * 2011-09-23 2014-10-02 Amazon Technologies, Inc. Intermediary for testing content and applications
CN104699604A (en) * 2015-02-28 2015-06-10 百度在线网络技术(北京)有限公司 Method and device for testing Android application on basis of customized rendering engine
CN105740138A (en) * 2014-12-08 2016-07-06 阿里巴巴集团控股有限公司 Test method, test device and test system of application
CN106897215A (en) * 2017-01-20 2017-06-27 华南理工大学 A kind of method gathered based on WebView webpages loading performance and user behavior flow data

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140298298A1 (en) * 2011-09-23 2014-10-02 Amazon Technologies, Inc. Intermediary for testing content and applications
CN105740138A (en) * 2014-12-08 2016-07-06 阿里巴巴集团控股有限公司 Test method, test device and test system of application
CN104699604A (en) * 2015-02-28 2015-06-10 百度在线网络技术(北京)有限公司 Method and device for testing Android application on basis of customized rendering engine
CN106897215A (en) * 2017-01-20 2017-06-27 华南理工大学 A kind of method gathered based on WebView webpages loading performance and user behavior flow data

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
LINUX????? MR.LIYZ: "腾讯Android自动化测试实战3.3.3 修改Robotium以支持X5WebView", 《HTTPS://BLOG.CSDN.NET/WEIXIN_33910137/ARTICLE/DETAILS/90556491》 *
腾讯优测: "编写xtest自动化测试脚本的演示教程", 《HTTPS://V.QQ.COM/X/PAGE/L0337Y41TVT.HTML》 *

Cited By (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109308263A (en) * 2018-09-29 2019-02-05 北京云测信息技术有限公司 A kind of small routine test method, device and equipment
CN109308263B (en) * 2018-09-29 2021-10-22 北京云测信息技术有限公司 Applet testing method, device and equipment
CN109542440A (en) * 2018-11-29 2019-03-29 金蝶软件(中国)有限公司 To the operating method and device of window, computer installation and readable storage medium storing program for executing
CN109815118A (en) * 2018-12-14 2019-05-28 深圳壹账通智能科技有限公司 Data base management method and device, electronic equipment and computer readable storage medium
CN109976973B (en) * 2019-02-19 2021-05-25 深圳点猫科技有限公司 Online exception monitoring method for small program and electronic equipment
CN109976973A (en) * 2019-02-19 2019-07-05 深圳点猫科技有限公司 Abnormality monitoring method and electronic equipment on a kind of small routine line
CN110139302A (en) * 2019-05-17 2019-08-16 广州品唯软件有限公司 A kind of app type of service localization method and device
CN110457211A (en) * 2019-07-23 2019-11-15 腾讯科技(深圳)有限公司 Script performance test methods, device and equipment and computer storage medium
CN110457211B (en) * 2019-07-23 2022-05-06 腾讯科技(深圳)有限公司 Script performance test method, device and equipment and computer storage medium
CN110618934A (en) * 2019-08-15 2019-12-27 重庆金融资产交易所有限责任公司 Front-end automatic test debugging method and device and computer readable storage medium
CN110750463A (en) * 2019-10-29 2020-02-04 百度在线网络技术(北京)有限公司 Applet testing method, device, system, equipment and medium
CN110865799A (en) * 2019-10-31 2020-03-06 爱钱进(北京)信息科技有限公司 Control information display method and device and storage medium
CN113971059A (en) * 2020-07-22 2022-01-25 北京奇虎科技有限公司 Method, device, equipment and storage medium for recovering equipment connection state
CN114064447B (en) * 2020-08-05 2024-05-31 腾讯科技(深圳)有限公司 Interface testing method and device, storage medium and terminal
CN114064447A (en) * 2020-08-05 2022-02-18 腾讯科技(深圳)有限公司 Interface test method and device, storage medium and terminal
US11500758B2 (en) 2020-09-02 2022-11-15 Coupang Corp. Systems and methods for analyzing application loading times
TWI797597B (en) * 2020-09-02 2023-04-01 南韓商韓領有限公司 Computer-implemented system for determining loading time by application in user device and non-transitory computer-readable medium
CN112269746A (en) * 2020-11-10 2021-01-26 京东数科海益信息科技有限公司 Automatic testing method and related equipment
CN114647466A (en) * 2020-12-17 2022-06-21 国信君和(北京)科技有限公司 Page content extraction method, device, equipment and computer readable storage medium
CN112597031A (en) * 2020-12-26 2021-04-02 中国农业银行股份有限公司 Web page test case generation device and method
CN112882933A (en) * 2021-02-09 2021-06-01 京东数科海益信息科技有限公司 Script recording method, device, equipment and storage medium
CN112882933B (en) * 2021-02-09 2024-08-16 京东科技信息技术有限公司 Script recording method, script recording device, script recording equipment and storage medium
CN113032264A (en) * 2021-03-29 2021-06-25 网易(杭州)网络有限公司 Method and device for detecting page view control
CN112988597A (en) * 2021-04-27 2021-06-18 北京全路通信信号研究设计院集团有限公司 Automatic test visualization method and system based on state transition
WO2023225801A1 (en) * 2022-05-23 2023-11-30 北京小米移动软件有限公司 Automated testing method and apparatus for application
CN118349317A (en) * 2024-05-10 2024-07-16 成都玖锦科技有限公司 SCPI instruction recording method and device of instrument

Also Published As

Publication number Publication date
CN108595329B (en) 2022-08-26

Similar Documents

Publication Publication Date Title
CN108595329A (en) A kind of application testing method, device and computer storage media
Cinque et al. Microservices monitoring with event logs and black box execution tracing
US10095609B1 (en) Intermediary for testing content and applications
Zheng et al. Automated test input generation for android: Towards getting there in an industrial case
USRE46055E1 (en) Method and system for testing interactions between web clients and networked servers
CN104765678B (en) The method and device tested the application on mobile terminal device
US20200133829A1 (en) Methods and systems for performance testing
CN111104315A (en) Test script generation method and device and computer readable storage medium
US7315807B1 (en) System and methods for storage area network simulation
CN103729294B (en) Method and device for testing performance script of application software
CN106844136A (en) The collection method and system of a kind of program crashing information
US8250196B2 (en) Script based computer health management system
CN107391219B (en) Function Compilation Method and device
CN110013672B (en) Method, device, apparatus and computer-readable storage medium for automated testing of machine-run games
CN115686540B (en) RPA control method and system based on Hongmong system
CN105740154A (en) Webgame test script generation method and device
CN106776318A (en) A kind of test script method for recording and system
CN110287056A (en) Webpage error message acquisition methods and device
CN108763056A (en) A kind of automatic test bullet frame processing method and terminal
CN107844486B (en) Method and system for analyzing webpage problems for client
CN109828920A (en) A kind of log analysis method, device and computer readable storage medium
CN107896173A (en) Automated testing method, test equipment, automatization test system and storage medium
CN110413476A (en) Webpage collapses monitor method, device, computer equipment and storage medium
CN109739704A (en) A kind of interface test method, server-side and computer readable storage medium
US20090240987A1 (en) Test amplification for datacenter applications via model checking

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
GR01 Patent grant
GR01 Patent grant