Method, device, storage medium and equipment for detecting buried data

By automatically detecting the number of reported entries and field values ​​of buried data, the inefficiency problem caused by manual verification in the existing technology is solved, and the efficiency of buried data detection is improved.

CN114756467BActive Publication Date: 2024-08-30HUNAN HAPPLY SUNSHINE INTERACTIVE ENTERTAINMENT MEDIA CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202210421284.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-21
Publication Date
2024-08-30
Estimated Expiration
2042-04-21

AI Technical Summary

Technical Problem

The existing buried point data detection method requires manual verification of the reporting method, format and field value of each buried point data, resulting in low detection efficiency.

Method used

By obtaining the buried point data and expected template data of the UI scene from the preset data table, selecting the buried point data that matches the domain name information, request method and target field, counting the number of reports and verifying the field value, generating a detection report, and realizing Automated detection.

Benefits of technology

There is no need to manually verify each buried point data, which improves the efficiency of buried point data detection and realizes automated detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114756467B
    Figure CN114756467B
Patent Text Reader

Abstract

The present application discloses a method, device, storage medium and equipment for detecting buried point data, which comprises: obtaining multiple buried point data from a data table; obtaining expected template data and expected number of reports from a template data table; selecting buried point data whose domain name information is the same as the domain name information template, whose request method is the same as the request method template, and whose main information contains a target field as valid buried point data from each buried point data; counting the number of valid buried point data to obtain the actual number of reports; comparing the actual number of reports with the expected number of reports to obtain a verification result of the number of reports; using field value verification rules to verify the field value of the target field of the valid buried point data to obtain a field value verification result; generating a detection report based on the verification result of the number of reports and the field value verification result. The method can avoid manual verification of each buried point data of the application, thereby effectively improving the detection efficiency of the buried point data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of software testing, and in particular to a method, device, storage medium and equipment for detecting buried data. Background Art

[0002] The era of big data has arrived. Nowadays, most Internet applications have the need to report buried data. Big data not only provides people with a way to view and share, but also further affects people's work, life, entertainment, etc. In order to ensure the smooth operation of terminal products, it is necessary to maintain the application based on the reporting results of buried data. Therefore, the accuracy detection of buried data has become a hot topic in the industry.

[0003] At present, the existing method of detecting buried data requires manual verification of the reporting method, format, field and field value of each buried data, and the detection efficiency is low. Summary of the invention

[0004] The present application provides a method, device, storage medium and equipment for detecting buried data, the purpose of which is to improve the detection efficiency of buried data.

[0005] In order to achieve the above objectives, this application provides the following technical solutions:

[0006] A method for detecting buried data, comprising:

[0007] After receiving the detection instruction from the user, multiple tracking data of the UI scene shown in the detection instruction are obtained from a preset data table; the tracking data includes domain name information, request method and subject information;

[0008] Obtaining expected template data of the UI scenario and the expected number of reports from a preset template data table; the expected template data includes a domain name information template, a request method template, a target field, and a field value validation rule of the target field;

[0009] From each of the embedding data, select embedding data whose domain name information is the same as the domain name information template, whose request method is the same as the request method template, and whose main body information contains the target field as valid embedding data;

[0010] Count the number of valid buried point data to obtain the actual number of reported items;

[0011] Compare the actual number of reports with the expected number of reports to obtain a verification result of the number of reports of the UI scenario;

[0012] Using the field value validation rule, the field value of the target field indicated by the main information of the valid embedding data is validated to obtain the field value validation result of the valid embedding data;

[0013] Based on the verification result of the number of reported items and the verification result of the field value, a test report is generated and sent to the user.

[0014] Optionally, after receiving the detection instruction from the user, a plurality of buried point data of the UI scene indicated by the detection instruction is obtained from a preset data table, including:

[0015] Call the preset automated testing tool in advance to trigger the terminal to start the pre-installed application;

[0016] Control the terminal to bind the network node address of the server so that the application sends a big data request to the server according to a pre-configured UI scenario;

[0017] Parse the big data request to obtain one or more embedded point data of the UI scene;

[0018] The embedded point data of the UI scene is stored in a preset data table;

[0019] After receiving the detection instruction from the user, multiple buried point data of the UI scene shown in the detection instruction are obtained from the data table.

[0020] Optionally, before controlling the terminal to bind the network node address of the server so that the application sends a big data request to the server according to a preconfigured UI scenario, the method further includes:

[0021] Delete the buried point data in the data table.

[0022] Optionally, comparing the actual number of reports with the expected number of reports to obtain a verification result of the number of reports of the UI scenario includes:

[0023] If the actual number of reports is the same as the expected number of reports, then the verification result of the number of reports of the UI scene is determined as follows: the number of reports of the valid tracking data meets expectations;

[0024] If the actual number of reports is different from the expected number of reports, the verification result of the number of reports of the UI scene is determined as: the number of reports of the valid buried data does not meet expectations.

[0025] Optionally, the field value validation rule is used to validate the field value of the target field indicated by the main information of the valid buried data to obtain the field value validation result of the valid buried data, including:

[0026] If the field value of the target field shown in the main information of the valid buried point data meets the field value verification rule, the field value verification result of the valid buried point data is determined as: the valid buried point data passes the field value verification;

[0027] If the field value of the target field shown in the main information of the valid buried point data does not comply with the field value validation rule, the field value validation result of the valid buried point data is determined as: the valid buried point data fails the field value validation.

[0028] Optionally, after selecting, from each of the embedding data, embedding data whose domain name information is the same as the domain name information template, whose request method is the same as the request method template, and whose body information includes the target field as valid embedding data, the method further includes:

[0029] For each of the valid buried point data, a missing value check is performed on the main information of the valid buried point data to obtain a missing value check result of the valid buried point data;

[0030] Performing redundancy check on the main information of the valid burying point data to obtain a redundancy check result of the valid burying point data;

[0031] Based on the missing value check result and the redundancy check result, a field verification result of the valid buried point data is generated;

[0032] Wherein, if the missing value check result indicates that the subject information has no missing fields, and the redundancy check result indicates that the subject information has no redundant fields, then the field verification result of the valid buried point data is determined as: the valid buried point data passes the field verification;

[0033] If the missing value check result indicates that there are missing fields in the main information, and the redundancy check result indicates that there are redundant fields in the main information, then the field verification result of the valid buried point data is determined to be: the valid buried point data fails the field verification.

[0034] Optionally, the generating a test report based on the verification result of the number of reported items and the verification result of the field value, and sending the test report to the user includes:

[0035] Based on the verification results of the number of reported items, the field verification results, and the field value verification results, a test report is generated, and the test report is sent to the user.

[0036] A buried point data detection device, comprising:

[0037] A first acquisition unit is used to acquire, after receiving a detection instruction from a user, a plurality of buried point data of the UI scene indicated by the detection instruction from a preset data table; the buried point data includes domain name information, request method and subject information;

[0038] The second acquisition unit is used to acquire the expected template data of the UI scene and the expected number of reports from a preset template data table; the expected template data includes a domain name information template, a request method template, a target field, and a field value verification rule of the target field;

[0039] A data screening unit, used for selecting, from each of the embedding data, embedding data whose domain name information is the same as the domain name information template, whose request method is the same as the request method template, and whose main body information contains the target field, as valid embedding data;

[0040] A number counting unit is used to count the number of valid buried point data to obtain the actual number of reported items;

[0041] A number comparison unit, used to compare the actual number of reported items with the expected number of reported items to obtain a verification result of the number of reported items of the UI scene;

[0042] A field value verification unit, used to verify the field value of the target field indicated by the main information of the valid buried point data by using the field value verification rule, and obtain the field value verification result of the valid buried point data;

[0043] A report generating unit is used to generate a detection report based on the verification result of the number of reported items and the verification result of the field value, and send the detection report to the user.

[0044] A computer-readable storage medium, the computer-readable storage medium comprising a stored program, wherein the program executes the buried point data detection method.

[0045] A buried point data detection device comprises: a processor, a memory and a bus; the processor and the memory are connected via the bus;

[0046] The memory is used to store programs, and the processor is used to run programs, wherein the buried point data detection method is executed when the program is running.

[0047] The technical solution provided by the present application, after receiving the detection instruction from the user, obtains multiple buried point data of the UI scene shown in the detection instruction from the preset data table. Obtain the expected template data of the UI scene from the preset template data table, as well as the expected number of reports. From each buried point data, select the buried point data whose domain name information is the same as the domain name information template, whose request method is the same as the request method template, and whose main information contains the target field as the valid buried point data. Count the number of valid buried point data to obtain the actual number of reports. Compare the actual number of reports with the expected number of reports to obtain the verification result of the number of reports of the UI scene. Using the field value verification rule, verify the field value of the target field shown in the main information of the valid buried point data to obtain the field value verification result of the valid buried point data. Based on the verification result of the number of reports and the field value verification result, generate a detection report and send the detection report to the user. Using the scheme shown in the present application, the user does not need to manually verify each buried point data of the application, but only needs to enter the detection instruction to realize the automatic detection of the buried point data, thereby effectively improving the detection efficiency of the buried point data. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0049] Figure 1a A flowchart of a method for detecting buried data provided by an embodiment of the present application;

[0050] Figure 1b A flowchart of a method for detecting buried data provided by an embodiment of the present application;

[0051] Figure 2 A flowchart of another method for detecting buried data provided in an embodiment of the present application;

[0052] Figure 3 A schematic diagram of the architecture of a buried point data detection device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0053] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0054] like Figure 1a and Figure 1b FIG. 1 is a flow chart of a method for detecting buried data provided by an embodiment of the present application, which is applied to a server and includes the following steps:

[0055] S101: pre-calling a preset automated testing tool to trigger a terminal to start a pre-installed application.

[0056] Among them, the preset automated testing tools include but are not limited to: Appium, Calabash, Robotium, Frank, and UIAutomator, etc. In the embodiment of the present application, triggering the terminal to start the pre-installed application is only to replay the pre-recorded use case. The specific implementation principles of the recording and playback of the use case are common knowledge familiar to those skilled in the art and will not be repeated here.

[0057] S102: Delete the buried point data in the preset data table.

[0058] In order to prevent invalid tracking data from being obtained from the data table later, it is necessary to clear the tracking data in the data table in advance.

[0059] In the embodiment of the present application, a preset data clearing interface can be called to delete the buried point data in the data table. The specific performance logic of the data clearing interface can be:

[0060] test_requrl="http: / / 10.200.8.114:80 / test"

[0061] delete_requrl="http: / / 10.200.8.114:80 / delete"

[0062] defcheck_result(field,platform,test_point,field_table,act_count,CaseName):

[0063] Test_data = {}

[0064] test_data['field'] = field

[0065] test_data['platform']=platform

[0066] test_data['test_point']=test_point

[0067] test_data['field_table']=field_table

[0068] test_data['act_count']=act_count

[0069] test_data_urlencode=urllib.urlencode(test_data)

[0070] req=urllib2.Request(url=test_requrl,data=test_data_urlencode)

[0071] res_data=urllib2.urlopen(req)

[0072] res = res_data.read()

[0073] res = eval(res)

[0074] return(res)

[0075] defdelete_data(self,platform):

[0076] test_data = {}

[0077] test_data['platform']=platform

[0078] test_data_urlencode=urllib.urlencode(test_data)

[0079] req=urllib2.Request(url=delete_requrl,data=test_data_urlencode)

[0080] res_data=urllib2.urlopen(req)

[0081] res = res_data.read()

[0082] return(res).

[0083] It should be noted that the above specific implementation logic is only used for illustration.

[0084] S103: Control the terminal to bind the network node (host) address of the server, so that the application sends a big data request to the server according to the pre-configured UI scene.

[0085] Among them, the so-called UI scene is used to indicate the reporting scenario of the buried data, that is, the scenario of using the application to trigger the reporting of the buried data.

[0086] Generally speaking, the server shown in the embodiment of the present application adopts the Django architecture. Therefore, based on the data collection characteristics of the Django architecture, it is only necessary to control the terminal to bind the network node address of the server, and the application can send big data requests to the server according to the UI scenario to realize the reporting of the buried data.

[0087] S104: Parse the big data request to obtain one or more embedded point data of the UI scene.

[0088] The buried data includes user agent information, domain name information, request method and body information. Specifically, the user agent information includes the device information of the terminal, which can be used to indicate the data source of the buried data. The request method includes but is not limited to: get method and post method.

[0089] S105: Storing the embedded point data of the UI scene in a data table.

[0090] Among them, the user agent information, domain name information, request method and subject information shown in the buried data are all stored in various fields of the data table in the form of key-value pairs, and each field includes the platform field, host field, httpmath field and data field.

[0091] Specifically, the value corresponding to the platform field as the key is used to record the user agent information, the value corresponding to the host field as the key is used to record the domain name information, the value corresponding to the httpmath field as the key is used to record the request method, and the value corresponding to the data field as the key is used to record the subject information.

[0092] Generally speaking, you can call the request.META['HTTP_USER_AGENT'] function to store the user agent information in the platform field of the data table, you can call the request.get_host function to store the domain name information in the host field of the data table, you can call the request.method function to store the request method in the httpmath field of the data table, and store the body information in the data field of the data table.

[0093] In the process of storing the main information in the data table, it is also necessary to convert the format of the main information to obtain the json data of the main information (json data can be regarded as a collection of multiple fields, and each field has a field value), and then store the json data of the main information in the data field of the data table.

[0094] In addition, the data table shown in the embodiment of the present application can also be used to store the update time of the UI scene. Specifically, the update time can be stored in the update_time field of the data table. In addition, the data table shown in the embodiment of the present application can be shown in Table 1.

[0095] Table 1

[0096]

[0097] It should be noted that the contents shown in Table 1 above are only for illustration.

[0098] S106: After receiving the detection instruction from the user, obtain multiple buried point data of the UI scene indicated by the detection instruction from the data table.

[0099] S107: Obtaining expected template data of the UI scene indicated by the detection instruction and the expected number of reports from a preset template data table.

[0100] The expected template data includes various template fields, and each template field includes a template host field, a template http field, and a template data field. Specifically, the template host field is used to record the domain name information template, the template http field is used to record the request method template, and the template data field is used to record the target field and the field value validation rule of the target field.

[0101] It should be noted that the field value validation rules can be expressed in the following forms: specific characters, 1000, nul, size_, change_, url_, config, list1_, lobstring_, dict1_, FieldMiss.

[0102] Generally speaking, specific characters represent comparing the target field of the buried data with the specific characters. If the target field is the same as the specific characters, it is determined that the target field and the specific characters completely match, and the buried data passes the field value verification. If the target field and the specific characters are not the same, it is determined that the target field and the specific characters do not completely match, and the buried data fails the field value verification.

[0103] Specifically, assuming that the specific character is f169a827000796, and the target field of the buried data is f169a827000796, it is obvious that the target field is the same as the specific character, so it can be determined that the target field completely matches the specific character, and the buried data passes the field value verification.

[0104] 10000 means that the target field of the buried data is judged to be non-empty. If the target field is not empty, it is determined that the buried data passes the field value verification. If the target field is empty, it is determined that the buried data fails the field value verification.

[0105] nul means to judge whether the target field of the buried data is empty. If the target field is empty, it is determined that the buried data passes the field value verification. If the target field is not empty, it is determined that the buried data fails the field value verification.

[0106] size_ represents the numerical value judgment of the field value contained in the target field of the buried data. If the field value contained in the target field is greater than the preset threshold, it is determined that the buried data passes the field value verification. If the field value contained in the target field is not greater than the preset threshold, it is determined that the buried data does not pass the field value verification. Specifically, taking size_1000 as an example, when the field value contained in the target field is greater than 1000, it is determined that the buried data passes the field value verification.

[0107] change_ represents the length judgment of the target field of the buried data. If the character length of the target field is greater than the preset length, the buried data is determined to have passed the field value verification. If the character length of the target field is not greater than the preset length, the buried data is determined to have failed the field value verification. Specifically, taking change_36 as an example, when the character length of the target field is greater than 36, the buried data is determined to have passed the field value verification.

[0108] url_ represents the fuzzy matching of characters on the target field of the buried data. If the target field contains the preset string, it is determined that the buried data passes the field value verification. If the target field does not contain the preset string, it is determined that the buried data fails the field value verification.

[0109] config means matching the target field of the tracking data with the common field. If the target field contains the preset common field, the tracking data is determined to have passed the field value verification. If the target field does not contain the preset common field, the tracking data is determined to have failed the field value verification.

[0110] list1_represents the judgment of the form format shown in the target field of the buried data. If the form format shown in the target field is the preset form format, it is determined that the buried data passes the field value verification. If the form format shown in the target field is not the preset form format, it is determined that the buried data does not pass the field value verification.

[0111] lobstring_ represents the key-value pair verification of the target field of the buried data. If the key-value pair shown in the target field is the preset key-value pair, it is determined that the buried data passes the field value verification. If the key-value pair shown in the target field is not the preset key-value pair, it is determined that the buried data does not pass the field value verification.

[0112] dict1_ represents a dictionary check on the target field of the buried data. If the dictionary format shown in the target field is the preset dictionary format, it is determined that the buried data passes the field value verification. If the dictionary format shown in the target field is not the preset dictionary format, it is determined that the buried data fails the field value verification.

[0113] FieldMiss means that there is no need to verify the field value of the target field of the buried data, and the buried data is directly determined to pass the field value verification.

[0114] S108: From various embedded point data of the UI scene shown in the detection instruction, select embedded point data whose domain name information is the same as the domain name information template, whose request method is the same as the request method template, and whose main information contains the target field as valid embedded point data.

[0115] The number of target fields recorded in the template data field is one or more, and the target field is usually expressed in the form of ${field}.

[0116] Specifically, if the number of target fields is one, for example, ${field}={'act':'pvs'}, then from each candidate embedding data, obtain the candidate embedding data whose main information contains {'act':'pvs'} as the valid embedding data. Generally speaking, act represents the target field, and pvs represents the field value of the target field, that is, from each candidate embedding data, obtain the candidate embedding data whose main information contains the act field and the field value of the act field is pvs as the valid embedding data.

[0117] If there are multiple target fields, for example, ${field} = {'logtype':'show', 'flag':'1'}, then from each candidate embedding data, the candidate embedding data whose main information includes {'logtype':'show', 'flag':'1'} is obtained as the valid embedding data.

[0118] In addition, fuzzy matching can be used to implement the selection process of valid buried point data. Assuming that there are multiple target fields, for example, ${field}={'logtype':'show','lob':'smod=5'}, then from each candidate buried point data, the candidate buried point data whose main information contains {'logtype':'show'} and {smod=5} is selected as the valid buried point data.

[0119] S109: Count the number of valid buried point data to obtain the actual number of reported items.

[0120] S110: Compare the actual number of reported items with the expected number of reported items to obtain a verification result of the number of reported items.

[0121] Among them, if the actual number of reports is the same as the expected number of reports, the verification result of the number of reports for the UI scene is determined as: the number of reports of valid tracking data meets expectations.

[0122] If the actual number of reports is different from the expected number of reports, the verification result of the number of reports for the UI scenario is determined as follows: the number of reports of valid tracking data does not meet expectations.

[0123] Specifically, the specific implementation logic for comparing the actual number of reported items with the expected number of reported items can be:

[0124] defDiffCount(self,data,count):

[0125] print 'start diffcount'

[0126] count = int(count)

[0127] DataCount=len(data)

[0128] ifDataCount == count:

[0129] print 'diffcountdone'

[0130] return(1,")

[0131] elifcount==9:

[0132] ifDataCount>0:

[0133] print'diffcount DataCount>0'

[0134] return(1,")

[0135] else:

[0136] print'diffcountnot DataCount>0'

[0137] return(0,DataCount)

[0138] else:

[0139] return(0,DataCount).

[0140] It should be noted that the above specific implementation logic is only used for illustration.

[0141] In addition, if the value of the expected number of reports is zero, it means that there is no need to verify the number of reports of the tracking data, and the verification result of the number of reports of the UI scene can be directly determined as: the number of reports of valid tracking data meets expectations.

[0142] S111: For each valid buried point data, perform missing value check on the main information of the valid buried point data to obtain the missing value check result of the valid buried point data.

[0143] Among them, the missing function can be called to perform missing value check on the main information of the valid buried data. Specifically, the specific implementation logic of calling the missing function can be:

[0144] missing=set(templete).difference(set(realtime)).

[0145] S112: Perform redundancy check on the main information of the valid burial point data to obtain the redundancy check result of the valid burial point data.

[0146] Among them, the redundant function can be called to perform redundant verification on the main information of the valid tracking data. Specifically, the specific implementation logic of calling the redundant function can be:

[0147] redundant=set(realtime).difference(set(templete)).

[0148] S113: Generate field verification results of valid buried point data based on missing value verification results and redundancy verification results.

[0149] Among them, if the missing value check result indicates that the main information has no missing fields, and the redundancy check result indicates that the main information has no redundant fields, then the field verification result of the valid buried point data is determined as: the valid buried point data passes the field verification.

[0150] If the missing value check result indicates that there are missing fields in the main information, and the redundancy check result indicates that there are redundant fields in the main information, then the field verification result of the valid buried point data is determined to be: the valid buried point data fails the field verification.

[0151] It should be noted that when calling the missing function to perform missing value check on the main information of valid embedded point data, if the missing value check result indicates that there are missing fields in the main information, the missing function will return the missing fields of the valid embedded point data.

[0152] When the redundant function is called to perform redundancy check on the main information of the valid buried point data, if the redundant check result indicates that there are redundant fields in the main information, the redundant function will return the redundant fields of the valid buried point data.

[0153] In this way, the missing fields and redundant fields of the valid buried data can also be added to the field verification results of the valid buried data.

[0154] S114: Using the field value validation rules, the field value of the target field indicated by the main information of the valid buried point data is validated to obtain the field value validation result of the valid buried point data.

[0155] Among them, if the field value of the target field shown in the main information of the valid buried point data meets the field value validation rules, the field value validation result of the valid buried point data is determined as: the valid buried point data passes the field value validation.

[0156] If the field value of the target field shown in the main information of the valid embedding data does not comply with the field value validation rules, the field value validation result of the valid embedding data is determined as: the valid embedding data fails the field value validation.

[0157] It should be noted that the specific logic for validating the field value of the target field shown in the main information of the valid tracking data by using the field value validation rule can be:

[0158]

[0159]

[0160]

[0161]

[0162] It should be noted that the above specific performance logic is only used for illustration.

[0163] In addition, a preset data verification interface may be called to execute the process shown in S106-S114 above. Specifically, the calling logic of the data verification interface may be:

[0164]

[0165] It should be noted that the above specific performance logic is only used for illustration.

[0166] S115: Generate a test report based on the verification results of the number of reported items, the field verification results, and the field value verification results, and send the test report to the user.

[0167] To sum up, by using the scheme shown in this embodiment, the user does not need to manually verify each buried point data of the application, but only needs to enter the detection instruction to realize the automatic detection of the buried point data, thereby effectively improving the detection efficiency of the buried point data.

[0168] It should be noted that S101 mentioned in the above embodiment is an optional implementation of the buried data detection method described in this application. In addition, S115 mentioned in the above embodiment is also an optional implementation of the buried data detection method described in this application. To this end, the process mentioned in the above embodiment can be summarized as follows: Figure 2 The method shown.

[0169] like Figure 2 FIG. 1 is a flow chart of another method for detecting buried data provided by an embodiment of the present application, comprising the following steps:

[0170] S201: After receiving a detection instruction from the user, a plurality of buried point data of the UI scene indicated by the detection instruction is obtained from a preset data table.

[0171] Among them, the buried data includes domain name information, request method and subject information.

[0172] S202: Obtain expected template data of the UI scene and the expected number of reported items from a preset template data table.

[0173] The expected template data includes a domain name information template, a request method template, a target field, and field value validation rules of the target field.

[0174] S203: From various embedding data, select embedding data whose domain name information is the same as the domain name information template, whose request method is the same as the request method template, and whose main body information contains the target field as valid embedding data.

[0175] S204: Count the number of valid buried point data to obtain the actual number of reported items.

[0176] S205: Compare the actual number of reports with the expected number of reports to obtain a verification result of the number of reports of the UI scenario.

[0177] S206: Using the field value validation rules, the field value of the target field indicated by the main information of the valid buried point data is validated to obtain the field value validation result of the valid buried point data.

[0178] S207: Generate a test report based on the verification results of the number of reported items and the field value verification results, and send the test report to the user.

[0179] To sum up, by using the scheme shown in this embodiment, the user does not need to manually verify each buried point data of the application, but only needs to enter the detection instruction to realize the automatic detection of the buried point data, thereby effectively improving the detection efficiency of the buried point data.

[0180] Corresponding to the buried point data detection method provided in the above-mentioned embodiment of the present application, the embodiment of the present application also provides a buried point data detection device.

[0181] like Figure 3 FIG. 1 is a schematic diagram of the architecture of a buried point data detection device provided in an embodiment of the present application, including:

[0182] The first acquisition unit 100 is used to acquire multiple embedded point data of the UI scene shown in the detection instruction from a preset data table after receiving the user's detection instruction; the embedded point data includes domain name information, request method and subject information.

[0183] Optionally, the first acquisition unit 100 is specifically used to: pre-call a preset automated testing tool to trigger the terminal to start a pre-installed application; control the terminal to bind the network node address of the server so that the application sends a big data request to the server based on a pre-configured UI scene; parse the big data request to obtain one or more buried point data of the UI scene; store the buried point data of the UI scene in a preset data table; after receiving the user's detection instruction, obtain multiple buried point data of the UI scene shown in the detection instruction from the data table.

[0184] The first acquisition unit 100 is also used to delete the buried point data in the data table.

[0185] The second acquisition unit 200 is used to acquire expected template data of the UI scene and the expected number of reports from a preset template data table; the expected template data includes a domain name information template, a request method template, a target field, and field value validation rules of the target field.

[0186] The data screening unit 300 is used to select, from various embedding data, embedding data whose domain name information is the same as the domain name information template, whose request method is the same as the request method template, and whose main information contains the target field, as valid embedding data.

[0187] The number counting unit 400 is used to count the number of valid buried point data to obtain the actual number of reported items.

[0188] The number comparison unit 500 is used to compare the actual number of reported items with the expected number of reported items to obtain a verification result of the number of reported items in the UI scenario.

[0189] Optionally, the number comparison unit 500 is specifically used for: if the actual number of reports is the same as the expected number of reports, then the verification result of the number of reports for the UI scene is determined to be: the number of reports of valid buried point data is in line with expectations; if the actual number of reports is different from the expected number of reports, then the verification result of the number of reports for the UI scene is determined to be: the number of reports of valid buried point data is not in line with expectations.

[0190] The field verification unit 600 is used to: for each valid buried point data, perform a missing value check on the main information of the valid buried point data to obtain the missing value check result of the valid buried point data; perform a redundancy check on the main information of the valid buried point data to obtain the redundancy check result of the valid buried point data; based on the missing value check result and the redundancy check result, generate the field verification result of the valid buried point data; wherein, if the missing value check result indicates that the main information has no missing fields, and the redundancy check result indicates that the main information has no redundant fields, then the field verification result of the valid buried point data is determined to be: the valid buried point data passes the field verification; if the missing value check result indicates that the main information has missing fields, and the redundancy check result indicates that the main information has redundant fields, then the field verification result of the valid buried point data is determined to be: the valid buried point data fails the field verification.

[0191] The field value verification unit 700 is used to verify the field value of the target field indicated by the main information of the valid buried point data by using the field value verification rules to obtain the field value verification result of the valid buried point data.

[0192] Optionally, the field value verification unit 700 is specifically used to: if the field value of the target field shown in the main information of the valid buried point data meets the field value verification rules, then the field value verification result of the valid buried point data is determined to be: the valid buried point data passes the field value verification; if the field value of the target field shown in the main information of the valid buried point data does not meet the field value verification rules, then the field value verification result of the valid buried point data is determined to be: the valid buried point data fails the field value verification.

[0193] The report generation unit 800 is used to generate a test report based on the verification results of the number of reported items and the field value verification results, and send the test report to the user.

[0194] Optionally, the report generation unit 800 is specifically used to generate a test report based on the reported number verification results, field verification results, and field value verification results, and send the test report to the user.

[0195] To sum up, by using the scheme shown in this embodiment, the user does not need to manually verify each buried point data of the application, but only needs to enter the detection instruction to realize the automatic detection of the buried point data, thereby effectively improving the detection efficiency of the buried point data.

[0196] The present application also provides a computer-readable storage medium, which includes a stored program, wherein the program executes the buried point data detection method provided by the present application.

[0197] The present application also provides a buried point data detection device, including: a processor, a memory and a bus. The processor and the memory are connected via a bus, the memory is used to store programs, and the processor is used to run programs, wherein when the program is running, the buried point data detection method provided by the present application is executed, including the following steps:

[0198] After receiving the detection instruction from the user, multiple tracking data of the UI scene shown in the detection instruction are obtained from a preset data table; the tracking data includes domain name information, request method and subject information;

[0199] Obtaining expected template data of the UI scenario and the expected number of reports from a preset template data table; the expected template data includes a domain name information template, a request method template, a target field, and a field value validation rule of the target field;

[0200] From each of the embedding data, select embedding data whose domain name information is the same as the domain name information template, whose request method is the same as the request method template, and whose main body information contains the target field as valid embedding data;

[0201] Count the number of valid buried point data to obtain the actual number of reported items;

[0202] Compare the actual number of reports with the expected number of reports to obtain a verification result of the number of reports of the UI scenario;

[0203] Using the field value validation rule, the field value of the target field indicated by the main information of the valid embedding data is validated to obtain the field value validation result of the valid embedding data;

[0204] Based on the verification result of the number of reported items and the verification result of the field value, a test report is generated and sent to the user.

[0205] Specifically, based on the above embodiment, after receiving the detection instruction from the user, multiple buried point data of the UI scene indicated by the detection instruction are obtained from a preset data table, including:

[0206] Call the preset automated testing tool in advance to trigger the terminal to start the pre-installed application;

[0207] Control the terminal to bind the network node address of the server so that the application sends a big data request to the server according to a pre-configured UI scenario;

[0208] Parse the big data request to obtain one or more embedded point data of the UI scene;

[0209] The embedded point data of the UI scene is stored in a preset data table;

[0210] After receiving the detection instruction from the user, multiple buried point data of the UI scene shown in the detection instruction are obtained from the data table.

[0211] Specifically, based on the above embodiment, before controlling the terminal to bind the network node address of the server so that the application sends a big data request to the server according to a pre-configured UI scenario, the method further includes:

[0212] Delete the buried point data in the data table.

[0213] Specifically, based on the above embodiment, the actual number of reports is compared with the expected number of reports to obtain a verification result of the number of reports of the UI scene, including:

[0214] If the actual number of reports is the same as the expected number of reports, then the verification result of the number of reports of the UI scene is determined as follows: the number of reports of the valid tracking data meets expectations;

[0215] If the actual number of reports is different from the expected number of reports, the verification result of the number of reports of the UI scene is determined as: the number of reports of the valid buried data does not meet expectations.

[0216] Specifically, based on the above embodiment, the field value validation rule is used to validate the field value of the target field shown in the main information of the valid buried data to obtain the field value validation result of the valid buried data, including:

[0217] If the field value of the target field shown in the main information of the valid buried point data meets the field value verification rule, the field value verification result of the valid buried point data is determined as: the valid buried point data passes the field value verification;

[0218] If the field value of the target field shown in the main information of the valid buried point data does not comply with the field value validation rule, the field value validation result of the valid buried point data is determined as: the valid buried point data fails the field value validation.

[0219] Specifically, based on the above embodiment, after selecting, from each of the embedding data, embedding data whose domain name information is the same as the domain name information template, whose request method is the same as the request method template, and whose body information includes the target field as valid embedding data, the method further includes:

[0220] For each of the valid buried point data, a missing value check is performed on the main information of the valid buried point data to obtain a missing value check result of the valid buried point data;

[0221] Performing redundancy check on the main information of the valid burying point data to obtain a redundancy check result of the valid burying point data;

[0222] Based on the missing value check result and the redundancy check result, a field verification result of the valid buried point data is generated;

[0223] Wherein, if the missing value check result indicates that the subject information has no missing fields, and the redundancy check result indicates that the subject information has no redundant fields, then the field verification result of the valid buried point data is determined as: the valid buried point data passes the field verification;

[0224] If the missing value check result indicates that there are missing fields in the main information, and the redundancy check result indicates that there are redundant fields in the main information, then the field verification result of the valid buried point data is determined to be: the valid buried point data fails the field verification.

[0225] Specifically, based on the above embodiment, generating a test report based on the verification result of the number of reported items and the verification result of the field value, and sending the test report to the user includes:

[0226] Based on the verification results of the number of reported items, the field verification results, and the field value verification results, a test report is generated, and the test report is sent to the user.

[0227] If the functions described in the method of the embodiment of the present application are implemented in the form of software functional units and sold or used as independent products, they can be stored in a storage medium readable by a computing device. Based on this understanding, the part of the embodiment of the present application that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computing device (which can be a personal computer, server, mobile computing device or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories, random access memories, magnetic disks or optical disks.

[0228] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0229] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for detecting buried data, characterized in that: include: After receiving the detection instruction from the user, multiple buried point data of the UI scene indicated by the detection instruction are obtained from a preset data table; The tracking data includes domain name information, request method and subject information; Obtaining expected template data of the UI scenario and the expected number of reports from a preset template data table; the expected template data includes a domain name information template, a request method template, a target field, and a field value validation rule of the target field; From each of the embedding data, select embedding data whose domain name information is the same as the domain name information template, whose request method is the same as the request method template, and whose main body information contains the target field as valid embedding data; Count the number of valid buried point data to obtain the actual number of reported items; Compare the actual number of reports with the expected number of reports to obtain a verification result of the number of reports of the UI scenario; Using the field value validation rule, the field value of the target field indicated by the main information of the valid embedding data is validated to obtain the field value validation result of the valid embedding data; Based on the verification result of the number of reported items and the verification result of the field value, a test report is generated and sent to the user.

2. The method according to claim 1, characterized in that After receiving the detection instruction from the user, multiple tracking point data of the UI scene indicated by the detection instruction are obtained from a preset data table, including: Call the preset automated testing tool in advance to trigger the terminal to start the pre-installed application; Control the terminal to bind the network node address of the server so that the application sends a big data request to the server according to a pre-configured UI scenario; Parse the big data request to obtain one or more embedded point data of the UI scene; The embedded point data of the UI scene is stored in a preset data table; After receiving the detection instruction from the user, multiple buried point data of the UI scene shown in the detection instruction are obtained from the data table.

3. The method according to claim 2, characterized in that Before controlling the terminal to bind the network node address of the server so that the application sends a big data request to the server according to a pre-configured UI scenario, the method further includes: Delete the buried point data in the data table.

4. The method according to claim 1, characterized in that The comparing the actual number of reports with the expected number of reports to obtain a verification result of the number of reports of the UI scene includes: If the actual number of reports is the same as the expected number of reports, then the verification result of the number of reports of the UI scene is determined as follows: the number of reports of the valid tracking data meets expectations; If the actual number of reports is different from the expected number of reports, the verification result of the number of reports of the UI scene is determined as: the number of reports of the valid buried data does not meet expectations.

5. The method according to claim 1, characterized in that The field value validation rule is used to validate the field value of the target field shown in the main information of the valid buried data to obtain the field value validation result of the valid buried data, including: If the field value of the target field shown in the main information of the valid buried point data meets the field value verification rule, the field value verification result of the valid buried point data is determined as: the valid buried point data passes the field value verification; If the field value of the target field shown in the main information of the valid buried point data does not comply with the field value validation rule, the field value validation result of the valid buried point data is determined as: the valid buried point data fails the field value validation.

6. The method according to claim 1, characterized in that After selecting, from each of the embedding data, embedding data whose domain name information is the same as the domain name information template, whose request method is the same as the request method template, and whose body information includes the target field as valid embedding data, the method further includes: For each of the valid buried point data, a missing value check is performed on the main information of the valid buried point data to obtain a missing value check result of the valid buried point data; Performing redundancy check on the main information of the valid burying point data to obtain a redundancy check result of the valid burying point data; Based on the missing value check result and the redundancy check result, a field verification result of the valid buried point data is generated; Wherein, if the missing value check result indicates that the subject information has no missing fields, and the redundancy check result indicates that the subject information has no redundant fields, then the field verification result of the valid buried point data is determined as: the valid buried point data passes the field verification; If the missing value check result indicates that there are missing fields in the main information, and the redundancy check result indicates that there are redundant fields in the main information, then the field verification result of the valid buried point data is determined to be: the valid buried point data fails the field verification.

7. The method according to claim 6, characterized in that The generating a test report based on the verification result of the number of reported items and the verification result of the field value, and sending the test report to the user, includes: Based on the verification results of the number of reported items, the field verification results, and the field value verification results, a test report is generated, and the test report is sent to the user.

8. A buried point data detection device, characterized in that: include: A first acquisition unit is used to acquire, after receiving a detection instruction from a user, a plurality of buried point data of the UI scene indicated by the detection instruction from a preset data table; the buried point data includes domain name information, request method and subject information; The second acquisition unit is used to acquire the expected template data of the UI scene and the expected number of reports from a preset template data table; the expected template data includes a domain name information template, a request method template, a target field, and a field value verification rule of the target field; A data screening unit, used for selecting, from each of the embedding data, embedding data whose domain name information is the same as the domain name information template, whose request method is the same as the request method template, and whose main body information contains the target field, as valid embedding data; A number counting unit is used to count the number of valid buried point data to obtain the actual number of reported items; A number comparison unit, used to compare the actual number of reported items with the expected number of reported items to obtain a verification result of the number of reported items of the UI scene; A field value verification unit, used to verify the field value of the target field indicated by the main information of the valid buried point data by using the field value verification rule, and obtain the field value verification result of the valid buried point data; A report generating unit is used to generate a detection report based on the verification result of the number of reported items and the verification result of the field value, and send the detection report to the user.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the buried point data detection method described in any one of claims 1-7.

10. A buried point data detection device, characterized in that: include: processor, memory, and bus; The processor is connected to the memory via the bus; The memory is used to store programs, and the processor is used to run programs, wherein when the program is run, the buried point data detection method described in any one of claims 1-7 is executed.

Citation Information

Patent Citations

  • Buried point data inspection method, device and system, computer equipment and storage medium

    CN112328504A

  • Business process monitoring method and device, electronic equipment and storage medium

    CN112506747A

  • Acoustic Underground Infrastructure Locating and Mapping System

    US20180275299A1

  • Buried point data processing method, device, computer device and storage medium

    WO2019100614A1