Test man-hour prediction method and device, equipment and storage medium

By obtaining the target test feature values ​​​​in the target test task data and constructing the target feature structure diagram, the graph convolution network model is used to predict the test working hours, which solves the problem of strong subjectivity of manual prediction in the existing technology and achieves efficient and accurate Automated forecasting of test hours.

CN118689756APending Publication Date: 2024-09-24BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310303014.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-23
Publication Date
2024-09-24

AI Technical Summary

Technical Problem

In the existing technology, test man-hour prediction relies on manual experience and is highly subjective, resulting in low prediction accuracy and poor efficiency, and cannot effectively guarantee the accuracy of test man-hours.

Method used

By obtaining the target test feature values ​​in the target test task data, construct a target feature structure graph, and use the pre-trained graph convolution network model to predict test working hours, automate the working time prediction process, and improve accuracy and efficiency.

Benefits of technology

It realizes automatic prediction of test working hours, improves prediction accuracy and efficiency, avoids prediction inaccuracies caused by too many or too few features, reduces manual participation, and improves the reliability of test planning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118689756A
    Figure CN118689756A
Patent Text Reader

Abstract

The embodiment of the invention discloses a test man-hour prediction method and device, equipment and a storage medium. The method comprises the steps of obtaining a target test feature value corresponding to a target test feature in target test task data; determining a target feature value structure chart based on the target test feature value and the target feature structure chart; inputting the target characteristic value structure diagram into a pre-trained target diagram convolutional network model to predict the test time, and obtaining the target test time corresponding to the target test task; wherein the target feature structure diagram is obtained by adjusting a node connection relation in the initial feature structure diagram in the training process of the target diagram convolutional network model, and nodes in the initial feature structure diagram are target test features. Through the technical scheme of the embodiment of the invention, automatic prediction of the test time can be realized, and the prediction accuracy and prediction efficiency of the test time are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to computer technology, and in particular to a test time prediction method, device, equipment and storage medium. Background Art

[0002] Software testing is to find potential defects in software products as early as possible and ensure that they are fixed so that the software products can be launched smoothly. The entire testing process includes finding defects, tracking defects, and fixing them. In this process, the test time forecast has a great impact on the software testing rhythm and product release. The more accurate the test time forecast, the more planned the testing process is, and the more accurate the test rhythm can be, ensuring the smooth launch of the product.

[0003] At present, testers usually predict the test time based on their own experience. However, in the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art:

[0004] The method of manual prediction based on one's own experience is highly subjective and cannot effectively guarantee the accuracy of the prediction of test hours. It is also time-consuming and labor-intensive, which reduces the efficiency of the prediction of test hours. Summary of the invention

[0005] The embodiments of the present invention provide a test time prediction method, device, equipment and storage medium to achieve automatic prediction of test time and improve the prediction accuracy and prediction efficiency of test time.

[0006] In a first aspect, an embodiment of the present invention provides a method for predicting test time, comprising:

[0007] Obtaining a target test feature value corresponding to a target test feature in the target test task data, wherein the target test feature is a test feature related to test working hours that is determined in advance from among the test features to be selected based on the sample test task data;

[0008] Determine a target feature value structure diagram based on the target test feature value and the target feature structure diagram;

[0009] Input the target feature value structure graph into a pre-trained target graph convolutional network model to predict the test hours, and obtain the target test hours corresponding to the target test task;

[0010] Among them, the target feature structure graph is obtained by adjusting the node connection relationship in the initial feature structure graph during the training process of the target graph convolutional network model, and the nodes in the initial feature structure graph are the target test features.

[0011] In a second aspect, an embodiment of the present invention further provides a test time prediction device, comprising:

[0012] A target test feature value acquisition module is used to acquire a target test feature value corresponding to a target test feature in target test task data, wherein the target test feature is a test feature related to test working hours determined in advance from among the test features to be selected based on the sample test task data;

[0013] A target characteristic value structure diagram determining module, used to determine a target characteristic value structure diagram based on the target test characteristic value and the target characteristic structure diagram;

[0014] A test time prediction module is used to input the target feature value structure graph into a pre-trained target graph convolutional network model to predict the test time and obtain the target test time corresponding to the target test task;

[0015] Among them, the target feature structure graph is obtained by adjusting the node connection relationship in the initial feature structure graph during the training process of the target graph convolutional network model, and the nodes in the initial feature structure graph are the target test features.

[0016] In a third aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:

[0017] one or more processors;

[0018] A memory for storing one or more programs;

[0019] When the one or more programs are executed by the one or more processors, the one or more processors implement the test man-hour prediction method provided by any embodiment of the present invention.

[0020] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method for predicting test man-hours as provided in any embodiment of the present invention.

[0021] One embodiment of the above invention has the following advantages or beneficial effects:

[0022] By determining the target test features related to the test time from the test features to be selected based on the sample test task data in advance, and constructing the initial feature structure diagram based on the target test features as nodes in the initial feature structure diagram, the node connection relationship in the initial feature structure diagram is adjusted to obtain the target feature value structure diagram during the training process of the target graph convolutional network model. In the process of predicting the test time for the target test task, the target feature value structure diagram can be determined based on the target test feature value and the target feature structure diagram corresponding to the target test feature in the target test task data, and the target feature value structure diagram is input into the pre-trained target graph convolutional network model to predict the test time, and the target test time corresponding to the target test task is obtained. By only considering the target test features related to the test time, the situation of inaccurate time prediction caused by considering too many or too few features can be avoided, and the pre-trained target graph convolutional network model can be used to realize the automatic prediction of the test time without manual participation, thereby improving the prediction efficiency of the test time and effectively ensuring the prediction accuracy of the test time. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0024] Figure 1 It is a flow chart of a method for predicting test working hours provided by an embodiment of the present invention;

[0025] Figure 2 It is a schematic diagram of the structure of a target graph convolutional network model involved in one embodiment of the present invention;

[0026] Figure 3 is a flow chart of another method for predicting test time provided by an embodiment of the present invention;

[0027] Figure 4 is a schematic diagram of a scatter plot involved in an embodiment of the present invention;

[0028] Figure 5 is a schematic diagram of a box plot involved in an embodiment of the present invention;

[0029] Figure 6 is a schematic diagram of an initial characteristic structure diagram involved in an embodiment of the present invention;

[0030] Figure 7 It is a structural schematic diagram of a test time prediction device provided by an embodiment of the present invention;

[0031] Figure 8 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0032] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0033] Figure 1 This is a flowchart of a test time prediction method provided by an embodiment of the present invention. This embodiment is applicable to the case of predicting the test time of software. The method can be executed by a test time prediction device, which can be implemented by software and / or hardware and integrated in an electronic device. Figure 1 As shown, the method specifically comprises the following steps:

[0034] S110, obtaining a target test feature value corresponding to a target test feature in the target test task data, wherein the target test feature is a test feature related to test working hours that is determined in advance from among the test features to be selected based on the sample test task data.

[0035] Among them, the target test task may refer to the test task of the target software that needs to be executed currently. The target test task data may refer to all test feature data associated with the target software test. The sample test task may refer to the historical software test task that has actually been executed. The sample test task data may refer to all test feature data associated with the historical software test. The selected test features may refer to all test features that may affect the test time. The target test feature may refer to the main test feature that affects the test time, that is, the test feature that really has an impact on the time prediction. The target test feature value may refer to the specific value of the target test feature.

[0036] Specifically, the sample test task data can be statistically analyzed in advance, and the target test features related to the test time can be determined from all the candidate test features, so that only the target test features can be considered for learning and training and time prediction, thereby avoiding the situation where too many or too few test features are considered during the time prediction, resulting in inaccurate time prediction. In the actual prediction process, the target test feature value corresponding to the target test feature can be obtained from the target test task data, without obtaining the feature values ​​of other test features that are not related to the test time, thereby improving the prediction accuracy and prediction efficiency of the test time.

[0037] S120. Determine a target feature value structure diagram based on the target test feature value and the target feature structure diagram.

[0038] Among them, the target feature structure diagram can be a feature relationship diagram for characterizing each target test feature. Each target test feature serves as a node in the target feature structure diagram. The node connection relationship in the target feature structure diagram is the optimal connection relationship determined in advance during the model training process, so as to ensure the accuracy of the predicted working hours. The target feature value structure diagram can be a feature relationship diagram for characterizing each target test feature value. The target test feature value corresponding to each target test feature serves as a node in the target feature structure diagram. The node connection relationship in the target feature value structure diagram is the same as the node connection relationship in the target feature structure diagram.

[0039] Specifically, the target feature structure diagram determined after the model training stage can be obtained, and each target test feature value can be used as a node, and each target test feature value can be connected according to the connection relationship between each target test feature in the target feature structure diagram to construct a target feature value structure diagram with the same connection relationship. Each target test feature in the target feature structure diagram can also be replaced with a corresponding target test feature value, so that a target feature value structure diagram consistent with the structure of the target feature structure diagram can be obtained more quickly.

[0040] In order to further ensure the prediction effect of the model, it is necessary to preprocess the target test feature values ​​of the input model, such as normalizing the numerical target test feature values ​​to the same numerical range to ensure that their iteration speed is consistent, so that the final prediction result will not be affected by the different numerical ranges. Encode the categorical target test feature values ​​using binary coding, such as encoding the category "yes" as 1 and the category "no" as 0.

[0041] S130, input the target feature value structure graph into a pre-trained target graph convolutional network model to predict the test hours, and obtain the target test hours corresponding to the target test task.

[0042] The target graph convolution network model can be a regression network model that predicts test hours using graph convolution. Graph convolution refers to a signal processing transformation on the input target feature value structure graph to extract feature information of the target feature value structure graph. The target graph convolution network model is pre-trained based on sample test task data and the initial feature structure graph. The mapping relationship between the target test feature value and the test hours can be learned through model training, thereby ensuring the accuracy of the prediction of the target graph convolution network model.

[0043] The target feature structure graph is obtained by adjusting the node connection relationship in the initial feature structure graph during the training process of the target graph convolutional network model. The nodes in the initial feature structure graph are target test features. The initial feature structure graph is preliminarily constructed to characterize the feature relationship graph between each target test feature. The node connection relationship in the initial feature structure graph is adjusted as the target graph convolutional network model is trained, so as to obtain the optimal target feature structure graph, thereby ensuring the training effect of the target graph convolutional network model.

[0044] Specifically, the target eigenvalue structure graph can be input into a pre-trained target graph convolutional network model to predict the test hours. The target graph convolutional network model can output the predicted target test hours, thereby quickly obtaining the target test hours corresponding to the target test task, realizing automatic prediction of the test hours, and effectively ensuring the accuracy of the test hour prediction.

[0045] The technical solution of this embodiment is to determine the target test features related to the test hours from the test features to be selected based on the sample test task data in advance, and to construct the initial feature structure diagram based on the target test features as nodes in the initial feature structure diagram. In the training process of the target graph convolutional network model, the node connection relationship in the initial feature structure diagram is adjusted to obtain the target feature value structure diagram. In the process of predicting the test hours for the target test task, the target feature value structure diagram can be determined based on the target test feature values ​​and the target feature structure diagram corresponding to the target test features in the target test task data, and the target feature value structure diagram is input into the pre-trained target graph convolutional network model to predict the test hours, and the target test hours corresponding to the target test task are obtained. By only considering the target test features related to the test hours, the situation of inaccurate time prediction caused by considering too many or too few features can be avoided, and the pre-trained target graph convolutional network model can be used to realize the automatic prediction of the test hours without manual participation, thereby improving the prediction efficiency of the test hours and effectively ensuring the prediction accuracy of the test hours.

[0046] On the basis of the above technical solution, the target graph convolutional network model may include: at least one group of graph convolutional network layers and fully connected layers. Each group of graph convolutional network layers includes: graph convolutional layers, graph pooling layers and aggregation layers. The graph convolutional network layers may be one or more groups. The more groups of graph convolutional network layers there are, the more complete the feature extraction is, but the model takes longer, so it is necessary to determine the appropriate number of groups to ensure both the model prediction accuracy and prediction efficiency. For example, the number of groups of graph convolutional network layers is two.

[0047] The graph convolution layer can be used to extract graph feature information. For example, the output of the graph convolution layer can be expressed as follows:

[0048]

[0049] Among them, h v is the output of the vth node in the graph after the graph convolution layer, σ is the activation function, b is the bias, w is the network parameter in this layer, which is determined during the model training process, and u is the uth neighbor node of the vth node in the graph. u is the output of the u-th neighbor node of the v-th node in the graph input to the graph convolutional layer, and N(v) is the set of all neighbor nodes of the v-th node in the graph; c uv is the product of the degree of the vth node and the square root of the degree of its uth neighbor node, that is,

[0050] The graph pooling layer can downsample the features of the entire graph. The graph pooling layer can be a graph pooling layer based on the self-attention mechanism, so as to obtain the most important features and further improve the accuracy of model prediction. The attention mechanism is an internal process that imitates biological observation behavior, that is, a mechanism that aligns internal experience and external sensation to increase the observation precision of some areas.

[0051] The aggregation layer can aggregate all graph features to obtain a fixed-size feature representation. For example, the output of the aggregation layer can be expressed as follows:

[0052]

[0053] Among them, s is the aggregated feature, N is the number of nodes, and x i is the feature of the i-th input to the aggregation layer in the figure, and || is the concatenation operation. The fully connected layer can fully connect all the final features to obtain the final predicted working hours.

[0054] Exemplarily, when there is only one set of graph convolutional network layers, that is, there is only one graph convolutional layer, one graph pooling layer and one aggregation layer, the target feature value structure graph is input into a pre-trained target graph convolutional network model to predict the test hours, which can include: inputting the target feature value structure graph into the graph convolutional layer for feature extraction, and inputting the extracted graph feature information into the graph pooling layer for feature downsampling to obtain the downsampled graph feature information; inputting the downsampled graph feature information into the aggregation layer for feature aggregation to obtain the aggregated graph feature information; inputting the aggregated graph feature information into the fully connected layer for full connection processing to obtain the target test hours.

[0055] Exemplarily, when there are two groups of graph convolutional network layers, that is, a first graph convolutional layer, a first graph pooling layer, a first aggregation layer, a second graph convolutional layer, a second graph pooling layer, and a second aggregation layer, inputting the target feature value structure graph into a pre-trained target graph convolutional network model to predict the test hours may include:

[0056] The target eigenvalue structure graph is input into the first graph convolution layer for feature extraction, and the extracted first graph feature information is input into the first graph pooling layer for feature downsampling to obtain the downsampled second graph feature information; the second graph feature information is input into the first aggregation layer for feature aggregation to obtain the aggregated third graph feature information; the second graph feature information is input into the second graph convolution layer for feature extraction, and the extracted fourth graph feature information is input into the second graph pooling layer for feature downsampling to obtain the downsampled fifth graph feature information; the fifth graph feature information is input into the second aggregation layer for feature aggregation to obtain the aggregated sixth graph feature information; the third graph feature information and the sixth graph feature information are added, and the added seventh graph feature information is input into the fully connected layer for full connection processing to obtain the target test working hours.

[0057] Specifically, Figure 2 A schematic diagram of the structure of the target graph convolutional network model is given when there are two groups of graph convolutional network layers. Figure 2 The target graph convolutional network model in can predict the test time more accurately and efficiently. It should be noted that when there are three or more graph convolutional network layers, Figure 2 By nesting two graph convolutional network layers in , three or more groups of graph convolutional network layers are nested to construct the corresponding target graph convolutional network model.

[0058] Figure 3 A flowchart of another test time prediction method provided by an embodiment of the present invention. Based on the above embodiments, this embodiment optimizes the step of "determining the target test feature related to the test time from the test features to be selected based on the sample test task data", and on this basis, the construction process of constructing the initial feature structure diagram based on the target test feature is also described in detail. The explanations of the terms that are the same or corresponding to the above embodiments are not repeated here.

[0059] See also Figure 3 Another test time prediction method provided in this embodiment specifically includes the following steps:

[0060] S310: Based on the sample test task data, determine the feature value type, sample test feature value and actual test time corresponding to each test feature to be selected.

[0061] Among them, the test features to be selected may include but are not limited to: the number of test cases, whether test data needs to be prepared, whether there is a good test environment, whether there are external dependencies, whether automated testing is performed, whether the test requirements are clear, development time, whether the user interaction layer is changed, whether the business component layer is changed, whether the service layer is changed, whether the basic dependency layer is changed, and personnel ratings.

[0062] Among them, the number of test cases will directly affect the length of test time. The more test cases, the longer the execution time. The fewer the test cases, the shorter the execution time. Whether it is necessary to prepare test data, such as test accounts, test orders and other data. If the test data is not prepared, the test process sometimes cannot be executed well, and the test results will be inaccurate. The test environment is the basis and guarantee of testing. A good test environment can improve the efficiency of testing. External dependencies are objects in the system. The tested code interacts with this object, but cannot control this object. Therefore, the test requirements of external dependencies will have a certain impact on the test time, and testers are required to take certain methods to verify. Automated testing can complete the coverage of more test cases in the same time and improve the test efficiency. If the demand testing process can use automated testing to replace manual testing, the test time will be greatly reduced. Whether the test requirements are clear not only affects the progress of test case writing, but also affects the organization and efficiency of subsequent testing processes. The length of development time has a certain impact on the quality of product functions. If the development time is short, some demand logic may not be fully considered and product function points may not be perfect. In the testing process, there will be more errors and regression testing time, resulting in longer testing hours. During demand development, changes will be made to different levels in the product architecture, and changes at different code levels will have different impacts on code quality. The product architecture can be divided into 4 layers, from top to bottom: user interaction layer, business component layer, service layer, and basic dependency layer. The deeper the layer, the more and more complex the code logic modifications involved, and the greater the possibility of having more impact on the quality of the product. Personnel ratings can include: product personnel ratings, R&D personnel ratings, and tester ratings. In a demand testing process, the maturity of the product personnel, R&D personnel, and testers involved may also affect the testing hours.

[0063] Among them, the feature value type corresponding to the test feature to be selected may include a numerical type or a category type. Among them, the numerical type may refer to the feature value having a numerical value, such as the number of test cases, development time and personnel rating, the three feature value types corresponding to the test features to be selected are numerical types. The category type may refer to the feature value range being yes or no, that is, a Boolean value of 0 or 1, for example, whether test data needs to be prepared, whether there is a good test environment, whether there are external dependencies, whether to automate testing, whether to change the user interaction layer, whether to change the business component layer, whether to change the service layer and whether to change the basic dependency layer. These feature value types corresponding to the test features to be selected are category types.

[0064] Specifically, a plurality of sample test tasks are obtained, and for each sample test task, a sample test feature value corresponding to each test feature to be selected and actual test hours of the sample test task are obtained from the sample test task data.

[0065] It should be noted that the candidate test features are test features that may affect the test time and are selected based on experience. They are subjective to a certain extent, so it is necessary to use more scientific methods to analyze the data, obtain the correlation between each candidate test feature and the test time, and obtain the target test features that mainly affect the test time.

[0066] S320, based on the feature value type, sample test feature value and actual test time corresponding to each test feature to be selected, detect the correlation between each test feature to be selected and the test time, and determine the target test feature from the test features to be selected based on the correlation result.

[0067] Specifically, based on different feature value types, different data analysis methods can be used to detect the correlation between each candidate test feature and the test time, so as to more accurately determine the target test feature from the candidate test features.

[0068] Exemplarily, S320 may include: if the feature value type corresponding to the test feature to be selected is a numerical type, then based on the sample test feature value and actual test hours corresponding to the test feature to be selected, a scatter plot between the test feature to be selected and the test hours is determined; if it is determined based on the scatter plot that the test feature to be selected is positively correlated with the test hours, then the test feature to be selected is determined to be the target test feature.

[0069] Specifically, a scatter plot can be used to perform correlation analysis on the numerical test feature to determine whether the test feature is positively correlated with the test time, that is, whether the test time increases with the increase of the test feature value. If it is positively correlated, the test feature is used as the target test feature. For example, when the test feature is the number of test cases, a corresponding scatter plot can be drawn based on the number of test cases and the actual test time in each sample test task, such as Figure 4 As shown. Figure 4 It can be seen that there is a positive correlation between the number of test cases and the test time, that is, the number of test cases does affect the test time, so the number of test cases is used as a target test feature.

[0070] Exemplarily, S320 may also include: if the feature value type corresponding to the test feature to be selected is a category type, then based on the sample test feature value and actual test hours corresponding to the test feature to be selected, a box plot between the test feature to be selected and the test hours is determined; if it is determined based on the box plot that the difference in test hours corresponding to the first category of the test feature to be selected and the test hours corresponding to the second category is greater than a preset difference, then the test feature to be selected is determined to be the target test feature.

[0071] Among them, the first category and the second category are two values ​​of the category-type test feature to be selected, that is, 1 or 0. The preset difference is a pre-set minimum working time difference corresponding to the two categories of the test feature to be selected that will affect the test time. Specifically, a box plot can be used to perform a correlation analysis on the category-type test feature to be selected to determine whether the test feature to be selected is related to the test time, that is, whether the test time difference between the test time corresponding to the first category of the test feature to be selected and the test time corresponding to the second category is greater than the preset difference. If so, the test feature to be selected is the target test feature. For example, when the test feature to be selected is whether test data needs to be prepared, a corresponding box plot can be drawn based on whether test data needs to be prepared and the actual test time in each sample test task, such as Figure 5 As shown. Figure 5 It can be seen that the test time required to prepare test data is significantly higher than the test time required without accurate test data, that is, whether test data needs to be prepared does affect the test time, so whether test data needs to be prepared is used as a target test feature as a candidate test feature.

[0072] After analyzing all candidate test features using scatter plots and box plots, the screened target test features may include: the number of test cases, whether test data needs to be prepared, whether there are external dependencies, whether automated testing is required, whether the test requirements are clear, whether the service layer needs to be changed, whether the basic dependency layer needs to be changed, and development time.

[0073] S330: Classify the target test features, determine the target test feature set under each category and the important target test features in each target test feature set.

[0074] Specifically, all the filtered target test features can be classified based on the usage stage to which each target test feature belongs, and a target test feature set under the test stage, a target test feature set under the research and development stage, and a target test feature set under the product stage can be obtained. For example, the target test feature set under the test stage includes: the number of test cases, whether to automate the test, whether to prepare test data, and whether there are external dependencies. The target test feature set under the research and development stage includes: whether to change the basic dependency layer, whether to change the service layer, and the development time. The target test feature set under the product stage includes: whether the test requirements are clear. For the target test feature set under each category, a target test feature can be randomly selected as a preliminary important target test feature. For example, the important target test feature in the target test feature set under the test stage is: whether to automate the test. The important target test feature in the target test feature set under the research and development stage is: whether to change the basic dependency layer. The important target test feature in the target test feature set under the product stage is: whether the test requirements are clear.

[0075] S340, connecting each important target test feature as a node in pairs, and connecting other target test features in each target test feature set as nodes to the nodes corresponding to the important target test features in the set, to construct an initial feature structure diagram.

[0076] Specifically, Figure 6 A schematic diagram of an initial feature structure diagram is given. Figure 6 As shown, first connect the three nodes of whether to automate the test, whether to change the basic dependency layer, and whether the test requirements are clear, then connect the three nodes of the number of test cases, whether to prepare test data, and whether there are external dependencies to the node of whether to automate the test, and connect the two nodes of whether to change the service layer and development time to the node of whether to change the basic dependency layer, so as to construct the initial feature structure diagram. It should be noted that based on actual needs and model training, the edge features in the initial feature structure diagram can be left unassigned.

[0077] S350: Perform training based on the sample test task data and the initial feature structure graph to obtain a target graph convolutional network model.

[0078] Specifically, the sample feature value structure diagram can be determined based on the sample test task data and the initial feature structure diagram, and the sample feature value structure diagram can be input into the target graph convolutional network model to be trained, and the node connection relationship in the initial feature structure diagram can be adjusted during the training process, so as to optimize the correlation between the target test features, improve the model training effect, ensure the accuracy of the test time prediction, solve the problem that the time evaluation cannot be performed due to insufficient experience, and then solve the problem of low accuracy and excessive uncertainty of manual evaluation of test time. In this embodiment, the K-fold cross-validation method can be used to verify the model performance. In order to verify the adequacy of the verification, K can be set to 5, that is, the entire sample test task data set is randomly divided into 5 parts, and one of them is taken as the verification set each time without repetition, and the other four are used as the training set to train the model, and then the accuracy of the model on the verification set is calculated. Finally, the average of the accuracies of 5 times is taken to obtain the final prediction accuracy, thereby effectively ensuring the accuracy of the test time prediction.

[0079] Exemplarily, the training process of the target graph convolutional network model may include: determining the sample feature value structure diagram based on the sample test feature values ​​and the initial feature structure diagram corresponding to the target test features in the sample test task data; inputting the sample feature value structure diagram into the graph convolutional network model to be trained to predict the test hours, and obtain the predicted test hours corresponding to the sample test task; determining the training error based on the predicted test hours and actual test hours corresponding to the sample test task; back-propagating the training error to the graph convolutional network model to be trained, adjusting the network parameters in the graph convolutional network model to be trained and the node connection relationship in the initial feature structure diagram, until the training is terminated when the preset convergence conditions are met, and the target graph convolutional network model and the target feature structure diagram are obtained.

[0080] Specifically, the sample test feature value corresponding to the target test feature in the sample test task data can be obtained, and each sample test feature value can be used as a node, and each sample test feature value can be connected according to the connection relationship between each target test feature in the initial feature structure diagram to construct a sample feature value structure diagram with the same connection relationship; alternatively, each target test feature in the initial feature structure diagram can be replaced with the corresponding sample test feature value to more quickly obtain a sample feature value structure diagram consistent with the structure of the initial feature structure diagram. The sample feature value structure diagram is input into the graph convolutional network model to be trained to predict the test hours, and the predicted test hours corresponding to the output sample test task are obtained. The training error can be determined based on the objective function of the model training according to the predicted test hours and the actual test hours corresponding to the sample test task. The objective function can be: Among them, M refers to the number of sample test tasks in the same training batch, y j and j ’They refer to the actual test hours and predicted test hours corresponding to the sample test task, respectively. The training error is back-propagated to the graph convolutional network model to be trained, and the network parameters in the graph convolutional network model to be trained and the node connection relationship in the initial feature structure graph are adjusted until the training ends when the preset convergence conditions are met. For example, when the number of iterations reaches the preset number, or when the change in the training error tends to be stable, the model training is determined to be completed, and the current graph convolutional network model is determined as the target graph convolutional network model and the current feature structure graph is determined as the target feature structure graph. Through multiple training and cross-validation, the most suitable parameters are selected to obtain the target graph convolutional network model and target feature structure graph with prediction accuracy that meets the requirements.

[0081] Exemplarily, the target graph convolutional network model has the characteristics of simple and fast training convergence, low time and space complexity, and can be fine-tuned and updated at any time. The characteristics of simple and fast training convergence ensure stability, and can output stable results when dealing with man-hour prediction tasks with large differences. Low time and space complexity can save computing resources and time in initial deployment and later fine-tuning. The feature of being able to be fine-tuned and updated at any time enables continuous learning capabilities. When encountering a major update to the test task version, the previously learned network model may not be fully applicable. The new test task data can be used to continue to optimize the model on the original basis and update it at any time to adapt to changes in test versions and technologies.

[0082] S360, obtaining a target test feature value corresponding to a target test feature in the target test task data, wherein the target test feature is a test feature related to test working hours that is determined in advance from among the test features to be selected based on the sample test task data.

[0083] S370. Determine a target feature value structure diagram based on the target test feature value and the target feature structure diagram.

[0084] S380: Input the target feature value structure graph into a pre-trained target graph convolutional network model to predict the test hours, and obtain the target test hours corresponding to the target test task.

[0085] The technical solution of this embodiment detects the correlation between each candidate test feature and the test hours based on the feature value type, sample test feature value and actual test hours corresponding to each candidate test feature, and determines the target test feature from the candidate test features based on the relevant results, so as to more accurately obtain the important test features most relevant to the test hours, and construct an initial feature structure graph based on the important test features, perform model training based on the initial feature structure graph, and obtain a target graph convolutional network model, so as to perform learning and training based on the test features that actually have an impact on the test hours, thereby further ensuring the prediction accuracy of the target graph convolutional network model.

[0086] The following is an embodiment of a test time prediction device provided in an embodiment of the present invention. The device and the test time prediction method of the above-mentioned embodiments belong to the same inventive concept. For details not described in detail in the embodiment of the test time prediction device, reference can be made to the embodiment of the above-mentioned test time prediction method.

[0087] Figure 7 This is a schematic diagram of the structure of a test time prediction device provided by an embodiment of the present invention. This embodiment is applicable to the situation of predicting the test time of software. Figure 7 As shown, the device specifically includes: a target test characteristic value acquisition module 710, a target characteristic value structure diagram determination module 720 and a test man-hour prediction module 730.

[0088] Among them, the target test feature value acquisition module 710 is used to obtain the target test feature value corresponding to the target test feature in the target test task data, wherein the target test feature is a test feature related to the test time determined in advance from the candidate test features based on the sample test task data; the target feature value structure diagram determination module 720 is used to determine the target feature value structure diagram based on the target test feature value and the target feature structure diagram; the test time prediction module 730 is used to input the target feature value structure diagram into the pre-trained target graph convolutional network model to predict the test time, and obtain the target test time corresponding to the target test task; wherein the target feature structure diagram is obtained by adjusting the node connection relationship in the initial feature structure diagram during the training process of the target graph convolutional network model, and the nodes in the initial feature structure diagram are the target test features.

[0089] The technical solution of this embodiment is to determine the target test features related to the test hours from the test features to be selected based on the sample test task data in advance, and to construct the initial feature structure diagram based on the target test features as nodes in the initial feature structure diagram. In the training process of the target graph convolutional network model, the node connection relationship in the initial feature structure diagram is adjusted to obtain the target feature value structure diagram. In the process of predicting the test hours for the target test task, the target feature value structure diagram can be determined based on the target test feature values ​​and the target feature structure diagram corresponding to the target test features in the target test task data, and the target feature value structure diagram is input into the pre-trained target graph convolutional network model to predict the test hours, and the target test hours corresponding to the target test task are obtained. By only considering the target test features related to the test hours, the situation of inaccurate time prediction caused by considering too many or too few features can be avoided, and the pre-trained target graph convolutional network model can be used to realize the automatic prediction of the test hours without manual participation, thereby improving the prediction efficiency of the test hours and effectively ensuring the prediction accuracy of the test hours.

[0090] Optionally, the device further comprises:

[0091] A feature value type determination module is used to determine the feature value type, sample test feature value and actual test time corresponding to each candidate test feature based on sample test task data;

[0092] The target test feature determination module is used to detect the correlation between each candidate test feature and the test time based on the feature value type, sample test feature value and actual test time corresponding to each candidate test feature, and determine the target test feature from the candidate test features based on the correlation results.

[0093] Optionally, the target test feature determination module is specifically used to:

[0094] If the feature value type corresponding to the test feature to be selected is a numerical type, then based on the sample test feature value and the actual test time corresponding to the test feature to be selected, a scatter plot between the test feature to be selected and the test time is determined; if it is determined based on the scatter plot that the test feature to be selected is positively correlated with the test time, then the test feature to be selected is determined to be the target test feature;

[0095] If the characteristic value type corresponding to the test feature to be selected is a category type, then based on the sample test characteristic value and the actual test hours corresponding to the test feature to be selected, a box plot between the test feature to be selected and the test hours is determined. If it is determined based on the box plot that the difference in test hours corresponding to the first category of the test feature to be selected and the test hours corresponding to the second category is greater than a preset difference, then the test feature to be selected is determined to be the target test feature.

[0096] Optionally, the device further comprises:

[0097] The initial feature structure diagram construction module is used to classify the target test features, determine the target test feature set under each category and the important target test features in each target test feature set; connect each of the important target test features as nodes in pairs, and connect other target test features in each target test feature set as nodes to the nodes corresponding to the important target test features in the set to construct an initial feature structure diagram.

[0098] Optionally, the target graph convolutional network model includes: at least one group of graph convolutional network layers and fully connected layers, wherein each group of graph convolutional network layers includes a graph convolutional layer, a graph pooling layer and an aggregation layer, and the graph pooling layer is a graph pooling layer based on a self-attention mechanism.

[0099] Optionally, when there are two groups of graph convolutional network layers, the test man-hour prediction module 730 is specifically used to:

[0100] The target eigenvalue structure graph is input into the first graph convolution layer for feature extraction, and the extracted first graph feature information is input into the first graph pooling layer for feature downsampling to obtain the downsampled second graph feature information; the second graph feature information is input into the first aggregation layer for feature aggregation to obtain the aggregated third graph feature information; the second graph feature information is input into the second graph convolution layer for feature extraction, and the extracted fourth graph feature information is input into the second graph pooling layer for feature downsampling to obtain the downsampled fifth graph feature information; the fifth graph feature information is input into the second aggregation layer for feature aggregation to obtain the aggregated sixth graph feature information; the third graph feature information and the sixth graph feature information are added, and the added seventh graph feature information is input into the fully connected layer for full connection processing to obtain the target test working hours.

[0101] Optionally, the device further comprises:

[0102] A model training module is used to determine a sample feature value structure diagram based on the sample test feature values ​​and the initial feature structure diagram corresponding to the target test features in the sample test task data; input the sample feature value structure diagram into the graph convolutional network model to be trained to predict the test hours, and obtain the predicted test hours corresponding to the sample test task; determine the training error based on the predicted test hours and actual test hours corresponding to the sample test task; backpropagate the training error to the graph convolutional network model to be trained, adjust the network parameters in the graph convolutional network model to be trained and the node connection relationship in the initial feature structure diagram, until the training is terminated when the preset convergence conditions are met, and obtain the target graph convolutional network model and the target feature structure diagram.

[0103] Optionally, the target test characteristics include: the number of test cases, whether test data needs to be prepared, whether there are external dependencies, whether automated testing is performed, whether the test requirements are clear, whether the service layer needs to be changed, whether the basic dependency layer needs to be changed, and development time.

[0104] The test time prediction device provided in the embodiment of the present invention can execute the test time prediction method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the test time prediction method.

[0105] It is worth noting that in the embodiment of the above-mentioned test time prediction device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0106] Figure 8 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Figure 8 A block diagram of an exemplary electronic device 12 suitable for use in implementing embodiments of the present invention is shown. Figure 8 The electronic device 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0107] like Figure 8 As shown, the electronic device 12 is in the form of a general purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that connects various system components (including the system memory 28 and the processing unit 16).

[0108] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.

[0109] The electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 12, including volatile and non-volatile media, removable and non-removable media.

[0110] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 8 not shown, usually called a "hard drive"). Although Figure 8 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The system memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.

[0111] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28, such program modules 42 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. Program modules 42 generally perform the functions and / or methods of the embodiments described herein.

[0112] The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), may communicate with one or more devices that enable a user to interact with the electronic device 12, and / or may communicate with any device that enables the electronic device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the electronic device 12 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 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 via a bus 18. 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 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0113] The processing unit 16 executes various functional applications and data processing by running the program stored in the system memory 28, for example, implementing a test time prediction method provided by the embodiment of the present invention, the method comprising:

[0114] Obtaining a target test feature value corresponding to a target test feature in the target test task data, wherein the target test feature is a test feature related to test working hours that is determined in advance from among the test features to be selected based on the sample test task data;

[0115] Determine a target feature value structure diagram based on the target test feature value and the target feature structure diagram;

[0116] Input the target feature value structure graph into a pre-trained target graph convolutional network model to predict the test hours, and obtain the target test hours corresponding to the target test task;

[0117] Among them, the target feature structure graph is obtained by adjusting the node connection relationship in the initial feature structure graph during the training process of the target graph convolutional network model, and the nodes in the initial feature structure graph are the target test features.

[0118] Of course, those skilled in the art can understand that the processor can also implement the technical solution of the test time prediction method provided by any embodiment of the present invention.

[0119] This embodiment provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the steps of the method for predicting test time provided in any embodiment of the present invention are implemented. The method includes:

[0120] Obtaining a target test feature value corresponding to a target test feature in the target test task data, wherein the target test feature is a test feature related to test working hours that is determined in advance from among the test features to be selected based on the sample test task data;

[0121] Determine a target feature value structure diagram based on the target test feature value and the target feature structure diagram;

[0122] Input the target feature value structure graph into a pre-trained target graph convolutional network model to predict the test hours, and obtain the target test hours corresponding to the target test task;

[0123] Among them, the target feature structure graph is obtained by adjusting the node connection relationship in the initial feature structure graph during the training process of the target graph convolutional network model, and the nodes in the initial feature structure graph are the target test features.

[0124] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can 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 computer-readable storage media include: an electrical connection with one or more wires, a portable computer 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. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0125] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. 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. Computer-readable signal media may also be any computer-readable medium other than a computer-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.

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

[0127] Computer program code for performing the operations of the present invention may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0128] It should be understood by those skilled in the art that the modules or steps of the present invention described above can be implemented by a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, optionally, they can be implemented by a program code executable by a computer device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0129] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A method for predicting test time, characterized in that: include: Obtaining a target test feature value corresponding to a target test feature in the target test task data, wherein the target test feature is a test feature related to test working hours that is determined in advance from among the test features to be selected based on the sample test task data; Determine a target feature value structure diagram based on the target test feature value and the target feature structure diagram; Input the target feature value structure graph into a pre-trained target graph convolutional network model to predict the test hours, and obtain the target test hours corresponding to the target test task; Among them, the target feature structure graph is obtained by adjusting the node connection relationship in the initial feature structure graph during the training process of the target graph convolutional network model, and the nodes in the initial feature structure graph are the target test features.

2. The method according to claim 1, characterized in that Based on the sample test task data, target test features related to test time are determined from the candidate test features, including: Based on the sample test task data, determine the feature value type, sample test feature value and actual test time corresponding to each candidate test feature; Based on the feature value type, sample test feature value and actual test time corresponding to each candidate test feature, the correlation between each candidate test feature and the test time is detected, and the target test feature is determined from the candidate test features based on the correlation result.

3. The method according to claim 2, characterized in that Based on the feature value type, sample test feature value and actual test time corresponding to each candidate test feature, the correlation between each candidate test feature and the test time is detected, and the target test feature is determined from the candidate test features based on the correlation results, including: If the feature value type corresponding to the test feature to be selected is a numerical type, then based on the sample test feature value and the actual test time corresponding to the test feature to be selected, a scatter plot between the test feature to be selected and the test time is determined; if it is determined based on the scatter plot that the test feature to be selected is positively correlated with the test time, then the test feature to be selected is determined to be the target test feature; If the characteristic value type corresponding to the test feature to be selected is a category type, then based on the sample test characteristic value and the actual test hours corresponding to the test feature to be selected, a box plot between the test feature to be selected and the test hours is determined. If it is determined based on the box plot that the difference in test hours corresponding to the first category of the test feature to be selected and the test hours corresponding to the second category is greater than a preset difference, then the test feature to be selected is determined to be the target test feature.

4. The method according to claim 1, characterized in that: The process of constructing the initial feature structure graph includes: Classifying the target test features, determining a target test feature set under each category and important target test features in each target test feature set; Each of the important target test features is used as a node to be connected in pairs, and other target test features in each target test feature set are used as nodes to be connected to the nodes corresponding to the important target test features in the set to construct an initial feature structure diagram.

5. The method according to claim 1, characterized in that The target graph convolutional network model includes: at least one group of graph convolutional network layers and a fully connected layer, wherein each group of graph convolutional network layers includes a graph convolutional layer, a graph pooling layer and an aggregation layer, and the graph pooling layer is a graph pooling layer based on a self-attention mechanism.

6. The method according to claim 5, characterized in that When there are two groups of graph convolutional network layers, the target feature value structure graph is input into a pre-trained target graph convolutional network model to predict the test hours, including: Inputting the target eigenvalue structure graph into the first graph convolution layer for feature extraction, and inputting the extracted first graph feature information into the first graph pooling layer for feature downsampling to obtain downsampled second graph feature information; Inputting the second graph feature information into the first aggregation layer for feature aggregation to obtain aggregated third graph feature information; Inputting the second image feature information into the second image convolution layer for feature extraction, and inputting the extracted fourth image feature information into the second image pooling layer for feature downsampling, to obtain the downsampled fifth image feature information; Inputting the fifth image feature information into the second aggregation layer for feature aggregation to obtain aggregated sixth image feature information; The third graph feature information and the sixth graph feature information are added, and the added seventh graph feature information is input into the fully connected layer for full connection processing to obtain the target test time.

7. The method according to claim 1, characterized in that The training process of the target graph convolutional network model includes: Determine a sample feature value structure diagram based on the sample test feature value corresponding to the target test feature in the sample test task data and the initial feature structure diagram; Input the sample feature value structure graph into the graph convolutional network model to be trained to predict the test hours, and obtain the predicted test hours corresponding to the sample test task; Determine the training error based on the predicted test hours and the actual test hours corresponding to the sample test tasks; The training error is back-propagated to the graph convolutional network model to be trained, and the network parameters in the graph convolutional network model to be trained and the node connection relationship in the initial feature structure graph are adjusted until the training ends when the preset convergence conditions are met, and the target graph convolutional network model and the target feature structure graph are obtained.

8. The method according to any one of claims 1 to 7, characterized in that: The target test characteristics include: the number of test cases, whether test data needs to be prepared, whether there are external dependencies, whether the test is automated, whether the test requirements are clear, whether the service layer needs to be changed, whether the basic dependency layer needs to be changed, and the development time.

9. A test time prediction device, characterized in that: include: A target test feature value acquisition module is used to acquire a target test feature value corresponding to a target test feature in target test task data, wherein the target test feature is a test feature related to test working hours determined in advance from among the test features to be selected based on the sample test task data; A target characteristic value structure diagram determining module, used to determine a target characteristic value structure diagram based on the target test characteristic value and the target characteristic structure diagram; A test time prediction module is used to input the target feature value structure graph into a pre-trained target graph convolutional network model to predict the test time and obtain the target test time corresponding to the target test task; Among them, the target feature structure graph is obtained by adjusting the node connection relationship in the initial feature structure graph during the training process of the target graph convolutional network model, and the nodes in the initial feature structure graph are the target test features.

10. An electronic device, characterized in that: The electronic device comprises: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the test man-hour prediction method according to any one of claims 1 to 8.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for predicting the test time as described in any one of claims 1 to 8 is implemented.