Software testing method and device based on interface testing data, equipment and medium

By determining the target data and processing dimensions of interface test data, generating data distribution information, and adjusting software test cases, the problems of insufficient comprehensiveness and uniformity of test data are solved, and the software testing effect is improved.

CN120653548APending Publication Date: 2025-09-16AGRICULTURAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510639431.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-16
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

In the existing technology, the comprehensiveness, accuracy and uniformity of test data are insufficient, which affects the effect of software testing, especially in functional testing and performance testing.

Method used

By determining the target test data in the interface test data, determining the matching data processing dimensions according to the data components, and generating data distribution information of the target test data through data classification statistics, the software test cases are adjusted to improve comprehensiveness and uniformity.

Benefits of technology

It improves the quality of software testing, ensures the comprehensiveness and uniformity of test data, and improves testing efficiency and accuracy, especially in functional testing and performance testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120653548A_ABST
    Figure CN120653548A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a software testing method and device based on interface testing data, equipment and a medium, and relates to the technical field of testing. The method comprises the steps of determining target test data in interface test data; determining a matched data processing dimension according to the data components of the target test data; according to a data classification statistical mode indicated by the data processing dimension, performing classification processing on the target test data to obtain data distribution information of the target test data; and determining a software test case according to the data distribution information, and performing software test according to the software test case. The method is used for achieving the effects of improving the comprehensiveness, diversity and uniformity of software test cases and further improving the software test quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of testing technology, and in particular to a software testing method, apparatus, device and medium based on interface test data. Background Art

[0002] In the field of testing technology, test data can directly affect the quality of software testing.

[0003] Software testing can include functional testing and performance testing. The comprehensiveness and accuracy of test data will affect the effectiveness of functional testing, while the uniformity of test data distribution will affect the effectiveness of performance testing.

[0004] Therefore, on the basis of the original test data, how to ensure the comprehensiveness, accuracy and uniformity of the test data to improve the software testing effect has become a technical problem that needs to be solved urgently. Summary of the Invention

[0005] The embodiments of the present application provide software testing methods, devices, equipment and media based on interface test data, so as to improve the comprehensiveness, diversity and uniformity of software test cases, thereby improving the quality of software testing.

[0006] In a first aspect, an embodiment of the present application provides a software testing method based on interface test data, comprising:

[0007] Determining target test data in the interface test data; wherein the target test data indicates at least one required data in the interface test data;

[0008] Determine a matching data processing dimension based on the data components of the target test data; wherein the data processing dimension is used to indicate a data classification and statistical method;

[0009] Classify the target test data according to the data classification and statistics method indicated by the data processing dimension to obtain data distribution information of the target test data;

[0010] A software test case is determined according to the data distribution information, and software testing is performed according to the software test case.

[0011] In a possible implementation, the target test data corresponds to multiple data components; determining the matching data processing dimensions according to the data components of the target test data includes:

[0012] combining at least some of the data components to obtain a plurality of initial components;

[0013] A target component is determined from the multiple initial components, and the matching data processing dimension is determined based on the target component.

[0014] In one possible implementation, determining the matching data processing dimension according to the target component includes:

[0015] Determine the target component as the matching data processing dimension; or

[0016] After performing computational processing on the data indicated by the target component, the data processing dimension of the match is determined.

[0017] In a possible implementation, classifying the target test data according to the data classification statistics method indicated by the data processing dimension to obtain data distribution information of the target test data includes:

[0018] Determining at least one data statistical condition according to the data classification and statistical method indicated by the data processing dimension;

[0019] Classify the target test data according to the data statistical conditions to obtain statistical results of the target test data under each of the data statistical conditions;

[0020] The data distribution information of the target test data is determined according to the statistical results of the target test data under each of the data statistical conditions.

[0021] In a possible implementation, the software test case indicates a software test case for functional testing; and determining the software test case according to the data distribution information includes:

[0022] Determining abnormal target test data based on statistical results of the target test data under each of the data statistical conditions;

[0023] Determining a supplementary test case based on the abnormal target test data and a normal test case corresponding to the normal target test data;

[0024] The software test case is determined according to the normal test case and the supplementary test case.

[0025] In one possible implementation, the target test data is stored in different database tables; the data distribution information includes the database tables corresponding to the target test data; the software test cases indicate software test cases for performance testing; and determining the software test cases based on the data distribution information includes:

[0026] Determining, based on the data distribution information, a data distribution ratio of the target test data in the different database tables;

[0027] Determining performance test data from each of the database tables according to the data distribution ratio and performance test case requirements;

[0028] The software test case is determined according to the performance test data.

[0029] In a possible implementation, after obtaining the data distribution information of the target test data, the method further includes:

[0030] The data distribution information is sent to a display interface of a computer device for visual display.

[0031] In a second aspect, an embodiment of the present application provides a software testing device based on interface test data, comprising:

[0032] A first determining unit is configured to determine target test data in the interface test data; wherein the target test data indicates at least one required data in the interface test data;

[0033] A second determining unit is configured to determine a matching data processing dimension based on the data components of the target test data; wherein the data processing dimension is used to indicate a data classification and statistical method;

[0034] a classification processing unit, configured to perform classification processing on the target test data according to the data classification statistical method indicated by the data processing dimension, to obtain data distribution information of the target test data;

[0035] The software testing unit is used to determine software testing cases according to the data distribution information, and perform software testing according to the software testing cases.

[0036] In a possible implementation manner, the target test data corresponds to multiple data components; in this case, the second determining unit is configured to:

[0037] combining at least some of the data components to obtain a plurality of initial components;

[0038] A target component is determined from the multiple initial components, and the matching data processing dimension is determined based on the target component.

[0039] In a possible implementation, the second determining unit is configured to:

[0040] Determine the target component as the matching data processing dimension; or

[0041] After performing computational processing on the data indicated by the target component, the data processing dimension of the match is determined.

[0042] In a possible implementation, the classification processing unit is configured to:

[0043] Determining at least one data statistical condition according to the data classification and statistical method indicated by the data processing dimension;

[0044] Classify the target test data according to the data statistical conditions to obtain statistical results of the target test data under each of the data statistical conditions;

[0045] The data distribution information of the target test data is determined according to the statistical results of the target test data under each of the data statistical conditions.

[0046] In a possible implementation, the software test case indicates a software test case for functional testing; in this case, the software testing unit is configured to:

[0047] Determining abnormal target test data based on statistical results of the target test data under each of the data statistical conditions;

[0048] Determining a supplementary test case based on the abnormal target test data and a normal test case corresponding to the normal target test data;

[0049] The software test case is determined according to the normal test case and the supplementary test case.

[0050] In one possible implementation, the target test data is stored in different database tables; the data distribution information includes the database tables corresponding to the target test data; the software test cases indicate software test cases for performance testing; in this case, the software testing unit is configured to:

[0051] Determining, based on the data distribution information, a data distribution ratio of the target test data in the different database tables;

[0052] Determining performance test data from each of the database tables according to the data distribution ratio and performance test case requirements;

[0053] The software test case is determined according to the performance test data.

[0054] In a possible implementation, the device further includes a visualization unit, configured to:

[0055] After obtaining the data distribution information of the target test data, the data distribution information is sent to a display interface of a computer device for visual display.

[0056] In a third aspect, an embodiment of the present application provides a computer device, including: a memory, a processor;

[0057] The memory stores computer-executable instructions;

[0058] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the above first aspect and / or various possible implementations of the first aspect.

[0059] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the first aspect above and / or various possible implementation methods of the first aspect.

[0060] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the above first aspect and / or various possible implementation methods of the first aspect.

[0061] The software testing method, apparatus, device, and medium based on interface test data provided by the embodiments of the present application can determine the target test data in the interface test data based on at least one required data in the interface test data, thereby ensuring the comprehensiveness of the target test data from the interface perspective. At the same time, by determining the target test data through at least one required data, it is possible to avoid processing a large amount of invalid data, reduce the data processing workload, and improve efficiency. After determining the target test data, the matching data processing dimensions can be determined based on the data components of the target test data, and the target test data can be classified and processed according to the data classification and statistical method indicated by the data processing dimensions to obtain data distribution information of the target test data. At this time, flexible and diverse data processing dimensions can be determined based on the data components of the target test data, thereby making the determined data distribution information of the target test data more flexible and diverse, thereby providing a flexible and comprehensive data view for software testing. Subsequently, software test cases can be determined based on the data distribution information, and software testing can be performed based on the software test cases. In this embodiment, software test cases can be adjusted based on the data distribution information, for example, supplementing software test cases, using evenly distributed software test cases, etc., thereby ensuring the comprehensiveness, diversity, and uniformity of software test cases, thereby improving the quality of software testing. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0063] Figure 1 A flowchart of a software testing method based on interface test data provided in an embodiment of the present application;

[0064] Figure 2 A flowchart of another software testing method based on interface test data provided in an embodiment of the present application;

[0065] Figure 3 A schematic diagram of an implementation flow of a software testing method based on interface test data provided in an embodiment of the present application;

[0066] Figure 4 A schematic diagram of the structure of a software testing device based on interface test data provided in an embodiment of the present application;

[0067] Figure 5 A schematic diagram of the structure of a computer device provided in an embodiment of the present application.

[0068] The above drawings illustrate specific embodiments of the present application, which will be described in more detail below. These drawings and the textual description are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION

[0069] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.

[0070] In the field of testing technology, test data can directly affect the quality of software testing. Software testing can include functional testing and performance testing.

[0071] When performing functional testing, rare data can be used to reveal hidden defects in software functions. Therefore, comprehensive and accurate test data is required for functional testing. When performing performance testing, evenly distributed test data can be used to conduct performance testing to avoid issues such as resource allocation and database wait times that may affect the performance testing results.

[0072] Therefore, how to ensure the comprehensiveness, accuracy and uniformity of test data (or test cases) to improve software testing results has become a technical problem that needs to be solved urgently.

[0073] The software testing method based on interface test data provided by this application can determine more comprehensive test data from the perspective of the interface. At this time, when performing software testing based on the interface test data, it is possible to provide a comprehensive data view for functional testing and performance testing based on the data distribution information of the interface test data, thereby determining more accurate and matching test data for the corresponding software test, that is, test cases, to improve the test quality of the software test, thereby solving the above technical problems.

[0074] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0075] Figure 1 A flowchart of a software testing method based on interface test data provided in an embodiment of the present application is shown as follows: Figure 1 As shown, the method includes:

[0076] S101: Determine target test data in interface test data.

[0077] The target test data indicates at least one required data in the interface test data.

[0078] In one example, the interface test data may be understood as test data determined for the transaction interface.

[0079] In one example, the required data in the interface test data can be determined based on the interface transaction fields described in the technical document. If there are multiple required data, the target test data can be determined based on at least one required data.

[0080] Optionally, the data column where the mandatory data is located can be determined from the database table according to the field name corresponding to the mandatory data, thereby determining the target test data in the interface test data.

[0081] Optionally, after determining the target test data in the interface test data, the target test data can be stored to facilitate statistical processing of the target test data, thereby determining more comprehensive and accurate test data / test cases. Exemplarily, the transaction interface name corresponding to the target test data, the field name of the target test data, the database table where the target test data is located, and the target test data can be formatted and stored. For example, if the transaction interface name is Tran_1, the field name of the target test data is A, the database table where the target test data is located is Table_a, and the target test data is b1, then the storage method of the target test data can be shown in Table 1 below.

[0082] Table 1 Storage method of target test data

[0083] Transaction interface name Field Name Database Table Target test data Tran_1 A Table_a b1

[0084] S102: Determine matching data processing dimensions based on data components of target test data.

[0085] Among them, the data processing dimension is used to indicate the data classification and statistical method.

[0086] In one example, the data components of the target test data may indicate the content of the target test data. In this case, the data components of the target test data may be determined based on the content of the target test data. For example, if the target test data indicates gender, then the data components of the target test data are: a single fixed value (e.g., a fixed value of male, female, or unknown); if the target test data indicates time, then the data components of the target test data may include: year, month, and day; if the target test data indicates an ID number, then the data components of the target test data may include: province, city, year, and month.

[0087] In one example, a data processing dimension indicates a data classification and statistical method determined based on data components. Different types of target test data can correspond to different data processing dimensions, allowing for classification and statistical analysis of the target test data based on the matching data processing dimensions. This allows for intuitive determination of the target test data's data distribution, and ultimately, the comprehensiveness, accuracy, and uniformity of the target test data based on the data distribution information.

[0088] For example, if the target test data indicates an ID number, and the data components of the target test data include province, city, year, and month, then the matching data processing dimension can be "province and city", "year", "year + month", "province and city + year + month", etc. In this case, if the data processing dimension is "province and city", then the data classification and statistical method indicated by the data processing dimension can be: classification and statistics by province and city.

[0089] S103 : Classify the target test data according to the data classification and statistics method indicated by the data processing dimension to obtain data distribution information of the target test data.

[0090] In specific implementation, the target test data can be classified according to the data classification statistics indicated by the data processing dimension, so as to determine the number of target test data in each category, thereby determining the data distribution information of the target test data.

[0091] S104: Determine software test cases based on the data distribution information, and perform software testing based on the software test cases.

[0092] Optionally, when determining software test cases based on data distribution information, on the one hand, test cases can be supplemented based on rare values ​​in the data distribution information, thereby determining more comprehensive software test cases. On the other hand, the data distribution information can be used to ensure the uniformity of the test data distribution, thereby ensuring that the determined software test cases are evenly distributed. In this way, when software testing is performed based on the software test cases, the test quality can be improved.

[0093] As can be seen from the above description, the embodiment of the present application can determine the target test data in the interface test data based on at least one required data in the interface test data, thereby ensuring the comprehensiveness of the target test data from the interface perspective. At the same time, by determining the target test data based on at least one required data, it is possible to avoid processing a large amount of invalid data, reduce the data processing workload, and improve efficiency. After determining the target test data, the matching data processing dimensions can be determined based on the data components of the target test data, and the target test data can be classified and processed according to the data classification and statistical method indicated by the data processing dimensions to obtain data distribution information of the target test data. At this time, flexible and diverse data processing dimensions can be determined based on the data components of the target test data, thereby making the determined data distribution information of the target test data more flexible and diverse, thereby providing a flexible and comprehensive data view for software testing. Subsequently, software test cases can be determined based on the data distribution information, and software testing can be performed based on the software test cases. In this embodiment, software test cases can be adjusted based on the data distribution information, for example, supplementing software test cases, using evenly distributed software test cases, etc., thereby ensuring the comprehensiveness, diversity, and uniformity of software test cases, thereby improving the quality of software testing.

[0094] Figure 2 A flowchart of another software testing method based on interface test data provided in an embodiment of the present application is shown as follows: Figure 2 As shown, this embodiment Figure 1 Based on the embodiment, a software testing method based on interface test data is described in detail. The method includes:

[0095] S201: Determine target test data in interface test data.

[0096] The target test data indicates at least one required data in the interface test data.

[0097] In an example, this step can refer to the content described in S101 above, and will not be described in detail here.

[0098] S202: Determine matching data processing dimensions based on data components of target test data.

[0099] Among them, the data processing dimension is used to indicate the data classification and statistical method.

[0100] In one example, the data components of the target test data may be determined based on the composition of the target test data. In this case, the target test data may correspond to one or more data components.

[0101] If the target test data corresponds to a data component, then the data component can be determined as the matching data processing dimension. For example, if the data component is gender, then the matching data processing dimension is gender. Then, the data classification statistical method indicated by the matching data processing dimension is: classification by gender.

[0102] If the target test data corresponds to multiple data components, then at least some of the data components can be combined to obtain multiple initial components. Then, the target component can be determined from the multiple initial components, and the matching data processing dimension can be determined based on the target component.

[0103] For example, if the number of data components is 3, namely data component 1, data component 2 and data component 3, then after combining at least some of the data components, the multiple initial components obtained include: data component 1, data component 2, data component 3, data component 1 + data component 2, data component 1 + data component 3, data component 2 + data component 3, data component 1 + data component 2 + data component 3, etc.

[0104] In one example, after determining multiple initial components, a target component can be determined from the multiple data components based on the type of target test data and pre-set classification rules. Alternatively, the multiple initial components can be sorted based on the data volume corresponding to each initial component, and the harvested initial component with a data volume that meets the data volume requirement can be determined as the target component.

[0105] In a possible implementation, after the target component is determined, a matching data processing dimension may be determined based on the target component.

[0106] Specifically, the target component can be determined as the matching data processing dimension. For example, if the target component is gender, gender can be directly used as the matching data processing dimension.

[0107] Alternatively, after performing computational processing on the data indicated by the target component, a matching data processing dimension is determined. For example, if the target component is the year in the ID number, then the user's age can be calculated based on the current year and the year in the ID number, and the user's age can be determined as the matching data processing dimension. In this case, computational processing can be used to broaden the scope of the data processing dimension, enabling more flexible classification and statistics of the target test data to meet various testing requirements.

[0108] In the above-described embodiment, the target test data components can be combined by combining one or more data components of the target test data, thereby determining the target component as needed. In this case, when determining the matching data processing dimensions based on the target component, the problem of classifying and statistically analyzing the data based solely on the target test data values ​​can be avoided, which affects the performance of data classification statistics.

[0109] Optionally, after determining the matching data processing dimension, the matching data processing dimension can be stored together with the target test data. Based on Table 1, if the data processing dimension is Rule 1-Year, then the storage method of the updated target test data can be shown in Table 2 below.

[0110] Table 2 Storage method of updated target test data

[0111] Transaction interface name Field Name Database Table Target test data Data processing dimension Tran_1 A Table_a b1 Rule 1-Year

[0112] It should be noted here that the data processing dimensions under the same field type are applicable to different database tables.

[0113] In one example, after determining the matching data processing dimension, a corresponding SQL (Structured Query Language) statement can be determined based on the data classification and statistical method indicated by the data processing dimension to classify the target test data and obtain the data distribution information of the target test data. For example, if the field name corresponding to the target test data is A and the database table stored is Table_a, then the SQL statement can be expressed as:

[0114] SELECT DISTINCT A,COUNT(*)FROM Table_a GROUP BY A.

[0115] At this point, you can use this SQL statement to obtain all the values ​​of field name A in Table_a and count the number of occurrences of each value. The parameters in the above SQL statement (e.g., "*," "Table_a," "A," etc.) can be set according to actual needs and are not specifically limited here.

[0116] For specific implementation, please refer to the steps described in S203 to S205 below.

[0117] S203: Determine at least one data statistics condition according to the data classification and statistics method indicated by the data processing dimension.

[0118] At this time, the determined data statistical condition can indicate the statistical content corresponding to the COUNT() statement. For example, if the data classification statistical method indicated by the data processing dimension is statistical gender, then the data statistical condition can be: at least one of: counting the number of females, counting the number of males, and counting the number of unknown genders. For another example, if the data classification statistical method indicated by the data processing dimension is statistical user age, then the data statistical condition can be: counting the number of users of different ages, or the data statistical condition can also be: counting users aged 1-30, counting users aged 31-60, and counting users aged 61 and above.

[0119] S204: Classify the target test data according to the data statistical conditions to obtain statistical results of the target test data under each data statistical condition.

[0120] S205 : Determine data distribution information of the target test data according to statistical results of the target test data under each data statistical condition.

[0121] For example, if the value of field A in database table Table_a (ie, the data statistical condition) includes b1-b3, then the statistical results of the target test data under each data statistical condition can be shown in Table 3 below.

[0122] Table 3 Statistical results of target test data under each data statistical condition

[0123] The value of field A Occurrences b1 n1 b2 n2 b3 n3

[0124] In the above implementation, at least one data statistical condition can be determined based on the data classification and statistical method indicated by the data processing dimension, so that the statistical method of the target test data can be determined based on the data statistical condition, thereby improving the flexibility of the classification processing of the target test data, avoiding classification processing based only on the value of the target test data, and making the statistical results corresponding to the target test data (that is, data distribution information) more concise and flexible, thereby facilitating the improvement of software test cases based on the data distribution information to improve the quality of software testing.

[0125] In an optional embodiment, after obtaining the data distribution information of the target test data according to the process described above, software test cases can be determined based on the data distribution information. In this case, if the software test includes functional testing and performance testing, the software test cases can be determined based on the specific situation. For example, if the software test is functional testing, the software test case indicates a software test case for functional testing. In this case, the process of determining the software test case based on the data distribution information can be referred to as described in the process of S206 to S208 below.

[0126] S206 : Determine abnormal target test data according to the statistical results of the target test data under each data statistical condition.

[0127] In one example, abnormal target test data can be understood as data that occurs infrequently. Specifically, clustering can be performed on the statistical results of the target test data under each statistical condition, and the target test data under the statistical condition corresponding to the "outlier" data in the statistical results can be identified as abnormal target test data.

[0128] For example, for Table 3 above, if the values ​​of n1 and n2 are 1000, and the value of n3 is 1, then n3 can be determined as the "isolated point" data in the statistical results, and the data statistical condition b3 corresponding to the "isolated point" data n3 and the corresponding target test data are determined as abnormal target test data.

[0129] S207: Determine a supplementary test case based on the abnormal target test data and the normal test case corresponding to the normal target test data.

[0130] In one example, by replacing the test data in the normal test case corresponding to the normal target test data with the abnormal target test data, the test case corresponding to the abnormal target test data, that is, the supplementary test case, can be determined, so that the supplementary test case can be generated simply and quickly to supplement and improve the software test case used for functional testing.

[0131] S208. Determine software test cases based on normal test cases and supplementary test cases.

[0132] This implementation method can enable functional test cases to include more abnormal target test data based on normal test cases and supplementary test cases, thereby facilitating the discovery of functional defects and further improving the functional test effect.

[0133] In one example, the target test data may be stored in different database tables. In this case, the data distribution information may include the database tables corresponding to the target test data. In this case, if the software test is a performance test, the software test case indicates a software test case for the performance test. In this case, the process of determining the software test case based on the data distribution information can be referred to the process described below in S209 to S211.

[0134] S209: Determine the data distribution ratio of the target test data in different database tables according to the data distribution information.

[0135] For example, if the target test data is distributed in three database tables, where database table 1 includes 5,000 target test data items, database table 2 includes 5,000 target test data items, and database table 3 includes 1,000 target test data items, then it can be determined that the data distribution ratio of the target test data in different database tables is 5:5:1.

[0136] S210 : Determine performance test data from each database table based on the data distribution ratio and performance test case requirements.

[0137] In an example, if the performance test case requirement is 1,100, then based on the data distribution ratio and the performance test case requirement, the performance test data determined from each database table includes: 500 target test data in database table 1, 500 target test data in database table 2, and 100 target test data in database table 3.

[0138] S211. Determine software test cases based on performance test data.

[0139] This implementation can determine the performance test data that is evenly distributed in each database table and used for performance testing based on the distribution of the target test data in the database table, which helps to avoid the problem of uneven distribution of performance test data affecting the performance test effect.

[0140] In an optional embodiment, in addition to determining the performance test data based on the data distribution ratio in the data distribution information, the data distribution ratio can be pre-set based on the actual production environment, and the performance test data can be determined from each database table based on the pre-set data distribution ratio, so that the performance test is more closely matched with the actual production environment, thereby improving the accuracy of the performance test.

[0141] In an optional embodiment, after obtaining the data distribution information of the target test data according to the process described above, the data distribution information may be sent to a display interface of a computer device for visual display.

[0142] Optionally, when visually displaying data distribution information, it can be displayed according to at least one of a table, a pie chart, a line chart, etc., and the visual display method is not limited here.

[0143] Optionally, after visually displaying the data distribution information, the abnormal target test data determined above can also be highlighted, so that staff can pay more attention to the abnormal target test data, thereby improving the software test cases and thus improving the quality of the software test cases.

[0144] S212. Perform software testing according to software test cases.

[0145] From the above description, it can be seen that the software testing method based on interface test data provided in the embodiment of the present application can provide a comprehensive data view for software testing by classifying and counting the target test data in the transaction interface and visually displaying it, thereby helping to improve software testing cases and further enhance software testing results.

[0146] Figure 3 A schematic diagram of an implementation flow of a software testing method based on interface test data provided in an embodiment of the present application is shown as follows: Figure 3 As shown, the method can determine the target test data from the interface test data by analyzing the interface fields, and determine the data processing dimensions that match the target test data based on the data components of the target test data. Afterwards, the target test data can be classified and processed based on the matched data processing dimensions to obtain data distribution information of the target test data. At this time, chart data can be generated based on the data distribution information and displayed visually. At this time, supplementary test cases for rare values ​​can be generated based on the abnormal target test data in the visually displayed data distribution information, thereby obtaining software test cases for functional testing; at the same time, performance test data can be determined based on the data distribution ratio determined by the visually displayed data distribution information, and software test cases for performance testing can be generated based on the performance test data, so that software testing can be performed based on the software test cases to improve the quality of software testing.

[0147] Figure 4 A schematic diagram of the structure of a software testing device based on interface test data provided in an embodiment of the present application is shown as follows: Figure 4 As shown, the software testing device based on interface test data provided by this embodiment includes:

[0148] The first determining unit 401 is configured to determine target test data in the interface test data; wherein the target test data indicates at least one required data in the interface test data.

[0149] The second determining unit 402 is configured to determine a matching data processing dimension based on the data components of the target test data; wherein the data processing dimension is used to indicate a data classification and statistical method.

[0150] The classification processing unit 403 is configured to perform classification processing on the target test data according to the data classification statistics method indicated by the data processing dimension to obtain data distribution information of the target test data.

[0151] The software testing unit 404 is configured to determine software testing cases based on the data distribution information and perform software testing based on the software testing cases.

[0152] In a possible implementation manner, the target test data corresponds to multiple data components; in this case, the second determining unit 402 is configured to:

[0153] After combining at least some of the data components, a plurality of initial components are obtained;

[0154] A target component is determined from multiple initial components, and a matching data processing dimension is determined based on the target component.

[0155] In a possible implementation, the second determining unit 402 is configured to:

[0156] Identify the target component as a matching data processing dimension; or

[0157] After calculating and processing the data indicated by the target component, the matching data processing dimension is determined.

[0158] In a possible implementation, the classification processing unit 403 is configured to:

[0159] Determine at least one data statistical condition according to the data classification and statistical method indicated by the data processing dimension;

[0160] According to the data statistical conditions, the target test data is classified and processed to obtain the statistical results of the target test data under each data statistical condition;

[0161] According to the statistical results of the target test data under each data statistical condition, the data distribution information of the target test data is determined.

[0162] In a possible implementation, the software test case indicates a software test case for functional testing; in this case, the software testing unit 404 is configured to:

[0163] Determine abnormal target test data based on the statistical results of the target test data under each data statistical condition;

[0164] Determine supplementary test cases based on abnormal target test data and normal test cases corresponding to normal target test data;

[0165] Determine software test cases based on normal test cases and supplementary test cases.

[0166] In one possible implementation, the target test data is stored in different database tables; the data distribution information includes the database tables corresponding to the target test data; and the software test cases indicate software test cases for performance testing. In this case, the software testing unit 404 is configured to:

[0167] According to the data distribution information, determine the data distribution ratio of the target test data in different database tables;

[0168] Determine the performance test data from each database table based on the data distribution ratio and performance test case requirements;

[0169] Determine software test cases based on performance test data.

[0170] In a possible implementation, the device further includes a visualization unit 405, configured to:

[0171] After obtaining the data distribution information of the target test data, the data distribution information is sent to a display interface of a computer device for visual display.

[0172] The software testing device based on interface test data provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effects are similar, and are not described in detail in this embodiment.

[0173] Figure 5 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. Figure 5 As shown, the computer device 50 provided in this embodiment includes: at least one processor 501 and a memory 502. Optionally, the computer device 50 further includes a communication component 503. The processor 501, the memory 502 and the communication component 503 are connected via a bus 504.

[0174] In a specific implementation process, at least one processor 501 executes the computer-executable instructions stored in the memory 502, so that the at least one processor 501 performs the above method.

[0175] The specific implementation process of the processor 501 can be found in the above method embodiment. Its implementation principle and technical effects are similar and will not be repeated here in this embodiment.

[0176] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASICs), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the present invention may be directly executed by a hardware processor or by a combination of hardware and software modules in the processor.

[0177] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (NVM), such as at least one disk memory.

[0178] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be classified into address buses, data buses, and control buses. For ease of illustration, the buses in the drawings of this application are not limited to just one bus or just one type of bus.

[0179] The present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.

[0180] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.

[0181] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile memory device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0182] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be an integral part of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the readable storage medium can also exist in a device as discrete components.

[0183] The division of units is merely a logical functional division; actual implementations may employ alternative divisions, such as combining or integrating multiple units or components into another system, or omitting or disabling certain features. Furthermore, any direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between devices or units, either through an interface, electrical, mechanical, or other means.

[0184] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0185] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0186] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program code.

[0187] Those skilled in the art will appreciate that all or part of the steps in the above-described method embodiments can be implemented using hardware associated with program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0188] Finally, it should be noted that those skilled in the art will readily identify other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art not disclosed herein. The present invention is not limited to the precise structure described above and illustrated in the accompanying drawings, and various modifications and variations may be made without departing from the scope thereof. The scope of the present invention is limited solely by the appended claims.

Claims

1. A software testing method based on interface test data, characterized in that: include: Determining target test data in the interface test data; wherein the target test data indicates at least one required data in the interface test data; Determine a matching data processing dimension based on the data components of the target test data; wherein the data processing dimension is used to indicate a data classification and statistical method; Classify the target test data according to the data classification and statistics method indicated by the data processing dimension to obtain data distribution information of the target test data; A software test case is determined according to the data distribution information, and software testing is performed according to the software test case.

2. The method according to claim 1, characterized in that The target test data corresponds to a plurality of data components; determining a matching data processing dimension according to the data components of the target test data includes: combining at least some of the data components to obtain a plurality of initial components; A target component is determined from the multiple initial components, and the matching data processing dimension is determined based on the target component.

3. The method according to claim 2, characterized in that Determine the data processing dimensions of the matching based on the target component, including: Determine the target component as the matching data processing dimension; or After performing computational processing on the data indicated by the target component, the data processing dimension of the match is determined.

4. The method according to claim 1, wherein Classifying the target test data according to the data classification and statistics method indicated by the data processing dimension to obtain data distribution information of the target test data includes: Determining at least one data statistical condition according to the data classification and statistical method indicated by the data processing dimension; Classify the target test data according to the data statistical conditions to obtain statistical results of the target test data under each of the data statistical conditions; The data distribution information of the target test data is determined according to the statistical results of the target test data under each of the data statistical conditions.

5. The method according to claim 4, characterized in that The software test case indicates a software test case for functional testing; Determining software test cases based on the data distribution information includes: Determining abnormal target test data based on statistical results of the target test data under each of the data statistical conditions; Determining a supplementary test case based on the abnormal target test data and a normal test case corresponding to the normal target test data; The software test case is determined according to the normal test case and the supplementary test case.

6. The method according to claim 4, characterized in that The target test data is stored in different database tables; the data distribution information includes the database tables corresponding to the target test data; The software test case indicates a software test case for performance testing; Determining software test cases based on the data distribution information includes: Determining, based on the data distribution information, a data distribution ratio of the target test data in the different database tables; Determining performance test data from each of the database tables according to the data distribution ratio and performance test case requirements; The software test case is determined according to the performance test data.

7. The method according to any one of claims 1 to 6, characterized in that After obtaining the data distribution information of the target test data, the method further includes: The data distribution information is sent to a display interface of a computer device for visual display.

8. A software testing device based on interface test data, characterized in that: include: A first determining unit is configured to determine target test data in the interface test data; wherein the target test data indicates at least one required data in the interface test data; A second determining unit is configured to determine a matching data processing dimension based on the data components of the target test data; wherein the data processing dimension is used to indicate a data classification and statistical method; a classification processing unit, configured to perform classification processing on the target test data according to the data classification statistical method indicated by the data processing dimension, to obtain data distribution information of the target test data; The software testing unit is used to determine software testing cases according to the data distribution information, and perform software testing according to the software testing cases.

9. A computer device, characterized in that: include: Memory, processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.