CN111190807B - Buried point testing method and equipment - Google Patents

Buried point testing method and equipment Download PDF

Info

Publication number
CN111190807B
CN111190807B CN201811351707.1A CN201811351707A CN111190807B CN 111190807 B CN111190807 B CN 111190807B CN 201811351707 A CN201811351707 A CN 201811351707A CN 111190807 B CN111190807 B CN 111190807B
Authority
CN
China
Prior art keywords
buried
buried point
point
code
accurate positioning
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811351707.1A
Other languages
Chinese (zh)
Other versions
CN111190807A (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.)
Hangzhou Ezviz Network Co Ltd
Original Assignee
Hangzhou Ezviz Network 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 Hangzhou Ezviz Network Co Ltd filed Critical Hangzhou Ezviz Network Co Ltd
Priority to CN201811351707.1A priority Critical patent/CN111190807B/en
Publication of CN111190807A publication Critical patent/CN111190807A/en
Application granted granted Critical
Publication of CN111190807B publication Critical patent/CN111190807B/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/362Software debugging
    • G06F11/3636Software debugging by tracing the execution of the program

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 application discloses a buried point testing method, which comprises the following steps: analyzing the buried point codes through an analysis tool, and collecting buried point accurate positioning data; and testing the buried point according to the buried point accurate positioning data. The application also discloses corresponding buried point test equipment, a nonvolatile computer readable storage medium and electronic equipment. By applying the technical scheme disclosed by the application, the buried points can be conveniently and accurately tested.

Description

Buried point testing method and equipment
Technical Field
The application relates to the field of big data processing, in particular to a buried point testing method and equipment.
Background
In the field of big data, the accuracy of buried point data is the source of all data. If the data quality of the source cannot be ensured, the source can be just like a dish, and the source is skillfully and difficultly rice-free cooking. Buried points are terms in the field of data collection, and in particular in the field of user behavior data collection, and refer to related techniques and their implementation for capturing, processing and transmitting specific user behaviors or events.
However, in the present stage, since the products need to iterate continuously, people often only pay attention to the quality of functions, but neglect the quality of buried points, so that after each product upgrade, the buried points may be lost or buried wrongly, thereby causing inaccurate data of the data warehouse and affecting decisions or other products using the data.
Buried points may be corrupted in two scenarios:
(1) The new buried points are buried by mistake or are missed for the first time, but no one is found;
(2) Old buried points are lost or modified during product upgrades.
The first problem or license can be solved manually, and the requirement of the newly added buried point is verified each time, but is always ignored in the actual operation process; the second problem cannot be solved manually.
For product testing, the effort is very great if the quality of all buried points is to be tested back each time. Typically, there are tens of burial points in a page, and if the whole product is manually returned, hundreds or thousands of burial points may need to be processed. It can be seen that if the manner of buried point testing is only by manual testing, it is almost impractical to check one by one.
Therefore, how to quickly return to the buried point before each product release is a technical problem to be solved.
Disclosure of Invention
In view of the above problems, the present application provides a method and an apparatus for testing buried points, so as to test buried points conveniently and accurately.
The application discloses a buried point testing method, which comprises the following steps:
analyzing the buried point codes through an analysis tool, and collecting buried point accurate positioning data;
and testing the buried point according to the buried point accurate positioning data.
Preferably, the analyzing the embedded point code by the analyzing tool, collecting the embedded point accurate positioning data includes:
analyzing the embedded point files with different code formats by adopting corresponding analysis tools;
and collecting buried point accurate positioning data from the analysis result by adopting a corresponding method according to different buried point modes.
Preferably, the parsing the embedded point file with respect to different code formats by using a corresponding parsing tool includes:
and analyzing the codes into abstract syntax trees based on the analysis library corresponding to the code format, and outputting the codes and the buried point information.
Preferably, the parsing the embedded point file with respect to different code formats by using a corresponding parsing tool includes:
for Java format codes, java code texts are resolved into abstract syntax trees of a complexation unit type through Java Parser.parameter (File) based on a Java Parser library, the abstract syntax trees receive a VoidVisitor adapter Object complexation unit, accept, search and traverse on the syntax trees, then specific callbacks are called according to the encountered node types, and when judging that embedded point codes exist in a method in the call backs of the void visit (MethodDeclaration n, object arg), package names, class names, method names+parameters+line numbers and embedded point KEY+line numbers+modes are output.
Preferably, the parsing the embedded point file with respect to different code formats by using a corresponding parsing tool includes:
for the code in the Kotlein format, analyzing the Kotlein code text into an abstract syntax tree of the KtFile type through related classes in a Kotlein compiler library, receiving a KtTreeVisitorVoid object KtFile. ActChildren (KtTreeVisitorVoid) to search and traverse on the syntax tree, then calling a specific callback according to the encountered node type, and outputting a packet name, a class name, a method name+parameter+line number and a buried point KEY+line number+mode when judging that the buried point code exists in the method in the callback of void visitNamedFunction (KtNamedFunction function).
Preferably, the parsing the embedded point file with respect to different code formats by using a corresponding parsing tool includes:
for the XML format code, based on the Beau full Soup library, processing the XML code text, generating a parsing tree, performing search traversal on the tree, outputting all the child node attribute values meeting the conditions, searching all the child nodes containing the android content description attribute, and outputting the file name, the control ID+line number and the embedded point KEY+line number+mode.
Preferably, collecting buried point accurate positioning data from the analysis result by adopting a corresponding method according to different buried point modes includes:
judging whether to call a buried point method for the static code buried point, if so, intercepting a buried point KEY from the return parameter;
judging whether a number exists in callback parameters of a user-defined dialog box button for the embedded point of the dynamic code, and if so, intercepting the number from the callback parameters to serve as an embedded point KEY;
for the visual embedded point, judging whether the content description attribute exists and the number is digital, and if so, intercepting the number from the digital to be the embedded point KEY.
Preferably, the testing the buried point according to the precisely located data of the buried point includes:
confirming whether a new buried point is buried by mistake or missing according to the buried point accurate positioning data, and storing the buried point accurate positioning data as buried point accurate positioning filing data after the test is passed;
and checking the old buried point according to the buried point accurate positioning filing data and the buried point accurate positioning data, and confirming whether the old buried point is lost or modified.
The application also discloses buried point testing equipment, which comprises: a processor for:
analyzing the buried point codes through an analysis tool, and collecting buried point accurate positioning data;
and testing the buried point according to the buried point accurate positioning data.
Preferably, the processor is specifically configured to:
analyzing the embedded point files with different code formats by adopting corresponding analysis tools;
and collecting buried point accurate positioning data from the analysis result by adopting a corresponding method according to different buried point modes.
Preferably, the processor is specifically configured to:
and analyzing the codes into abstract syntax trees based on the analysis library corresponding to the code format, and outputting the codes and the buried point information.
Preferably, the processor is specifically configured to:
for Java format codes, java code texts are resolved into abstract syntax trees of a complexation unit type through Java Parser.parameter (File) based on a Java Parser library, the abstract syntax trees receive a VoidVisitor adapter Object complexation unit, accept, search and traverse on the syntax trees, then specific callbacks are called according to the encountered node types, and when judging that embedded point codes exist in a method in the call backs of the void visit (MethodDeclaration n, object arg), package names, class names, method names+parameters+line numbers and embedded point KEY+line numbers+modes are output.
Preferably, the processor is specifically configured to:
for the code in the Kotlein format, analyzing the Kotlein code text into an abstract syntax tree of the KtFile type through related classes in a Kotlein compiler library, receiving a KtTreeVisitorVoid object KtFile. ActChildren (KtTreeVisitorVoid) to search and traverse on the syntax tree, then calling a specific callback according to the encountered node type, and outputting a packet name, a class name, a method name+parameter+line number and a buried point KEY+line number+mode when judging that the buried point code exists in the method in the callback of void visitNamedFunction (KtNamedFunction function).
Preferably, the processor is specifically configured to:
for the XML format code, based on the Beau full Soup library, processing the XML code text, generating a parsing tree, performing search traversal on the tree, outputting all the child node attribute values meeting the conditions, searching all the child nodes containing the android content description attribute, and outputting the file name, the control ID+line number and the embedded point KEY+line number+mode.
Preferably, the processor is specifically configured to:
judging whether to call a buried point method for the static code buried point, if so, intercepting a buried point KEY from the return parameter;
judging whether a number exists in callback parameters of a user-defined dialog box button for the embedded point of the dynamic code, and if so, intercepting the number from the callback parameters to serve as an embedded point KEY;
for the visual embedded point, judging whether the content description attribute exists and the number is digital, and if so, intercepting the number from the digital to be the embedded point KEY.
Preferably, the device further comprises a memory; wherein:
the processor is specifically configured to:
according to the accurate positioning data of the buried points, determining whether the new buried points are buried wrongly or omitted, and after the test is passed, storing the accurate positioning data of the buried points into a memory as the accurate positioning filing data of the buried points;
and checking old buried points according to the buried point accurate positioning filing data stored in the memory and the collected buried point accurate positioning data, and confirming whether the old buried points are lost or modified.
The application also discloses a non-volatile computer readable storage medium storing instructions that, when executed by a processor, cause the processor to perform the steps of the buried point test method as described above.
The application also discloses an electronic device comprising the non-volatile computer readable storage medium as described above, and the processor having access to the non-volatile computer readable storage medium.
According to the embedded point testing method and the embedded point testing equipment, the embedded point codes are analyzed through the analysis tool, the embedded point accurate positioning data are collected, the embedded point is tested according to the embedded point accurate positioning data, the new embedded point can be checked, whether the embedded point is wrong or missing is checked, the old embedded point can be checked through comparison, and therefore complete regression is not needed, and the system testing time is greatly saved.
Drawings
FIG. 1 is a schematic flow chart of the application for collecting accurate positioning data of buried points;
FIG. 2 is a schematic diagram showing the constitution of the apparatus of the buried point test method of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail below by referring to the accompanying drawings and examples.
The buried point testing method provided by the application mainly comprises the following steps:
step 1: and analyzing the buried point codes through an analysis tool, and collecting the buried point accurate positioning data.
The method comprises the following two parts:
1) Defining buried point accurate positioning data according to a buried point mode;
2) And analyzing the buried point codes through an analysis tool, and collecting buried point accurate positioning data by adopting a corresponding method according to different buried point modes.
Step 2: and testing the buried point according to the buried point accurate positioning data.
The test buried point comprises: testing the new buried point and the old buried point specifically comprises the following steps:
1) According to the accurate positioning data of the buried points, whether the new buried points are buried wrongly or omitted is confirmed;
2) And checking the old buried point according to the buried point accurate positioning filing data and the buried point accurate positioning data, and confirming whether the old buried point is lost or modified.
The above method is described in detail below.
1. And adding a buried point mode and a buried point reporting mode.
Taking android clients as an example, there are three ways to add buried points:
1) Static code embedded point: adding buried points in a java/kotlin code method, and reporting when the method is called;
2) Visual buried points: adding buried points in control attributes (android: content description) of an xml layout, and reporting when an AOP (tangential plane programming: aspect Oriented Programming) cuts into a click event;
3) Dynamic code embedded point: and adding buried points in callback parameters of the user-defined dialog box buttons, and reporting when the user clicks the buttons.
The embedding point adding mode and the embedding point reporting mode of other clients are basically consistent, such as the embedding points of Objective-C and Swift codes of the IOS client.
2. And analyzing the buried point codes through an analysis tool, and collecting the buried point accurate positioning data.
The flow for collecting accurate positioning data of buried points in the application is shown in figure 1, and mainly comprises the following steps: and analyzing the buried point files with different code formats by adopting corresponding analysis tools, and collecting buried point accurate positioning data from analysis results by adopting corresponding methods according to different buried point modes.
Taking android clients as an example, there are three code parsing modes:
1) Java code parsing
Based on the JavaParser library, analyzing the JAVA code text into an abstract syntax tree of a complexation unit type through JavaParser.parameter (File), receiving a VoidVisitor adapter Object (solicit) to search through the syntax tree, calling a specific callback according to the encountered node type, and outputting data such as package name, class name, method name+parameter+line number, buried point KEY+line number+ mode and the like when the buried point code exists in the callback judging method in the VOid visual (MethodDeclaration n, object arg).
2) Kotlen code parsing
And analyzing the Kotlein code text into an abstract grammar tree of a KtFile type through related classes in a Kotlein compiler library, receiving a KtTreeVisistorVoid object (KtFile. Accept Children) to search and traverse on the grammar tree, then calling a specific callback according to the type of the encountered node, and outputting data such as packet name, class name, method name+parameter+line number, embedded point KEY+line number+mode and the like when judging that the embedded point code exists in the method in the callback of void visitNamedFunction (KtNamedFunction function).
Specific examples of the data are shown in Table 1:
TABLE 1
3) XML code parsing
Based on the Beautifuge Soup library, XML code text is processed to generate a parsing tree (parameter tree), search traversal is carried out on the tree, all child node attribute values meeting the conditions are output, all child nodes containing the android content description attribute are searched, and data such as file names, control ID+line numbers, buried point KEY+line numbers+ modes and the like are output.
The specific data are shown in table 2:
file type File name Control ID Control ID number of rows Buried point KEY Number of buried point lines Buried point mode
XML fingerprints_login_page.xml @+id/user_name 23 16118 32 AOP cut-in
XML fingerprints_login_page.xml @+id/fingerprint_image 36 16120 44 AOP cut-in
TABLE 2
Aiming at the three different embedded point modes, the application provides three corresponding methods for intercepting embedded point KEY:
judging whether to call a buried point method for the static code buried point, if so, intercepting a buried point KEY from a callback parameter;
judging whether a number exists in callback parameters of a user-defined dialog box button for the embedded point of the dynamic code, and if so, intercepting the number from the callback parameters to serve as an embedded point KEY;
for the visual embedded point, judging whether the content description attribute exists and the number is digital, and if so, intercepting the number from the digital to be the embedded point KEY.
Here, the buried point KEY is a unique identification of the buried point, and can be used to index the buried point.
The codes of other clients are based on the corresponding parsing library, the codes can be parsed into abstract syntax trees, and the output codes and buried point information, such as Objective-C and Swift codes of the IOS client, can be based on the Clang library parsing abstract syntax tree.
3. Buried point is tested through buried point accurate positioning data
The buried point scene can be divided into 3 by the buried point accurate positioning data test:
1. after the new buried point is developed, the buried point accurate positioning data of the new buried point is collected to confirm whether the fault is buried or missing.
Specifically: for example, 100 newly added buried points are planned, the related information of the buried points needing to be newly added can be arranged in advance, after the newly added buried points are added, the buried point accurate positioning data of the newly added buried points are collected by adopting the method, and whether the situation of burying errors or omission exists can be confirmed by automatically comparing the planned newly added buried point data with the collected buried point accurate positioning data.
For example: assuming that only the accurate positioning data of the buried points of 98 buried points are collected, the method means that 2 buried points are omitted, and the buried point KEY can accurately position which 2 buried points are omitted.
For another example: by comparing the number of lines of a certain buried point with the original plan, the error of the buried point can be confirmed.
2. After the verification of the new buried point is completed, collecting the buried point accurate positioning data of the new buried point, archiving the buried point accurate positioning data into old buried point data for storage, and the method is as follows: the buried points are accurately positioned and archived.
3. After the product is subjected to an iterative process, the accurate positioning data of the buried point of the old buried point is collected by adopting the method, and is compared with the accurate positioning archiving data of the buried point for verification, so as to confirm whether the old buried point is lost or modified.
Specifically: as described above, the embedded point can be indexed by the embedded point KEY, after the product iterates, the embedded point accurate positioning data of the old embedded point is collected and compared with the embedded point accurate positioning archiving data stored before, if the number of lines of a certain embedded point is not consistent, the embedded point can be confirmed to be modified. Alternatively, if a buried point KEY does not exist, it can be confirmed that the buried point is lost.
Corresponding to the method, the application provides buried point testing equipment, the composition structure of which is shown in fig. 2, at least comprising: a processor for:
analyzing the buried point codes through an analysis tool, and collecting buried point accurate positioning data;
and testing the buried point according to the buried point accurate positioning data.
Wherein the processor may be specifically configured to:
analyzing the embedded point files with different code formats by adopting corresponding analysis tools;
and collecting buried point accurate positioning data from the analysis result by adopting a corresponding method according to different buried point modes.
Wherein the processor may be specifically configured to: and analyzing the codes into abstract syntax trees based on the analysis library corresponding to the code format, and outputting the codes and the buried point information.
Wherein the processor may be specifically configured to: for Java format codes, java code texts are resolved into abstract syntax trees of a complexation unit type through Java Parser.parameter (File) based on a Java Parser library, the abstract syntax trees receive a VoidVisitor adapter Object complexation unit, accept, search and traverse on the syntax trees, then specific callbacks are called according to the encountered node types, and when judging that embedded point codes exist in a method in the call backs of the void visit (MethodDeclaration n, object arg), package names, class names, method names+parameters+line numbers and embedded point KEY+line numbers+modes are output.
Wherein the processor may be specifically configured to: for the code in the Kotlein format, analyzing the Kotlein code text into an abstract syntax tree of the KtFile type through related classes in a Kotlein compiler library, receiving a KtTreeVisitorVoid object KtFile. ActChildren (KtTreeVisitorVoid) to search and traverse on the syntax tree, then calling a specific callback according to the encountered node type, and outputting a packet name, a class name, a method name+parameter+line number and a buried point KEY+line number+mode when judging that the buried point code exists in the method in the callback of void visitNamedFunction (KtNamedFunction function).
Wherein the processor may be specifically configured to: for the XML format code, based on the Beau full Soup library, processing the XML code text, generating a parsing tree, performing search traversal on the tree, outputting all the child node attribute values meeting the conditions, searching all the child nodes containing the android content description attribute, and outputting the file name, the control ID+line number and the embedded point KEY+line number+mode.
Wherein the processor may be specifically configured to:
judging whether to call a buried point method for the static code buried point, if so, intercepting a buried point KEY from the return parameter;
judging whether a number exists in callback parameters of a user-defined dialog box button for the embedded point of the dynamic code, and if so, intercepting the number from the callback parameters to serve as an embedded point KEY;
for the visual embedded point, judging whether the content description attribute exists and the number is digital, and if so, intercepting the number from the digital to be the embedded point KEY.
The apparatus shown in fig. 2 may further include a memory, where the processor is specifically configured to:
according to the accurate positioning data of the buried points, determining whether the new buried points are buried wrongly or omitted, and after the test is passed, storing the accurate positioning data of the buried points into a memory as the accurate positioning filing data of the buried points;
and checking old buried points according to the buried point accurate positioning filing data stored in the memory and the collected buried point accurate positioning data, and confirming whether the old buried points are lost or modified.
Furthermore, the present application provides a non-transitory computer readable storage medium storing instructions which, when executed by a processor, cause the processor to perform the steps of a buried point test method as described above.
Furthermore, the application provides an electronic device comprising the non-volatile computer readable storage medium as described above, and the processor having access to the non-volatile computer readable storage medium.
The foregoing description of the preferred embodiments of the application is not intended to be limiting, but rather to enable any modification, equivalent replacement, improvement or the like to be made within the spirit and principles of the application.

Claims (16)

1. A buried point testing method, comprising:
analyzing the buried point codes through an analysis tool, and collecting buried point accurate positioning data;
according to the accurate positioning data of the buried points, testing whether the new buried points are buried wrongly or omitted, and after the test is passed, taking the accurate positioning data of the buried points as the accurate positioning filing data of the buried points for storage;
and checking the old buried point according to the buried point accurate positioning filing data and the buried point accurate positioning data, and confirming whether the old buried point is lost or modified.
2. The method of claim 1, wherein analyzing the buried point code by an analytical tool, collecting buried point precise positioning data comprises:
analyzing the embedded point files with different code formats by adopting corresponding analysis tools;
and collecting buried point accurate positioning data from the analysis result by adopting a corresponding method according to different buried point modes.
3. The method of claim 2, wherein parsing the embedded point file for different code formats using corresponding parsing tools comprises:
and analyzing the codes into abstract syntax trees based on the analysis library corresponding to the code format, and outputting the codes and the buried point information.
4. The method of claim 3, wherein parsing the embedded point file for different code formats using corresponding parsing tools comprises:
for Java format codes, java code texts are resolved into abstract syntax trees of a complexation unit type through Java Parser.parameter (File) based on a Java Parser library, the abstract syntax trees receive a VoidVisitor adapter Object complexation unit, accept, search and traverse on the syntax trees, then specific callbacks are called according to the encountered node types, and when judging that embedded point codes exist in a method in the call backs of the void visit (MethodDeclaration n, object arg), package names, class names, method names+parameters+line numbers and embedded point KEY+line numbers+modes are output.
5. The method of claim 3, wherein parsing the embedded point file for different code formats using corresponding parsing tools comprises:
for the code in the Kotlein format, analyzing the Kotlein code text into an abstract syntax tree of the KtFile type through related classes in a Kotlein compiler library, receiving a KtTreeVisitorVoid object KtFile. ActChildren (KtTreeVisitorVoid) to search and traverse on the syntax tree, then calling a specific callback according to the encountered node type, and outputting a packet name, a class name, a method name+parameter+line number and a buried point KEY+line number+mode when judging that the buried point code exists in the method in the callback of void visitNamedFunction (KtNamedFunction function).
6. The method of claim 3, wherein parsing the embedded point file for different code formats using corresponding parsing tools comprises:
for the XML format code, based on the Beau full Soup library, processing the XML code text, generating a parsing tree, performing search traversal on the tree, outputting all the child node attribute values meeting the conditions, searching all the child nodes containing the android content description attribute, and outputting the file name, the control ID+line number and the embedded point KEY+line number+mode.
7. The method according to any one of claims 2 to 6, wherein the collecting the accurate positioning data of the buried point from the analysis result by adopting a corresponding method according to different buried point modes comprises:
judging whether to call a buried point method for the static code buried point, if so, intercepting a buried point KEY from the return parameter;
judging whether a number exists in callback parameters of a user-defined dialog box button for the embedded point of the dynamic code, and if so, intercepting the number from the callback parameters to serve as an embedded point KEY;
for the visual embedded point, judging whether the content description attribute exists and the number is digital, and if so, intercepting the number from the digital to be the embedded point KEY.
8. A buried point testing apparatus, comprising: a processor and a memory, the processor to:
analyzing the buried point codes through an analysis tool, and collecting buried point accurate positioning data;
confirming whether a new buried point is buried by mistake or missing according to the buried point accurate positioning data, and storing the buried point accurate positioning data into the memory as buried point accurate positioning filing data after the test is passed; and checking old buried points according to the buried point accurate positioning filing data stored in the memory and the collected buried point accurate positioning data, and confirming whether the old buried points are lost or modified.
9. The apparatus of claim 8, wherein the processor is specifically configured to:
analyzing the embedded point files with different code formats by adopting corresponding analysis tools;
and collecting buried point accurate positioning data from the analysis result by adopting a corresponding method according to different buried point modes.
10. The apparatus of claim 9, wherein the processor is specifically configured to:
and analyzing the codes into abstract syntax trees based on the analysis library corresponding to the code format, and outputting the codes and the buried point information.
11. The apparatus of claim 10, wherein the processor is specifically configured to:
for Java format codes, java code texts are resolved into abstract syntax trees of a complexation unit type through Java Parser.parameter (File) based on a Java Parser library, the abstract syntax trees receive a VoidVisitor adapter Object complexation unit, accept, search and traverse on the syntax trees, then specific callbacks are called according to the encountered node types, and when judging that embedded point codes exist in a method in the call backs of the void visit (MethodDeclaration n, object arg), package names, class names, method names+parameters+line numbers and embedded point KEY+line numbers+modes are output.
12. The apparatus of claim 10, wherein the processor is specifically configured to:
for the code in the Kotlein format, analyzing the Kotlein code text into an abstract syntax tree of the KtFile type through related classes in a Kotlein compiler library, receiving a KtTreeVisitorVoid object KtFile. ActChildren (KtTreeVisitorVoid) to search and traverse on the syntax tree, then calling a specific callback according to the encountered node type, and outputting a packet name, a class name, a method name+parameter+line number and a buried point KEY+line number+mode when judging that the buried point code exists in the method in the callback of void visitNamedFunction (KtNamedFunction function).
13. The apparatus of claim 10, wherein the processor is specifically configured to:
for the XML format code, based on the Beau full Soup library, processing the XML code text, generating a parsing tree, performing search traversal on the tree, outputting all the child node attribute values meeting the conditions, searching all the child nodes containing the android content description attribute, and outputting the file name, the control ID+line number and the embedded point KEY+line number+mode.
14. The apparatus according to any one of claims 9 to 13, wherein the processor is specifically configured to:
judging whether to call a buried point method for the static code buried point, if so, intercepting a buried point KEY from the return parameter;
judging whether a number exists in callback parameters of a user-defined dialog box button for the embedded point of the dynamic code, and if so, intercepting the number from the callback parameters to serve as an embedded point KEY;
for the visual embedded point, judging whether the content description attribute exists and the number is digital, and if so, intercepting the number from the digital to be the embedded point KEY.
15. A non-transitory computer readable storage medium storing instructions which, when executed by a processor, cause the processor to perform the steps of the buried point testing method according to any of claims 1 to 7.
16. An electronic device comprising the non-volatile computer-readable storage medium of claim 15, and the processor having access to the non-volatile computer-readable storage medium.
CN201811351707.1A 2018-11-14 2018-11-14 Buried point testing method and equipment Active CN111190807B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811351707.1A CN111190807B (en) 2018-11-14 2018-11-14 Buried point testing method and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811351707.1A CN111190807B (en) 2018-11-14 2018-11-14 Buried point testing method and equipment

Publications (2)

Publication Number Publication Date
CN111190807A CN111190807A (en) 2020-05-22
CN111190807B true CN111190807B (en) 2023-08-18

Family

ID=70710511

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811351707.1A Active CN111190807B (en) 2018-11-14 2018-11-14 Buried point testing method and equipment

Country Status (1)

Country Link
CN (1) CN111190807B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112148606B (en) * 2020-09-22 2024-05-17 京东科技控股股份有限公司 Buried point test method, buried point test device, buried point test equipment and computer readable medium
CN112596978B (en) * 2020-12-23 2023-07-14 华人运通(上海)云计算科技有限公司 Buried point information processing method, buried point information processing device and medium
CN113641345A (en) * 2021-08-13 2021-11-12 网易(杭州)网络有限公司 Mapping configuration-based point burying method and device, electronic equipment and storage medium
CN114331574A (en) * 2022-03-17 2022-04-12 北京搜狐新媒体信息技术有限公司 Verification method, device, storage medium and equipment for reporting buried point
CN116680171B (en) * 2023-05-22 2024-03-08 前海飞算云智软件科技(深圳)有限公司 Test method, device, storage medium and electronic equipment

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5850511A (en) * 1996-10-28 1998-12-15 Hewlett-Packard Company Computer implemented methods and apparatus for testing a telecommunications management network (TMN) agent
CN103530223A (en) * 2012-07-06 2014-01-22 百度在线网络技术(北京)有限公司 Method and device for automatically generating unit test cases
CN106502896A (en) * 2016-10-21 2017-03-15 武汉斗鱼网络科技有限公司 A kind of generation method of function test code and device
CN106844217A (en) * 2017-01-26 2017-06-13 网易(杭州)网络有限公司 Control to applying bury method and device, readable storage medium storing program for executing a little
CN107688530A (en) * 2017-04-06 2018-02-13 平安科技(深圳)有限公司 Method for testing software and device
CN107832216A (en) * 2017-11-08 2018-03-23 无线生活(杭州)信息科技有限公司 One kind buries a method of testing and device
CN107870860A (en) * 2017-05-05 2018-04-03 平安科技(深圳)有限公司 Bury a checking system and method
WO2018113385A1 (en) * 2016-12-24 2018-06-28 上海壹账通金融科技有限公司 Method and system for dynamically tracking application of client, client, and server
CN108319552A (en) * 2018-02-07 2018-07-24 优信数享(北京)信息技术有限公司 One kind burying a test method, apparatus and system
CN108536589A (en) * 2018-03-26 2018-09-14 广州小鹏汽车科技有限公司 A kind of application program buries point methods and system

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5850511A (en) * 1996-10-28 1998-12-15 Hewlett-Packard Company Computer implemented methods and apparatus for testing a telecommunications management network (TMN) agent
CN103530223A (en) * 2012-07-06 2014-01-22 百度在线网络技术(北京)有限公司 Method and device for automatically generating unit test cases
CN106502896A (en) * 2016-10-21 2017-03-15 武汉斗鱼网络科技有限公司 A kind of generation method of function test code and device
WO2018113385A1 (en) * 2016-12-24 2018-06-28 上海壹账通金融科技有限公司 Method and system for dynamically tracking application of client, client, and server
CN106844217A (en) * 2017-01-26 2017-06-13 网易(杭州)网络有限公司 Control to applying bury method and device, readable storage medium storing program for executing a little
CN107688530A (en) * 2017-04-06 2018-02-13 平安科技(深圳)有限公司 Method for testing software and device
WO2018184420A1 (en) * 2017-04-06 2018-10-11 平安科技(深圳)有限公司 Software testing method, apparatus, electronic device, and medium
CN107870860A (en) * 2017-05-05 2018-04-03 平安科技(深圳)有限公司 Bury a checking system and method
CN107832216A (en) * 2017-11-08 2018-03-23 无线生活(杭州)信息科技有限公司 One kind buries a method of testing and device
CN108319552A (en) * 2018-02-07 2018-07-24 优信数享(北京)信息技术有限公司 One kind burying a test method, apparatus and system
CN108536589A (en) * 2018-03-26 2018-09-14 广州小鹏汽车科技有限公司 A kind of application program buries point methods and system

Also Published As

Publication number Publication date
CN111190807A (en) 2020-05-22

Similar Documents

Publication Publication Date Title
CN111190807B (en) Buried point testing method and equipment
CN109388566B (en) Code coverage rate analysis method, device, equipment and storage medium
CN102804147B (en) Perform the code check executive system of the code check of ABAP source code
CN110688307B (en) JavaScript code detection method, device, equipment and storage medium
CN106919612B (en) Processing method and device for online structured query language script
CN110908890A (en) Automatic test method and device for interface
US11074162B2 (en) System and a method for automated script generation for application testing
CN111522741B (en) Interface test code generation method and device, electronic equipment and readable storage medium
CN108694108B (en) iOS crash data classification and statistics method and device
CN109271315B (en) Script code detection method, script code detection device, computer equipment and storage medium
CN112506769B (en) Request body generation method and device based on interface document and computer equipment
CN110688315A (en) Interface code detection report generation method, electronic device, and storage medium
US9390073B2 (en) Electronic file comparator
CN111767213B (en) Database check point testing method and device, electronic equipment and storage medium
CN111258562A (en) Java code quality inspection method, device, equipment and storage medium
CN111078529A (en) Client write-in module testing method and device and electronic equipment
CN111459817B (en) Method and device for checking program execution code
CN113037521B (en) Method for identifying state of communication equipment, communication system and storage medium
CN114492324A (en) Component data statistical method and device
CN114528218A (en) Test program generation method, test program generation device, storage medium, and electronic device
CN110298018B (en) Text data processing method, device, computer equipment and storage medium
CN113792017A (en) Method and system for checking template content imported into excel
CN109783105B (en) Coding statistical method, equipment, storage medium and device of enterprise service platform
CN115579096A (en) Automatic generation and analysis verification method, system and storage medium for drug alert E2B R3 standard report
CN113342657A (en) Method and device for detecting code exception

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