CN111782495A - Method and device for acquiring buried point data - Google Patents

Method and device for acquiring buried point data Download PDF

Info

Publication number
CN111782495A
CN111782495A CN202010607934.7A CN202010607934A CN111782495A CN 111782495 A CN111782495 A CN 111782495A CN 202010607934 A CN202010607934 A CN 202010607934A CN 111782495 A CN111782495 A CN 111782495A
Authority
CN
China
Prior art keywords
buried point
page
tested
buried
thread
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010607934.7A
Other languages
Chinese (zh)
Inventor
陈念
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
JD Digital Technology Holdings Co Ltd
Original Assignee
JD Digital Technology Holdings 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 JD Digital Technology Holdings Co Ltd filed Critical JD Digital Technology Holdings Co Ltd
Priority to CN202010607934.7A priority Critical patent/CN111782495A/en
Publication of CN111782495A publication Critical patent/CN111782495A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3438Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment monitoring of user actions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3636Software debugging by tracing the execution of the program

Landscapes

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

Abstract

The application relates to a method and a device for acquiring buried point data, wherein the method comprises the following steps: acquiring element information corresponding to a buried point element of a page to be tested; intercepting a buried point interface corresponding to the buried point element in an application where a page to be tested is located when operation corresponding to the buried point element is executed on the buried point element according to the element information; and acquiring input parameters of the buried point interface as buried point data corresponding to the buried point elements. The method and the device solve the technical problem that the efficiency of acquiring the buried point data is low in the related technology.

Description

Method and device for acquiring buried point data
Technical Field
The present application relates to the field of computers, and in particular, to a method and an apparatus for obtaining buried point data.
Background
In the use stage of the application, certain positions (such as buttons, icons, input boxes and the like) on the page are required to be dotted, and the operation data of the user is acquired through the operation of the user on the positions. In the page testing stage, whether the data can be acquired by the buried points on the page or not and the accuracy of the acquired data need to be tested. The current embedded point test mode generally obtains a request parameter of an embedded point position by manually clicking the embedded point position and then capturing a packet of data. In the process of implementing the invention, the inventor finds that the embedded point reporting is not timely easily caused by the method for acquiring the embedded point data, so that the condition that the embedded point is missed in catching or packet catching errors occurs.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The application provides a method and a device for acquiring buried point data, which are used for at least solving the technical problem of low efficiency of acquiring the buried point data in the related technology.
According to an aspect of an embodiment of the present application, there is provided a method for obtaining buried point data, including:
acquiring element information corresponding to a buried point element of a page to be tested;
when the operation corresponding to the embedded point element is executed on the embedded point element according to the element information, intercepting an embedded point interface corresponding to the embedded point element in the application where the page to be tested is located;
and acquiring input parameters of the buried point interface as buried point data corresponding to the buried point elements.
Optionally, when the operation corresponding to the buried point element is executed on the buried point element according to the element information, intercepting a buried point interface corresponding to the buried point element in an application in which the page to be tested is located includes:
starting a first thread and a second thread in a thread pool;
executing an operation corresponding to the buried point element on the buried point element according to the element information through the first thread;
intercepting a buried point interface corresponding to the buried point element in the application of the page to be tested through the second thread.
Optionally, the executing, by the first thread, the operation corresponding to the buried point element according to the element information includes: executing a first test plug-in through the first thread, and executing click operation on the embedded point element on the page to be tested according to the element information;
intercepting the embedded point interface corresponding to the embedded point element in the application of the page to be tested through the second thread comprises the following steps: and executing a second test plug-in through the second thread, and intercepting a buried point interface corresponding to the buried point element in the application of the page to be tested.
Optionally, executing, by the first thread, the first test plug-in to execute, according to the element information, a click operation on the buried point element on the page to be tested includes:
executing the first test plug-in, and sliding the page to be tested to the page position of the embedded point element according to the element information;
executing the first test plug-in, and determining the element position of the buried point element on the page position;
and executing the first test plug-in, and executing the click operation on the element position.
Optionally, the obtaining of the element information corresponding to the buried point element of the page to be tested includes:
acquiring the buried point elements of the page to be tested;
executing a third test plug-in to traverse the page to be tested to obtain the element information corresponding to the embedded point element, wherein the element information comprises at least one of the following elements: element identification, element coordinates.
Optionally, after obtaining the input parameter of the buried point interface as the buried point data corresponding to the buried point element, the method further includes:
verifying the buried point data to obtain a verification result;
and determining a test result corresponding to the buried point data according to the verification result.
According to another aspect of the embodiments of the present application, there is also provided an apparatus for obtaining buried point data, including:
the first acquisition module is used for acquiring element information corresponding to a buried point element of a page to be tested;
the intercepting module is used for intercepting a buried point interface corresponding to the buried point element in the application of the page to be tested when the operation corresponding to the buried point element is executed on the buried point element according to the element information;
and the second acquisition module is used for acquiring the input parameters of the embedded point interface as the embedded point data corresponding to the embedded point element.
Optionally, the intercepting module comprises:
the starting unit is used for starting a first thread and a second thread in the thread pool;
the execution unit is used for executing the operation corresponding to the embedded point element on the embedded point element through the first thread according to the element information;
and the interception unit is used for intercepting the embedded point interface corresponding to the embedded point element in the application where the page to be tested is located through the second thread.
According to another aspect of the embodiments of the present application, there is also provided a storage medium including a stored program which, when executed, performs the above-described method.
According to another aspect of the embodiments of the present application, there is also provided an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the above method through the computer program.
In the embodiment of the application, acquiring element information corresponding to a buried point element of a page to be tested; intercepting a buried point interface corresponding to the buried point element in an application where a page to be tested is located when operation corresponding to the buried point element is executed on the buried point element according to the element information; the method comprises the steps of obtaining input parameters of a buried point interface as buried point data corresponding to buried point elements, executing corresponding operation on the buried point elements according to obtained element information corresponding to the buried point elements of a page to be tested, intercepting the buried point interface corresponding to the buried point elements in an application where the page to be tested is located while executing the operation, obtaining the input parameters from the buried point interface, using the obtained input parameters as the buried point data corresponding to the buried point elements, achieving the purpose of directly intercepting data from the application interface, improving the accuracy of obtaining the buried point data, reducing the probability of missing the buried point data, improving the efficiency of obtaining the buried point data, and further solving the technical problem that the efficiency of obtaining the buried point data in the related technology is low.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a schematic diagram of a hardware environment of a method for acquiring buried point data according to an embodiment of the present application;
FIG. 2 is a flow chart of an alternative method for obtaining buried point data according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an alternative way of sliding a page to be tested according to an embodiment of the present application;
FIG. 4 is a schematic diagram of an alternative click pattern of a buried point element according to an embodiment of the present application;
FIG. 5 is a schematic illustration of buried point data according to an alternative embodiment of the present application;
FIG. 6 is a schematic diagram of an alternative apparatus for obtaining buried point data according to an embodiment of the present application;
fig. 7 is a block diagram of a terminal according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an aspect of an embodiment of the present application, an embodiment of a method for obtaining buried point data is provided.
Alternatively, in the present embodiment, the above-described method for acquiring buried point data may be applied to a hardware environment formed by the terminal 101 and the server 103 as shown in fig. 1. As shown in fig. 1, a server 103 is connected to a terminal 101 through a network, which may be used to provide services (such as game services, application services, etc.) for the terminal or a client installed on the terminal, and a database may be provided on the server or separately from the server for providing data storage services for the server 103, and the network includes but is not limited to: the terminal 101 is not limited to a PC, a mobile phone, a tablet computer, and the like. The method for acquiring buried point data according to the embodiment of the present application may be executed by the server 103, the terminal 101, or both the server 103 and the terminal 101. The method for acquiring the buried point data by the terminal 101 according to the embodiment of the present application may be executed by a client installed thereon.
Fig. 2 is a flowchart of an alternative method for obtaining buried point data according to an embodiment of the present application, and as shown in fig. 2, the method may include the following steps:
step S202, acquiring element information corresponding to a buried point element of a page to be tested;
step S204, when the operation corresponding to the embedded point element is executed on the embedded point element according to the element information, intercepting an embedded point interface corresponding to the embedded point element in the application where the page to be tested is located;
step S206, obtaining the input parameters of the buried point interface as the buried point data corresponding to the buried point element.
Through the steps S202 to S206, the corresponding operation of the embedded point element is executed according to the obtained element information corresponding to the embedded point element of the page to be tested, and the embedded point interface corresponding to the embedded point element is intercepted in the application where the page to be tested is located while the operation is executed, so that the input parameter is obtained from the embedded point interface, and the obtained input parameter is used as the embedded point data corresponding to the embedded point element, thereby achieving the purpose of directly intercepting data from the application interface, improving the accuracy of obtaining the embedded point data and reducing the probability of missing the embedded point data, thereby achieving the technical effect of improving the efficiency of obtaining the embedded point data, and further solving the technical problem of low efficiency of obtaining the embedded point data in the related technology.
In the technical solution provided in step S202, the page to be tested may be, but is not limited to, various types of pages on various types of applications, such as: a trading page on a financial application, an investment page on a financial application, a play page in a multimedia application, a community page in a multimedia application, a merchandise display page in a shopping application, an order page in a shopping application, and the like.
Optionally, in this embodiment, the element information corresponding to the buried point element may be, but is not limited to, used for locating the position of the buried point element on the page to be tested. The buried point elements may be, but are not limited to, determined according to test requirements, and may be icons, buttons, sliders, links, and the like on the page.
Optionally, in this embodiment, the element information corresponding to the embedded point element of the page to be tested may be obtained, but is not limited to, by an automated testing tool uiautomation.
In the technical solution provided in step S204, the operation corresponding to the buried point element performed on the buried point element may include, but is not limited to: click operations, slide operations, track operations, and the like. The operation corresponding to the buried point element may be determined, but is not limited to, according to the requirements of the test.
Optionally, in this embodiment, the buried point interface is intercepted while performing an operation on the buried point element. The interface may be intercepted, but is not limited to, using the test tool Puppeteer.
In the technical solution provided in step S206, the input parameter of the buried point interface may be, but is not limited to, used as the buried point data.
As an optional embodiment, when the operation corresponding to the buried point element is executed on the buried point element according to the element information, intercepting a buried point interface corresponding to the buried point element in an application where the page to be tested is located includes:
s11, starting a first thread and a second thread in the thread pool;
s12, executing the operation corresponding to the buried point element on the buried point element according to the element information through the first thread;
s13, intercepting the embedded point interface corresponding to the embedded point element in the application of the page to be tested through the second thread.
Optionally, in this embodiment, different threads may be started at the same time, and the operation process on the buried point element and the interception process on the buried point interface may be implemented by parallel execution of the different threads.
Optionally, in this embodiment, the first thread may, but is not limited to, perform its corresponding operation on the buried point element through the test tool Appium. The second thread may intercept, but is not limited to, a buried point interface corresponding to the buried point element through a test tool Puppeteer.
As an alternative embodiment, the performing, by the first thread, the operation corresponding to the buried point element according to the element information includes:
s21, executing a first test plug-in through the first thread, and executing click operation on the embedded point element on the page to be tested according to the element information;
intercepting the embedded point interface corresponding to the embedded point element in the application of the page to be tested through the second thread comprises the following steps:
and S22, executing a second test plug-in through the second thread, and intercepting a buried point interface corresponding to the buried point element in the application of the page to be tested.
Optionally, in this embodiment, a function that implements a click operation performed on a buried point element on a page to be tested according to element information may be packaged as, but not limited to, a first test plug-in. And packaging the function of intercepting the embedded point interface corresponding to the embedded point element in the application where the page to be tested is positioned into a second test plug-in.
Optionally, in this embodiment, the first thread may be, but is not limited to, used to invoke and execute a first test plug-in, and the second thread may be, but is not limited to, used to invoke and execute a second test plug-in.
As an optional embodiment, executing, by the first thread, a first test plug-in, and executing, according to the element information, a click operation on the buried point element on the page to be tested includes:
s31, executing the first test plug-in, and sliding the page to be tested to the page position of the embedded point element according to the element information;
s32, executing the first test plug-in, and determining the element position of the buried point element on the page position;
and S33, executing the first test plug-in, and executing the clicking operation on the element position.
Optionally, in this embodiment, the first test plug-in may slide the page to be tested to the page position where the buried point element is located by using a doSwipe () method packaged by the appumdriver in the app. Fig. 3 is a schematic diagram of an alternative manner of sliding a page to be tested according to an embodiment of the present application, and as shown in fig. 3, source code of a doSwipe () method is given, and a sliding operation on a fund page to be tested can be implemented by executing the source code.
Optionally, in this embodiment, the first test plug-in may, but is not limited to, determine the element position of the buried point element at the page position and perform a click operation on the element position by using a tab () method packaged by the app driver in app. Fig. 4 is a schematic diagram of a click mode of an alternative buried point element according to an embodiment of the present application, and as shown in fig. 4, a source code of a tap () method is given, and a function of clicking a button for buying and selling on a fund page can be realized by executing the source code.
As an optional embodiment, the obtaining the element information corresponding to the buried point element of the page to be tested includes:
s41, acquiring the embedded point elements of the page to be tested;
s42, executing a third test plug-in, traversing the page to be tested to obtain the element information corresponding to the buried point element, wherein the element information includes at least one of the following: element identification, element coordinates.
Optionally, in this embodiment, the buried point element of the page to be tested may be provided by, but is not limited to, the presenter of the test requirement.
Optionally, in this embodiment, the third test plug-in may be, but is not limited to, a code for encapsulating the call test tool uiautomation. Therefore, the embedding point information of the embedding point element is obtained by traversing the page to be tested through the UIAutomator.
Optionally, in this embodiment, the element information may include, but is not limited to, at least one of the following: an element identification (such as an id value), an element coordinate (such as an xpath value).
As an optional embodiment, after obtaining the input parameter of the buried point interface as the buried point data corresponding to the buried point element, the method further includes:
s51, verifying the buried point data to obtain a verification result;
and S52, determining a test result corresponding to the buried point data according to the verification result.
Optionally, in this embodiment, after the buried point data is obtained, the buried point data may be checked to determine whether the buried point data meets the operation requirement of the page, so as to obtain a check result, and determine a test result corresponding to the buried point data according to the check result, so as to complete the test of the buried point data.
The present application also provides an alternative embodiment that provides an automated testing process of a buried site. The process carries out automatic testing of the embedded point in an automatic execution mode, and acquires data of the embedded point by calling embedded parameters of an embedded point interface. The specific buried point testing process may include the following procedures:
step 1, firstly, traversing a page to be tested through a UIAutomator to obtain an element identification id value or an element coordinate xpath value of a buried point element.
And 2, starting a thread in the thread pool, and clicking a buried point element to be operated or sliding a page by using a tab () method and a doSwipe () method packaged by an apple driver in the apple.
And 3, when the App operates the embedded point element, another thread intercepts an embedded point interface in the App through a testing tool Puppeneer.
Step 4, then, through the API provided by Puppeteer, input parameters of all the buried point interfaces can be obtained from the interfaces of the buried point, such as: FIG. 5 is a schematic diagram of buried point data according to an alternative embodiment of the present application, and as shown in FIG. 5, examples of a buried point interface, a buried point data list, and buried point data are given.
And 5, verifying the obtained buried point data so as to finish the buried point test.
According to the process, the data of the embedded point of the interface is obtained through the testing tool Puppeneer, the condition that the embedded point is missed to be grabbed or the packet is mistakenly grabbed due to the fact that the embedded point is not reported in time can be avoided, and therefore the success rate and the accuracy rate of data obtaining are improved. Through the automatic buried point test operation of the Apium, the test time can be saved, and the test efficiency is improved.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present application.
According to another aspect of the embodiment of the present application, there is also provided an apparatus for acquiring buried point data, which is used for implementing the above method for acquiring buried point data. Fig. 6 is a schematic diagram of an alternative apparatus for obtaining buried point data according to an embodiment of the present application, and as shown in fig. 6, the apparatus may include:
a first obtaining module 62, configured to obtain element information corresponding to a buried point element of a page to be tested;
an intercepting module 64, configured to intercept, in the application where the page to be tested is located, a buried point interface corresponding to the buried point element when the operation corresponding to the buried point element is executed on the buried point element according to the element information;
and a second obtaining module 66, configured to obtain an input parameter of the buried point interface as buried point data corresponding to the buried point element.
It should be noted that the first obtaining module 62 in this embodiment may be configured to execute step S202 in this embodiment, the intercepting module 64 in this embodiment may be configured to execute step S204 in this embodiment, and the second obtaining module 66 in this embodiment may be configured to execute step S206 in this embodiment.
It should be noted here that the modules described above are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of the above embodiments. It should be noted that the modules described above as a part of the apparatus may operate in a hardware environment as shown in fig. 1, and may be implemented by software or hardware.
Through the module, the corresponding operation of the embedded point element is executed according to the acquired element information corresponding to the embedded point element of the page to be tested, the embedded point interface corresponding to the embedded point element is intercepted in the application where the page to be tested is located while the operation is executed, so that the input parameter is acquired from the embedded point interface, the acquired input parameter is used as the embedded point data corresponding to the embedded point element, the purpose of directly intercepting the data from the application interface is achieved, the accuracy of acquiring the embedded point data can be improved, the probability of missing the embedded point data is reduced, the technical effect of improving the efficiency of acquiring the embedded point data is achieved, and the technical problem that the efficiency of acquiring the embedded point data in the related technology is low is solved.
As an alternative embodiment, the interception module comprises:
the starting unit is used for starting a first thread and a second thread in the thread pool;
the execution unit is used for executing the operation corresponding to the embedded point element on the embedded point element through the first thread according to the element information;
and the interception unit is used for intercepting the embedded point interface corresponding to the embedded point element in the application where the page to be tested is located through the second thread.
As an alternative embodiment, the execution unit is configured to: executing a first test plug-in through the first thread, and executing click operation on the embedded point element on the page to be tested according to the element information;
the interception unit is used for: and executing a second test plug-in through the second thread, and intercepting a buried point interface corresponding to the buried point element in the application of the page to be tested.
As an alternative embodiment, the execution unit is configured to:
executing the first test plug-in, and sliding the page to be tested to the page position of the embedded point element according to the element information;
executing the first test plug-in, and determining the element position of the buried point element on the page position;
and executing the first test plug-in, and executing the click operation on the element position.
As an alternative embodiment, the first obtaining module includes:
the acquisition unit is used for acquiring the embedded point elements of the page to be tested;
the traversing unit is configured to execute a third test plug-in, traverse the page to be tested, and obtain the element information corresponding to the embedded point element, where the element information includes at least one of the following: element identification, element coordinates.
As an alternative embodiment, the apparatus further comprises:
the verification module is used for verifying the buried point data after the input parameters of the buried point interface are obtained and used as the buried point data corresponding to the buried point element to obtain a verification result;
and the determining module is used for determining a test result corresponding to the buried point data according to the checking result.
It should be noted here that the modules described above are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of the above embodiments. It should be noted that the modules described above as a part of the apparatus may be operated in a hardware environment as shown in fig. 1, and may be implemented by software, or may be implemented by hardware, where the hardware environment includes a network environment.
According to another aspect of the embodiment of the application, a server or a terminal for implementing the method for acquiring buried point data is also provided.
Fig. 7 is a block diagram of a terminal according to an embodiment of the present application, and as shown in fig. 7, the terminal may include: one or more processors 701 (only one of which is shown), a memory 703, and a transmission means 705. as shown in fig. 7, the terminal may further include an input/output device 707.
The memory 703 may be used to store software programs and modules, such as program instructions/modules corresponding to the method and apparatus for obtaining buried point data in the embodiment of the present application, and the processor 701 executes various functional applications and data processing by running the software programs and modules stored in the memory 703, that is, implements the above method for obtaining buried point data. The memory 703 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory. In some examples, the memory 703 may further include memory located remotely from the processor 701, which may be connected to the terminal through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 705 is used for receiving or transmitting data via a network, and may also be used for data transmission between a processor and a memory. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 705 includes a Network adapter (NIC) that can be connected to a router via a Network cable and other Network devices to communicate with the internet or a local area Network. In one example, the transmission device 705 is a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
Among other things, the memory 703 is used to store application programs.
The processor 701 may call the application program stored in the memory 703 through the transmission means 705 to perform the following steps:
acquiring element information corresponding to a buried point element of a page to be tested;
when the operation corresponding to the embedded point element is executed on the embedded point element according to the element information, intercepting an embedded point interface corresponding to the embedded point element in the application where the page to be tested is located;
and acquiring input parameters of the buried point interface as buried point data corresponding to the buried point elements.
By adopting the embodiment of the application, a scheme for acquiring the buried point data is provided. The method comprises the steps of executing corresponding operation on a buried point element according to obtained element information corresponding to the buried point element of a page to be tested, intercepting a buried point interface corresponding to the buried point element in an application where the page to be tested is located while executing the operation, so that an input parameter is obtained from the buried point interface, and the obtained input parameter is used as the buried point data corresponding to the buried point element, so that the purpose of directly intercepting data from the application interface is achieved, the accuracy of obtaining the buried point data can be improved, the probability of missing catching the buried point data is reduced, the technical effect of improving the efficiency of obtaining the buried point data is achieved, and the technical problem that the efficiency of obtaining the buried point data in the related technology is low is solved.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
It can be understood by those skilled in the art that the structure shown in fig. 7 is only an illustration, and the terminal may be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, and a Mobile Internet Device (MID), a PAD, etc. Fig. 7 is a diagram illustrating a structure of the electronic device. For example, the terminal may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 7, or have a different configuration than shown in FIG. 7.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
Embodiments of the present application also provide a storage medium. Alternatively, in the present embodiment, the storage medium may be a program code for executing the method for acquiring buried point data.
Optionally, in this embodiment, the storage medium may be located on at least one of a plurality of network devices in a network shown in the above embodiment.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps:
acquiring element information corresponding to a buried point element of a page to be tested;
when the operation corresponding to the embedded point element is executed on the embedded point element according to the element information, intercepting an embedded point interface corresponding to the embedded point element in the application where the page to be tested is located;
and acquiring input parameters of the buried point interface as buried point data corresponding to the buried point elements.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
Optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a storage medium, and including instructions for causing one or more computer devices (which may be personal computers, servers, network devices, or the like) to execute all or part of the steps of the method described in the embodiments of the present application.
In the above embodiments of the present application, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (10)

1. A method for acquiring buried point data is characterized by comprising the following steps:
acquiring element information corresponding to a buried point element of a page to be tested;
when the operation corresponding to the embedded point element is executed on the embedded point element according to the element information, intercepting an embedded point interface corresponding to the embedded point element in the application where the page to be tested is located;
and acquiring input parameters of the buried point interface as buried point data corresponding to the buried point elements.
2. The method according to claim 1, wherein intercepting a buried point interface corresponding to the buried point element in an application in which the page to be tested is located when the operation corresponding to the buried point element is executed on the buried point element according to the element information comprises:
starting a first thread and a second thread in a thread pool;
executing an operation corresponding to the buried point element on the buried point element according to the element information through the first thread;
intercepting a buried point interface corresponding to the buried point element in the application of the page to be tested through the second thread.
3. The method of claim 2,
executing, by the first thread, an operation corresponding to the buried point element according to the element information includes: executing a first test plug-in through the first thread, and executing click operation on the embedded point element on the page to be tested according to the element information;
intercepting the embedded point interface corresponding to the embedded point element in the application of the page to be tested through the second thread comprises the following steps: and executing a second test plug-in through the second thread, and intercepting a buried point interface corresponding to the buried point element in the application of the page to be tested.
4. The method of claim 3, wherein executing a first test plug-in via the first thread, performing a click operation on the buried point element on the page to be tested according to the element information comprises:
executing the first test plug-in, and sliding the page to be tested to the page position of the embedded point element according to the element information;
executing the first test plug-in, and determining the element position of the buried point element on the page position;
and executing the first test plug-in, and executing the click operation on the element position.
5. The method of claim 1, wherein obtaining the element information corresponding to the buried point element of the page to be tested comprises:
acquiring the buried point elements of the page to be tested;
executing a third test plug-in, traversing the page to be tested to obtain the element information corresponding to the embedded point element, wherein the element information comprises at least one of the following: element identification, element coordinates.
6. The method of claim 1, wherein after obtaining the input parameters of the buried point interface as the buried point data corresponding to the buried point element, the method further comprises:
verifying the buried point data to obtain a verification result;
and determining a test result corresponding to the buried point data according to the verification result.
7. An apparatus for acquiring buried point data, comprising:
the first acquisition module is used for acquiring element information corresponding to a buried point element of a page to be tested;
the intercepting module is used for intercepting a buried point interface corresponding to the buried point element in the application of the page to be tested when the operation corresponding to the buried point element is executed on the buried point element according to the element information;
and the second acquisition module is used for acquiring the input parameters of the embedded point interface as the embedded point data corresponding to the embedded point element.
8. The apparatus of claim 7, wherein the intercepting module comprises:
the starting unit is used for starting a first thread and a second thread in the thread pool;
the execution unit is used for executing the operation corresponding to the embedded point element on the embedded point element through the first thread according to the element information;
and the interception unit is used for intercepting the embedded point interface corresponding to the embedded point element in the application where the page to be tested is located through the second thread.
9. A storage medium, characterized in that the storage medium comprises a stored program, wherein the program when executed performs the method of any of the preceding claims 1 to 6.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the method of any of the preceding claims 1 to 6 by means of the computer program.
CN202010607934.7A 2020-06-29 2020-06-29 Method and device for acquiring buried point data Pending CN111782495A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010607934.7A CN111782495A (en) 2020-06-29 2020-06-29 Method and device for acquiring buried point data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010607934.7A CN111782495A (en) 2020-06-29 2020-06-29 Method and device for acquiring buried point data

Publications (1)

Publication Number Publication Date
CN111782495A true CN111782495A (en) 2020-10-16

Family

ID=72761569

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010607934.7A Pending CN111782495A (en) 2020-06-29 2020-06-29 Method and device for acquiring buried point data

Country Status (1)

Country Link
CN (1) CN111782495A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6279124B1 (en) * 1996-06-17 2001-08-21 Qwest Communications International Inc. Method and system for testing hardware and/or software applications
CN105446884A (en) * 2015-12-16 2016-03-30 北京奇虎科技有限公司 Code coverage rate test method and apparatus
CN106066826A (en) * 2016-05-24 2016-11-02 北京金山安全软件有限公司 Automatic testing method and device for buried point and terminal
CN110362480A (en) * 2019-06-19 2019-10-22 平安普惠企业管理有限公司 Client buries a test method, device, equipment and storage medium
CN110442511A (en) * 2019-06-25 2019-11-12 苏宁云计算有限公司 A test method and device are buried in visualization

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6279124B1 (en) * 1996-06-17 2001-08-21 Qwest Communications International Inc. Method and system for testing hardware and/or software applications
CN105446884A (en) * 2015-12-16 2016-03-30 北京奇虎科技有限公司 Code coverage rate test method and apparatus
CN106066826A (en) * 2016-05-24 2016-11-02 北京金山安全软件有限公司 Automatic testing method and device for buried point and terminal
CN110362480A (en) * 2019-06-19 2019-10-22 平安普惠企业管理有限公司 Client buries a test method, device, equipment and storage medium
CN110442511A (en) * 2019-06-25 2019-11-12 苏宁云计算有限公司 A test method and device are buried in visualization

Similar Documents

Publication Publication Date Title
US9760475B2 (en) Automatic updating of graphical user interface element locators based on image comparison
US9946637B2 (en) Automatic updating of graphical user interface element locators based on dimension comparison
CN108845930B (en) Interface operation test method and device, storage medium and electronic device
CN103873455B (en) A kind of method and device of information checking
CN108491321B (en) Method and device for determining test case range and storage medium
CN109145590B (en) Function hook detection method, detection equipment and computer readable medium
CN107370740A (en) Redirect hold-up interception method and device
CN107908556A (en) Interface test method, device, equipment and computer-readable recording medium
CN104754136A (en) Method and system for managing account numbers relevant to mobile phone numbers on basis of intelligent terminals
CN112148607A (en) Interface testing method and device for service scene
CN111782524A (en) Application testing method and device, storage medium and electronic device
CN109828920A (en) A kind of log analysis method, device and computer readable storage medium
CN105959306A (en) IP address identification method and device
CN112650614A (en) Call chain monitoring method and device, electronic equipment and storage medium
CN112433935A (en) Test method, test device, electronic equipment and storage medium
CN112463519A (en) Flatter-based page use behavior data non-buried point statistical method, equipment and storage medium
CN111859322A (en) Identity verification method and device and electronic equipment
CN111782495A (en) Method and device for acquiring buried point data
CN108647139B (en) System test method, device, storage medium and electronic device
EP3424005A1 (en) Counterfeit electronic device detection
CN113535580B (en) CTS test method, CTS test device and test equipment
CN112416734A (en) Test method, device and storage medium
CN105262829B (en) Geographical position monitoring method and system
CN107770575A (en) The method and device of brush present is prevented in a kind of live platform
CN111782291A (en) Test page starting method and device

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant after: Jingdong Technology Holding Co.,Ltd.

Address before: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant before: Jingdong Digital Technology Holding Co.,Ltd.

Address after: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant after: Jingdong Digital Technology Holding Co.,Ltd.

Address before: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant before: JINGDONG DIGITAL TECHNOLOGY HOLDINGS Co.,Ltd.