Method and device for searching and comparing buried points, computing device and readable storage medium
Through automated buried point search comparison methods and equipment, the time-consuming and labor-intensive manual operation of buried point regression testing in the existing technology is solved, and efficient buried point parameter comparison and verification is achieved.
Patent Information
- Application Number
- CN202111199666.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-14
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2041-10-14
AI Technical Summary
The prior art requires manual operation in the buried point regression test, which is time-consuming and labor-intensive, and is not conducive to improving work efficiency.
It provides a method and equipment for searching and comparison of buried point events, and realizes automated search and comparison verification of buried point events through steps such as initializing page operations, running test cases, reading test data, judging the number of buried point events and parameter consistency.
It improves the efficiency of buried point regression testing, reduces manpower, and can complete batch comparison and verification of buried point parameters in a short time.
Smart Images

Figure CN113946509B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to buried point processing technology, and in particular to a buried point search and comparison method and device, as well as a computing device and a readable storage medium. Background Art
[0002] In the era of big data, most websites or application programs (APP) collect user behavior data or other information data. In this process, tracking points are a relatively important part. Depending on different pages and different requirements, an APP of a project may contain hundreds or even thousands of tracking points, which brings a lot of workload to the regression testing of tracking points.
[0003] Currently, you can use Charles, Fiddler and other packet capture tools to search for specific tracking events and verify them. However, this method can only perform manual operations individually to find tracking events and compare results, which is not only time-consuming and labor-intensive, but also not conducive to improving work efficiency. Summary of the invention
[0004] To this end, the present invention provides a method and device for finding and comparing buried points, as well as a computing device and a readable storage medium, in an effort to solve or at least alleviate the above problems.
[0005] According to a first aspect of the present invention, a method for searching and comparing buried points is provided, comprising: initializing page operation, running test cases, and reading test data; determining whether there are buried point events reported in advance, and if so, recording the results in the result column of the test data, terminating this case and executing the next case; reading buried point data during page operation; determining whether the number of buried point events is a predetermined number; if the buried point events are not the predetermined number, recording the results in the result column of the test data, terminating this case and executing the next case; if the buried point events are the predetermined number, determining whether the parameters of the buried points are consistent with the parameters of the expected results of the test data, wherein the expected results are the correct buried point results, and if not, recording the inconsistent results in the result column of the test data, terminating this case and executing the next case; if consistent, determining whether the value of each parameter is consistent with the parameter value in the expected result, and if not, recording the parameters and parameter values of the problematic buried points in the result column of the test data, terminating this case and executing the next case; if consistent, recording the data of the correct buried points in the result column of the test data, terminating this case and executing the next case.
[0006] Optionally, the method is executed by appium, and the appium mobilizes a page or an application to execute the buried point search and comparison method for the page or the application.
[0007] Optionally, during the operation of the page or application, real-time monitoring is performed to store: the data of the correct embedding point; the URL from which the parameter value of the expected result is obtained; the interface from which the parameter value of the expected result is obtained returns the result.
[0008] Optionally, the buried point search and comparison method further includes the following steps: before reading the buried point data, in the absence of a buried point event being reported in advance, determining whether there are parameters in the expected result that need to be replaced.
[0009] Optionally, the buried point search and comparison method also includes: after completing the test cases of all test data, generating a test report, wherein the test report includes the judgment results of each judgment step.
[0010] Optionally, the method for finding and comparing buried points also includes: creating in advance a file for storing judgment results, a file for storing parameters and parameter values, and a file for storing data of correct buried points.
[0011] According to a second aspect of the present invention, there is provided a buried point search and comparison device, comprising: an operation module, used to initialize page operations, run test cases, and read test data. The early report judgment module is used to judge whether there is a buried point event reported in advance. If it is reported in advance, the result is recorded in the result column of the test data, and this use case is terminated to execute the next use case; the buried point data reading module is used to read the buried point data during the page operation; the buried point number judgment module is used to judge whether the number of buried point events is a predetermined number; the buried point parameter judgment module, if the buried point event is a predetermined number, judges whether the parameters of the buried point are consistent with the parameters of the expected result of the test data, wherein the expected result is the correct buried point result, if not, record this result in the result column of the test data, and feed it back to the test report, and then terminate this use case to execute the next use case; the parameter value judgment module, if the parameters of the buried point are consistent with the expected result of the test data, judges whether the parameter value corresponding to each parameter is consistent with the parameter value in the expected result, if not, record the parameters and parameter values of the problematic buried point in the result column of the test data, and terminate this use case to execute the next use case; if consistent, record the correct buried point data in the result column of the test data, and terminate this use case to execute the next use case.
[0012] Optionally, the buried point search and comparison device also includes: a monitoring module, which is used to perform real-time monitoring during the operation of the page or application, and store: the data of the correct buried points; the URL from which the parameter value of the expected result is obtained; and the interface from which the parameter value of the expected result is obtained to return the result.
[0013] Optionally, the tracking point search and comparison device also includes: a parameter replacement judgment module, which is used to judge whether there are parameters in the expected result that need to be replaced when no event is reported in advance.
[0014] Optionally, the buried point search and comparison device also includes: a test report generation module, which is used to generate a test report after the execution of the test cases generated by all test data is completed, and the test report includes the judgment results of each judgment step.
[0015] According to a third aspect of the present invention, there is provided a computing device, comprising: at least one processor and a memory storing program instructions; when the program instructions are read and executed by the processor, the computing device executes the above-mentioned buried point search and comparison method.
[0016] According to a fourth aspect of the present invention, a readable storage medium storing program instructions is provided. When the program instructions are read and executed by a computing device, the computing device executes the above-mentioned buried point search and comparison method.
[0017] According to the technical solution of the present invention, automatic search and comparative verification of buried point events can be performed in batches, thereby improving test work efficiency and reducing manpower.
[0018] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] To achieve the above and related purposes, certain illustrative aspects are described herein in conjunction with the following description and accompanying drawings, which indicate various ways in which the principles disclosed herein can be practiced, and all aspects and their equivalents are intended to fall within the scope of the claimed subject matter. The above and other purposes, features and advantages of the present disclosure will become more apparent by reading the following detailed description in conjunction with the accompanying drawings. Throughout the present disclosure, the same reference numerals generally refer to the same parts or elements.
[0020] Figure 1 A flow chart of a method for finding and comparing buried points according to an embodiment of the present invention is shown.
[0021] Figure 2 A design concept diagram under a preferred implementation is shown.
[0022] Figure 3 The complete flowchart after incorporating the steps of mitmproxy monitoring, parameter update judgment, etc. is shown.
[0023] Figure 4 A code file structure diagram of the overall design framework according to an embodiment of the present invention is shown.
[0024] Figure 5A schematic block diagram of a buried point search and comparison device according to an embodiment of the present invention is shown.
[0025] Figure 6 It is a simplified structural diagram showing a general computer system that can be used as an information processing device for implementing the method for searching and comparing buried points according to an embodiment of the present invention. DETAILED DESCRIPTION
[0026] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0027] Method for finding and comparing buried points
[0028] According to an embodiment of the present invention, a method for searching and comparing buried points is provided. Figure 1 FIG. 2 shows a flow chart of a method for finding and comparing buried points according to an embodiment of the present invention. Figure 1 As shown, the method for searching and comparing buried points according to an embodiment of the present invention includes:
[0029] S110, initialize page operation, run test cases, and read test data. The initialization page operation refers to launching the APP or page to the corresponding business page by executing the code, and the test case refers to a certain tracking operation to be verified, specifically a row in an Excel table. The test data is the value of a column in this row.
[0030] According to a preferred embodiment, this design framework can be built based on appium, using pycharm as an integrated development tool, using languages such as python and java. The test framework can use the unittest unit test framework that comes with the python language, and can develop and execute automated test cases. The following is a detailed description using this preferred embodiment as an example, but it should be understood that the present invention is not limited to this layout framework. Those skilled in the art can use other development tools, languages, design frameworks, etc. according to actual needs.
[0031] After the program is started, appium runs. In an exemplary embodiment, if you need to find a buried point in a mobile phone APP, appium starts the APP for subsequent operations. If you need to find a buried point in a page, for example, appium calls the page to execute the following program steps.
[0032] At this time, you can also use a listening program to run the filtering script, monitor in real time during the page operation, filter the content that meets the filtering conditions and store it. As an example, the listening program used can be mitmproxy. Here, you can create files such as result.txt, url.txt, and response.txt in advance, or automatically generate these files through code. Mitmproxy can monitor in real time and store the content that meets the filtering conditions in result.txt, url.txt, and response.txt. Figure 3 The complete flow chart after combining the above mitmproxy monitoring steps is shown, as Figure 3 As shown, step S1101 shows the sub-step of using mitmproxy for monitoring.
[0033] The filtering conditions can refer to the content to be captured, such as the results generated by user operations, the URLs that need to be taken, or the results returned by the interface. Here, the filtering conditions are generally divided into three categories: The first category, for the actual tracking results, will determine whether the desired tracking data is reported, and then capture and store it in result.txt. The second category, for the URL requested by the user operation, some parameter values in the expected results of the tracking need to be extracted from the requested URL, so those that meet the conditions will be stored in url.txt. The third category, for the results returned by the interface after the user operation, some parameter values in the expected results of the tracking need to be extracted from the returned results, so those that meet the conditions will be stored in response.txt.
[0034] The result.txt stores the tracking results, which can be extracted and formatted and stored in the result column of the test data (the actual result column (result column) of the Excel table event.xlsx). The url.txt and response.txt store the parameter values, which can be extracted and stored in them. When executing the use case, the parameterized parameters are assigned.
[0035] Figure 2 The figure shows the design idea diagram under the preferred embodiment. Figure 2 As shown, the main design idea is: users perform operations, generate buried data, report the data, and then capture the reported data for verification. Figure 2 The idea is mainly reflected in two parts:
[0036] 1) To verify the tracking point, you need to obtain the tracking point -> to obtain the tracking point, you need to perform automated operations (appium environment construction, writing and executing automation scripts in pycharm);
[0037] 2) Through the automated operation function, after the data is reported, how to store the acquired tracking points->mitmproxy monitors and stores and extracts those that meet the conditions.
[0038] Among them, DDT (Data Driver Tests) is a data-driven test, which can automatically generate test cases written in Excel tables into script-executable test cases through the decorators and methods contained in it.
[0039] Continue to refer to Figure 1 Describe the method for searching and comparing buried points according to an embodiment of the present invention. After step S110, execute step S120 to perform page operations before the buried point operation to determine whether there is a buried point event reported in advance. If it is reported in advance, the result is recorded in the result column of the test case, and fed back to the test report, and the test case is terminated and the next test case is executed. Among them, the result column of the test case is an excel table (event.xlsx) of the written test case, which contains the stored execution results (result column and assert_result column).
[0040] One situation where tracking events are reported in advance is that when tracking is incorrect, the tracking event may be reported before the user performs any operation. You can read the content of result.txt to determine whether to report the tracking event in advance. It should be understood that in addition to reading the content of result.txt, other methods can also be used to obtain tracking data, such as directly reading the tracking reporting results from the database without using mitmproxy for real-time monitoring.
[0041] Optionally, in the case where no event is reported in advance, it is also possible to determine whether there are parameters in the expected result that need to be replaced (mainly because the dynamically updated embedded data needs to be obtained from the interface, such as article ID, author ID, etc. Since the ID generated by clicking on different content is different, the parameter value in the expected result cannot be fixed, so it needs to be parameterized, and then the actual value is obtained and replaced accordingly). If there are, extract the required parameters from url.txt or response.txt for replacement, and then execute the subsequent steps. If there are no parameters that need to be replaced, execute the subsequent steps directly.
[0042] The expected result is a correct tracking result, which can be generated in the following way: first manually generate tracking, then capture it through a packet capture tool such as Charles, and then edit and store it in the above event.xlsx. Figure 3 FIG. 4 shows a complete flow chart after incorporating the above parameter replacement judgment step, such as Figure 3 As shown, step S1102 shows the sub-step of determining whether parameters need to be replaced.
[0043] It should be noted that if mitmproxy is not used for real-time monitoring, you can write code to call the URL to be buried, obtain the interface return value and replace the parameters. Alternatively, you can manually execute the interface operation without parameterization, store the interface return result, and mock the interface return result, so that the parameter value is fixed and does not need to be replaced.
[0044] S130, during the page operation, reading the buried point data.
[0045] Perform page operations to generate buried point data, which are automatically stored in, for example, the above-mentioned result.txt. Then, the buried point event can be judged by reading the data in result.txt. It should be understood that the buried point data is stored in result.txt for example only, and those skilled in the art can use other buried point data storage methods, and the present invention is not limited thereto.
[0046] You can also filter matching tracking events here, for example Figure 4 In addons.py shown in the figure, a column of tracking events in event.xlsx is read out, and after capturing the tracking event name reported by the user operation, it will loop to determine whether it is in the read tracking event. If so, the tracking result is stored in result.txt, and then the following operations are continued.
[0047] S140, determine whether the number of buried point events is the predetermined number through the buried point data. When a buried point event corresponding to an operation can only be reported once, the predetermined number is 1. If it is not 1, it means that the buried point is reported incorrectly, 0 means no report, and greater than 0 means multiple reports. When the result is not 1, this result is recorded in the result column of the test data, and fed back to the test report, and the current use case is terminated and the next use case is executed.
[0048] S150, if the number of buried events is a predetermined number, that is, 1 in the above case, it is determined whether the buried event parameters are consistent with the parameters of the expected result of the test data. When reading the test data, the parameters in the expected result are saved for use here.
[0049] If they are inconsistent, it means that there is a problem with the tracking point parameters. The result is recorded in the result column of the test data and fed back to the test report. Then end this use case and execute the next use case.
[0050] S160, if they are consistent, that is, there is no problem with the parameters of the embedded point, then determine whether the parameter value corresponding to each parameter is consistent with the parameter value in the expected result. If they are inconsistent, the parameters and parameter values of the problematic embedded point are recorded in the result column of the test data and fed back to the test report, then this use case is terminated and the next use case is executed.
[0051] If the parameter values are consistent, it means that the tracking result is reported correctly. The tracking data is recorded in the result column of the test data and fed back to the test report. Then end this use case and execute the next use case.
[0052] As mentioned above, if there is no problem with the tracking result, the result column (result column) in the test data result column will directly store the data of the extracted tracking result, otherwise inconsistent parameters and parameter values will be recorded.
[0053] After all the test cases generated by the test data are executed, a test report can be generated. As mentioned above, the test report records the results of each judgment and can be regarded as a record of the tracking results, which records the number of successes and failures and their detailed information.
[0054] Figure 3 The complete flow chart after incorporating the above-mentioned mitmproxy monitoring and parameter replacement judgment steps is shown. Figure 4 The code file structure diagram of the overall design framework of the above-mentioned embodiment is shown in Figure 4 The addons.py filter script shown in the figure can capture the monitored data that meets the conditions.
[0055] Beneficial Effects
[0056] The buried point search and comparison method according to the embodiment of the present invention improves the efficiency of buried point regression and reduces manpower. A direct comparison with the prior art in two cases is described in detail below.
[0057] 1) The embedding parameter values are relatively fixed
[0058] For example, if the tracking point is clicked on the home page channel page, it will take about 10 minutes if it is operated manually (because there are 13 secondary navigations, and each secondary navigation requires comparison of parameters).
[0059] However, through the automated operation of the embodiment of the present invention, the operation can be completed and the results can be viewed in about 4 minutes after clicking, and the test efficiency is increased by 60%.
[0060] 2) The tracking parameter value needs to be obtained from the interface
[0061] For example, for the click tracking event of an image, each tracking event generated by clicking on a piece of content needs to be compared with the type id, content id, and author id of the content. When operating manually, you need to obtain the expected result from the corresponding interface, and then compare and verify it with the tracking result. Assuming that there are 5 different types according to the requirements, then each article will take about 3 minutes, and 5 articles will take about 15 minutes.
[0062] However, through the automated operation of the embodiment of the present invention, the operation can be completed and the results can be viewed within about 2 minutes after clicking, and the test efficiency is increased by 86.6%.
[0063] Find and compare equipment
[0064] According to an embodiment of the present invention, a buried point search and comparison device is also provided. Figure 5 FIG. 2 shows a schematic block diagram of a buried point search and comparison device according to an embodiment of the present invention. Figure 5 As shown, the buried point search and comparison equipment includes:
[0065] The running module 510 is used to initialize page operations, run test cases, and read test data.
[0066] As described above, according to the preferred implementation, this design framework can be built based on appium, using pycharm as an integrated development tool, using python, java and other languages. The test framework can use the unittest unit test framework that comes with the python language, and can develop and execute automated test cases. After starting the program, appium runs. In an exemplary implementation, assuming that you need to find the embedded points in the mobile phone APP, appium starts the APP for subsequent operations. If you need to find, for example, the embedded points in the page, appium calls the page to execute the following program steps.
[0067] Optionally, the device may also include a monitoring module for running a filtering script, performing real-time monitoring during page operations, filtering and storing content that meets the filtering conditions, including: correct embedded data; a URL from which the parameter value of the expected result is obtained; and an interface from which the parameter value of the expected result is obtained to return the result.
[0068] The early reporting judgment module 520 is used to judge whether there is an early reporting of the buried point event. If it is reported in advance, the result is fed back to the test report, and the use case is terminated and the next use case is executed;
[0069] Optionally, the device may further include a parameter replacement judgment module, which is used to judge whether there are parameters in the expected result that need to be replaced when no event is reported in advance.
[0070] The buried point data reading module 530 is used to read the buried point data during page operation.
[0071] The buried point number judgment module 540 is used to judge whether the number of buried point events is the predetermined number through the buried point data. When a buried point event corresponding to an operation can only be reported once, the predetermined number is 1. If it is not 1, it means that the buried point is reported incorrectly, 0 means no report, and greater than 0 means multiple reports. When the result is not 1, this result is recorded in the result column of the test data, and fed back to the test report, and the current use case is terminated and the next use case is executed.
[0072] The burying point parameter judgment module 550 determines whether the parameters of the burying point are consistent with the parameters of the expected results of the test data if the burying point event is a predetermined number, that is, 1 in the above case.
[0073] If they are inconsistent, it means that there is a problem with the tracking point parameters. The result is recorded in the result column of the test data and fed back to the test report. Then end this use case and execute the next use case.
[0074] The parameter value judgment module 560 determines whether the parameter value corresponding to each parameter is consistent with the expected result if the parameter of the buried point is consistent with the expected result of the test data, that is, there is no problem with the parameter of the buried point.
[0075] If there is inconsistency, the result is recorded in the result column of the test data and fed back into the test report, then this use case is terminated and the next use case is executed.
[0076] If the parameter values are consistent, it means that the tracking result is reported correctly. This result is recorded in the result column of the test data and fed back to the test report. Then end this use case and execute the next use case.
[0077] Among them, if there is no problem with the tracking result, the result column (result column) in the test data result column will directly store the data of the extracted tracking result, otherwise the inconsistent parameters and parameter values will be recorded.
[0078] Optionally, the device may also include a test report generation module, which is used to generate a test report after the execution of all test cases generated by the test data is completed. As mentioned above, the test report records the results of each judgment, which can be regarded as a record of the result of the buried point, recording the number of successes and failures and their detailed information.
[0079] For the specific details of the steps executed by the specific components of this device, please refer to the above description of the method implementation method, which will not be repeated here.
[0080] Computing equipment
[0081] The embodiments of the present invention have been described in detail above through block diagrams and flow charts. It is understood by those skilled in the art that some aspects of the embodiments described in this specification can be implemented equivalently in whole or in part in the form of one or more computer programs running on one or more computers, in the form of one or more programs running on one or more processors, in the form of firmware, or in the form of any combination thereof, and, based on the contents disclosed in this specification, it is entirely within the capabilities of those skilled in the art to design circuits for the present disclosure and / or write software and / or firmware codes for the present disclosure.
[0082] For example, each step in the processing flow chart of the above-mentioned method for searching and comparing buried points can be executed by software, firmware, hardware or any combination thereof. In the case of being implemented by software or firmware, the data can be transmitted from a storage medium or a network to a computer (e.g., a computer) having a dedicated hardware structure. Figure 6 The general-purpose computer 600 shown in the figure is installed with programs constituting the software, and the computer can execute various functions when various programs are installed.
[0083] Therefore, the present invention also proposes a program product storing a machine-readable instruction code. When the instruction code is read and executed by a machine, the method for searching and comparing buried points according to the embodiment of the present invention can be executed.
[0084] Figure 6 6 is a simplified structural diagram of a general computer system that can be used as an information processing device for implementing the method for finding and comparing buried points according to an embodiment of the present invention. The device may include: a processor 610, a memory 620, an input / output interface 630, a communication interface 640, and a bus 650. The processor 610, the memory 620, the input / output interface 630, and the communication interface 640 are connected to each other in communication within the device through the bus 650.
[0085] The processor 610 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the implementation methods of this specification.
[0086] The memory 620 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 620 can store an operating system and other application programs. When the technical solution provided in the implementation mode of this specification is implemented by software or firmware, the relevant program code is stored in the memory 620 and called and executed by the processor 610.
[0087] The input / output interface 630 is used to connect the input / output module to realize information input and output. The input / output module can be configured as a component in the device (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0088] The communication interface 640 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).
[0089] The bus 650 comprises a pathway that transmits information between the various components of the device (eg, the processor 610 , the memory 620 , the input / output interface 630 , and the communication interface 640 ).
[0090] It should be noted that, although the above device only shows the processor 610, the memory 620, the input / output interface 630, the communication interface 640 and the bus 650, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the implementation scheme of this specification, and does not necessarily include all the components shown in the figure.
[0091] Readable storage medium
[0092] According to an embodiment of the present invention, a computer-readable storage medium is also provided, which stores computer instructions, and the computer instructions are used to enable the computer to execute the above-mentioned buried point search and comparison method.
[0093] The computer-readable medium of the present embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be a computer-readable instruction, a data structure, a module of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassette or other magnetic storage device or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
[0094] A9. The tracking point search and comparison device according to A7 also includes: a parameter replacement judgment module, which is used to judge whether there are parameters in the expected result that need to be replaced when no event is reported in advance. A10. The tracking point search and comparison device according to A7 also includes: a test report generation module, which is used to generate a test report after the execution of the test cases generated by all test data is completed, and the test report includes the judgment results of each judgment step.
[0095] It should be noted that the method of one or more embodiments of this specification can be performed by a single device, such as a computer or server. The method of this embodiment can also be applied in a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps of the method of one or more embodiments of this specification, and the multiple devices will interact with each other to complete the described method.
[0096] The above is a description of a specific embodiment of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0097] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present disclosure (including the claims) is limited to these examples. In line with the present disclosure, the above embodiments or technical features in different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of different aspects of one or more embodiments of the present specification as described above, which are not provided in detail for the sake of simplicity.
[0098] While the disclosure has been described in conjunction with specific embodiments thereof, many alternatives, modifications and variations of these embodiments will be apparent to those skilled in the art in light of the foregoing description.
[0099] One or more embodiments of this specification are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of this specification should be included in the scope of protection of this disclosure.
Claims
1. A method for finding and comparing buried points, comprising: Initialize page operations, run test cases, and read test data; Determine whether any embedded point events are reported in advance. If so, record the results in the result column of the test data, end this use case, and execute the next use case. During page operation, read the buried data; Determine whether the number of buried point events is the predetermined number; If the number of tracking events is not the predetermined number, the result is recorded in the result column of the test data, and this test case is terminated and the next test case is executed; If the number of buried events is the predetermined number, determine whether the buried point parameters are consistent with the parameters of the expected result of the test data, wherein the expected result is a correct buried point result, If they are inconsistent, the inconsistent results will be recorded in the result column of the test data, and this test case will be terminated and the next test case will be executed; If they are consistent, then determine whether the value of each parameter is consistent with the parameter value in the expected result. If they are inconsistent, the parameters and parameter values of the problematic tracking points are recorded in the result column of the test data, and this test case is terminated and the next test case is executed; If they are consistent, the correct tracking data will be recorded in the result column of the test data, and this use case will be ended and the next use case will be executed.
2. The method for searching and comparing buried points according to claim 1, further comprising: The method is executed by appium, and the appium mobilizes the page or application to execute the buried point search and comparison method for the page or application.
3. According to the method for searching and comparing buried points as described in claim 2, real-time monitoring is performed during the operation of the page or application, and the following are stored: the data of the correct buried points; the URL from which the parameter value of the expected result is obtained; and the interface from which the parameter value of the expected result is obtained returns the result.
4. The method for searching and comparing buried points according to claim 3 further comprises: Create in advance the files that store the judgment results of each judgment step, the files that store parameters and parameter values, and the files that store the data of the correct tracking points.
5. The method for searching and comparing buried points according to claim 1 further comprises the following steps: Before reading the tracking data, if no tracking events are reported in advance, determine whether there are parameters in the expected results that need to be replaced.
6. The method for searching and comparing buried points according to claim 1, further comprising: After the test cases of all the test data are finished, a test report is generated, and the test report includes the judgment results of each judgment step.
7. A buried point search and comparison device, comprising: Run module, used to initialize page operations, run test cases, and read test data; The early reporting judgment module is used to determine whether there is an early reporting of a buried event. If so, the result is recorded in the result column of the test data, and this use case is terminated and the next use case is executed. The buried point data reading module is used to read the buried point data during page operation; The tracking number judgment module is used to judge whether the number of tracking events is a predetermined number; The burying point parameter judgment module determines whether the burying point parameters are consistent with the parameters of the expected result of the test data if the burying point event is a predetermined number, wherein the expected result is a correct burying point result. If they are inconsistent, record the result in the result column of the test data, end this test case, and execute the next test case; The parameter value judgment module determines whether the parameter value corresponding to each parameter is consistent with the parameter value in the expected result if the parameter of the buried point is consistent with the parameter of the expected result of the test data. If they are inconsistent, the parameters and parameter values of the problematic tracking points are recorded in the result column of the test data, and this test case is terminated and the next test case is executed; If they are consistent, the correct tracking data will be recorded in the result column of the test data, and this use case will be ended and the next use case will be executed.
8. The buried point search and comparison device according to claim 7, further comprising: The monitoring module is used to monitor in real time during page or application operation and store: correct tracking data; The URL from which the parameter value of the expected result is taken; the interface from which the parameter value of the expected result is taken returns the result.
9. The buried point search and comparison device according to claim 7, further comprising: The parameter replacement judgment module is used to judge whether there are parameters in the expected result that need to be replaced when no event is reported in advance.
10. The buried point search and comparison device according to claim 7, further comprising: The test report generation module is used to generate a test report after the execution of all test cases generated by the test data is completed. The test report includes the judgment results of each judgment step.
11. A computing device comprising: at least one processor and a memory storing program instructions; When the program instructions are read and executed by the processor, the computing device executes the buried point search and comparison method as described in any one of claims 1-6.
12. A readable storage medium storing program instructions, when the program instructions are read and executed by a computing device, the computing device executes the buried point search and comparison method as described in any one of claims 1-6.
Citation Information
Patent Citations
Buried point testing method and device
CN110347582A
Client buried point test method and device, equipment and storage medium
CN110362480A