Case test result processing method and device, storage medium and electronic equipment

By classifying and comparing the use case execution results and comparing attributes, the automatic merge of test cases is achieved, solving the problem of the same errors in the test report in the prior art, and improving processing efficiency and reporting accuracy.

CN119396682APending Publication Date: 2025-02-07K TRONICS (SUZHOU) TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411496505.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

In the prior art, the test report generated by Allure will not merge the same errors, resulting in too many of the same errors, and requires manual merging and verification, which is inefficient.

Method used

By obtaining the use case execution results, extracting the use case name and error status, and classifying them; then extracting the use case attribute information in the same classification result, comparing, and combining the use cases based on the comparison results to generate a combined test report.

Benefits of technology

Automatic merging of test cases is realized, processing efficiency is improved, error rate of manual operation is reduced, and the accuracy and efficiency of test reports are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119396682A_ABST
    Figure CN119396682A_ABST
Patent Text Reader

Abstract

The invention relates to a case test result processing method and device, a storage medium and electronic equipment, and relates to the technical field of software test.The method comprises the steps that a case execution result obtained by executing a test case is obtained, and a case name and a case error reporting state of the test case are extracted from the case execution result; classifying the use case execution results based on the use case names and the use case error reporting states to obtain use case classification results; extracting the use case attribute information of each test case included in the same use case classification result, and comparing the use case attribute information of each test case in the same use case classification result to obtain an attribute comparison result; and combining the test cases included in the same case classification result according to the attribute comparison result to obtain a case combination result. The processing efficiency of the use case test result is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] At present, the way to view software test reports is to analyze the logs generated during the execution of test cases through Allure and then generate a test report in HTML (HyperText Markup Language) format; however, the test report generated based on Allure will not merge the same errors, so there will be a large number of same errors; and in the process of checking the errors in the test report, each execution error case is analyzed and compared by manual review to determine whether it is the same error; then, if it is determined to be the same error, the error information is manually counted and the test report is finally output; but this method has the problem of low efficiency.

[0003] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0004] The purpose of the present disclosure is to provide a method for processing use case test results, a device for processing use case test results, a computer-readable storage medium, and an electronic device, thereby at least to a certain extent overcoming the problem of low processing efficiency of use case execution results caused by the limitations and defects of related technologies.

[0005] According to one aspect of the present disclosure, a method for processing a test result of a use case is provided, comprising:

[0006] Obtaining a test case execution result obtained by executing the test case, and extracting a test case name and a test case error status from the test case execution result;

[0007] Classify the use case execution results based on the use case name and the use case error status to obtain a use case classification result;

[0008] Extracting the use case attribute information of each of the test cases included in the same use case classification result, and comparing the use case attribute information of each of the test cases in the same use case classification result to obtain an attribute comparison result;

[0009] The test cases included in the same use case classification result are merged according to the attribute comparison result to obtain a use case merging result.

[0010] In an exemplary embodiment of the present disclosure, the use case execution result is classified based on the use case name and the use case error status to obtain a use case classification result, including:

[0011] Traversing the use case names, extracting test cases with the same use case name from the test cases, and obtaining a first use case set;

[0012] The test case error states of the test cases in the first test case set are traversed, and the test cases with the same test case error states are classified to obtain the test case classification result.

[0013] In an exemplary embodiment of the present disclosure, the use case attribute information includes at least one of the use case error information, use case error details information and error information screenshot of the test case;

[0014] The use case attribute information of each test case in the same use case classification result is compared to obtain an attribute comparison result, including:

[0015] Comparing the use case error information of each of the test cases in the same use case classification result to obtain a first comparison result, and comparing the use case error detail information of each of the test cases in the same use case classification result to obtain a second comparison result;

[0016] The error information screenshots of the test cases in the same case classification result are compared to obtain a third comparison result, and the attribute comparison result is generated according to the first comparison result, the second comparison result and the third comparison result.

[0017] In an exemplary embodiment of the present disclosure, the use case error detail information of each test case in the same use case classification result is compared to obtain a second comparison result, including:

[0018] Extracting the use case error details information of each of the test cases in the same use case classification result from the use case execution result;

[0019] Extracting timestamp data and cycle count data from the use case error details information, and replacing the timestamp data based on a first preset character;

[0020] The cycle count data is replaced based on a second preset character, and the replaced use case error detail information is compared to obtain the second comparison result.

[0021] In an exemplary embodiment of the present disclosure, the error information screenshots of the test cases in the same case classification result are compared to obtain a third comparison result, including:

[0022] Extracting the image storage path of the error information screenshot of each test case in the same test case classification result from the test case execution result;

[0023] Acquire the error information screenshot based on the image storage path, and crop the error information screenshot to obtain a cropped image;

[0024] The first image similarity between the cropped images is calculated, and the third comparison result is obtained according to the first image similarity.

[0025] In an exemplary embodiment of the present disclosure, cropping the error information screenshot to obtain a cropped image includes:

[0026] Obtaining a device screen resolution of a terminal device that executes the test case from the test case execution result;

[0027] Determine a display area of ​​the status bar of the terminal device in the error information screenshot based on the device screen resolution;

[0028] Based on the display area of ​​the status bar in the error information screenshot, the status bar in the error information screenshot is cropped to obtain a cropped image.

[0029] In an exemplary embodiment of the present disclosure, calculating the first image similarity between the cropped images includes:

[0030] Detecting a first image corner point in the cropped image, and calculating pixel gradient information of other pixels around the first image corner point;

[0031] Determine a gradient direction of the first image corner point according to the pixel gradient information, and calculate a corner point descriptor of the first image corner point based on the gradient direction;

[0032] A corner point similarity between corner points of the first images is determined based on the corner point descriptors, and a first image similarity between the cropped images is determined according to the corner point similarity.

[0033] In an exemplary embodiment of the present disclosure, obtaining the third comparison result according to the image similarity includes:

[0034] Determining an image confidence calculation area from the cropped image according to the first image corner point, and intercepting a confidence image corresponding to the image confidence calculation area;

[0035] Convert the confidence image after grayscale processing from the time domain to the frequency domain, and calculate the frequency domain similarity between the confidence images after frequency domain conversion;

[0036] A weighted sum is performed on the first image similarity and the frequency domain similarity, and the third comparison result is obtained according to the weighted sum result.

[0037] In an exemplary embodiment of the present disclosure, the test cases included in the same use case classification result are merged according to the attribute comparison result to obtain a use case merging result, including:

[0038] If the first comparison result in the attribute comparison result is that the use case error information is consistent, the second comparison result is that the use case error details information is consistent, and the third comparison result is that the error information is consistent Figure 1 If the test cases are consistent, the test cases included in the same use case classification result are merged to obtain a use case merging result.

[0039] In an exemplary embodiment of the present disclosure, the method for processing the use case test result further includes:

[0040] Obtaining a standard use case error screenshot template corresponding to the use case error type, and comparing the use case error screenshot template with the error information screenshot corresponding to the use case merging result to obtain a second image similarity;

[0041] The use case error type of the test case included in the use case merging result is determined based on the second image similarity, and the error cause of the test case is located according to the use case error type.

[0042] According to one aspect of the present disclosure, a device for processing a test result of a use case is provided, comprising:

[0043] A use case name extraction module is used to obtain the use case execution result obtained by executing the test case, and extract the use case name and the use case error status of the test case from the use case execution result;

[0044] A use case execution result classification module is used to classify the use case execution result based on the use case name and the use case error status to obtain a use case classification result;

[0045] A use case attribute information comparison module, used to extract the use case attribute information of each test case included in the same use case classification result, and compare the use case attribute information of each test case in the same use case classification result to obtain an attribute comparison result;

[0046] The use case execution result merging module is used to merge the use case execution results of each test case included in the same use case classification result according to the attribute comparison result to obtain the use case merging result.

[0047] According to one aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for processing the test results of a use case described in any one of the above is implemented.

[0048] According to one aspect of the present disclosure, there is provided an electronic device, including:

[0049] Processor; and

[0050] A memory, configured to store executable instructions of the processor;

[0051] The processor is configured to execute any one of the above-mentioned methods for processing the test results of the use case by executing the executable instructions.

[0052] A method for processing use case test results provided by an embodiment of the present disclosure comprises the following steps: on the one hand, obtaining the use case execution result obtained by executing the test case, and extracting the use case name and the use case error status of the test case from the use case execution result; then classifying the use case execution result based on the use case name and the use case error status to obtain a use case classification result; then extracting the use case attribute information of each test case included in the same use case classification result, and comparing the use case attribute information of each test case in the same use case classification result to obtain an attribute comparison result; finally, merging each test case included in the same use case classification result according to the attribute comparison result to obtain a use case merging result, thereby realizing automatic merging of test cases, and thereby solving the problem of low processing efficiency of use case test results due to the need for manual merging in the prior art; on the other hand, it can also solve the problem of low accuracy of use case merging results due to the need for manual merging in the prior art, thereby improving the accuracy of use case merging results.

[0053] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0055] Figure 1 The flowchart schematically shows a method for processing a use case execution result according to an exemplary embodiment of the present disclosure.

[0056] Figure 2 A scenario example diagram of a first set of use cases obtained according to an exemplary embodiment of the present disclosure is schematically shown.

[0057] Figure 3 A flowchart of a method for comparing use case error detail information to obtain a second comparison result according to an exemplary embodiment of the present disclosure is schematically shown.

[0058] Figure 4 A flowchart of a method for comparing screenshots of the same error message to obtain a third comparison result according to an exemplary embodiment of the present disclosure is schematically shown.

[0059] Figure 5 An example diagram schematically shows an example of a cropped image obtained by cropping an error information screenshot according to an example embodiment of the present disclosure.

[0060] Figure 6 A scene example diagram schematically illustrates a process of calculating a first image corner point according to an example embodiment of the present disclosure.

[0061] Figure 7 The following is a diagram schematically showing a structural example of a device for processing a use case execution result according to an exemplary embodiment of the present disclosure.

[0062] Figure 8 An electronic device for implementing a method for processing a use case execution result according to an exemplary embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0063] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.

[0064] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0065] Stability testing is a process used to verify whether a system or application can run stably and work normally in different scenarios. When conducting stability testing, it is necessary to conduct long-term stability testing for different business operations, simulate different users, and multiple devices. Therefore, the amount of test results data generated during long-term testing of multiple devices is also huge, which in turn leads to a huge workload for analyzing test results and outputting test reports. At present, the way to view the report is to generate a test report in HTML (HyperText Markup Language) format through allure analysis log; however, the test report generated based on allure will not merge the same errors, so there will be a large number of identical errors; and in the process of checking the errors in the test report, each use case that reports an error is manually checked, and the error information, error details, screenshots and other information of each test result are analyzed and compared, and it is manually determined whether it is the same error, and the error information is manually counted and the test report is output, so the efficiency is very low; further, since it currently takes about 90 minutes to analyze the test results of a device and output the report, it is very time-consuming and labor-intensive, and due to the large amount of result data, manual analysis is also prone to omissions, which greatly reduces the test efficiency and accuracy.

[0066] Based on this, this exemplary embodiment first provides a method for processing the use case execution results, which can be run on a computer terminal, server, server cluster or cloud server, etc. Of course, those skilled in the art can also run the method disclosed in this disclosure on other platforms as required, and this exemplary embodiment does not specifically limit this. Figure 1 As shown, the method for processing the execution result of the use case may include the following steps:

[0067] Step S110. Obtain the test case execution result obtained by executing the test case, and extract the test case name and the test case error status from the test case execution result;

[0068] Step S120. Classify the use case execution results based on the use case name and the use case error status to obtain a use case classification result;

[0069] Step S130. Extracting the use case attribute information of each test case included in the same use case classification result, and comparing the use case attribute information of each test case in the same use case classification result to obtain an attribute comparison result;

[0070] Step S140. Merge the test cases included in the same use case classification result according to the attribute comparison result to obtain a use case merging result.

[0071] In the above-mentioned method for processing use case test results, on the one hand, the use case execution result obtained by executing the test case is obtained, and the use case name and the use case error status of the test case are extracted from the use case execution result; then the use case execution result is classified based on the use case name and the use case error status to obtain a use case classification result; then the use case attribute information of each test case included in the same use case classification result is extracted, and the use case attribute information of each test case in the same use case classification result is compared to obtain an attribute comparison result; finally, the test cases included in the same use case classification result are merged according to the attribute comparison result to obtain a use case merging result, thereby realizing automatic merging of test cases, thereby solving the problem of low processing efficiency of use case test results due to the need for manual merging in the prior art; on the other hand, it can also solve the problem of low accuracy of use case merging results due to the need for manual merging in the prior art, thereby improving the accuracy of the use case merging results.

[0072] Hereinafter, the method for processing the test results of the use case described in the exemplary embodiment of the present disclosure will be explained and illustrated in detail with reference to the accompanying drawings.

[0073] First, the technical implementation principle of the example embodiment of the present disclosure is explained and illustrated. Specifically, the example embodiment of the present disclosure provides a method for processing the test results of a use case. After the stability test is completed, first, the result report file of the stability test is exported; then, the test execution result information of the same use case is filtered out through a tool, and the information of the same use case name and test result is compared, and the error information, error details, and screenshot attachments are compared, feature recognition is performed, and errors of the same type are merged after analyzing the problem, so as to quickly output the report, reduce the workload of manual screening, and reduce the error rate; secondly, the inherent graph of the problem type is extracted, and the problem type is analyzed and identified by finding the location of the inherent graph of the error type on the error screenshot, so as to achieve the purpose of improving the analysis efficiency of the error type.

[0074] Secondly, Figure 1 The following further explains and illustrates the processing method of the test results of the use cases shown in the figure. Specifically:

[0075] In step S110, a test case execution result obtained by executing the test case is obtained, and a test case name and a test case error status of the test case are extracted from the test case execution result.

[0076] In this example embodiment, first, the test case execution result obtained by executing the test case is obtained; wherein, the test case recorded here refers to the test case used to test a certain interface or a certain functional module in a certain application; there will be different test cases for different corresponding interfaces or different functional modules; at the same time, since the application needs to be deployed on multiple terminal devices of different types, brands and models, in order for the application to run stably on these devices, multiple tests need to be performed; further, in the process of executing the test case on the terminal device, there will be different execution results such as successful execution of the test case and failed execution of the test case; and for the test case that is successfully executed, no further processing is required; for the test case that fails to execute, the reasons for the failure need to be analyzed one by one; therefore, in order to analyze the reasons for the failure, after obtaining the use case execution result, it is also necessary to parse the use case execution result to extract the use case name and the use case error status from the use case execution result.

[0077] In an example embodiment, in the process of obtaining the use case execution results, it can be achieved in the following way: after the terminal device completes the execution of the test case, the use case execution results corresponding to the test case can be exported, and the use case execution results can be uploaded to the server or computer terminal, and then the use case execution results can be read based on the program of the server or computer terminal.

[0078] In step S120, the use case execution results are classified based on the use case names and use case error states to obtain use case classification results.

[0079] Specifically, the classification process of use case execution results can be implemented in the following ways: first, traverse the use case names, extract test cases with the same use case names from the test cases, and obtain a first use case set; second, traverse the use case error states of the test cases in the first use case set, classify the test cases with the same use case error states, and obtain the use case classification results. That is, in the actual application process, in order to merge the same use case execution results, first traverse the used use case names, then extract the use case execution results corresponding to the test cases with the same use case names and construct a first use case set; wherein the first use case set recorded here may include multiple, such as use case set 1, use case set 2, use case set 3, ..., use case set N, etc., and specific use case sets can refer to Figure 2As shown; at the same time, each use case set corresponds to a different use case name; then the test cases with the same use case error status in the first use case set are classified into the same category to obtain the use case classification result; at the same time, the use case error status recorded here means that the use case execution result of the test case is the use case execution failure, and the error code is consistent, such as 01 or 02 or 03, etc. This example does not impose any special restrictions on this.

[0080] In step S130, the use case attribute information of each of the test cases included in the same use case classification result is extracted, and the use case attribute information of each of the test cases in the same use case classification result is compared to obtain an attribute comparison result.

[0081] In this example embodiment, first, the use case attribute information of each test case included in the same classification result is extracted; wherein, the use case attribute information recorded here may include but is not limited to the use case error information of the test case, the use case error detail information and the error information screenshot, etc.; at the same time, the use case error information recorded here refers to the specific reason for the failure of the use case execution, which may include but is not limited to configuration file errors, code errors or operating environment errors, etc., and may also include incomplete test case design, data dependency problems, coupling between test cases and software defects, etc.; the use case error detail information recorded here refers to the detailed information of the test case during the execution process, such as the start execution time, execution duration, execution process log, end execution time, etc.; the error information screenshot recorded here refers to the screenshot corresponding to the use case error information.

[0082] Secondly, compare the use case attribute information of each test case in the same use case classification result to obtain an attribute comparison result; specifically, this can be achieved in the following ways: compare the use case error information of each test case in the same use case classification result to obtain a first comparison result, and compare the use case error detail information of each test case in the same use case classification result to obtain a second comparison result; compare the error information screenshots of each test case in the same use case classification result to obtain a third comparison result, and generate the attribute comparison result according to the first comparison result, the second comparison result and the third comparison result. That is, in the actual application process, it is possible to compare whether the test cases in the error state can be merged from three different dimensions, namely, the dimension of the use case error information, the dimension of the use case error detail information, and the dimension of the error information screenshot.

[0083] In an example embodiment, the use case error information of each test case in the same use case classification result is compared to obtain a first comparison result, which can be achieved in the following manner: first, the use case error information of each test case in the same use case classification result is extracted from the use case execution result; then, the timestamp data in the use case error information is extracted, and the timestamp data is replaced; finally, the replaced use case error information is compared to obtain the first comparison result; wherein, the specific replacement process of the timestamp data recorded here can be achieved in the following manner: the timestamp data is replaced based on a first preset character (for example, a space character), of course, it can also be directly deleted without replacement, or it can also be replaced based on other specific characters, and this example does not impose any special restrictions on this.

[0084] In an exemplary embodiment, referring to Figure 3 As shown, comparing the use case error detail information of each test case in the same use case classification result to obtain a second comparison result may include the following steps:

[0085] Step S310, extracting the use case error details information of each test case in the same use case classification result from the use case execution result;

[0086] Step S320, extracting the timestamp data and the cycle number data in the use case error details information, and replacing the timestamp data based on the first preset character;

[0087] Step S330, replacing the cycle count data based on a second preset character, and comparing the replaced use case error detail information to obtain the second comparison result.

[0088] Steps S310 to S330 will be explained and illustrated below. Specifically, in the actual application process, before comparing the use case error details information, it is necessary to first process the use case error reporting time in the use case error details information; wherein, the use case error reporting time recorded here is also the timestamp data recorded above, and its specific data presentation format in the use case error details information is YYmmddHHMMSS (year-month-day-hour-minute-second), and then based on the first preset character (for example, it can be a space character), the timestamp data is replaced. Of course, it can also be directly deleted without replacement, or it can also be replaced based on other specific characters. This example does not impose special restrictions on this; secondly, if the use case error details information If the information also includes the number of use case cycles, the use case cycle number data can be replaced based on the second preset character; wherein, the use case cycle number recorded here can include the large cycle number of the use case and the small cycle number of the use case; when replacing the large cycle number of the use case, it can be implemented based on the second preset character suite; when replacing the small cycle number of the use case, it can be implemented based on the second preset character case, and of course it can also be replaced based on other specific characters, and this example does not impose special restrictions on this; further, after the replacement is completed, the replaced use case error detail information can be compared to obtain a second comparison result.

[0089] It should be noted here that the reason why the timestamp data and the number of loops need to be replaced is to further determine whether the same test cases can be merged; at the same time, for the test cases that report errors, whether it is the test case execution time, the test case error time or the number of loops, it does not affect the execution of the test cases; therefore, by replacing the timestamp data and the number of loops, the accuracy of the test case merging results can be further improved.

[0090] In an exemplary embodiment, referring to Figure 4 As shown, comparing the error information screenshots of each test case in the same use case classification result to obtain a third comparison result may include the following steps:

[0091] Step S410, extracting the image storage path of the error information screenshot of each test case in the same test case classification result from the test case execution result.

[0092] Specifically, in the actual application process, it is first necessary to determine whether the use case execution result includes the image storage path of the error message screenshot; if it exists, extract the image storage path; if it does not exist, skip this step; then, based on the image storage path, determine whether the picture size is 0; if so, stop; if not, execute the next step (that is, obtain the error message screenshot based on the image storage path).

[0093] Step S420: acquiring the error information screenshot based on the image storage path, and cropping the error information screenshot to obtain a cropped image.

[0094] Specifically, the specific cropping process of the error information screenshot can be implemented in the following manner: first, the device screen resolution of the terminal device that executes the test case is obtained from the use case execution result; second, based on the device screen resolution, the display area of ​​the status bar of the terminal device in the error information screenshot is determined; then, based on the display area of ​​the status bar in the error information screenshot, the status bar in the error information screenshot is cropped to obtain a cropped image. That is, in the actual application process, in order to improve the calculation efficiency of the first image similarity and the accuracy of the first image similarity, the inherent difference part in the error information screenshot can be cropped; at the same time, in the cropping process, the size of the inherent difference part of different terminal devices can be set according to the screen resolution of the terminal device and the length and width of the display screen of the terminal device, and then the error information screenshot can be cropped based on the size of the inherent difference part; wherein, the cropped image can refer to Figure 5 shown.

[0095] Step S430, calculating the first image similarity between the cropped images, and obtaining the third comparison result according to the first image similarity.

[0096] In this example embodiment, first, the first image similarity between the cropped images is calculated; specifically, it can be implemented in the following manner: detecting the first image corner point in the cropped image, and calculating the pixel gradient information of other pixels around the first image corner point; determining the gradient direction of the first image corner point according to the pixel gradient information, and calculating the corner point descriptor of the first image corner point based on the gradient direction; determining the corner point similarity between the first image corner points based on the corner point descriptor, and determining the first image similarity between the cropped images based on the corner point similarity. That is, in the actual application process, the first image similarity of the picture can be obtained based on the opencv feature point matching method; specifically, in the process of obtaining the first image similarity of the picture based on the opencv feature point matching method, it can be implemented based on the ORB (Oriented FAST and Rotated BRIEF) feature recognition method.

[0097] In an exemplary embodiment, in the process of feature recognition based on ORB, first, the first image corner point in the cropped image can be detected based on FAST (Feature from Accelerated Segment Test); wherein, in the process of calculating the first image corner point, it can be achieved in the following manner: ① input a suitable pixel threshold Threshold; ② read the brightness value Ip of a certain pixel point P in the image; ③ find 16 pixel points on the Bresenham circle with a radius of 3 around the pixel point P; wherein, the Bresenham circle with a radius of 3 around the pixel point P can refer to Figure 6 As shown; ④ If there are n consecutive pixel values ​​between [Ip-Threshold, Ip+Threshold] among the 16 boundary pixels on the Bresenham circle, the pixel point P can be used as the first image corner point.

[0098] Secondly, the pixel gradient information of other pixels around the corner point of the first image is calculated; that is, the pixel gradient information between the 16 boundary pixels on the Bresenham circle can be calculated, and then the gradient direction of the corner point of the first image is determined according to the pixel gradient information to ensure that the corner point of the first image has rotation invariance; further, for each corner point of the first image, it is necessary to calculate its corresponding binary descriptor (that is, the corner point descriptor) based on the BRIEF descriptor algorithm; in the calculation process of the corner point descriptor, the pixel pair adjacent to the corner point of the first image can be determined based on the gradient direction of the corner point of the first image, and then the brightness relationship between the pixel pairs can be converted into a binary code to obtain the corner point descriptor; finally, after obtaining the corner point descriptor, the first image similarity can be determined based on the corner point descriptor.

[0099] It should be additionally explained here that, since there may be multiple corner points in the first image, after obtaining the corner point similarity, the first image similarity can be obtained by performing a weighted summation on the similarities of the corner points.

[0100] Secondly, the third comparison result is obtained according to the image similarity; specifically, it can be implemented in the following ways: determine the image confidence calculation area from the cropped image according to the first image corner point, and intercept the confidence image corresponding to the image confidence calculation area; convert the confidence image after grayscale processing from the time domain to the frequency domain, and calculate the frequency domain similarity between the confidence images after frequency domain conversion; perform weighted summation on the first image similarity and the frequency domain similarity, and obtain the third comparison result according to the weighted summation result. That is, in the actual application process, in order to further improve the accuracy of the third comparison result, after obtaining the first image similarity, it is also necessary to use the TM_CCOEFF_NORMED method to obtain the credibility of the cropped image; at the same time, in the specific calculation process, first expand the confidence calculation area, and then increase the value range interference to prevent the algorithm from over-magnifying small differences; finally, perform weighted summation on the first image similarity and the frequency domain similarity to obtain the third comparison result.

[0101] In step S140, the test cases included in the same use case classification result are merged according to the attribute comparison result to obtain a use case merging result.

[0102] Specifically, the specific merging process of the test cases is: if the first comparison result in the attribute comparison result is that the test case error information is consistent, the second comparison result is that the test case error details information is consistent, and the third comparison result is that the error information is consistent, Figure 1 If the test cases are consistent, the test cases included in the same test case classification result are merged to obtain the test case merging result. That is, the test case merging can be performed only when the test case error information, the test case error details information and the error information screenshot are consistent. Based on this method, not only can the problem of too redundant test case reports due to not merging all error cases be avoided, but also the problem of not being able to change the polarity of all errors due to excessive merging, resulting in the program being unable to run stably, can be avoided.

[0103] Furthermore, after the test case merger is completed, it is necessary to determine the specific error type; specifically, this can be achieved in the following way: first, obtain a standard use case error screenshot template corresponding to the use case error type, and compare the use case error screenshot template and the error information screenshot corresponding to the use case merger result to obtain a second image similarity; secondly, determine the use case error type of the test case included in the use case merger result based on the second image similarity, and locate the error cause of the test case according to the use case error type; that is, in the actual application process, first, set the common part of the error screenshots of all error types and save it as a problem type inherent map; then compare the screenshot with it to determine whether the error screenshot contains an inherent map of a certain problem type error; if so, write the corresponding error type into the report for the operation and maintenance personnel to view, and locate the error cause according to the error type, and then debug the application based on the error cause.

[0104] So far, the method for processing the execution results of the use cases recorded in the example embodiments of the present disclosure has been fully realized. Based on the above-mentioned contents, it can be known that the method for processing the execution results of the use cases recorded in the example embodiments of the present disclosure can accurately and quickly merge the same error use cases and output the stability test report efficiently and accurately; for example, based on the method for processing the execution results of the use cases recorded in the example embodiments of the present disclosure, the analysis time of the test report output by a single device can be reduced to 1 / 3, which greatly saves labor costs and reduces manual errors when analyzing large amounts of test data. Thereby improving the test quality and test efficiency.

[0105] The following are embodiments of the device disclosed herein, which can be used to execute the method embodiments disclosed herein. For details not disclosed in the device embodiments disclosed herein, please refer to the method embodiments disclosed herein.

[0106] The exemplary embodiment of the present disclosure also discloses a device for processing test results of a use case. Figure 7 The processing device for modifying the test result of the use case may include a use case name extraction module 710, a use case execution result classification module 720, a use case attribute information comparison module 730, and a use case execution result merging module 740. Among them:

[0107] The use case name extraction module 710 may be used to obtain the use case execution result obtained by executing the test case, and extract the use case name and the use case error status of the test case from the use case execution result;

[0108] The use case execution result classification module 720 may be used to classify the use case execution result based on the use case name and the use case error status to obtain a use case classification result;

[0109] The use case attribute information comparison module 730 may be used to extract the use case attribute information of each test case included in the same use case classification result, and compare the use case attribute information of each test case in the same use case classification result to obtain an attribute comparison result;

[0110] The use case execution result merging module 740 may be used to merge the use case execution results of the test cases included in the same use case classification result according to the attribute comparison result to obtain a use case merging result.

[0111] In an exemplary embodiment of the present disclosure, the use case execution results are classified based on the use case name and the use case error status to obtain a use case classification result, including: traversing the use case name, extracting test cases with the same use case name from the test cases, and obtaining a first use case set; traversing the use case error status of the test cases in the first use case set, classifying the test cases with the same use case error status, and obtaining the use case classification result.

[0112] In an exemplary embodiment of the present disclosure, the use case attribute information includes at least one of the use case error information, use case error details information and error information screenshot of the test case;

[0113] Among them, the use case attribute information of each test case in the same use case classification result is compared to obtain an attribute comparison result, including: comparing the use case error information of each test case in the same use case classification result to obtain a first comparison result, and comparing the use case error detail information of each test case in the same use case classification result to obtain a second comparison result; comparing the error information screenshots of each test case in the same use case classification result to obtain a third comparison result, and generating the attribute comparison result according to the first comparison result, the second comparison result and the third comparison result.

[0114] In an exemplary embodiment of the present disclosure, the use case error detail information of each of the test cases in the same use case classification result is compared to obtain a second comparison result, including: extracting the use case error detail information of each of the test cases in the same use case classification result from the use case execution result; extracting the timestamp data and the number of cycles data in the use case error detail information, and replacing the timestamp data based on a first preset character; replacing the number of cycles data based on a second preset character, and comparing the replaced use case error detail information to obtain the second comparison result.

[0115] In an exemplary embodiment of the present disclosure, error information screenshots of each of the test cases in the same use case classification result are compared to obtain a third comparison result, including: extracting the image storage path of the error information screenshots of each of the test cases in the same use case classification result from the use case execution result; acquiring the error information screenshot based on the image storage path, and cropping the error information screenshot to obtain a cropped image; calculating a first image similarity between the cropped images, and obtaining the third comparison result based on the first image similarity.

[0116] In an exemplary embodiment of the present disclosure, the error information screenshot is cropped to obtain a cropped image, including: obtaining the device screen resolution of the terminal device that executes the test case from the use case execution result; determining the display area of ​​the status bar of the terminal device in the error information screenshot based on the device screen resolution; and cropping the status bar in the error information screenshot based on the display area of ​​the status bar in the error information screenshot to obtain a cropped image.

[0117] In an exemplary embodiment of the present disclosure, calculating the first image similarity between the cropped images includes: detecting a first image corner point in the cropped image, and calculating pixel gradient information of other pixels around the first image corner point; determining a gradient direction of the first image corner point according to the pixel gradient information, and calculating a corner descriptor of the first image corner point based on the gradient direction; determining a corner point similarity between the first image corner points based on the corner point descriptor, and determining the first image similarity between the cropped images according to the corner point similarity.

[0118] In an exemplary embodiment of the present disclosure, the third comparison result is obtained according to the image similarity, including: determining an image confidence calculation area from the cropped image according to the first image corner point, and intercepting a confidence image corresponding to the image confidence calculation area; converting the confidence image after grayscale processing from the time domain to the frequency domain, and calculating the frequency domain similarity between the confidence images after frequency domain conversion; performing weighted summation on the first image similarity and the frequency domain similarity, and obtaining the third comparison result according to the weighted summation result.

[0119] In an exemplary embodiment of the present disclosure, the test cases included in the same use case classification result are merged according to the attribute comparison result to obtain a use case merging result, including: if the first comparison result in the attribute comparison result is that the use case error information is consistent, the second comparison result is that the use case error detail information is consistent, and the third comparison result is that the error information cut-off is consistent, Figure 1 If the test cases are consistent, the test cases included in the same use case classification result are merged to obtain a use case merging result.

[0120] In an exemplary embodiment of the present disclosure, the device for processing the test result of the use case may further include:

[0121] The second image similarity determination module can be used to obtain a standard use case error screenshot template corresponding to the use case error type, and compare the use case error screenshot template with the error information screenshot corresponding to the use case merging result to obtain a second image similarity;

[0122] The use case error type determination module can be used to determine the use case error type of the test case included in the use case merging result based on the second image similarity, and locate the error cause of the test case according to the use case error type.

[0123] The specific details of each module in the above-mentioned use case execution result processing device have been described in detail in the corresponding use case execution result processing method, so they will not be repeated here.

[0124] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0125] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0126] In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.

[0127] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".

[0128] Refer to the following Figure 8 The electronic device 800 according to this embodiment of the present disclosure is described. Figure 8The electronic device 800 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0129] like Figure 8 As shown, the electronic device 800 is in the form of a general computing device. The components of the electronic device 800 may include, but are not limited to: the at least one processing unit 810, the at least one storage unit 820, a bus 830 connecting different system components (including the storage unit 820 and the processing unit 810), and a display unit 840.

[0130] The storage unit stores program codes, which can be executed by the processing unit 810, so that the processing unit 810 performs the steps according to various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification. For example, the processing unit 810 can perform the following steps: Figure 1 Step S110 shown in: obtaining the use case execution result obtained by executing the test case, and extracting the use case name and the use case error status of the test case from the use case execution result; step S120: classifying the use case execution result based on the use case name and the use case error status to obtain a use case classification result; step S130: extracting the use case attribute information of each of the test cases included in the same use case classification result, and comparing the use case attribute information of each of the test cases in the same use case classification result to obtain an attribute comparison result; step S140: merging each of the test cases included in the same use case classification result according to the attribute comparison result to obtain a use case merging result.

[0131] The storage unit 820 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 8201 and / or a cache memory unit 8202 , and may further include a read-only memory unit (ROM) 8203 .

[0132] The storage unit 820 may also include a program / utility 8204 having a set (at least one) of program modules 8205, such program modules 8205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0133] Bus 830 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0134] The electronic device 800 may also communicate with one or more external devices 900 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 800, and / or communicate with any device that enables the electronic device 800 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 850. Furthermore, the electronic device 800 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 860. As shown, the network adapter 860 communicates with other modules of the electronic device 800 via a bus 830. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0135] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0136] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary implementations of the present disclosure described in the above "Exemplary Method" section of the present specification.

[0137] According to the program product for implementing the above method in the embodiment of the present disclosure, it can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.

[0138] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0139] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0140] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0141] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0142] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.

[0143] Other embodiments of the present disclosure will be readily apparent to those skilled in the art after considering the specification and practicing the inventions invented herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not invented by the present disclosure. The specification and examples are to be considered merely exemplary, and the true scope and spirit of the present disclosure are indicated by the claims.

Claims

1. A method for processing test results of a use case, characterized in that: include: Obtaining a test case execution result obtained by executing the test case, and extracting a test case name and a test case error status from the test case execution result; Classify the use case execution results based on the use case name and the use case error status to obtain a use case classification result; Extracting the use case attribute information of each of the test cases included in the same use case classification result, and comparing the use case attribute information of each of the test cases in the same use case classification result to obtain an attribute comparison result; The test cases included in the same use case classification result are merged according to the attribute comparison result to obtain a use case merging result.

2. The method for processing the test result of a use case according to claim 1, characterized in that: The use case execution result is classified based on the use case name and the use case error status to obtain a use case classification result, including: Traversing the use case names, extracting test cases with the same use case name from the test cases, and obtaining a first use case set; The test case error states of the test cases in the first test case set are traversed, and the test cases with the same test case error states are classified to obtain the test case classification result.

3. The method for processing the test result of a use case according to claim 1, characterized in that: The use case attribute information includes at least one of the use case error information, use case error details information and error information screenshot of the test case; The use case attribute information of each test case in the same use case classification result is compared to obtain an attribute comparison result, including: Comparing the use case error information of each of the test cases in the same use case classification result to obtain a first comparison result, and comparing the use case error detail information of each of the test cases in the same use case classification result to obtain a second comparison result; The error information screenshots of the test cases in the same case classification result are compared to obtain a third comparison result, and the attribute comparison result is generated according to the first comparison result, the second comparison result and the third comparison result.

4. The method for processing the test result of a use case according to claim 3, characterized in that: Comparing the use case error detail information of each of the test cases in the same use case classification result to obtain a second comparison result, including: Extracting the use case error details information of each of the test cases in the same use case classification result from the use case execution result; Extracting timestamp data and cycle count data from the use case error details information, and replacing the timestamp data based on a first preset character; The cycle count data is replaced based on a second preset character, and the replaced use case error detail information is compared to obtain the second comparison result.

5. The method for processing the test result of a use case according to claim 3, characterized in that: Compare the error information screenshots of the test cases in the same case classification result to obtain a third comparison result, including: Extracting the image storage path of the error information screenshot of each test case in the same test case classification result from the test case execution result; Acquire the error information screenshot based on the image storage path, and crop the error information screenshot to obtain a cropped image; The first image similarity between the cropped images is calculated, and the third comparison result is obtained according to the first image similarity.

6. The method for processing the test result of a use case according to claim 5, characterized in that: The error message screenshot is cropped to obtain a cropped image, including: Obtaining a device screen resolution of a terminal device that executes the test case from the test case execution result; Determine a display area of ​​the status bar of the terminal device in the error information screenshot based on the device screen resolution; Based on the display area of ​​the status bar in the error information screenshot, the status bar in the error information screenshot is cropped to obtain a cropped image.

7. The method for processing the test result of a use case according to claim 5, characterized in that: Calculate the first image similarity between the cropped images, including: Detecting a first image corner point in the cropped image, and calculating pixel gradient information of other pixels around the first image corner point; Determine a gradient direction of the first image corner point according to the pixel gradient information, and calculate a corner point descriptor of the first image corner point based on the gradient direction; A corner point similarity between corner points of the first images is determined based on the corner point descriptors, and a first image similarity between the cropped images is determined according to the corner point similarity.

8. The method for processing test results of a use case according to claim 5, characterized in that: Obtaining the third comparison result according to the image similarity includes: Determining an image confidence calculation area from the cropped image according to the first image corner point, and intercepting a confidence image corresponding to the image confidence calculation area; Convert the confidence image after grayscale processing from the time domain to the frequency domain, and calculate the frequency domain similarity between the confidence images after frequency domain conversion; A weighted sum is performed on the first image similarity and the frequency domain similarity, and the third comparison result is obtained according to the weighted sum result.

9. The method for processing use case test results according to claim 1, characterized in that: The test cases included in the same case classification result are merged according to the attribute comparison result to obtain a case merging result, including: If the first comparison result in the attribute comparison result is that the use case error information is consistent, the second comparison result is that the use case error detail information is consistent, and the third comparison result is that the error information screenshot is consistent, then the test cases included in the same use case classification result are merged to obtain the use case merge result.

10. The method for processing use case test results according to claim 1, characterized in that: The method for processing the test result of the use case also includes: Obtaining a standard use case error screenshot template corresponding to the use case error type, and comparing the use case error screenshot template with the error information screenshot corresponding to the use case merging result to obtain a second image similarity; The use case error type of the test case included in the use case merging result is determined based on the second image similarity, and the error cause of the test case is located according to the use case error type.

11. A device for processing test results of a use case, characterized in that: include: A use case name extraction module is used to obtain the use case execution result obtained by executing the test case, and extract the use case name and the use case error status of the test case from the use case execution result; A use case execution result classification module is used to classify the use case execution result based on the use case name and the use case error status to obtain a use case classification result; A use case attribute information comparison module, used to extract the use case attribute information of each test case included in the same use case classification result, and compare the use case attribute information of each test case in the same use case classification result to obtain an attribute comparison result; The use case execution result merging module is used to merge the use case execution results of each test case included in the same use case classification result according to the attribute comparison result to obtain the use case merging result.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for processing the use case test results described in any one of claims 1 to 10 is implemented.

13. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; Wherein, the processor is configured to execute the method for processing the use case test results described in any one of claims 1-10 by executing the executable instructions.