WO2023273177A1 - Test case processing method and apparatus, platform, and storage medium - Google Patents

Test case processing method and apparatus, platform, and storage medium Download PDF

Info

Publication number
WO2023273177A1
WO2023273177A1 PCT/CN2021/136833 CN2021136833W WO2023273177A1 WO 2023273177 A1 WO2023273177 A1 WO 2023273177A1 CN 2021136833 W CN2021136833 W CN 2021136833W WO 2023273177 A1 WO2023273177 A1 WO 2023273177A1
Authority
WO
WIPO (PCT)
Prior art keywords
matrix
test
historical
feature
cases
Prior art date
Application number
PCT/CN2021/136833
Other languages
French (fr)
Chinese (zh)
Inventor
史媛媛
卢道和
周杰
黄涛
陈文龙
袁文静
Original Assignee
深圳前海微众银行股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳前海微众银行股份有限公司 filed Critical 深圳前海微众银行股份有限公司
Publication of WO2023273177A1 publication Critical patent/WO2023273177A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/368Test management for test version control, e.g. updating test cases to a new software version
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Definitions

  • the embodiment of the present application relates to the technical field of financial technology (Fintech) data processing, and relates to but not limited to a test case processing method, a test case processing device, a test platform and a storage medium.
  • Financial technology Fetech
  • test cases in the financial system include front-end test cases and back-end test cases.
  • classification of test cases in the financial system is achieved by manual marking by testers, and the system under test in the financial system Whether the version is automatically tested depends on the experience of the tester, subjectively judging the frequency of requirement changes in the version of the system to be tested and the stability of the test case. It can be seen that the above method must rely on manual operation, at least there are problems of low efficiency and poor accuracy.
  • the embodiments of the present application provide a test case processing method, a test case processing device, a test platform, and a storage medium, so as to solve the problems that related technologies must rely on manual operations, and at least have low efficiency and poor accuracy.
  • the embodiment of this application provides a method, including:
  • n is a positive integer greater than or equal to 1 and less than or equal to N
  • N is the total number of front-end test cases in the version set of the system to be tested
  • An embodiment of the present application provides a device, including:
  • An acquisition module configured to acquire all front-end test cases in the system version set to be tested, and all front-end historical cases in each historical system version set in at least two historical system version sets;
  • a processing module configured to calculate the eigenvalues corresponding to the features in each of the front-end test cases in all the front-end test cases, and obtain the test feature matrix of the version set of the system to be tested;
  • the processing module is also used to calculate the feature value corresponding to the feature in each front-end historical case in all the front-end historical cases in the set of each historical system version, and obtain the historical feature of each historical system version set matrix;
  • the processing module is also used to perform dimensionality reduction processing on the test feature matrix based on a non-negative matrix factorization algorithm to obtain a dimensionality-reduced test feature matrix;
  • the processing module is further configured to perform dimensionality reduction processing on the historical feature matrix based on the non-negative matrix factorization algorithm, to obtain a dimensionally reduced historical feature matrix;
  • the processing module is also used to calculate the dimensionality-reduced feature of the nth front-end test case in the dimension-reduced test feature matrix and the dimensionality reduction of each front-end historical case in the dimension-reduced historical feature matrix
  • the degree of similarity of the features after is obtained similarity matrix;
  • said n is a positive integer greater than or equal to 1 and less than or equal to N, and N is the total number of front-end test cases in the described system version set to be tested;
  • the processing module is further configured to perform automated testing on all front-end test cases in the version set of the system under test when it is determined that all front-end test cases meet the automated test conditions based on the similarity matrix.
  • test platform including:
  • An embodiment of the present application provides a storage medium, which stores executable instructions, and is used to cause a processor to implement the above method when executed.
  • the test platform of this application After obtaining all front-end test cases and all front-end historical cases in the version set of the system to be tested, the test platform of this application first calculates the characteristic value corresponding to the feature in each front-end test case, and obtains the test features of the version set of the system to be tested Matrix, calculate the eigenvalues corresponding to the features in each front-end historical case, and obtain the historical feature matrix of each historical system version set; secondly, use the non-negative matrix algorithm to perform dimension reduction processing on the test feature matrix and the historical feature matrix respectively, And perform similarity processing on the test feature matrix after dimensionality reduction and the historical feature matrix after dimensionality reduction to obtain a similarity matrix, and then according to the similarity matrix, when all front-end test cases meet the automated test conditions, all front-end test cases Run automated tests.
  • this application solves the problem that related technologies must rely on manual operation and uncertainty brought by manual subjectivity, and at least has the problems of low efficiency and poor accuracy; realizes the establishment of a unified standard for the automatic execution of front-end test cases, and improves The accuracy of judgment is improved, and at the same time, it does not need to rely on manual operation, which improves the processing efficiency.
  • Fig. 1 is a schematic diagram of an optional architecture of the test platform provided by the embodiment of the present application.
  • Fig. 2 is an optional schematic flow chart of the test case processing method provided by the embodiment of the present application.
  • Fig. 3 is an optional schematic flow chart of the test case processing method provided by the embodiment of the present application.
  • Fig. 4 is an optional flowchart for training a classifier in a front-end case provided by an embodiment of the present application
  • Fig. 5 is an optional schematic flow chart of the test case processing method provided by the embodiment of the present application.
  • FIG. 6 is an optional schematic flow chart of a test case processing method provided in an embodiment of the present application.
  • Fig. 7 is an optional schematic flow chart of the test case processing method provided by the embodiment of the present application.
  • Fig. 8 is a schematic flowchart of an optional test case processing method provided by the embodiment of the present application.
  • FIG. 1 is a schematic structural diagram of a test platform 100 provided by an embodiment of the present application.
  • the test platform 100 shown in FIG. Various components in the test platform 100 are coupled together through the bus system 140 . It can be understood that the bus system 140 is used to realize connection and communication between these components.
  • the bus system 140 also includes a power bus, a control bus and a status signal bus. However, for clarity of illustration, the various buses are labeled as bus system 140 in FIG.
  • Processor 110 can be a kind of integrated circuit chip, has signal processing capability, such as general-purpose processor, digital signal processor (DSP, Digital Signal Processor), or other programmable logic device, discrete gate or transistor logic device, discrete hardware Components, etc., wherein the general-purpose processor can be a microprocessor or any conventional processor, etc.
  • DSP digital signal processor
  • DSP Digital Signal Processor
  • User interface 130 includes one or more output devices 131 that enable presentation of media content, including one or more speakers and/or one or more visual displays.
  • the user interface 130 also includes one or more input devices 132, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
  • Memory 150 may be removable, non-removable or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, and the like. Memory 150 optionally includes one or more storage devices located physically remote from processor 110 . Memory 150 includes volatile memory or nonvolatile memory, and may include both volatile and nonvolatile memory. The non-volatile memory can be read-only memory (Read Only Memory, ROM), and the volatile memory can be random access memory (Random Access Memory, RAM). The memory 150 described in the embodiment of the present application is intended to include any suitable type of memory. In some embodiments, the memory 150 is capable of storing data to support various operations, examples of which include programs, modules, and data structures, or subsets or supersets thereof, as exemplified below.
  • Operating system 151 including system programs for processing various basic system services and performing hardware-related tasks, such as framework layer, core library layer, driver layer, etc., for implementing various basic services and processing hardware-based tasks;
  • the network communication module 152 is used to reach other computing devices via one or more (wired or wireless) network interfaces 120.
  • Exemplary network interfaces 120 include: Bluetooth, Wireless Compatibility Authentication (WiFi), and Universal Serial Bus ( Universal Serial Bus, USB), etc.;
  • the input processing module 153 is configured to detect one or more user inputs or interactions from one or more of the input devices 132 and translate the detected inputs or interactions.
  • the device provided by the embodiment of the present application can be realized by software.
  • FIG. 1 shows a test case processing device 154 stored in the memory 150.
  • the test case processing device 154 can be the The test case processing device, which can be software in the form of programs and plug-ins, includes the following software modules: acquisition module 1541, processing module 1542, these modules are logical, so any combination or further split. The function of each module will be explained below.
  • the device provided in the embodiment of the present application may be implemented in hardware.
  • the device provided in the embodiment of the present application may be a processor in the form of a hardware decoding processor, which is programmed to execute the In the test case processing method provided by the embodiment, for example, the processor in the form of a hardware decoding processor can adopt one or more Application Specific Integrated Circuits (Application Specific Integrated Circuit, ASIC), DSP, Programmable Logic Device (Programmable Logic Device, PLD), Complex Programmable Logic Device (Complex Programmable Logic Device, CPLD), Field Programmable Gate Array (Field-Programmable Gate Array, FPGA) or other electronic components.
  • ASIC Application Specific Integrated Circuit
  • DSP Digital Signal Processing
  • Programmable Logic Device Programmable Logic Device
  • PLD Complex Programmable Logic Device
  • CPLD Complex Programmable Logic Device
  • Field Programmable Gate Array Field-Programmable Gate Array
  • FPGA Field-Programmable Gate Array
  • the application layer software of the new version system is the application layer software in the system under test, which is obtained by modifying a certain module in the historical version system and/or adding a certain module, which makes the web front end of the system under test often
  • the changes are relatively large, but the logic of some modules in the reused historical version system has not changed, that is, the back-end implementation has not changed.
  • the classification of the front-end and back-end in the system under test is mainly realized through manual marking by testers, and the functional verification of the web front-end of the system under test must be tested through automated scripts. Whether the functional verification of the web front-end of the test system is automatically tested mainly depends on the experience of the testers, subjectively judging the frequency of requirements changes in the version of the system under test and the stability of the test cases. It can be seen that at least there are problems of low efficiency and poor accuracy in the above method.
  • FIG. 2 is an optional flow chart of the test case processing method provided in the embodiment of the present application, which will be described in conjunction with the steps shown in FIG. 2,
  • Step 201 Acquire all front-end test cases in the system version set to be tested, and all front-end historical cases in each of the at least two historical system version sets.
  • the system to be tested is a system that tests the cases contained in the system before release
  • the historical system is a system that has been successfully released.
  • the system version to be tested can be understood as the system corresponding to the current version number
  • the historical system version can be understood as the system corresponding to the version numbers of different historical periods, and there can be multiple historical system versions.
  • developers iteratively and incrementally develop the legacy system to obtain the system under test.
  • the developer obtains the system under test by modifying a certain functional module in the historical system and/or adding a certain functional module.
  • the front-end test cases are all test cases included in the web front-end of the system to be tested, and all the test cases included in the web front-end of the system to be tested form the version set of the system to be tested; All historical cases included in the web front end of the system, and all historical cases included in the web front end of each historical system constitute each historical system version set.
  • a case can be understood as a functional module of the system front-end page.
  • a case can be a registration module of the system front-end page, and a case can also be a login module of the system front-end page.
  • the total number of front-end test cases in the system version set to be tested may be the same as or different from the total number of front-end historical cases in each of the at least two historical system version sets.
  • the total number of front-end test cases in the system version set to be tested is the same as the total number of front-end historical cases in each of the at least two historical system version sets.
  • the test platform obtains all the front-end test cases in the system version set to be tested. Further, the test platform also obtains at least two historical system version sets corresponding to the system to be tested. In each historical system version set All front-end history cases for .
  • Step 202 Calculate the eigenvalues corresponding to the features in each front-end test case in all the front-end test cases, and obtain the test feature matrix of the system version set to be tested.
  • the feature value corresponding to a feature in each front-end test case in all front-end test cases is used to represent the importance of the feature in the front-end test case.
  • the test platform can calculate the eigenvalues corresponding to the features in each front-end test case in all front-end test cases based on the word frequency-reverse file frequency algorithm, and obtain the test feature matrix of the system version set to be tested.
  • TF-IDF frequency-inverse document frequency
  • the test platform is based on the TF-IDF algorithm to calculate the feature value corresponding to the mth feature in the nth case of all front-end test cases N, and then all the features in all front-end test cases correspond to The eigenvalues of , generate the test feature matrix of the system version set under test.
  • the matrix size of the test feature matrix X of the system version set to be tested is N ⁇ M
  • n is a positive integer greater than or equal to 1 and less than or equal to N
  • N is the total number of front-end test cases in the system version set to be tested
  • m is A positive integer greater than or equal to 1 and less than or equal to N, where M is the number of features of each front-end test case.
  • Step 203 Calculate the eigenvalues corresponding to the features in each front-end historical case in all front-end historical cases in each historical system version set, and obtain the historical feature matrix of each historical system version set.
  • the feature value corresponding to the feature in each front-end historical case in all front-end historical cases in each historical system version set is used to represent the importance of the feature in the front-end historical case.
  • the total number of features in each front-end test case in all front-end test cases may be the same as or different from the total number of features in each front-end historical case in each historical system version set.
  • the total number of features in each front-end test case in all front-end test cases is the same as the total number of features in each front-end historical case in each historical system version set as an example. .
  • the test platform is based on the TF-IDF algorithm, and calculates the m-th feature of the n-th front-end historical case in all front-end historical cases N in the k-th historical system version set in at least two historical system version sets corresponding eigenvalues Then, from the eigenvalues corresponding to all the features in all front-end historical cases in the kth historical system version set, a historical feature matrix of the kth historical system version set is generated.
  • the historical feature matrix Among them, the matrix size of the historical feature matrix P k corresponding to the kth historical system version set is M ⁇ N, n is a positive integer greater than or equal to 1 and less than or equal to N, and N is the front-end historical case in each historical system version set m is a positive integer greater than or equal to 1 and less than or equal to N, and M is the number of features of each front-end historical case; k is a positive integer greater than or equal to 1 and less than or equal to K, and K is the total number of all historical system version sets.
  • step 202 and step 203 may be performed simultaneously, or step 202 and step 203 may be performed sequentially, which is not specifically limited in this application.
  • Step 204 based on the non-negative matrix factorization algorithm, perform dimensionality reduction processing on the test feature matrix to obtain a dimensionality-reduced test feature matrix.
  • the test platform calculates the eigenvalues corresponding to the features in each front-end test case in all front-end test cases based on the word frequency-reverse file frequency algorithm, and obtains the test feature matrix of the system version set to be tested.
  • the test platform performs dimensionality reduction processing on the test feature matrix through the non-negative matrix decomposition algorithm, and obtains the test feature matrix after dimensionality reduction.
  • the dimension-reduced test feature matrix is used to replace the original test feature matrix.
  • the dimension-reduced test feature matrix The feature matrix is processed, which not only reduces the storage space, but also reduces the calculation amount of computer resources.
  • the non-negative matrix factorization (Non-negative matrix factorization, NMF) algorithm is a matrix factorization method under the constraint that all elements in the matrix are non-negative numbers, that is, for a given non-negative matrix A, the NMF algorithm can find a A non-negative matrix U and a non-negative matrix V with smaller dimensions, that is, A ⁇ U ⁇ V, to obtain a dimensionally reduced non-negative matrix U.
  • NMF non-negative matrix factorization
  • Step 205 based on the non-negative matrix factorization algorithm, perform dimensionality reduction processing on the historical feature matrix to obtain a dimensionally reduced historical feature matrix.
  • the test platform calculates the feature value corresponding to the feature in each front-end historical case in all front-end historical cases in each historical system version set based on the word frequency-reverse document frequency algorithm, and obtains each historical system version set
  • the test platform uses the non-negative matrix factorization algorithm to reduce the dimensionality of the historical feature matrix to obtain the historical feature matrix after dimensionality reduction.
  • the historical feature matrix after dimensionality reduction is used to replace the original historical feature matrix.
  • the historical feature matrix after dimensionality reduction The feature matrix is processed, which not only reduces the storage space, but also reduces the calculation amount of computer resources.
  • step 204 and step 205 may be performed simultaneously, and step 204 and step 205 may also be performed sequentially, which is not specifically limited in this application.
  • Step 206 calculate the similarity between the dimensionality-reduced features of the nth front-end test case in the dimension-reduced test feature matrix and the dimension-reduced features of each front-end historical case in the dimension-reduced historical feature matrix, and obtain similarity degree matrix.
  • n is a positive integer greater than or equal to 1 and less than or equal to N, and N is the total number of front-end test cases in the system version set to be tested.
  • the test platform performs dimensionality reduction processing on the test feature matrix based on the non-negative matrix decomposition algorithm, obtains the dimensionality-reduced test feature matrix, and performs dimensionality reduction processing on the historical feature matrix based on the non-negative matrix decomposition algorithm , when the dimensionality-reduced historical feature matrix is obtained, calculate the dimensionality-reduced feature of the nth front-end test case in the dimension-reduced test feature and the dimensionality reduction of each front-end historical case in the dimensionality-reduced historical feature matrix
  • the similarity of the final features is obtained to obtain a similarity matrix, so that the test platform can judge whether all the front-end test cases in the system version set under test meet the automated test conditions based on the similarity matrix.
  • Step 207 based on the similarity matrix, when it is determined that all front-end test cases meet the automated test conditions, perform automated tests on all front-end test cases in the system version set to be tested.
  • the automated test condition is the condition that the front-end test case in the system version set to be tested can use the automated script to perform the automated test.
  • the test platform calculates the dimensionality-reduced features of the nth front-end test case in the dimension-reduced test feature matrix and the dimension-reduced features of each front-end historical case in the dimension-reduced historical feature matrix In the case of obtaining the similarity matrix, based on the similarity matrix, when it is determined that all front-end test cases meet the automated test conditions, all front-end test cases in the system version set to be tested are automatically tested through automated scripts.
  • test case processing method After the test platform obtains all front-end test cases and all front-end historical cases in the system version set to be tested, first, calculates the feature value corresponding to the feature in each front-end test case, Obtain the test feature matrix of the system version set to be tested, calculate the eigenvalues corresponding to the features in each front-end historical case, and obtain the historical feature matrix of each historical system version set; secondly, through the non-negative matrix algorithm, the test feature matrix and Dimensionality reduction processing is performed on the historical feature matrix, and the similarity processing is performed on the reduced test feature matrix and the reduced historical feature matrix to obtain a similarity matrix, and then according to the similarity matrix, it is determined that all front-end test cases meet the requirements of automation When testing conditions, automate tests for all front-end test cases.
  • this application solves the problem that related technologies must rely on manual operation and uncertainty brought by manual subjectivity, and at least has the problems of low efficiency and poor accuracy; realizes the establishment of a unified standard for the automatic execution of front-end test cases, and improves The accuracy of judgment is improved, and at the same time, it does not need to rely on manual operation, which improves the processing efficiency.
  • FIG. 3 is an optional schematic flowchart of the test case processing method provided in the embodiment of the present application, which will be described in conjunction with the steps shown in FIG. 3,
  • Step 301 Obtain all test cases in the version set of the system to be tested.
  • Step 302 Input all the test cases in the version set of the system under test into the trained classifier, and obtain the front-end test cases in the version set of the system under test output by the trained classifier.
  • all test cases in the system version set to be tested include front-end test cases and back-end test cases.
  • the trained classifier is used to classify all the test cases in the version set of the system under test to obtain the front-end test cases among all the test cases in the version set of the system under test.
  • a classifier is a method of data mining. The classifier can map the data records in the database to one of the given categories, so that it can be applied to data prediction.
  • a classifier is a general term for methods for classifying samples in data mining. Classification methods include algorithms such as decision trees, logistic regression, naive Bayesian, and neural networks. Classification methods also include support vector machines (support vector machines, SVM) algorithm.
  • the test platform obtains all marked front-end historical cases and back-end historical cases in each historical system version set in at least two historical system version sets as a training sample set Afterwards, the test platform uses the TF-IDF method to calculate the eigenvalues corresponding to each feature in the front-end historical cases in each historical system version set in at least two historical system version sets, and the corresponding eigenvalues for each feature in the back-end historical cases eigenvalues, so as to obtain the training sample feature matrix. The test platform trains the classifier through the training sample feature matrix to obtain a trained classifier.
  • SVM is used as an example to illustrate.
  • the test platform uses SVM for classification training.
  • SVM is a binary classification model, which mainly looks for the classifier with the largest interval in the feature space, combined with the kernel function , can classify nonlinear features, and the actual implementation can be converted into a problem of solving convex quadratic programming.
  • the optimal solution of the Lagrangian parameters can be obtained corresponding Take the classification decision function as:
  • b is the parameter to confirm the classification decision function corresponding to each sample
  • the exponential kernel function
  • is the distance between features
  • l is the hyperparameter of the kernel function.
  • the SVM classifier corresponding to the exponential kernel function is a binary classifier of the exponential function, then the final classification decision function is Based on this, the sample set is trained to obtain the final classifier.
  • the test platform uses the TF-IDF method to calculate each test case in all the test cases in the system version set to be tested.
  • the eigenvalue corresponding to a feature is obtained to obtain the test feature matrix, and the test feature matrix is input into the trained classifier to obtain the front-end test cases in the version set of the system under test output by the trained classifier.
  • the test platform inputs all test cases in the version set of the system under test into the trained classifier, and obtains the front end in the version set of the system under test output by the trained classifier.
  • the test cases pass the obtained front-end test cases through the jieba model, traverse each front-end test case, and mark the traversed front-end test cases as "front-end".
  • front-end and back-end test cases are automatically classified, freeing manpower, saving labor costs, reducing the risk of misclassification caused by manual marking, and improving processing efficiency.
  • the test platform after the test platform marks the front-end test cases and the back-end test cases in the version set of the system to be tested, in order to improve the classification accuracy of the classifier, the test platform will use the version of the system to be tested
  • the marked front-end test cases and back-end test cases in the collection are re-added to the training sample set, and the classifier is continuously trained, so that the classifier can classify the front-end test cases more accurately and quickly.
  • Step 303 Obtain all front-end historical cases in each historical system version set in at least two historical system version sets.
  • Step 304 Calculate the eigenvalues corresponding to the features in each front-end test case in all the front-end test cases, and obtain the test feature matrix of the system version set to be tested.
  • Step 305 Calculate the eigenvalues corresponding to the features in each front-end historical case in all front-end historical cases in each historical system version set, and obtain the historical feature matrix of each historical system version set.
  • Step 306 based on the non-negative matrix factorization algorithm, perform dimensionality reduction processing on the test feature matrix to obtain a dimensionality-reduced test feature matrix.
  • step 306 is based on the non-negative matrix factorization algorithm to perform dimensionality reduction processing on the test feature matrix to obtain the dimensionality-reduced test feature matrix, which can be performed through steps 401 to 403 shown in FIG. 5; or steps 401 to 403.
  • Step 401 Decompose the test feature matrix through a non-negative matrix factorization algorithm based on the determined feature numbers after dimension reduction of the test feature matrix to obtain a test projection matrix and a test fundamental matrix.
  • the value range of the test platform based on the feature number S after dimensionality reduction is Select a positive integer S to determine the feature number S after dimension reduction, and decompose the test feature matrix X through the non-negative matrix decomposition algorithm, and randomly generate the test projection matrix W1 and the test basic matrix B1.
  • the size of the test projection matrix W1 is N ⁇ S
  • the size of the test fundamental matrix B1 is S ⁇ M.
  • Step 402. Obtain a first product matrix obtained by multiplying the test projection matrix and the test fundamental matrix.
  • Step 403 If the first difference matrix obtained by subtracting the first product matrix from the test feature matrix conforms to the difference threshold matrix, determine the test projection matrix corresponding to the first difference matrix as the reduced-dimensional test feature matrix.
  • the difference threshold matrix is used to determine the difference matrix between the test feature matrix and the first product matrix obtained by multiplying the test projection matrix and the test fundamental matrix.
  • the value of each element in the difference threshold matrix may be 10 -6 .
  • the test platform decomposes the test feature matrix X through the non-negative matrix decomposition algorithm based on the determined feature number S after dimensionality reduction of the test feature matrix, and obtains the test projection matrix W1 and the test basic matrix B1 , to obtain the first product matrix Q1 obtained by multiplying the test projection matrix W1 and the test fundamental matrix B1.
  • the test projection matrix W1 corresponding to the first difference matrix E1 is the test feature matrix after dimensionality reduction
  • the test feature matrix after dimensionality reduction The size of is N ⁇ S.
  • Step 404 If the first difference matrix obtained by subtracting the first product matrix from the test feature matrix does not conform to the difference threshold matrix, adjust each element in the test projection matrix through the projection matrix adjustment model to obtain the adjusted test projection matrix.
  • the projection matrix adjustment model is:
  • W' ns is the element in row n and column s in the adjusted test projection matrix
  • W is the test projection matrix
  • W ns is the element in row n and column s in the test projection matrix
  • X is the test feature matrix
  • B is the test fundamental matrix
  • B T is the transpose matrix of the test fundamental matrix
  • (XB T ) ns is the nth row s of the matrix obtained by multiplying the test feature matrix X and the transpose matrix B T of the test fundamental matrix
  • the elements of the column, (WBB T ) ns are the elements of the nth row and the sth column in the matrix obtained by multiplying the test projection matrix W, the test fundamental matrix B and the transpose matrix B T of the test fundamental matrix.
  • the test platform determines that the first difference matrix E1 obtained by subtracting the first product matrix Q1 from the test feature matrix X does not meet the difference threshold matrix E, and adjusts the model for each of the test projection matrix W1 through the projection matrix. One element is adjusted to obtain the adjusted test projection matrix W11.
  • Step 405 Adjust each element in the test fundamental matrix through the fundamental matrix adjustment model to obtain an adjusted test fundamental matrix.
  • the basic matrix adjustment model is:
  • B'sm is the element of the sth row and the mth column in the adjusted test fundamental matrix
  • B is the test fundamental matrix
  • B sm is the element of the sth row and the mth column in the test fundamental matrix
  • X is the test feature matrix
  • W is the test projection matrix
  • W T is the transpose matrix of the test projection matrix
  • (W T X) sm is the matrix obtained by multiplying the transpose matrix W T of the test projection matrix by the test feature matrix X
  • the elements in column m, (W T WB ) sm are the elements in row s and column m in the matrix obtained by multiplying the transposition matrix W T of the test projection matrix, the test projection matrix W and the test fundamental matrix B.
  • the test platform adjusts each element in the basic projection matrix B1 through the basic matrix adjustment model to obtain the adjusted test basic matrix B11.
  • Step 406 Obtain a second product matrix obtained by multiplying the adjusted test projection matrix and the adjusted test fundamental matrix.
  • Step 407 If the second difference matrix obtained by subtracting the second product matrix from the test feature matrix conforms to the difference threshold matrix, determine that the adjusted test projection matrix corresponding to the second difference matrix is the reduced-dimensional test feature matrix.
  • the test platform obtains the second product matrix Q2 obtained by multiplying the adjusted test projection matrix W11 and the adjusted test fundamental matrix B11;
  • the difference matrix E2 conforms to the difference threshold matrix E. Since the test platform needs to find the test projection matrix corresponding to the difference threshold matrix E, it is the test feature matrix after dimensionality reduction. At this time, because the second difference matrix E2 satisfies the condition, then Determine the adjusted test projection matrix W11 corresponding to the second difference matrix E2 as the test feature matrix after dimensionality reduction
  • Step 408 If the second difference matrix obtained by subtracting the second product matrix from the test feature matrix does not conform to the difference threshold matrix, adjust each element in the adjusted test projection matrix through the projection matrix adjustment model to obtain a new adjustment After the test projection matrix.
  • Step 409 Adjust each element in the adjusted test fundamental matrix through the fundamental matrix adjustment model to obtain a new adjusted test fundamental matrix.
  • Step 410 Obtain a third product matrix obtained by multiplying the newly adjusted test projection matrix and the newly adjusted test fundamental matrix.
  • Step 411 If the third difference matrix obtained by subtracting the third product matrix from the test feature matrix conforms to the difference threshold matrix, determine that the newly adjusted test projection matrix corresponding to the third difference matrix is the reduced-dimensional test feature matrix.
  • the test platform determines that the second difference matrix E2 obtained by subtracting the second product matrix Q2 from the test feature matrix X does not meet the difference threshold matrix E, and the adjusted test projection matrix is adjusted by the projection matrix adjustment model Each element in W11 is adjusted to obtain the newly adjusted test projection matrix W12; secondly, the test platform adjusts each element in the adjusted test basic matrix B11 through the basic matrix adjustment model to obtain the newly adjusted test The basic matrix B12; then, the test platform obtains the third product matrix Q3 obtained by multiplying the newly adjusted test projection matrix W12 and the newly adjusted test basic matrix B12; finally, the test platform determines the test feature matrix X minus the third product The third difference matrix E3 obtained by matrix Q3 conforms to the difference threshold matrix E, and the newly adjusted test projection matrix W12 corresponding to the third difference matrix E3 is determined to be the test feature matrix after dimensionality reduction It should be noted that, in the embodiment of the present application, for the dimensionality-reduced test feature matrix The determination of , can be that the dimensionality-reduced test feature
  • the present application does not specifically limit the number of adjustment cycles, and the dimensionality-reduced test feature matrix that satisfies the conditions shall prevail.
  • the test platform needs to find the test projection matrix corresponding to the difference threshold matrix E as the test feature matrix after dimensionality reduction, at this time, because the third difference matrix E3 satisfies the condition, then determine the third difference matrix E3 corresponding to The newly adjusted test projection matrix W12 is the test feature matrix after dimensionality reduction
  • the test platform replaces the original test feature matrix with the reduced-dimensional test feature matrix, which not only reduces the storage space, but also reduces the calculation amount and computational complexity of computer resources, and the feature representation power is improved. At the same time Whether automated testing is performed on all front-end test cases, and accurate data is provided as the basis for calculation.
  • Step 307 based on the non-negative matrix factorization algorithm, perform dimensionality reduction processing on the historical feature matrix to obtain a dimensionally reduced historical feature matrix.
  • step 307 is based on the non-negative matrix factorization algorithm to perform dimensionality reduction processing on the historical feature matrix to obtain the dimensionality-reduced historical feature matrix, which can be performed through steps 501 to 503 shown in FIG. 6; or steps 501 to 503.
  • Step 501 Based on the determined feature numbers of the historical feature matrix after dimension reduction, the historical feature matrix is decomposed through a non-negative matrix factorization algorithm to obtain a historical projection matrix and a historical fundamental matrix.
  • the value range of the test platform based on the feature number S after dimensionality reduction is Select a positive integer S to determine the feature number S after dimension reduction, and decompose the historical feature matrix P k through the non-negative matrix decomposition algorithm, and randomly generate the historical projection matrix W2 and historical basic matrix B2.
  • the size of the historical projection matrix W2 is N ⁇ S
  • the size of the historical basic matrix B2 is S ⁇ M.
  • Step 502. Obtain a fourth product matrix obtained by multiplying the historical projection matrix and the historical fundamental matrix.
  • Step 503 If the fourth difference matrix obtained by subtracting the fourth product matrix from the historical feature matrix conforms to the difference threshold matrix, determine that the historical projection matrix corresponding to the fourth difference matrix is the historical feature matrix after dimensionality reduction.
  • the difference threshold matrix is used to determine the difference matrix between the historical feature matrix and the first product matrix obtained by multiplying the historical projection matrix and the historical fundamental matrix.
  • the value of each element in the difference threshold matrix may be 10 -6 .
  • the test platform decomposes the historical feature matrix P k through the non-negative matrix decomposition algorithm based on the feature number S after the dimensionality reduction of the determined historical feature matrix, and obtains the situation of the historical projection matrix W2 and the historical basic matrix B2 Next, obtain the fourth product matrix Q4 obtained by multiplying the historical projection matrix W2 and the historical fundamental matrix B2.
  • the fourth difference matrix E4 obtained by subtracting the fourth product matrix Q4 from the historical feature matrix Pk conforms to the difference threshold matrix E, since the test platform needs to find the historical projection matrix that satisfies the difference threshold matrix E, it is the dimension-reduced history Feature matrix, at this time, because the fourth difference matrix E4 satisfies the condition, the historical projection matrix W2 corresponding to the fourth difference matrix E4 is the historical feature matrix after dimensionality reduction
  • the historical feature matrix after dimensionality reduction Among them, the historical feature matrix after dimensionality reduction The size is S ⁇ N.
  • Step 504 If the fourth difference matrix obtained by subtracting the fourth product matrix from the historical feature matrix does not conform to the difference threshold matrix, adjust each element in the historical projection matrix through the projection matrix adjustment model to obtain the adjusted historical projection matrix.
  • Step 505 Adjust each element in the historical basic matrix through the basic matrix adjustment model to obtain an adjusted historical basic matrix.
  • the test platform determines that the fourth difference matrix E4 obtained by subtracting the fourth product matrix Q4 from the historical feature matrix Pk does not meet the difference threshold matrix E, and adjusts the model for each historical projection matrix W2 through the projection matrix.
  • One element is adjusted to obtain the adjusted historical projection matrix W21.
  • each element in the basic projection matrix B2 is adjusted through the basic matrix adjustment model to obtain the adjusted basic projection matrix B21.
  • Step 506 Obtain a fifth product matrix obtained by multiplying the adjusted historical projection matrix and the adjusted historical fundamental matrix.
  • Step 507 If the fifth difference matrix obtained by subtracting the fifth product matrix from the historical feature matrix conforms to the difference threshold matrix, determine that the adjusted historical projection matrix corresponding to the fifth difference matrix is the reduced dimensionality historical feature matrix.
  • the test platform obtains the fifth product matrix Q5 obtained by multiplying the adjusted historical projection matrix W21 and the adjusted historical fundamental matrix B21;
  • the five-difference matrix E5 conforms to the difference threshold matrix E. Since the test platform needs to find that the historical projection matrix corresponding to the difference threshold matrix E is the historical feature matrix after dimensionality reduction, at this time, because the fifth difference matrix E5 satisfies the condition, Then determine that the adjusted historical projection matrix W21 corresponding to the fifth difference matrix E5 is the historical feature matrix after dimensionality reduction
  • Step 508 If the fifth difference matrix obtained by subtracting the fifth product matrix from the historical feature matrix does not conform to the difference threshold matrix, adjust each element in the adjusted historical projection matrix through the projection matrix adjustment model to obtain a new adjusted The post-historical projection matrix.
  • Step 509 Adjust each element in the adjusted historical basic matrix through the basic matrix adjustment model to obtain a new adjusted historical basic matrix.
  • Step 510 Obtain a sixth product matrix obtained by multiplying the newly adjusted historical projection matrix and the newly adjusted historical fundamental matrix.
  • Step 511 If the sixth difference matrix obtained by subtracting the sixth product matrix from the historical feature matrix conforms to the difference threshold matrix, determine that the newly adjusted historical projection matrix corresponding to the sixth difference matrix is the dimensionality-reduced historical feature matrix.
  • the test platform determines that the fifth difference matrix E5 obtained by subtracting the fifth product matrix Q5 from the historical feature matrix Pk does not conform to the difference threshold matrix E, and adjusts the model through the projection matrix to adjust the historical projection
  • Each element in the matrix W21 is adjusted to obtain the newly adjusted historical projection matrix W22;
  • the test platform adjusts each element in the adjusted historical basic matrix B21 through the basic matrix adjustment model to obtain the newly adjusted The historical basic matrix B22;
  • the test platform obtains the sixth product matrix Q6 obtained by multiplying the newly adjusted historical projection matrix W22 and the newly adjusted historical basic matrix B22;
  • the test platform determines the historical feature matrix P k minus the first
  • the sixth difference matrix E6 obtained by the six product matrix Q6 conforms to the difference threshold matrix E, and the newly adjusted historical projection matrix W22 corresponding to the sixth difference matrix E6 is determined to be the historical feature matrix after dimensionality reduction
  • Historical feature matrix that is to say, the present application does not specifically limit the number of adjustment cycles, and the dimensionality-reduced historical feature matrix that satisfies the conditions is obtained.
  • the test platform needs to find that the historical projection matrix corresponding to the difference threshold matrix E is the historical feature matrix after dimensionality reduction, at this time, because the sixth difference matrix E6 satisfies the condition, it is determined that the sixth difference matrix E6 corresponds to
  • the newly adjusted historical projection matrix W22 is the historical feature matrix after dimensionality reduction
  • the test platform replaces the original historical feature matrix with the historical feature matrix after dimensionality reduction, which not only reduces the storage space, but also reduces the calculation amount and computational complexity of computer resources, and the feature representation power is improved. At the same time Whether automated testing is performed on all front-end test cases, and accurate data is provided as the basis for calculation.
  • Step 308 calculating the similarity between the dimensionality-reduced features of the nth front-end test case in the dimension-reduced test feature matrix and the dimension-reduced features of each front-end historical case in the dimension-reduced historical feature matrix, to obtain the similarity degree matrix.
  • the test feature matrix after dimensionality reduction The historical feature matrix after each dimensionality reduction
  • the test platform calculates the test feature matrix after dimensionality reduction through the cosine theorem
  • the dimensionality-reduced feature of the n-th front-end test case in and the historical feature matrix of the k-th dimensionality-reduction matrix
  • the similarity of the dimensionality-reduced features of each front-end historical case in based on multiple similarities Get the similarity matrix Among them, the similarity matrix
  • the size is 1 ⁇ N.
  • the test platform calculates the dimensionality-reduced test feature matrix through the cosine theorem The nth row in and the historical feature matrix after dimensionality reduction The similarity between each column in
  • Step 309 based on the similarity matrix, when it is determined that all front-end test cases satisfy the automated test conditions, perform automated tests on all front-end test cases in the system version set to be tested.
  • step 309 is based on the similarity matrix, and when it is determined that all front-end test cases meet the automated test conditions, all front-end test cases in the system version set to be tested are automatically tested, which can be implemented through the steps shown in Figure 7:
  • Step 601. Obtain the weight corresponding to each historical system version set in at least two historical system version sets.
  • the test platform sets a weight w k for the similarity matrix ⁇ k corresponding to each historical system version set, and the weight w k is greater than or equal to 0 and less than or equal to 1.
  • the weight w k is greater than or equal to 0 and less than or equal to 1.
  • w k is the weight w k corresponding to each similarity matrix ⁇ k
  • k is the sequence number of each historical system version set in all historical system version sets
  • K is the total number of all historical system version sets
  • the test platform obtains the weight w k corresponding to each historical system version set k in at least two historical system version sets.
  • Step 602 based on the similarity matrix between each front-end test case after dimension reduction and case n in all front-end historical cases in each historical version set after dimensionality reduction, and the weight corresponding to each historical system version set, generate Each target correlation matrix between the version set of the system under test and the set of all historical system versions.
  • each front-end test case after dimension reduction includes the feature after dimension reduction of the front-end test case, and the cases in all front-end historical cases in each historical version set after dimension reduction include the features of each front-end historical case.
  • the test platform generates each target correlation matrix y k between the system version set to be tested and all historical system version sets, which can also be implemented in the following manner:
  • Step 1 Acquire weights and supplementary factors corresponding to each historical system version set in at least two historical system version sets.
  • Step2 based on the similarity matrix between each front-end test case after dimensionality reduction and case n in all front-end historical cases in each historical version set after dimensionality reduction, the weight and supplementary factor corresponding to each historical system version set , to generate each target correlation matrix between the version set of the system under test and the set of all historical system versions.
  • the test platform obtains the weight w k corresponding to each historical system version set in at least two historical system version sets, and after supplementing the factor h, compares each front-end test case after dimensionality reduction with the reduced dimensionality
  • the similarity matrix ⁇ k between cases n in all front-end historical cases in each historical version set, the weight w k corresponding to each historical system version set and the supplementary factor h, through y k w k ⁇ k +h, Generate each target correlation matrix y k between the version set of the system to be tested and the set of all historical system versions. In this way, by setting the supplementary factor h, each element in each target correlation matrix y k between the generated system-under-test version set and all historical system version sets is prevented from being 0.
  • Step 603 Obtain the maximum value of each row in each target correlation matrix, and determine a first number of maximum values greater than the first target threshold among the maximum values of all rows in each target correlation matrix.
  • the test platform obtains the maximum value of each row in each target correlation matrix y k , and obtains the maximum value greater than the first target threshold such as 1/2 among the maximum values of all rows in each target correlation matrix y k , and determine the first quantity sum1 greater than the maximum value of 1/2.
  • Step 604. Calculate the ratio of the first quantity to the total number of all front-end test cases in the system version set under test to obtain the first ratio.
  • the test platform calculates the ratio of the first quantity sum1 to the total number N of all front-end test cases in the system version set to be tested to obtain the first ratio z1, wherein,
  • Step 605. Obtain a second number of first ratios greater than the second target threshold among all first ratios corresponding to each target correlation matrix.
  • the test platform obtains the first ratio z1 greater than the second target threshold such as 1/2 among all the first ratios z1 corresponding to each target correlation matrix y k , and determines the first ratio z1 greater than 1/2 The second quantity sum2.
  • Step 606. Calculate the ratio of the second quantity to the total number of the historical system version sets to obtain the second ratio.
  • the test platform calculates the ratio of the second number sum2 to the total number K of the historical system version set to obtain the second ratio z2, wherein,
  • Step 607. If the second ratio is greater than the third target threshold, determine that all front-end test cases meet the automated test conditions, and perform automated tests on all front-end test cases in the system version set to be tested.
  • the test platform determines that the second ratio z2 is greater than the third target threshold such as 1/2, which means that all front-end test cases in the system version set to be tested are compared with all front-end historical test cases in the historical system version set. The difference is not big. At this point, it is determined that all front-end test cases meet the automated test conditions. And after the developer makes a small change to some of the scripts in the automation scripts corresponding to the historical system version set, the test platform can perform automated tests on all front-end test cases in the system version set to be tested through the modified automation scripts, so that It establishes a unified standard for the automated execution of front-end test cases, improves the accuracy of judgment, and improves processing efficiency without relying on manual operations.
  • the third target threshold such as 1/2
  • FIG. 8 is an optional flow chart of the test case processing method provided by the embodiment of the present application, which will be described in conjunction with the steps shown in FIG. 8,
  • Step 701. Obtain all test cases in the version set of the system to be tested.
  • Step 702 Input all test cases in the version set of the system to be tested into the trained classifier, and obtain all front-end test cases in all test cases output by the trained classifier.
  • Step 703. Obtain all front-end historical cases in each historical system version set in at least two historical system version sets.
  • Step 704 based on the word frequency-reverse document frequency algorithm, calculate the eigenvalues corresponding to the features in each front-end test case in all front-end test cases, and obtain the test feature matrix of the system version set to be tested.
  • Step 705 Based on the word frequency-reverse document frequency algorithm, calculate the eigenvalues corresponding to the features in each front-end historical case in all front-end historical cases in each historical system version set, and obtain the historical feature matrix of each historical system version set.
  • Step 706 based on the non-negative matrix factorization algorithm, perform dimension reduction processing on the test feature matrix to obtain a dimension-reduced test feature matrix.
  • Step 707 based on the non-negative matrix factorization algorithm, perform dimensionality reduction processing on the historical feature matrix to obtain a dimensionally reduced historical feature matrix.
  • Step 708 Calculate the similarity between the dimensionality-reduced feature of the nth front-end test case in the dimension-reduced test feature matrix and the dimension-reduced feature of each front-end historical case in the dimension-reduced historical feature matrix, and obtain the similarity degree matrix.
  • Step 709 based on the obtained weight and supplementary factor corresponding to each historical system version set, and the relationship between each front-end test case after dimension reduction and case n in all front-end historical cases in each historical version set after dimension reduction
  • the similarity matrix of is used to generate each target correlation matrix between the version set of the system under test and the set of all historical system versions.
  • Step 710 based on each target correlation matrix between the system version set to be tested and all historical system version sets, determine whether all front-end test cases meet the automated test conditions, so as to determine whether to perform all front-end test cases in the system version set to be tested automated test.
  • the test platform obtains all front-end test cases and all front-end historical cases in the system version set to be tested, first, it calculates the number of front-end test cases in each front-end test case through the word frequency-reverse file frequency algorithm.
  • the eigenvalues corresponding to the features of the system to be tested are obtained from the test feature matrix of the system version set to be tested, and the eigenvalues corresponding to the features in each front-end historical case are calculated to obtain the historical feature matrix of each historical system version set; secondly, through the non-negative matrix Algorithm, the dimensionality reduction process is performed on the test feature matrix and the historical feature matrix respectively, and the similarity processing is performed on the dimensionality-reduced test feature matrix and the dimensionality-reduced historical feature matrix to obtain a similarity matrix, and then according to the similarity matrix, When it is determined that all front-end test cases meet the automation test conditions, perform automated tests on all front-end test cases.
  • this application solves the problem that related technologies must rely on manual operation and uncertainty brought by manual subjectivity, and at least has the problems of low efficiency and poor accuracy; realizes the establishment of a unified standard for the automatic execution of front-end test cases, and improves The accuracy of judgment is improved, and at the same time, it does not need to rely on manual operation, which improves the processing efficiency.
  • test case processing device 154 provided by the embodiment of the present application implemented as a software module.
  • the software modules stored in the test case processing device 154 of the memory 150 can be is a test case processing device in the test platform 100, including:
  • An acquisition module 1541 configured to acquire all front-end test cases in the system version set to be tested, and all front-end historical cases in each of the at least two historical system version sets;
  • the processing module 1542 is used to calculate the eigenvalues corresponding to the features in each front-end test case in all front-end test cases, and obtain the test feature matrix of the system version set to be tested;
  • the processing module 1542 is also used to calculate the eigenvalues corresponding to the features in each front-end historical case in all front-end historical cases in each historical system version set, and obtain the historical feature matrix of each historical system version set;
  • the processing module 1542 is also used to perform dimensionality reduction processing on the test feature matrix based on the non-negative matrix factorization algorithm, and obtain the test feature matrix after dimensionality reduction;
  • the processing module 1542 is also used to perform dimensionality reduction processing on the historical feature matrix based on the non-negative matrix factorization algorithm to obtain the historical feature matrix after dimensionality reduction;
  • the processing module 1542 is also used to calculate the similarity between the dimension-reduced features of the nth front-end test case in the dimension-reduced test feature matrix and the dimension-reduced features of each front-end historical case in the dimension-reduced historical feature matrix degree, to obtain a similarity matrix; wherein, n is a positive integer greater than or equal to 1 and less than or equal to N, and N is the total number of front-end test cases in the system version set to be tested;
  • the processing module 1542 is further configured to perform automated testing on all front-end test cases in the system version set to be tested when it is determined that all front-end test cases meet the automated test conditions based on the similarity matrix.
  • the processing module 1542 is further configured to decompose the test feature matrix through a non-negative matrix decomposition algorithm based on the determined feature number after dimensionality reduction of the test feature matrix to obtain a test projection matrix and a test fundamental matrix; obtain Module 1541 is also used to obtain the first product matrix obtained by multiplying the test projection matrix and the test fundamental matrix; the processing module 1542 is also used to obtain the first difference matrix obtained by subtracting the first product matrix from the test feature matrix according to the difference value The threshold matrix is used to determine the test projection matrix corresponding to the first difference matrix as the dimension-reduced test feature matrix.
  • the processing module 1542 is further configured to adjust each element in the test projection matrix through the projection matrix adjustment model to obtain the adjusted test projection matrix if the first difference matrix does not meet the difference threshold matrix ;
  • Each element in the test fundamental matrix is adjusted through the fundamental matrix adjustment model to obtain the adjusted test fundamental matrix;
  • the acquisition module 1541 is also used to obtain the adjusted test projection matrix and multiply the adjusted test fundamental matrix to obtain The second product matrix;
  • the processing module 1542 is also used to determine the adjusted test projection matrix corresponding to the second difference matrix if the second difference matrix obtained by subtracting the second product matrix from the test feature matrix meets the difference threshold matrix is the test feature matrix after dimensionality reduction.
  • the projection matrix adjustment model is:
  • W' ns is the element in row n and column s in the adjusted test projection matrix
  • W is the test projection matrix
  • W ns is the element in row n and column s in the test projection matrix
  • X is the test feature matrix
  • B is the test fundamental matrix
  • B T is the transpose matrix of the test fundamental matrix
  • (XB T ) ns is the nth row s of the matrix obtained by multiplying the test feature matrix X and the transpose matrix B T of the test fundamental matrix
  • the element of the column, (WBB T ) ns is the element of the nth row and the sth column in the matrix obtained after multiplying the transposition matrix B T of the test projection matrix W, the test fundamental matrix B and the test fundamental matrix;
  • the basic matrix adjustment model is:
  • B'sm is the element of the sth row and the mth column in the adjusted test fundamental matrix
  • B is the test fundamental matrix
  • B sm is the element of the sth row and the mth column in the test fundamental matrix
  • X is the test feature matrix
  • W is the test projection matrix
  • W T is the transpose matrix of the test projection matrix
  • (W T X) sm is the matrix obtained by multiplying the transpose matrix W T of the test projection matrix by the test feature matrix X
  • the elements in column m, (W T WB ) sm are the elements in row s and column m in the matrix obtained by multiplying the transposition matrix W T of the test projection matrix, the test projection matrix W and the test fundamental matrix B.
  • the processing module 1542 is further configured to adjust each element in the adjusted test projection matrix through the projection matrix adjustment model to obtain a new adjusted The test projection matrix; each element in the adjusted test fundamental matrix is adjusted through the fundamental matrix adjustment model to obtain a new adjusted test fundamental matrix; the acquisition module 1541 is also used to obtain the newly adjusted test projection matrix and The third product matrix obtained by multiplying the newly adjusted test fundamental matrix; the processing module 1542 is also used to determine the third difference matrix if the third difference matrix obtained by subtracting the third product matrix from the test feature matrix meets the difference threshold matrix.
  • the newly adjusted test projection matrix corresponding to the value matrix is the dimensionality-reduced test feature matrix.
  • the obtaining module 1541 is also used to obtain the weight corresponding to each historical system version set in at least two historical system version sets; the processing module 1542 is also used to obtain the weight corresponding to each front-end test case and The similarity matrix between cases n in all front-end historical cases in each historical version set after dimensionality reduction, and the weight corresponding to each historical system version set, generate the relationship between the system version set to be tested and all historical system version sets Each target correlation matrix; the acquisition module 1541 is also used to obtain the maximum value of each row in each target correlation matrix, and determine among the maximum values of all rows in each target correlation matrix, which is greater than the maximum value of the first target threshold The first quantity; the processing module 1542 is also used to calculate the ratio of the first quantity and the total number of all front-end test cases in the system version set to be tested to obtain the first ratio; the acquisition module 1541 is also used to obtain each target correlation matrix Among all the corresponding first ratios, the second number of the first ratio greater than the second target threshold; the processing module 1542 is
  • the obtaining module 1541 is also used to obtain all test cases in the version set of the system under test; the processing module 1542 is also used to input all test cases in the version set of the system under test to the trained classifier In , get all front-end test cases in all test cases output by the trained classifier.
  • the embodiment of the present application provides a storage medium storing executable instructions, and the executable instruction is stored therein.
  • the executable instruction When executed by the processor, it will cause the processor to execute the method provided in the embodiment of the present application, for example, as shown in FIG. 2 - the method shown in Figure 3, Figure 5- Figure 8.
  • the storage medium can be a computer-readable storage medium, for example, a ferroelectric memory (FRAM, Ferromagnetic Random Access Memory), a read-only memory (ROM, Read Only Memory), a programmable read-only memory (PROM, Programmable Read Only Memory), Erasable Programmable Read Only Memory (EPROM, Erasable Programmable Read Only Memory), Electrically Erasable Programmable Read Only Memory (EEPROM, Electrically Erasable Programmable Read Only Memory), flash memory, magnetic surface memory, optical disc, Or memory such as CD-ROM (Compact Disk-Read Only Memory); It can also be various devices including one or any combination of the above-mentioned memories.
  • FRAM Ferroelectric memory
  • ROM Read Only Memory
  • PROM programmable read-only memory
  • EPROM Erasable Programmable Read Only Memory
  • EEPROM Electrically Erasable Programmable Read Only Memory
  • flash memory magnetic surface memory
  • optical disc Or memory such as CD-ROM (Compact Disk-Read Only Memory); It can also be various
  • executable instructions may take the form of programs, software, software modules, scripts, or code written in any form of programming language, including compiled or interpreted languages, or declarative or procedural languages, and its Can be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
  • executable instructions may, but do not necessarily correspond to files in a file system, may be stored as part of a file that holds other programs or data, for example, in Hyper Text Markup Language (HTML, Hyper Text Markup Language) in one or more scripts in a document, in a single file dedicated to the program in question, or in multiple cooperating files (for example, a file that stores one or more modules, subroutines, or code sections )middle.
  • executable instructions may be deployed to be executed on one computing device, or on multiple computing devices located at one site, or alternatively, on multiple computing devices distributed across multiple sites and interconnected by a communication network. to execute.
  • the embodiment of the present application provides a test case processing method, test case processing device, test platform and storage medium, by obtaining all front-end test cases in the system version set to be tested, and each historical system in at least two historical system version sets All front-end historical cases in the version set; calculate the eigenvalues corresponding to the features in each front-end test case in all front-end test cases, and obtain the test feature matrix of the system version set to be tested; calculate all front-end history in each historical system version set In the case, the eigenvalues corresponding to the features in each front-end historical case are obtained to obtain the historical feature matrix of each historical system version set; based on the non-negative matrix decomposition algorithm, the dimensionality reduction process is performed on the test feature matrix to obtain the dimensionality-reduced test features matrix; based on the non-negative matrix factorization algorithm, the dimensionality reduction process is performed on the historical feature matrix to obtain the dimensionality-reduced historical feature matrix; the dimensionality-reduced feature and the dimensionality-reduced
  • this application solves the problem that related technologies must rely on manual operation and uncertainty brought by manual subjectivity, and at least has the problems of low efficiency and poor accuracy; realizes the establishment of a unified standard for the automatic execution of front-end test cases, and improves The accuracy of judgment is improved, and at the same time, it does not need to rely on manual operation, which improves the processing efficiency.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

A test case processing method and apparatus, a platform, and a storage medium. The method comprises: obtaining all front-end test cases and all front-end historical cases; calculating a feature value corresponding to a feature in each front-end test case to obtain a test feature matrix of a system version set to be tested, and calculating a feature value corresponding to a feature in each front-end historical case to obtain a historical feature matrix of each historical system version set; on the basis of a non-negative matrix factorization algorithm, performing dimension reduction processing on the test feature matrix and the historical feature matrix respectively to obtain a dimension-reduced test feature matrix and a dimension-reduced historical feature matrix; calculating a similarity between a dimension-reduced feature of the nth front-end test case in the dimension-reduced test feature matrix and a dimension-reduced feature of each front-end historical case in the dimension-reduced historical feature matrix to obtain a similarity matrix; and on the basis of the similarity matrix, determining that all the front-end test cases satisfy automated test conditions, and performing automated test on all the front-end test cases.

Description

一种测试案例处理方法、装置、平台及存储介质A test case processing method, device, platform and storage medium
相关申请的交叉引用Cross References to Related Applications
本申请基于申请号为202110729999.3、申请日为2021年06月29日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。This application is based on a Chinese patent application with application number 202110729999.3 and a filing date of June 29, 2021, and claims the priority of this Chinese patent application. The entire content of this Chinese patent application is hereby incorporated by reference into this application.
技术领域technical field
本申请实施例涉及金融科技(Fintech)的数据处理技术领域,涉及但不限于一种测试案例处理方法、测试案例处理装置、测试平台及存储介质。The embodiment of the present application relates to the technical field of financial technology (Fintech) data processing, and relates to but not limited to a test case processing method, a test case processing device, a test platform and a storage medium.
背景技术Background technique
随着计算机计算的发展,越来越多的技术应用在金融领域,传统金融业正在逐步向金融科技(Fintech)转变,然而,由于金融行业的安全性、实时性要求,金融科技也对技术提出了更高的要求。With the development of computer computing, more and more technologies are applied in the financial field, and the traditional financial industry is gradually transforming into Fintech. However, due to the security and real-time requirements of the financial industry, Fintech also raises the higher requirements.
金融科技领域下,金融系统中的测试案例包括前端测试案例和后端测试案例,目前针对金融系统中的测试案例的分类通过测试人员进行人工打标的方式实现,且对金融系统中待测系统版本是否进行自动化测试,依赖于测试人员的经验,主观判断待测系统版本中需求变动的频率以及测试案例的稳定性。可见,上述方法必须依赖于人工操作,至少存在效率低、准确性差的问题。In the field of financial technology, the test cases in the financial system include front-end test cases and back-end test cases. Currently, the classification of test cases in the financial system is achieved by manual marking by testers, and the system under test in the financial system Whether the version is automatically tested depends on the experience of the tester, subjectively judging the frequency of requirement changes in the version of the system to be tested and the stability of the test case. It can be seen that the above method must rely on manual operation, at least there are problems of low efficiency and poor accuracy.
发明内容Contents of the invention
本申请实施例提供一种测试案例处理方法、测试案例处理装置、测试平台及存储介质,以解决相关技术必须依赖于人工操作,至少存在效率低、准确性差的问题。The embodiments of the present application provide a test case processing method, a test case processing device, a test platform, and a storage medium, so as to solve the problems that related technologies must rely on manual operations, and at least have low efficiency and poor accuracy.
本申请实施例提供一种方法,包括:The embodiment of this application provides a method, including:
获取待测系统版本集合中的所有前端测试案例,以及至少两个历史系统版本集合中每一历史系统版本集合中的所有前端历史案例;Obtain all front-end test cases in the system version set to be tested, and all front-end historical cases in each historical system version set in at least two historical system version sets;
计算所述所有前端测试案例中每一前端测试案例中的特征对应的特征值,得到所述待测系统版本集合的测试特征矩阵;Calculate the eigenvalues corresponding to the features in each front-end test case in all the front-end test cases, and obtain the test feature matrix of the version set of the system to be tested;
计算所述每一历史系统版本集合中所述所有前端历史案例中每一前端历史案例中的特征对应的特征值,得到所述每一历史系统版本集合的历史特征矩阵;Calculating the eigenvalues corresponding to the features in each of the front-end historical cases in all the front-end historical cases in the set of each historical system version, to obtain the historical feature matrix of each set of historical system versions;
基于非负矩阵分解算法,对所述测试特征矩阵进行降维处理,得到降维后的测试特征矩阵;Based on a non-negative matrix factorization algorithm, performing dimensionality reduction processing on the test feature matrix to obtain a dimensionally reduced test feature matrix;
基于所述非负矩阵分解算法,对所述历史特征矩阵进行降维处理,得到降维后的历史特征矩阵;Based on the non-negative matrix decomposition algorithm, performing dimensionality reduction processing on the historical feature matrix to obtain a dimensionally reduced historical feature matrix;
计算所述降维后的测试特征矩阵中第n个前端测试案例的降维后的特征与所述降维后的历史特征矩阵中每一前端历史案例的降维后的特征的相似度,得到相似度矩阵;其中,所述n为大于等于1且小于等于N的正整数,N为所述待测系统版本集合中的前端测试案例的总数;Calculating the similarity between the dimension-reduced feature of the nth front-end test case in the dimension-reduced test feature matrix and the dimension-reduced feature of each front-end historical case in the dimension-reduced historical feature matrix, to obtain A similarity matrix; wherein, the n is a positive integer greater than or equal to 1 and less than or equal to N, and N is the total number of front-end test cases in the version set of the system to be tested;
基于所述相似度矩阵,确定所述所有前端测试案例满足自动化测试条件时,对所述 待测系统版本集合中的所有前端测试案例进行自动化测试。Based on the similarity matrix, when it is determined that all the front-end test cases meet the automated test conditions, all the front-end test cases in the version set of the system under test are automatically tested.
本申请实施例提供一种装置,包括:An embodiment of the present application provides a device, including:
获取模块,用于获取待测系统版本集合中的所有前端测试案例,以及至少两个历史系统版本集合中每一历史系统版本集合中的所有前端历史案例;An acquisition module, configured to acquire all front-end test cases in the system version set to be tested, and all front-end historical cases in each historical system version set in at least two historical system version sets;
处理模块,用于计算所述所有前端测试案例中每一前端测试案例中的特征对应的特征值,得到所述待测系统版本集合的测试特征矩阵;A processing module, configured to calculate the eigenvalues corresponding to the features in each of the front-end test cases in all the front-end test cases, and obtain the test feature matrix of the version set of the system to be tested;
所述处理模块,还用于计算所述每一历史系统版本集合中所述所有前端历史案例中每一前端历史案例中的特征对应的特征值,得到所述每一历史系统版本集合的历史特征矩阵;The processing module is also used to calculate the feature value corresponding to the feature in each front-end historical case in all the front-end historical cases in the set of each historical system version, and obtain the historical feature of each historical system version set matrix;
所述处理模块,还用于基于非负矩阵分解算法,对所述测试特征矩阵进行降维处理,得到降维后的测试特征矩阵;The processing module is also used to perform dimensionality reduction processing on the test feature matrix based on a non-negative matrix factorization algorithm to obtain a dimensionality-reduced test feature matrix;
所述处理模块,还用于基于所述非负矩阵分解算法,对所述历史特征矩阵进行降维处理,得到降维后的历史特征矩阵;The processing module is further configured to perform dimensionality reduction processing on the historical feature matrix based on the non-negative matrix factorization algorithm, to obtain a dimensionally reduced historical feature matrix;
所述处理模块,还用于计算所述降维后的测试特征矩阵中第n个前端测试案例的降维后的特征与所述降维后的历史特征矩阵中每一前端历史案例的降维后的特征的相似度,得到相似度矩阵;其中,所述n为大于等于1且小于等于N的正整数,N为所述待测系统版本集合中的前端测试案例的总数;The processing module is also used to calculate the dimensionality-reduced feature of the nth front-end test case in the dimension-reduced test feature matrix and the dimensionality reduction of each front-end historical case in the dimension-reduced historical feature matrix The degree of similarity of the features after is obtained similarity matrix; Wherein, said n is a positive integer greater than or equal to 1 and less than or equal to N, and N is the total number of front-end test cases in the described system version set to be tested;
所述处理模块,还用于基于所述相似度矩阵,确定所述所有前端测试案例满足自动化测试条件时,对所述待测系统版本集合中的所有前端测试案例进行自动化测试。The processing module is further configured to perform automated testing on all front-end test cases in the version set of the system under test when it is determined that all front-end test cases meet the automated test conditions based on the similarity matrix.
本申请实施例提供一种测试平台,包括:The embodiment of the present application provides a test platform, including:
存储器,用于存储可执行指令;memory for storing executable instructions;
处理器,用于执行存储器中存储的可执行指令时,实现上述的方法。When the processor is configured to execute the executable instructions stored in the memory, the above method is implemented.
本申请实施例提供一种存储介质,存储有可执行指令,用于引起处理器执行时,实现上述的方法。An embodiment of the present application provides a storage medium, which stores executable instructions, and is used to cause a processor to implement the above method when executed.
本申请实施例具有以下有益效果:The embodiment of the present application has the following beneficial effects:
本申请测试平台在获取到待测系统版本集合中的所有前端测试案例和所有前端历史案例后,首先,计算每一前端测试案例中的特征对应的特征值,得到待测系统版本集合的测试特征矩阵,计算每一前端历史案例中的特征对应的特征值,得到每一历史系统版本集合的历史特征矩阵;其次,通过非负矩阵算法,对测试特征矩阵和历史特征矩阵分别进行降维处理,并对降维后的测试特征矩阵和降维后的历史特征矩阵进行相似度处理,以得到相似度矩阵,进而根据相似度矩阵,确定所有前端测试案例满足自动化测试条件时,对所有前端测试案例进行自动化测试。如此,本申请解决了相关技术必须依赖于人工操作以及人工主观带来的不确定性,且至少存在效率低、准确性差的问题;实现了对前端测试案例的自动化执行建立了统一的标准,提高了判断的准确性,同时,无需依赖人工操作,提高了处理效率。After obtaining all front-end test cases and all front-end historical cases in the version set of the system to be tested, the test platform of this application first calculates the characteristic value corresponding to the feature in each front-end test case, and obtains the test features of the version set of the system to be tested Matrix, calculate the eigenvalues corresponding to the features in each front-end historical case, and obtain the historical feature matrix of each historical system version set; secondly, use the non-negative matrix algorithm to perform dimension reduction processing on the test feature matrix and the historical feature matrix respectively, And perform similarity processing on the test feature matrix after dimensionality reduction and the historical feature matrix after dimensionality reduction to obtain a similarity matrix, and then according to the similarity matrix, when all front-end test cases meet the automated test conditions, all front-end test cases Run automated tests. In this way, this application solves the problem that related technologies must rely on manual operation and uncertainty brought by manual subjectivity, and at least has the problems of low efficiency and poor accuracy; realizes the establishment of a unified standard for the automatic execution of front-end test cases, and improves The accuracy of judgment is improved, and at the same time, it does not need to rely on manual operation, which improves the processing efficiency.
附图说明Description of drawings
图1是本申请实施例提供的测试平台的一个可选的架构示意图;Fig. 1 is a schematic diagram of an optional architecture of the test platform provided by the embodiment of the present application;
图2是本申请实施例提供的测试案例处理方法的一个可选的流程示意图;Fig. 2 is an optional schematic flow chart of the test case processing method provided by the embodiment of the present application;
图3是本申请实施例提供的测试案例处理方法的一个可选的流程示意图;Fig. 3 is an optional schematic flow chart of the test case processing method provided by the embodiment of the present application;
图4是本申请实施例提供的前端案例对分类器进行训练的一个可选的流程框图;Fig. 4 is an optional flowchart for training a classifier in a front-end case provided by an embodiment of the present application;
图5是本申请实施例提供的测试案例处理方法的一个可选的流程示意图;Fig. 5 is an optional schematic flow chart of the test case processing method provided by the embodiment of the present application;
图6是本申请实施例提供的测试案例处理方法的一个可选的流程示意图;FIG. 6 is an optional schematic flow chart of a test case processing method provided in an embodiment of the present application;
图7是本申请实施例提供的测试案例处理方法的一个可选的流程示意图;Fig. 7 is an optional schematic flow chart of the test case processing method provided by the embodiment of the present application;
图8是本申请实施例提供的测试案例处理方法的一个可选的流程示意图。Fig. 8 is a schematic flowchart of an optional test case processing method provided by the embodiment of the present application.
具体实施方式detailed description
为了使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请作进一步地详细描述,所描述的实施例不应视为对本申请的限制,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本申请保护的范围。In order to make the purpose, technical solutions and advantages of the application clearer, the application will be further described in detail below in conjunction with the accompanying drawings. All other embodiments obtained under the premise of creative labor belong to the scope of protection of this application.
在以下的描述中,涉及到“一些实施例”,其描述了所有可能实施例的子集,但是可以理解,“一些实施例”可以是所有可能实施例的相同子集或不同子集,并且可以在不冲突的情况下相互结合。除非另有定义,本申请实施例所使用的所有的技术和科学术语与属于本申请实施例的技术领域的技术人员通常理解的含义相同。本申请实施例所使用的术语只是为了描述本申请实施例的目的,不是旨在限制本申请。In the following description, references to "some embodiments" describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or a different subset of all possible embodiments, and Can be combined with each other without conflict. Unless otherwise defined, all technical and scientific terms used in the embodiments of the present application have the same meaning as commonly understood by those skilled in the technical field of the embodiments of the present application. The terms used in the embodiments of the present application are only for the purpose of describing the embodiments of the present application, and are not intended to limit the present application.
下面说明本申请实施例提供的示例性应用,本申请实施例提供的可以实施为服务器。下面,将说明实施为时的示例性应用。The following describes exemplary applications provided by the embodiments of the present application, which may be implemented as servers. In the following, an exemplary application of the implementation will be described.
参见图1,图1是本申请实施例提供的测试平台100的结构示意图,图1所示的测试平台100包括:至少一个处理器110、至少一个网络接口120、用户接口130和存储器150。测试平台100中的各个组件通过总线系统140耦合在一起。可理解,总线系统140用于实现这些组件之间的连接通信。总线系统140除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图1中将各种总线都标为总线系统140。Referring to FIG. 1, FIG. 1 is a schematic structural diagram of a test platform 100 provided by an embodiment of the present application. The test platform 100 shown in FIG. Various components in the test platform 100 are coupled together through the bus system 140 . It can be understood that the bus system 140 is used to realize connection and communication between these components. In addition to the data bus, the bus system 140 also includes a power bus, a control bus and a status signal bus. However, for clarity of illustration, the various buses are labeled as bus system 140 in FIG.
处理器110可以是一种集成电路芯片,具有信号的处理能力,例如通用处理器、数字信号处理器(DSP,Digital Signal Processor),或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等,其中,通用处理器可以是微处理器或者任何常规的处理器等。Processor 110 can be a kind of integrated circuit chip, has signal processing capability, such as general-purpose processor, digital signal processor (DSP, Digital Signal Processor), or other programmable logic device, discrete gate or transistor logic device, discrete hardware Components, etc., wherein the general-purpose processor can be a microprocessor or any conventional processor, etc.
用户接口130包括使得能够呈现媒体内容的一个或多个输出装置131,包括一个或多个扬声器和/或一个或多个视觉显示屏。用户接口130还包括一个或多个输入装置132,包括有助于用户输入的用户接口部件,比如键盘、鼠标、麦克风、触屏显示屏、摄像头、其他输入按钮和控件。User interface 130 includes one or more output devices 131 that enable presentation of media content, including one or more speakers and/or one or more visual displays. The user interface 130 also includes one or more input devices 132, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
存储器150可以是可移除的,不可移除的或其组合。示例性地硬件设备包括固态存储器,硬盘驱动器,光盘驱动器等。存储器150可选地包括在物理位置上远离处理器110的一个或多个存储设备。存储器150包括易失性存储器或非易失性存储器,也可包括易失性和非易失性存储器两者。非易失性存储器可以是只读存储器(Read Only Memory,ROM),易失性存储器可以是随机存取存储器(Random Access Memory,RAM)。本申请实施例描述的存储器150旨在包括任意适合类型的存储器。在一些实施例中,存储器150能够存储数据以支持各种操作,这些数据的示例包括程序、模块和数据结构或者其子集或超集,下面示例性说明。Memory 150 may be removable, non-removable or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, and the like. Memory 150 optionally includes one or more storage devices located physically remote from processor 110 . Memory 150 includes volatile memory or nonvolatile memory, and may include both volatile and nonvolatile memory. The non-volatile memory can be read-only memory (Read Only Memory, ROM), and the volatile memory can be random access memory (Random Access Memory, RAM). The memory 150 described in the embodiment of the present application is intended to include any suitable type of memory. In some embodiments, the memory 150 is capable of storing data to support various operations, examples of which include programs, modules, and data structures, or subsets or supersets thereof, as exemplified below.
操作系统151,包括用于处理各种基本系统服务和执行硬件相关任务的系统程序,例如框架层、核心库层、驱动层等,用于实现各种基础业务以及处理基于硬件的任务;Operating system 151, including system programs for processing various basic system services and performing hardware-related tasks, such as framework layer, core library layer, driver layer, etc., for implementing various basic services and processing hardware-based tasks;
网络通信模块152,用于经由一个或多个(有线或无线)网络接口120到达其他计算设备,示例性地网络接口120包括:蓝牙、无线相容性认证(WiFi)、和通用串行总线(Universal Serial Bus,USB)等;The network communication module 152 is used to reach other computing devices via one or more (wired or wireless) network interfaces 120. Exemplary network interfaces 120 include: Bluetooth, Wireless Compatibility Authentication (WiFi), and Universal Serial Bus ( Universal Serial Bus, USB), etc.;
输入处理模块153,用于对一个或多个来自一个或多个输入装置132之一的一个或多个用户输入或互动进行检测以及翻译所检测的输入或互动。The input processing module 153 is configured to detect one or more user inputs or interactions from one or more of the input devices 132 and translate the detected inputs or interactions.
在一些实施例中,本申请实施例提供的装置可以采用软件方式实现,图1示出了存储在存储器150中的一种测试案例处理装置154,该测试案例处理装置154可以是测试 平台100中的测试案例处理装置,其可以是程序和插件等形式的软件,包括以下软件模块:获取模块1541、处理模块1542,这些模块是逻辑上的,因此根据所实现的功能可以进行任意的组合或进一步拆分。将在下文中说明各个模块的功能。In some embodiments, the device provided by the embodiment of the present application can be realized by software. FIG. 1 shows a test case processing device 154 stored in the memory 150. The test case processing device 154 can be the The test case processing device, which can be software in the form of programs and plug-ins, includes the following software modules: acquisition module 1541, processing module 1542, these modules are logical, so any combination or further split. The function of each module will be explained below.
在另一些实施例中,本申请实施例提供的装置可以采用硬件方式实现,作为示例,本申请实施例提供的装置可以是采用硬件译码处理器形式的处理器,其被编程以执行本申请实施例提供的测试案例处理方法,例如,硬件译码处理器形式的处理器可以采用一个或多个应用专用集成电路(Application Specific Integrated Circuit,ASIC)、DSP、可编程逻辑器件(Programmable Logic Device,PLD)、复杂可编程逻辑器件(Complex Programmable Logic Device,CPLD)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或其他电子元件。In other embodiments, the device provided in the embodiment of the present application may be implemented in hardware. As an example, the device provided in the embodiment of the present application may be a processor in the form of a hardware decoding processor, which is programmed to execute the In the test case processing method provided by the embodiment, for example, the processor in the form of a hardware decoding processor can adopt one or more Application Specific Integrated Circuits (Application Specific Integrated Circuit, ASIC), DSP, Programmable Logic Device (Programmable Logic Device, PLD), Complex Programmable Logic Device (Complex Programmable Logic Device, CPLD), Field Programmable Gate Array (Field-Programmable Gate Array, FPGA) or other electronic components.
在对本申请实施例提供的测试案例处理方法进行说明之前,对本申请实施的应用背景以及相关技术进行简要介绍。Before describing the test case processing method provided in the embodiment of the present application, the application background and related technologies implemented in the present application are briefly introduced.
随着互联行业和物联网的兴起,测试平台中的应用层软件如测试平台的应用系统、测试平台的应用程序(Application,APP)等的软件开发并不是一次性发布的,都是通过迭代的方式进行持续增量开发和增量发布。新版本系统的应用层软件即待测系统中应用层软件,是通过修改历史版本系统中的某一模块,和/或新增某一模块后得到的,这就使得待测系统的web前端往往变化比较大,而复用的历史版本系统中的部分模块的逻辑并没有发生变更,即后端实现没有发生变更。这里,目前针对待测系统中的前端和后端的分类主要通过测试人员进行人工打标的方式实现,而对于待测系统的web前端的功能验证必须通过自动化脚本来进行测试,相关技术中针对待测系统的web前端的功能验证是否进行自动化测试,主要依赖于测试人员的经验,主观判断待测系统版本中需求变动的频率以及测试案例的稳定性。可见,上述方法中至少存在效率低、准确性差的问题。With the rise of the Internet industry and the Internet of Things, the software development of the application layer software in the test platform, such as the application system of the test platform and the application program (Application, APP) of the test platform, is not released at one time, but is iterative. Continuous incremental development and incremental release. The application layer software of the new version system is the application layer software in the system under test, which is obtained by modifying a certain module in the historical version system and/or adding a certain module, which makes the web front end of the system under test often The changes are relatively large, but the logic of some modules in the reused historical version system has not changed, that is, the back-end implementation has not changed. Here, at present, the classification of the front-end and back-end in the system under test is mainly realized through manual marking by testers, and the functional verification of the web front-end of the system under test must be tested through automated scripts. Whether the functional verification of the web front-end of the test system is automatically tested mainly depends on the experience of the testers, subjectively judging the frequency of requirements changes in the version of the system under test and the stability of the test cases. It can be seen that at least there are problems of low efficiency and poor accuracy in the above method.
下面将结合本申请实施例提供的测试平台100的示例性应用和实施,说明本申请实施例提供的测试案例处理方法。参见图2,图2是本申请实施例提供的测试案例处理方法的一个可选的流程示意图,将结合图2示出的步骤进行说明,The test case processing method provided in the embodiment of the present application will be described below in conjunction with the exemplary application and implementation of the test platform 100 provided in the embodiment of the present application. Referring to FIG. 2, FIG. 2 is an optional flow chart of the test case processing method provided in the embodiment of the present application, which will be described in conjunction with the steps shown in FIG. 2,
步骤201、获取待测系统版本集合中的所有前端测试案例,以及至少两个历史系统版本集合中每一历史系统版本集合中的所有前端历史案例。 Step 201. Acquire all front-end test cases in the system version set to be tested, and all front-end historical cases in each of the at least two historical system version sets.
本申请实施例中,待测系统为在发布之前,对系统中所包含的案例进行测试的系统,历史系统为已经成功发布的系统。待测系统版本可以理解为与当前版本号对应的系统,历史系统版本可以理解为与不同历史时期的版本号对应的系统,历史系统版本可以有多个。在一种可实现的场景中,开发人员通过迭代的方式对历史系统进行持续增量开发,以得到待测系统。示例性的,开发人员通过修改历史系统中某一功能模块,和/或新增某一功能模块后,得到待测系统。In this embodiment of the application, the system to be tested is a system that tests the cases contained in the system before release, and the historical system is a system that has been successfully released. The system version to be tested can be understood as the system corresponding to the current version number, and the historical system version can be understood as the system corresponding to the version numbers of different historical periods, and there can be multiple historical system versions. In an achievable scenario, developers iteratively and incrementally develop the legacy system to obtain the system under test. Exemplarily, the developer obtains the system under test by modifying a certain functional module in the historical system and/or adding a certain functional module.
本申请实施例中,前端测试案例为待测系统的web前端中包括的所有测试案例,且待测系统的web前端中包括的所有测试案例组成待测系统版本集合;前端历史案例为每一历史系统的web前端中包括的所有历史案例,且每一历史系统的web前端中包括的所有历史案例组成每一历史系统版本集合。这里,案例可以理解为系统前端页面的功能模块,示例性的,案例可以为系统前端页面的注册模块,案例还可以为系统前端页面的登录模块。这里,待测系统版本集合中的前端测试案例的总数与至少两个历史系统版本集合中每一历史系统版本集合中的前端历史案例的总数可以相同,也可以不同。在本申请实施例中,以待测系统版本集合中的前端测试案例的总数与至少两个历史系统版本集合中每一历史系统版本集合中的前端历史案例的总数相同为例进行说明。In the embodiment of the present application, the front-end test cases are all test cases included in the web front-end of the system to be tested, and all the test cases included in the web front-end of the system to be tested form the version set of the system to be tested; All historical cases included in the web front end of the system, and all historical cases included in the web front end of each historical system constitute each historical system version set. Here, a case can be understood as a functional module of the system front-end page. Exemplarily, a case can be a registration module of the system front-end page, and a case can also be a login module of the system front-end page. Here, the total number of front-end test cases in the system version set to be tested may be the same as or different from the total number of front-end historical cases in each of the at least two historical system version sets. In the embodiment of the present application, the total number of front-end test cases in the system version set to be tested is the same as the total number of front-end historical cases in each of the at least two historical system version sets.
本申请实施例中,测试平台获取的待测系统版本集合中的所有前端测试案例,进一步地,测试平台还获取待测系统对应的至少两个历史系统版本集合中,每一历史系统版 本集合中的所有前端历史案例。In this embodiment of the application, the test platform obtains all the front-end test cases in the system version set to be tested. Further, the test platform also obtains at least two historical system version sets corresponding to the system to be tested. In each historical system version set All front-end history cases for .
步骤202、计算所有前端测试案例中每一前端测试案例中的特征对应的特征值,得到待测系统版本集合的测试特征矩阵。 Step 202. Calculate the eigenvalues corresponding to the features in each front-end test case in all the front-end test cases, and obtain the test feature matrix of the system version set to be tested.
本申请实施例中,所有前端测试案例中每一前端测试案例中的特征对应的特征值用于表征该特征在该前端测试案例中的重要程度。In the embodiment of the present application, the feature value corresponding to a feature in each front-end test case in all front-end test cases is used to represent the importance of the feature in the front-end test case.
本申请实施例中,测试平台可以基于词频-逆向文件频率算法,计算所有前端测试案例中每一前端测试案例中的特征对应的特征值,得到待测系统版本集合的测试特征矩阵。In the embodiment of the present application, the test platform can calculate the eigenvalues corresponding to the features in each front-end test case in all front-end test cases based on the word frequency-reverse file frequency algorithm, and obtain the test feature matrix of the system version set to be tested.
这里,词频-逆向文件频率(termfrequency–inverse document frequency,TF-IDF)算法为一种针对词语的统计分析方法,用于评估一个词语对一个文档集或者一个语料库的重要程度。一个词的重要程度跟它在文章中出现的次数成正比,跟它在语料库出现的次数成反比。TF=(某词在文档中出现的次数/文档的总词量),IDF=log(语料库中文档总数/包含该词的文档数+1),TF-IDF的结果为TF×IDF。Here, the term frequency-inverse document frequency (TF-IDF) algorithm is a statistical analysis method for words, which is used to evaluate the importance of a word to a document set or a corpus. The importance of a word is directly proportional to the number of times it appears in the article, and inversely proportional to the number of times it appears in the corpus. TF=(the number of times a word appears in the document/the total number of words in the document), IDF=log(the total number of documents in the corpus/the number of documents containing the word+1), the result of TF-IDF is TF×IDF.
本申请实施例中,测试平台基于TF-IDF算法,计算所有前端测试案例N中第n个案例中的第m个特征对应的特征值为x nm,进而由所有前端测试案例中的所有特征对应的特征值,生成待测系统版本集合的测试特征矩阵。这里,测试特征矩阵
Figure PCTCN2021136833-appb-000001
Figure PCTCN2021136833-appb-000002
其中,待测系统版本集合的测试特征矩阵X的矩阵大小为N×M,n为大于等于1且小于等于N的正整数,N为待测系统版本集合中的前端测试案例的总数;m为大于等于1且小于等于N的正整数,M为每一前端测试案例的特征数。
In the embodiment of this application, the test platform is based on the TF-IDF algorithm to calculate the feature value corresponding to the mth feature in the nth case of all front-end test cases N, and then all the features in all front-end test cases correspond to The eigenvalues of , generate the test feature matrix of the system version set under test. Here, the test feature matrix
Figure PCTCN2021136833-appb-000001
Figure PCTCN2021136833-appb-000002
Among them, the matrix size of the test feature matrix X of the system version set to be tested is N×M, n is a positive integer greater than or equal to 1 and less than or equal to N, and N is the total number of front-end test cases in the system version set to be tested; m is A positive integer greater than or equal to 1 and less than or equal to N, where M is the number of features of each front-end test case.
步骤203、计算每一历史系统版本集合中所有前端历史案例中每一前端历史案例中的特征对应的特征值,得到每一历史系统版本集合的历史特征矩阵。Step 203: Calculate the eigenvalues corresponding to the features in each front-end historical case in all front-end historical cases in each historical system version set, and obtain the historical feature matrix of each historical system version set.
本申请实施例中,每一历史系统版本集合中所有前端历史案例中每一前端历史案例中的特征对应的特征值用于表征该特征在前端历史案例中的重要程度。这里,所有前端测试案例中每一前端测试案例中的特征的总数与每一历史系统版本集合中所有前端历史案例中每一前端历史案例中的特征的总数可以相同,也可以不同。在本申请实施例中,以所有前端测试案例中每一前端测试案例中的特征的总数与每一历史系统版本集合中所有前端历史案例中每一前端历史案例中特征的总数相同为例进行说明。In the embodiment of the present application, the feature value corresponding to the feature in each front-end historical case in all front-end historical cases in each historical system version set is used to represent the importance of the feature in the front-end historical case. Here, the total number of features in each front-end test case in all front-end test cases may be the same as or different from the total number of features in each front-end historical case in each historical system version set. In the embodiment of this application, the total number of features in each front-end test case in all front-end test cases is the same as the total number of features in each front-end historical case in each historical system version set as an example. .
本申请实施例中,测试平台基于TF-IDF算法,计算至少两个历史系统版本集合中第k个历史系统版本集合中,所有前端历史案例N中第n个前端历史案例中的第m个特征对应的特征值
Figure PCTCN2021136833-appb-000003
进而由第k个历史系统版本集合中,所有前端历史案例中的所有特征对应的特征值,生成第k个历史系统版本集合的历史特征矩阵。这里,历史特征矩阵
Figure PCTCN2021136833-appb-000004
其中,第k个历史系统版本集合对应的历史特征矩阵P k的矩阵大小为M×N,n为大于等于1且小于等于N的正整数,N为每一历史系统版本集合中的前端历史案例的总数;m为大于等于1且小于等于N的正整数,M为每一前端历史案例的特征数;k为大于等于1且小于等于K的正整数,K为所有历史系统版本集合的总数。
In the embodiment of this application, the test platform is based on the TF-IDF algorithm, and calculates the m-th feature of the n-th front-end historical case in all front-end historical cases N in the k-th historical system version set in at least two historical system version sets corresponding eigenvalues
Figure PCTCN2021136833-appb-000003
Then, from the eigenvalues corresponding to all the features in all front-end historical cases in the kth historical system version set, a historical feature matrix of the kth historical system version set is generated. Here, the historical feature matrix
Figure PCTCN2021136833-appb-000004
Among them, the matrix size of the historical feature matrix P k corresponding to the kth historical system version set is M×N, n is a positive integer greater than or equal to 1 and less than or equal to N, and N is the front-end historical case in each historical system version set m is a positive integer greater than or equal to 1 and less than or equal to N, and M is the number of features of each front-end historical case; k is a positive integer greater than or equal to 1 and less than or equal to K, and K is the total number of all historical system version sets.
需要说明的是,步骤202和步骤203可以同时执行,步骤202和步骤203也可以分先后顺序执行,本申请不做具体限定。It should be noted that step 202 and step 203 may be performed simultaneously, or step 202 and step 203 may be performed sequentially, which is not specifically limited in this application.
步骤204、基于非负矩阵分解算法,对测试特征矩阵进行降维处理,得到降维后的测试特征矩阵。 Step 204 , based on the non-negative matrix factorization algorithm, perform dimensionality reduction processing on the test feature matrix to obtain a dimensionality-reduced test feature matrix.
本申请实施例中,测试平台在基于词频-逆向文件频率算法,计算所有前端测试案例中每一前端测试案例中的特征对应的特征值,得到待测系统版本集合的测试特征矩阵的情况下,为了高效处理通过测试特征矩阵存放的数据,测试平台通过非负矩阵分解算法对测试特征矩阵进行降维处理,得到降维后的测试特征矩阵。如此,在确保降维后的测试特征矩阵中的每一元素为非负值的情况下,利用降维后的测试特征矩阵替代原有的测试特征矩阵,此时,再对降维后的测试特征矩阵进行处理,不仅减少了存储空间,还减少了计算机资源的计算量。In the embodiment of the present application, the test platform calculates the eigenvalues corresponding to the features in each front-end test case in all front-end test cases based on the word frequency-reverse file frequency algorithm, and obtains the test feature matrix of the system version set to be tested. In order to efficiently process the data stored in the test feature matrix, the test platform performs dimensionality reduction processing on the test feature matrix through the non-negative matrix decomposition algorithm, and obtains the test feature matrix after dimensionality reduction. In this way, in the case of ensuring that each element in the dimension-reduced test feature matrix is a non-negative value, the dimension-reduced test feature matrix is used to replace the original test feature matrix. At this time, the dimension-reduced test feature matrix The feature matrix is processed, which not only reduces the storage space, but also reduces the calculation amount of computer resources.
这里,非负矩阵分解(Non-negative matrix factorization,NMF)算法为在矩阵中所有元素均为非负数约束条件下的矩阵分解方法,即对于给定一个非负矩阵A,NMF算法能够寻找到一个维度更小的非负矩阵U和非负矩阵V,即A≈U×V从而得到降维后的非负矩阵U。需要说明的是,在数学上,从计算的观点看,分解结果中存在负值是正确的,但负值元素在实际问题中往往是没有意义的。例如本申请实施例中,每一案例中的特征对应的特征值不可能有负值的特征,因此,利用NMF算法能够使得测试平台根据实际问题进行处理。Here, the non-negative matrix factorization (Non-negative matrix factorization, NMF) algorithm is a matrix factorization method under the constraint that all elements in the matrix are non-negative numbers, that is, for a given non-negative matrix A, the NMF algorithm can find a A non-negative matrix U and a non-negative matrix V with smaller dimensions, that is, A≈U×V, to obtain a dimensionally reduced non-negative matrix U. It should be noted that, in mathematics, from a calculation point of view, it is correct to have negative values in the decomposition results, but negative value elements are often meaningless in practical problems. For example, in the embodiment of the present application, the eigenvalues corresponding to the features in each case cannot have negative features. Therefore, using the NMF algorithm can enable the test platform to process according to actual problems.
步骤205、基于非负矩阵分解算法,对历史特征矩阵进行降维处理,得到降维后的历史特征矩阵。 Step 205 , based on the non-negative matrix factorization algorithm, perform dimensionality reduction processing on the historical feature matrix to obtain a dimensionally reduced historical feature matrix.
本申请实施例中,测试平台在基于词频-逆向文件频率算法,计算每一历史系统版本集合中所有前端历史案例中每一前端历史案例中的特征对应的特征值,得到每一历史系统版本集合的历史特征矩阵的情况下,为了高效处理通过历史特征矩阵存放的数据,测试平台通过非负矩阵分解算法对历史特征矩阵进行降维处理,得到降维后的历史特征矩阵。如此,在确保降维后的历史特征矩阵中的每一元素为非负值的情况下,利用降维后的历史特征矩阵替代原有的历史特征矩阵,此时,再对降维后的历史特征矩阵进行处理,不仅减少了存储空间,还减少了计算机资源的计算量。In the embodiment of this application, the test platform calculates the feature value corresponding to the feature in each front-end historical case in all front-end historical cases in each historical system version set based on the word frequency-reverse document frequency algorithm, and obtains each historical system version set In the case of the historical feature matrix, in order to efficiently process the data stored through the historical feature matrix, the test platform uses the non-negative matrix factorization algorithm to reduce the dimensionality of the historical feature matrix to obtain the historical feature matrix after dimensionality reduction. In this way, in the case of ensuring that each element in the historical feature matrix after dimensionality reduction is a non-negative value, the historical feature matrix after dimensionality reduction is used to replace the original historical feature matrix. At this time, the historical feature matrix after dimensionality reduction The feature matrix is processed, which not only reduces the storage space, but also reduces the calculation amount of computer resources.
需要说明的是,步骤204和步骤205可以同时执行,步骤204和步骤205也可以分先后执行,本申请不做具体限定。It should be noted that step 204 and step 205 may be performed simultaneously, and step 204 and step 205 may also be performed sequentially, which is not specifically limited in this application.
步骤206、计算降维后的测试特征矩阵中第n个前端测试案例的降维后的特征与降维后的历史特征矩阵中每一前端历史案例的降维后的特征的相似度,得到相似度矩阵。 Step 206, calculate the similarity between the dimensionality-reduced features of the nth front-end test case in the dimension-reduced test feature matrix and the dimension-reduced features of each front-end historical case in the dimension-reduced historical feature matrix, and obtain similarity degree matrix.
其中,n为大于等于1且小于等于N的正整数,N为待测系统版本集合中的前端测试案例的总数。Wherein, n is a positive integer greater than or equal to 1 and less than or equal to N, and N is the total number of front-end test cases in the system version set to be tested.
本申请实施例中,测试平台在基于非负矩阵分解算法,对测试特征矩阵进行降维处理,得到降维后的测试特征矩阵,以及基于非负矩阵分解算法,对历史特征矩阵进行降维处理,得到降维后的历史特征矩阵的情况下,计算降维后的测试特征中第n个前端测试案例的降维后的特征与降维后的历史特征矩阵中每一前端历史案例的降维后的特征的相似度,得到相似度矩阵,以使测试平台基于相似度矩阵,判断待测系统版本集合中的所有前端测试案例是否满足自动化测试条件。In the embodiment of the present application, the test platform performs dimensionality reduction processing on the test feature matrix based on the non-negative matrix decomposition algorithm, obtains the dimensionality-reduced test feature matrix, and performs dimensionality reduction processing on the historical feature matrix based on the non-negative matrix decomposition algorithm , when the dimensionality-reduced historical feature matrix is obtained, calculate the dimensionality-reduced feature of the nth front-end test case in the dimension-reduced test feature and the dimensionality reduction of each front-end historical case in the dimensionality-reduced historical feature matrix The similarity of the final features is obtained to obtain a similarity matrix, so that the test platform can judge whether all the front-end test cases in the system version set under test meet the automated test conditions based on the similarity matrix.
步骤207、基于相似度矩阵,确定所有前端测试案例满足自动化测试条件时,对待测系统版本集合中的所有前端测试案例进行自动化测试。 Step 207 , based on the similarity matrix, when it is determined that all front-end test cases meet the automated test conditions, perform automated tests on all front-end test cases in the system version set to be tested.
本申请实施例中,自动化测试条件为待测系统版本集合中的前端测试案例可以使用自动化脚本进行自动化测试的条件。In the embodiment of the present application, the automated test condition is the condition that the front-end test case in the system version set to be tested can use the automated script to perform the automated test.
本申请实施例中,测试平台在计算降维后的测试特征矩阵中第n个前端测试案例的降维后的特征与降维后的历史特征矩阵中每一前端历史案例的降维后的特征的相似度,得到相似度矩阵的情况下,基于相似度矩阵,确定所有前端测试案例满足自动化测试条 件时,对待测系统版本集合中的所有前端测试案例通过自动化脚本进行自动化测试。In the embodiment of the present application, the test platform calculates the dimensionality-reduced features of the nth front-end test case in the dimension-reduced test feature matrix and the dimension-reduced features of each front-end historical case in the dimension-reduced historical feature matrix In the case of obtaining the similarity matrix, based on the similarity matrix, when it is determined that all front-end test cases meet the automated test conditions, all front-end test cases in the system version set to be tested are automatically tested through automated scripts.
本申请实施例提供的测试案例处理方法,测试平台在获取到待测系统版本集合中的所有前端测试案例和所有前端历史案例后,首先,计算每一前端测试案例中的特征对应的特征值,得到待测系统版本集合的测试特征矩阵,计算每一前端历史案例中的特征对应的特征值,得到每一历史系统版本集合的历史特征矩阵;其次,通过非负矩阵算法,对测试特征矩阵和历史特征矩阵分别进行降维处理,并对降维后的测试特征矩阵和降维后的历史特征矩阵进行相似度处理,以得到相似度矩阵,进而根据相似度矩阵,确定所有前端测试案例满足自动化测试条件时,对所有前端测试案例进行自动化测试。如此,本申请解决了相关技术必须依赖于人工操作以及人工主观带来的不确定性,且至少存在效率低、准确性差的问题;实现了对前端测试案例的自动化执行建立了统一的标准,提高了判断的准确性,同时,无需依赖人工操作,提高了处理效率。In the test case processing method provided by the embodiment of the present application, after the test platform obtains all front-end test cases and all front-end historical cases in the system version set to be tested, first, calculates the feature value corresponding to the feature in each front-end test case, Obtain the test feature matrix of the system version set to be tested, calculate the eigenvalues corresponding to the features in each front-end historical case, and obtain the historical feature matrix of each historical system version set; secondly, through the non-negative matrix algorithm, the test feature matrix and Dimensionality reduction processing is performed on the historical feature matrix, and the similarity processing is performed on the reduced test feature matrix and the reduced historical feature matrix to obtain a similarity matrix, and then according to the similarity matrix, it is determined that all front-end test cases meet the requirements of automation When testing conditions, automate tests for all front-end test cases. In this way, this application solves the problem that related technologies must rely on manual operation and uncertainty brought by manual subjectivity, and at least has the problems of low efficiency and poor accuracy; realizes the establishment of a unified standard for the automatic execution of front-end test cases, and improves The accuracy of judgment is improved, and at the same time, it does not need to rely on manual operation, which improves the processing efficiency.
参见图3,图3是本申请实施例提供的测试案例处理方法的一个可选的流程示意图,将结合图3示出的步骤进行说明,Referring to FIG. 3, FIG. 3 is an optional schematic flowchart of the test case processing method provided in the embodiment of the present application, which will be described in conjunction with the steps shown in FIG. 3,
步骤301、获取待测系统版本集合中的所有测试案例。 Step 301. Obtain all test cases in the version set of the system to be tested.
步骤302、将待测系统版本集合中的所有测试案例输入至训练好的分类器中,得到训练好的分类器输出的待测系统版本集合中的前端测试案例。Step 302: Input all the test cases in the version set of the system under test into the trained classifier, and obtain the front-end test cases in the version set of the system under test output by the trained classifier.
本申请实施例中,待测系统版本集合中的所有测试案例包括前端测试案例和后端测试案例。In the embodiment of the present application, all test cases in the system version set to be tested include front-end test cases and back-end test cases.
这里,训练好的分类器用于将待测系统版本集合中的所有测试案例进行分类,以得到待测系统版本集合中所有测试案例中的前端测试案例。分类器是数据挖掘的一种的方法,分类器能够把数据库中的数据纪录映射到给定类别中的某一个,从而可以应用于数据预测。这里,分类器是数据挖掘中对样本进行分类的方法的统称,分类的方法包括决策树、逻辑回归、朴素贝叶斯、神经网络等算法,分类的方法还包括支持向量机(support vector machines,SVM)算法。Here, the trained classifier is used to classify all the test cases in the version set of the system under test to obtain the front-end test cases among all the test cases in the version set of the system under test. A classifier is a method of data mining. The classifier can map the data records in the database to one of the given categories, so that it can be applied to data prediction. Here, a classifier is a general term for methods for classifying samples in data mining. Classification methods include algorithms such as decision trees, logistic regression, naive Bayesian, and neural networks. Classification methods also include support vector machines (support vector machines, SVM) algorithm.
在一种可实现的场景中,参见图4所示,测试平台获取至少两个历史系统版本集合中每一历史系统版本集合中的所有已标记的前端历史案例和后端历史案例作为训练样本集之后,测试平台采用TF-IDF方法,计算出至少两个历史系统版本集合中每一历史系统版本集合中的前端历史案例中每一特征对应的特征值,和后端历史案例中每一特征对应的特征值,从而得到训练样本特征矩阵。测试平台通过训练样本特征矩阵对分类器进行训练,以得到训练好的分类器。In an achievable scenario, as shown in Figure 4, the test platform obtains all marked front-end historical cases and back-end historical cases in each historical system version set in at least two historical system version sets as a training sample set Afterwards, the test platform uses the TF-IDF method to calculate the eigenvalues corresponding to each feature in the front-end historical cases in each historical system version set in at least two historical system version sets, and the corresponding eigenvalues for each feature in the back-end historical cases eigenvalues, so as to obtain the training sample feature matrix. The test platform trains the classifier through the training sample feature matrix to obtain a trained classifier.
在一种可实现的应用场景中,以SVM为例进行说明,测试平台采用SVM进行分类训练,SVM作为一种二分类的模型,其主要是寻找特征空间上间隔最大的分类器,结合核函数,可以对非线性特征进行分类,实际实现可转换为一个求解凸二次规划的问题。首先,构造凸二次规划问题:In a realizable application scenario, SVM is used as an example to illustrate. The test platform uses SVM for classification training. SVM is a binary classification model, which mainly looks for the classifier with the largest interval in the feature space, combined with the kernel function , can classify nonlinear features, and the actual implementation can be converted into a problem of solving convex quadratic programming. First, construct a convex quadratic programming problem:
Figure PCTCN2021136833-appb-000005
Figure PCTCN2021136833-appb-000005
约束条件为:
Figure PCTCN2021136833-appb-000006
结合序列最小优化算法(Sequential minimal optimization,SMO),得到拉格朗日参数
Figure PCTCN2021136833-appb-000007
最优解
Figure PCTCN2021136833-appb-000008
The constraints are:
Figure PCTCN2021136833-appb-000006
Combined with the sequential minimal optimization algorithm (Sequential minimal optimization, SMO), the Lagrangian parameters are obtained
Figure PCTCN2021136833-appb-000007
Optimal solution
Figure PCTCN2021136833-appb-000008
再次,根据KKT条件
Figure PCTCN2021136833-appb-000009
及约束条件
Figure PCTCN2021136833-appb-000010
可得到拉格朗日参数最优解
Figure PCTCN2021136833-appb-000011
对应的
Figure PCTCN2021136833-appb-000012
取分类决策函数为:
Figure PCTCN2021136833-appb-000013
这里,b为确认每个样本对应的分类决策函数的参数,指 数核函数
Figure PCTCN2021136833-appb-000014
这里,δ为特征之间的距离,l为核函数的超参数。指数核函数对应的SVM分类器是指数函数的二分类器,则分类决策函数最终为
Figure PCTCN2021136833-appb-000015
以此对样本集进行训练,得到最终分类器。
Again, according to the KKT condition
Figure PCTCN2021136833-appb-000009
and constraints
Figure PCTCN2021136833-appb-000010
The optimal solution of the Lagrangian parameters can be obtained
Figure PCTCN2021136833-appb-000011
corresponding
Figure PCTCN2021136833-appb-000012
Take the classification decision function as:
Figure PCTCN2021136833-appb-000013
Here, b is the parameter to confirm the classification decision function corresponding to each sample, and the exponential kernel function
Figure PCTCN2021136833-appb-000014
Here, δ is the distance between features, and l is the hyperparameter of the kernel function. The SVM classifier corresponding to the exponential kernel function is a binary classifier of the exponential function, then the final classification decision function is
Figure PCTCN2021136833-appb-000015
Based on this, the sample set is trained to obtain the final classifier.
本申请实施例中,参见图4所示,测试平台获取到待测系统版本集合中的所有测试案例后,测试平台采用TF-IDF方法,计算出待测系统版本集合中的所有测试案例中每一特征对应的特征值,得到测试特征矩阵,将测试特征矩阵输入至训练好的分类器中,得到训练好的分类器输出的待测系统版本集合中的前端测试案例。In the embodiment of the present application, as shown in FIG. 4, after the test platform obtains all the test cases in the system version set to be tested, the test platform uses the TF-IDF method to calculate each test case in all the test cases in the system version set to be tested. The eigenvalue corresponding to a feature is obtained to obtain the test feature matrix, and the test feature matrix is input into the trained classifier to obtain the front-end test cases in the version set of the system under test output by the trained classifier.
在一些实施例中,参见图4所示,测试平台将待测系统版本集合中的所有测试案例输入至训练好的分类器中,得到训练好的分类器输出的待测系统版本集合中的前端测试案例之后,将得到的前端测试案例经过jieba模型,遍历每个前端测试案例,并将遍历后的前端测试案例标记为“前端”。如此,通过机器学习和分类器,对前端测试案例自动地进行前后端分类,释放人力,节约了人力成本,且减少了人工打标带来的错分风险,同时,提高了处理效率。In some embodiments, as shown in FIG. 4, the test platform inputs all test cases in the version set of the system under test into the trained classifier, and obtains the front end in the version set of the system under test output by the trained classifier. After the test cases, pass the obtained front-end test cases through the jieba model, traverse each front-end test case, and mark the traversed front-end test cases as "front-end". In this way, through machine learning and classifiers, front-end and back-end test cases are automatically classified, freeing manpower, saving labor costs, reducing the risk of misclassification caused by manual marking, and improving processing efficiency.
在一些实施例中,参见图4所示,测试平台对待测系统版本集合中的前端测试案例和后端测试案例进行标记后,为了提升分类器的分类精确度,测试平台会将待测系统版本集合中标记后的前端测试案例和后端测试案例重新加入到训练样本集中,对分类器进行持续训练,以使分类器更加精确快速地分类出前端测试案例。In some embodiments, as shown in FIG. 4, after the test platform marks the front-end test cases and the back-end test cases in the version set of the system to be tested, in order to improve the classification accuracy of the classifier, the test platform will use the version of the system to be tested The marked front-end test cases and back-end test cases in the collection are re-added to the training sample set, and the classifier is continuously trained, so that the classifier can classify the front-end test cases more accurately and quickly.
步骤303、获取至少两个历史系统版本集合中每一历史系统版本集合中的所有前端历史案例。 Step 303. Obtain all front-end historical cases in each historical system version set in at least two historical system version sets.
步骤304、计算所有前端测试案例中每一前端测试案例中的特征对应的特征值,得到待测系统版本集合的测试特征矩阵。Step 304: Calculate the eigenvalues corresponding to the features in each front-end test case in all the front-end test cases, and obtain the test feature matrix of the system version set to be tested.
步骤305、计算每一历史系统版本集合中所有前端历史案例中每一前端历史案例中的特征对应的特征值,得到每一历史系统版本集合的历史特征矩阵。Step 305: Calculate the eigenvalues corresponding to the features in each front-end historical case in all front-end historical cases in each historical system version set, and obtain the historical feature matrix of each historical system version set.
步骤306、基于非负矩阵分解算法,对测试特征矩阵进行降维处理,得到降维后的测试特征矩阵。 Step 306 , based on the non-negative matrix factorization algorithm, perform dimensionality reduction processing on the test feature matrix to obtain a dimensionality-reduced test feature matrix.
在一些实施例中,步骤306基于非负矩阵分解算法,对测试特征矩阵进行降维处理,得到降维后的测试特征矩阵,可以通过图5所示的步骤401至步骤403;或步骤401至步骤402以及步骤404至步骤407;或步骤401至步骤402、步骤404至步骤406以及步骤408至步骤411实现:In some embodiments, step 306 is based on the non-negative matrix factorization algorithm to perform dimensionality reduction processing on the test feature matrix to obtain the dimensionality-reduced test feature matrix, which can be performed through steps 401 to 403 shown in FIG. 5; or steps 401 to 403. Step 402 and step 404 to step 407; or step 401 to step 402, step 404 to step 406 and step 408 to step 411 to achieve:
步骤401、基于确定的测试特征矩阵降维后的特征数,通过非负矩阵分解算法,对测试特征矩阵进行分解,得到测试投影矩阵和测试基础矩阵。Step 401 : Decompose the test feature matrix through a non-negative matrix factorization algorithm based on the determined feature numbers after dimension reduction of the test feature matrix to obtain a test projection matrix and a test fundamental matrix.
本申请实施例中,测试平台基于降维后的特征数S的取值范围为
Figure PCTCN2021136833-appb-000016
选取正整数S,确定降维后的特征数S,并通过非负矩阵分解算法,对测试特征矩阵X进行分解,随机生成测试投影矩阵W1和测试基础矩阵B1。这里,测试投影矩阵W1的大小为N×S,测试基础矩阵B1的大小为S×M。
In the embodiment of this application, the value range of the test platform based on the feature number S after dimensionality reduction is
Figure PCTCN2021136833-appb-000016
Select a positive integer S to determine the feature number S after dimension reduction, and decompose the test feature matrix X through the non-negative matrix decomposition algorithm, and randomly generate the test projection matrix W1 and the test basic matrix B1. Here, the size of the test projection matrix W1 is N×S, and the size of the test fundamental matrix B1 is S×M.
步骤402、获取测试投影矩阵和测试基础矩阵相乘得到的第一乘积矩阵。 Step 402. Obtain a first product matrix obtained by multiplying the test projection matrix and the test fundamental matrix.
步骤403、若测试特征矩阵减去第一乘积矩阵得到的第一差值矩阵符合差值阈值矩阵,确定第一差值矩阵对应的测试投影矩阵为降维后的测试特征矩阵。Step 403: If the first difference matrix obtained by subtracting the first product matrix from the test feature matrix conforms to the difference threshold matrix, determine the test projection matrix corresponding to the first difference matrix as the reduced-dimensional test feature matrix.
本申请实施例中,差值阈值矩阵用于确定测试特征矩阵,与测试投影矩阵和测试基础矩阵相乘得到的第一乘积矩阵之间的差值的矩阵。示例性的,差值阈值矩阵中的每一元素的值可以为10 -6In the embodiment of the present application, the difference threshold matrix is used to determine the difference matrix between the test feature matrix and the first product matrix obtained by multiplying the test projection matrix and the test fundamental matrix. Exemplarily, the value of each element in the difference threshold matrix may be 10 -6 .
本申请实施例中,测试平台基于确定的测试特征矩阵降维后的特征数S,通过非负 矩阵分解算法,对测试特征矩阵X进行分解,得到测试投影矩阵W1和测试基础矩阵B1的情况下,获取测试投影矩阵W1和测试基础矩阵B1相乘得到的第一乘积矩阵Q1。若测试特征矩阵X减去第一乘积矩阵Q1得到的第一差值矩阵E1符合差值阈值矩阵E,由于测试平台需找到满足差值阈值矩阵E对应的测试投影矩阵为降维后的测试特征矩阵,此时,因为第一差值矩阵E1满足条件,则第一差值矩阵E1对应的测试投影矩阵W1为降维后的测试特征矩阵
Figure PCTCN2021136833-appb-000017
这里,降维后的测试特征矩阵
Figure PCTCN2021136833-appb-000018
其中,降维后的测试特征矩阵
Figure PCTCN2021136833-appb-000019
的大小为N×S。
In the embodiment of the present application, the test platform decomposes the test feature matrix X through the non-negative matrix decomposition algorithm based on the determined feature number S after dimensionality reduction of the test feature matrix, and obtains the test projection matrix W1 and the test basic matrix B1 , to obtain the first product matrix Q1 obtained by multiplying the test projection matrix W1 and the test fundamental matrix B1. If the first difference matrix E1 obtained by subtracting the first product matrix Q1 from the test feature matrix X conforms to the difference threshold matrix E, since the test platform needs to find the test projection matrix that satisfies the difference threshold matrix E, it is the test feature after dimensionality reduction At this time, because the first difference matrix E1 satisfies the condition, the test projection matrix W1 corresponding to the first difference matrix E1 is the test feature matrix after dimensionality reduction
Figure PCTCN2021136833-appb-000017
Here, the test feature matrix after dimensionality reduction
Figure PCTCN2021136833-appb-000018
Among them, the test feature matrix after dimensionality reduction
Figure PCTCN2021136833-appb-000019
The size of is N×S.
步骤404、若测试特征矩阵减去第一乘积矩阵得到的第一差值矩阵不符合差值阈值矩阵,通过投影矩阵调整模型对测试投影矩阵中的每一元素进行调整,得到调整后的测试投影矩阵。Step 404: If the first difference matrix obtained by subtracting the first product matrix from the test feature matrix does not conform to the difference threshold matrix, adjust each element in the test projection matrix through the projection matrix adjustment model to obtain the adjusted test projection matrix.
本申请实施例中,投影矩阵调整模型为:In the embodiment of this application, the projection matrix adjustment model is:
Figure PCTCN2021136833-appb-000020
Figure PCTCN2021136833-appb-000020
其中,W′ ns为调整后的测试投影矩阵中第n行第s列的元素,W为测试投影矩阵,W ns为测试投影矩阵中第n行第s列的元素,X为测试特征矩阵,B为测试基础矩阵,B T为测试基础矩阵的转置矩阵,(XB T) ns为测试特征矩阵X与测试基础矩阵的转置矩阵B T相乘后所得到的矩阵中第n行第s列的元素,(WBB T) ns为测试投影矩阵W、测试基础矩阵B和测试基础矩阵的转置矩阵B T相乘后所得到的矩阵中第n行第s列的元素。 Among them, W' ns is the element in row n and column s in the adjusted test projection matrix, W is the test projection matrix, W ns is the element in row n and column s in the test projection matrix, X is the test feature matrix, B is the test fundamental matrix, B T is the transpose matrix of the test fundamental matrix, (XB T ) ns is the nth row s of the matrix obtained by multiplying the test feature matrix X and the transpose matrix B T of the test fundamental matrix The elements of the column, (WBB T ) ns are the elements of the nth row and the sth column in the matrix obtained by multiplying the test projection matrix W, the test fundamental matrix B and the transpose matrix B T of the test fundamental matrix.
本申请其他实施例中,测试平台确定测试特征矩阵X减去第一乘积矩阵Q1得到的第一差值矩阵E1不符合差值阈值矩阵E,通过投影矩阵调整模型对测试投影矩阵W1中的每一元素进行调整,得到调整后的测试投影矩阵W11。In other embodiments of the present application, the test platform determines that the first difference matrix E1 obtained by subtracting the first product matrix Q1 from the test feature matrix X does not meet the difference threshold matrix E, and adjusts the model for each of the test projection matrix W1 through the projection matrix. One element is adjusted to obtain the adjusted test projection matrix W11.
步骤405、通过基础矩阵调整模型对测试基础矩阵中的每一元素进行调整,得到调整后的测试基础矩阵。Step 405: Adjust each element in the test fundamental matrix through the fundamental matrix adjustment model to obtain an adjusted test fundamental matrix.
本申请实施例中,基础矩阵调整模型为:In the embodiment of this application, the basic matrix adjustment model is:
Figure PCTCN2021136833-appb-000021
Figure PCTCN2021136833-appb-000021
其中,B′ sm为调整后的测试基础矩阵中第s行第m列的元素,B为测试基础矩阵,B sm为测试基础矩阵中第s行第m列的元素,X为测试特征矩阵,W为测试投影矩阵,W T为测试投影矩阵的转置矩阵,(W TX) sm为测试投影矩阵的转置矩阵W T与测试特征矩阵X相乘后所得到的矩阵中第s行第m列的元素,(W TWB) sm为测试投影矩阵的转置矩阵W T、测试投影矩阵W和测试基础矩阵B相乘后所得到的矩阵中第s行第m列的元素。 Among them, B'sm is the element of the sth row and the mth column in the adjusted test fundamental matrix, B is the test fundamental matrix, B sm is the element of the sth row and the mth column in the test fundamental matrix, X is the test feature matrix, W is the test projection matrix, W T is the transpose matrix of the test projection matrix, (W T X) sm is the matrix obtained by multiplying the transpose matrix W T of the test projection matrix by the test feature matrix X The elements in column m, (W T WB ) sm are the elements in row s and column m in the matrix obtained by multiplying the transposition matrix W T of the test projection matrix, the test projection matrix W and the test fundamental matrix B.
本申请实施例中,测试平台通过基础矩阵调整模型对基础投影矩阵B1中的每一元素进行调整,得到调整后的测试基础矩阵B11。In the embodiment of the present application, the test platform adjusts each element in the basic projection matrix B1 through the basic matrix adjustment model to obtain the adjusted test basic matrix B11.
步骤406、获取调整后的测试投影矩阵和调整后的测试基础矩阵相乘得到的第二乘积矩阵。Step 406: Obtain a second product matrix obtained by multiplying the adjusted test projection matrix and the adjusted test fundamental matrix.
步骤407、若测试特征矩阵减去第二乘积矩阵得到的第二差值矩阵符合差值阈值矩阵,确定第二差值矩阵对应的调整后的测试投影矩阵为降维后的测试特征矩阵。Step 407: If the second difference matrix obtained by subtracting the second product matrix from the test feature matrix conforms to the difference threshold matrix, determine that the adjusted test projection matrix corresponding to the second difference matrix is the reduced-dimensional test feature matrix.
本申请实施例中,测试平台获取调整后的测试投影矩阵W11和调整后的测试基础矩阵B11相乘得到的第二乘积矩阵Q2;若测试特征矩阵X减去第二乘积矩阵Q2得到的第二差值矩阵E2符合差值阈值矩阵E,由于测试平台需找到满足差值阈值矩阵E对应的测试投影矩阵为降维后的测试特征矩阵,此时,因为第二差值矩阵E2满足条件,则确定 第二差值矩阵E2对应的调整后的测试投影矩阵W11为降维后的测试特征矩阵
Figure PCTCN2021136833-appb-000022
In the embodiment of the present application, the test platform obtains the second product matrix Q2 obtained by multiplying the adjusted test projection matrix W11 and the adjusted test fundamental matrix B11; The difference matrix E2 conforms to the difference threshold matrix E. Since the test platform needs to find the test projection matrix corresponding to the difference threshold matrix E, it is the test feature matrix after dimensionality reduction. At this time, because the second difference matrix E2 satisfies the condition, then Determine the adjusted test projection matrix W11 corresponding to the second difference matrix E2 as the test feature matrix after dimensionality reduction
Figure PCTCN2021136833-appb-000022
步骤408、若测试特征矩阵减去第二乘积矩阵得到的第二差值矩阵不符合差值阈值矩阵,通过投影矩阵调整模型对调整后的测试投影矩阵中的每一元素进行调整,得到新调整后的测试投影矩阵。Step 408: If the second difference matrix obtained by subtracting the second product matrix from the test feature matrix does not conform to the difference threshold matrix, adjust each element in the adjusted test projection matrix through the projection matrix adjustment model to obtain a new adjustment After the test projection matrix.
步骤409、通过基础矩阵调整模型对调整后的测试基础矩阵中的每一元素进行调整,得到新调整后的测试基础矩阵。Step 409: Adjust each element in the adjusted test fundamental matrix through the fundamental matrix adjustment model to obtain a new adjusted test fundamental matrix.
步骤410、获取新调整后的测试投影矩阵和新调整后的测试基础矩阵相乘得到的第三乘积矩阵。Step 410: Obtain a third product matrix obtained by multiplying the newly adjusted test projection matrix and the newly adjusted test fundamental matrix.
步骤411、若测试特征矩阵减去第三乘积矩阵得到的第三差值矩阵符合差值阈值矩阵,确定第三差值矩阵对应的新调整后的测试投影矩阵为降维后的测试特征矩阵。Step 411: If the third difference matrix obtained by subtracting the third product matrix from the test feature matrix conforms to the difference threshold matrix, determine that the newly adjusted test projection matrix corresponding to the third difference matrix is the reduced-dimensional test feature matrix.
本申请实施例中,首先,测试平台确定测试特征矩阵X减去第二乘积矩阵Q2得到的第二差值矩阵E2不符合差值阈值矩阵E,通过投影矩阵调整模型对调整后的测试投影矩阵W11中的每一元素进行调整,得到新调整后的测试投影矩阵W12;其次,测试平台通过基础矩阵调整模型对调整后的测试基础矩阵B11中的每一元素进行调整,得到新调整后的测试基础矩阵B12;然后,测试平台获取新调整后的测试投影矩阵W12和新调整后的测试基础矩阵B12相乘得到的第三乘积矩阵Q3;最后,测试平台确定测试特征矩阵X减去第三乘积矩阵Q3得到的第三差值矩阵E3符合差值阈值矩阵E,确定第三差值矩阵E3对应的新调整后的测试投影矩阵W12为降维后的测试特征矩阵
Figure PCTCN2021136833-appb-000023
需要说明的是,本申请实施例对于降维后的测试特征矩阵
Figure PCTCN2021136833-appb-000024
的确定,可以是测试平台对测试投影矩阵经过一次调整后得到满足条件的降维后的测试特征矩阵,也可以是测试平台对测试投影矩阵经过多次调整后,得到满足条件的降维后的测试特征矩阵。也就是说,本申请对于调整的循环次数不作具体的限定,以得到满足条件的降维后的测试特征矩阵为准。这里,由于测试平台需找到满足差值阈值矩阵E对应的测试投影矩阵为降维后的测试特征矩阵,此时,因为第三差值矩阵E3满足条件,则确定第三差值矩阵E3对应的新调整后的测试投影矩阵W12为降维后的测试特征矩阵
Figure PCTCN2021136833-appb-000025
本申请实施例中,测试平台利用降维后的测试特征矩阵替代原有的测试特征矩阵,不仅减少了存储空间,还减少了计算机资源的计算量以及计算复杂度,且特征表征力提高,同时是否对所有前端测试案例进行自动化测试,提供了准确的数据作为计算依据。
In the embodiment of the present application, first, the test platform determines that the second difference matrix E2 obtained by subtracting the second product matrix Q2 from the test feature matrix X does not meet the difference threshold matrix E, and the adjusted test projection matrix is adjusted by the projection matrix adjustment model Each element in W11 is adjusted to obtain the newly adjusted test projection matrix W12; secondly, the test platform adjusts each element in the adjusted test basic matrix B11 through the basic matrix adjustment model to obtain the newly adjusted test The basic matrix B12; then, the test platform obtains the third product matrix Q3 obtained by multiplying the newly adjusted test projection matrix W12 and the newly adjusted test basic matrix B12; finally, the test platform determines the test feature matrix X minus the third product The third difference matrix E3 obtained by matrix Q3 conforms to the difference threshold matrix E, and the newly adjusted test projection matrix W12 corresponding to the third difference matrix E3 is determined to be the test feature matrix after dimensionality reduction
Figure PCTCN2021136833-appb-000023
It should be noted that, in the embodiment of the present application, for the dimensionality-reduced test feature matrix
Figure PCTCN2021136833-appb-000024
The determination of , can be that the test platform adjusts the test projection matrix once to obtain the dimensionality-reduced test feature matrix that satisfies the conditions, or it can be that the test platform obtains the dimensionality-reduced feature matrix that satisfies the conditions after multiple adjustments to the test projection matrix Test feature matrix. That is to say, the present application does not specifically limit the number of adjustment cycles, and the dimensionality-reduced test feature matrix that satisfies the conditions shall prevail. Here, because the test platform needs to find the test projection matrix corresponding to the difference threshold matrix E as the test feature matrix after dimensionality reduction, at this time, because the third difference matrix E3 satisfies the condition, then determine the third difference matrix E3 corresponding to The newly adjusted test projection matrix W12 is the test feature matrix after dimensionality reduction
Figure PCTCN2021136833-appb-000025
In the embodiment of the present application, the test platform replaces the original test feature matrix with the reduced-dimensional test feature matrix, which not only reduces the storage space, but also reduces the calculation amount and computational complexity of computer resources, and the feature representation power is improved. At the same time Whether automated testing is performed on all front-end test cases, and accurate data is provided as the basis for calculation.
步骤307、基于非负矩阵分解算法,对历史特征矩阵进行降维处理,得到降维后的历史特征矩阵。 Step 307 , based on the non-negative matrix factorization algorithm, perform dimensionality reduction processing on the historical feature matrix to obtain a dimensionally reduced historical feature matrix.
在一些实施例中,步骤307基于非负矩阵分解算法,对历史特征矩阵进行降维处理,得到降维后的历史特征矩阵,可以通过图6所示的步骤501至步骤503;或步骤501至步骤502以及步骤504至步骤507;或步骤501至步骤502、步骤504至步骤506以及步骤508至步骤511实现:In some embodiments, step 307 is based on the non-negative matrix factorization algorithm to perform dimensionality reduction processing on the historical feature matrix to obtain the dimensionality-reduced historical feature matrix, which can be performed through steps 501 to 503 shown in FIG. 6; or steps 501 to 503. Step 502 and step 504 to step 507; or step 501 to step 502, step 504 to step 506 and step 508 to step 511 to achieve:
步骤501、基于确定的历史特征矩阵降维后的特征数,通过非负矩阵分解算法,对历史特征矩阵进行分解,得到历史投影矩阵和历史基础矩阵。Step 501 : Based on the determined feature numbers of the historical feature matrix after dimension reduction, the historical feature matrix is decomposed through a non-negative matrix factorization algorithm to obtain a historical projection matrix and a historical fundamental matrix.
本申请实施例中,测试平台基于降维后的特征数S的取值范围为
Figure PCTCN2021136833-appb-000026
选取正整数S,确定降维后的特征数S,并通过非负矩阵分解算法,对历史特征矩阵P k进行分解,随机生成历史投影矩阵W2和历史基础矩阵B2。其中,历史投影矩阵W2的大小为N×S,历史基础矩阵B2的大小为S×M。
In the embodiment of this application, the value range of the test platform based on the feature number S after dimensionality reduction is
Figure PCTCN2021136833-appb-000026
Select a positive integer S to determine the feature number S after dimension reduction, and decompose the historical feature matrix P k through the non-negative matrix decomposition algorithm, and randomly generate the historical projection matrix W2 and historical basic matrix B2. Wherein, the size of the historical projection matrix W2 is N×S, and the size of the historical basic matrix B2 is S×M.
步骤502、获取历史投影矩阵和历史基础矩阵相乘得到的第四乘积矩阵。 Step 502. Obtain a fourth product matrix obtained by multiplying the historical projection matrix and the historical fundamental matrix.
步骤503、若历史特征矩阵减去第四乘积矩阵得到的第四差值矩阵符合差值阈值矩阵,确定所述第四差值矩阵对应的历史投影矩阵为降维后的历史特征矩阵。Step 503 : If the fourth difference matrix obtained by subtracting the fourth product matrix from the historical feature matrix conforms to the difference threshold matrix, determine that the historical projection matrix corresponding to the fourth difference matrix is the historical feature matrix after dimensionality reduction.
本申请实施例中,差值阈值矩阵用于确定历史特征矩阵,与历史投影矩阵和历史基 础矩阵相乘得到的第一乘积矩阵之间的差值的矩阵。示例性的,差值阈值矩阵中的每一元素的值可以为10 -6In the embodiment of the present application, the difference threshold matrix is used to determine the difference matrix between the historical feature matrix and the first product matrix obtained by multiplying the historical projection matrix and the historical fundamental matrix. Exemplarily, the value of each element in the difference threshold matrix may be 10 -6 .
本申请实施例中,测试平台基于确定的历史特征矩阵降维后的特征数S,通过非负矩阵分解算法,对历史特征矩阵P k进行分解,得到历史投影矩阵W2和历史基础矩阵B2的情况下,获取历史投影矩阵W2和历史基础矩阵B2相乘得到的第四乘积矩阵Q4。若历史特征矩阵P k减去第四乘积矩阵Q4得到的第四差值矩阵E4符合差值阈值矩阵E,由于测试平台需找到满足差值阈值矩阵E对应的历史投影矩阵为降维后的历史特征矩阵,此时,因为第四差值矩阵E4满足条件,则第四差值矩阵E4对应的历史投影矩阵W2为降维后的历史特征矩阵
Figure PCTCN2021136833-appb-000027
这里,降维后的历史特征矩阵
Figure PCTCN2021136833-appb-000028
其中,降维后的历史特征矩阵
Figure PCTCN2021136833-appb-000029
的大小为S×N。
In the embodiment of this application, the test platform decomposes the historical feature matrix P k through the non-negative matrix decomposition algorithm based on the feature number S after the dimensionality reduction of the determined historical feature matrix, and obtains the situation of the historical projection matrix W2 and the historical basic matrix B2 Next, obtain the fourth product matrix Q4 obtained by multiplying the historical projection matrix W2 and the historical fundamental matrix B2. If the fourth difference matrix E4 obtained by subtracting the fourth product matrix Q4 from the historical feature matrix Pk conforms to the difference threshold matrix E, since the test platform needs to find the historical projection matrix that satisfies the difference threshold matrix E, it is the dimension-reduced history Feature matrix, at this time, because the fourth difference matrix E4 satisfies the condition, the historical projection matrix W2 corresponding to the fourth difference matrix E4 is the historical feature matrix after dimensionality reduction
Figure PCTCN2021136833-appb-000027
Here, the historical feature matrix after dimensionality reduction
Figure PCTCN2021136833-appb-000028
Among them, the historical feature matrix after dimensionality reduction
Figure PCTCN2021136833-appb-000029
The size is S×N.
步骤504、若历史特征矩阵减去第四乘积矩阵得到的第四差值矩阵不符合差值阈值矩阵,通过投影矩阵调整模型对历史投影矩阵中的每一元素进行调整,得到调整后的历史投影矩阵。Step 504: If the fourth difference matrix obtained by subtracting the fourth product matrix from the historical feature matrix does not conform to the difference threshold matrix, adjust each element in the historical projection matrix through the projection matrix adjustment model to obtain the adjusted historical projection matrix.
步骤505、通过基础矩阵调整模型对历史基础矩阵中的每一元素进行调整,得到调整后的历史基础矩阵。Step 505: Adjust each element in the historical basic matrix through the basic matrix adjustment model to obtain an adjusted historical basic matrix.
本申请实施例中,测试平台确定历史特征矩阵P k减去第四乘积矩阵Q4得到的第四差值矩阵E4不符合差值阈值矩阵E,通过投影矩阵调整模型对历史投影矩阵W2中的每一元素进行调整,得到调整后的历史投影矩阵W21。进一步的,通过基础矩阵调整模型对基础投影矩阵B2中的每一元素进行调整,得到调整后的基础投影矩阵B21。 In the embodiment of the present application, the test platform determines that the fourth difference matrix E4 obtained by subtracting the fourth product matrix Q4 from the historical feature matrix Pk does not meet the difference threshold matrix E, and adjusts the model for each historical projection matrix W2 through the projection matrix. One element is adjusted to obtain the adjusted historical projection matrix W21. Further, each element in the basic projection matrix B2 is adjusted through the basic matrix adjustment model to obtain the adjusted basic projection matrix B21.
步骤506、获取调整后的历史投影矩阵和调整后的历史基础矩阵相乘得到的第五乘积矩阵。Step 506: Obtain a fifth product matrix obtained by multiplying the adjusted historical projection matrix and the adjusted historical fundamental matrix.
步骤507、若历史特征矩阵减去第五乘积矩阵得到的第五差值矩阵符合差值阈值矩阵,确定第五差值矩阵对应的调整后的历史投影矩阵为降维后的历史特征矩阵。Step 507: If the fifth difference matrix obtained by subtracting the fifth product matrix from the historical feature matrix conforms to the difference threshold matrix, determine that the adjusted historical projection matrix corresponding to the fifth difference matrix is the reduced dimensionality historical feature matrix.
本申请实施例中,测试平台获取调整后的历史投影矩阵W21和调整后的历史基础矩阵B21相乘得到的第五乘积矩阵Q5;若历史特征矩阵P k减去第五乘积矩阵Q5得到的第五差值矩阵E5符合差值阈值矩阵E,由于测试平台需找到满足差值阈值矩阵E对应的历史投影矩阵为降维后的历史特征矩阵,此时,因为第五差值矩阵E5满足条件,则确定第五差值矩阵E5对应的调整后的历史投影矩阵W21为降维后的历史特征矩阵
Figure PCTCN2021136833-appb-000030
In the embodiment of the present application, the test platform obtains the fifth product matrix Q5 obtained by multiplying the adjusted historical projection matrix W21 and the adjusted historical fundamental matrix B21; The five-difference matrix E5 conforms to the difference threshold matrix E. Since the test platform needs to find that the historical projection matrix corresponding to the difference threshold matrix E is the historical feature matrix after dimensionality reduction, at this time, because the fifth difference matrix E5 satisfies the condition, Then determine that the adjusted historical projection matrix W21 corresponding to the fifth difference matrix E5 is the historical feature matrix after dimensionality reduction
Figure PCTCN2021136833-appb-000030
步骤508、若历史特征矩阵减去第五乘积矩阵得到的第五差值矩阵不符合差值阈值矩阵,通过投影矩阵调整模型对调整后的历史投影矩阵中的每一元素进行调整,得到新调整后的历史投影矩阵。Step 508: If the fifth difference matrix obtained by subtracting the fifth product matrix from the historical feature matrix does not conform to the difference threshold matrix, adjust each element in the adjusted historical projection matrix through the projection matrix adjustment model to obtain a new adjusted The post-historical projection matrix.
步骤509、通过基础矩阵调整模型对调整后的历史基础矩阵中的每一元素进行调整,得到新调整后的历史基础矩阵。Step 509: Adjust each element in the adjusted historical basic matrix through the basic matrix adjustment model to obtain a new adjusted historical basic matrix.
步骤510、获取新调整后的历史投影矩阵和新调整后的历史基础矩阵相乘得到的第六乘积矩阵。Step 510: Obtain a sixth product matrix obtained by multiplying the newly adjusted historical projection matrix and the newly adjusted historical fundamental matrix.
步骤511、若历史特征矩阵减去第六乘积矩阵得到的第六差值矩阵符合差值阈值矩阵,确定第六差值矩阵对应的新调整后的历史投影矩阵为降维后的历史特征矩阵。Step 511 : If the sixth difference matrix obtained by subtracting the sixth product matrix from the historical feature matrix conforms to the difference threshold matrix, determine that the newly adjusted historical projection matrix corresponding to the sixth difference matrix is the dimensionality-reduced historical feature matrix.
本申请实施例中,首先,测试平台确定历史特征矩阵P k减去第五乘积矩阵Q5得到的第五差值矩阵E5不符合差值阈值矩阵E,通过投影矩阵调整模型对调整后的历史投影矩阵W21中的每一元素进行调整,得到新调整后的历史投影矩阵W22;其次,测试平台通过基础矩阵调整模型对调整后的历史基础矩阵B21中的每一元素进行调整,得到新调整 后的历史基础矩阵B22;然后,测试平台获取新调整后的历史投影矩阵W22和新调整后的历史基础矩阵B22相乘得到的第六乘积矩阵Q6;最后,测试平台确定历史特征矩阵P k减去第六乘积矩阵Q6得到的第六差值矩阵E6符合差值阈值矩阵E,确定第六差值矩阵E6对应的新调整后的历史投影矩阵W22为降维后的历史特征矩阵
Figure PCTCN2021136833-appb-000031
需要说明的是,本申请实施例对于降维后的历史特征矩阵
Figure PCTCN2021136833-appb-000032
的确定,可以是测试平台对历史投影矩阵经过一次调整后得到满足条件的降维后的历史特征矩阵,也可以是测试平台对历史投影矩阵经过多次调整后,得到满足条件的降维后的历史特征矩阵。也就是说,本申请对于调整的循环次数不作具体的限定,以得到满足条件的降维后的历史特征矩阵为准。这里,由于测试平台需找到满足差值阈值矩阵E对应的历史投影矩阵为降维后的历史特征矩阵,此时,因为第六差值矩阵E6满足条件,则确定第六差值矩阵E6对应的新调整后的历史投影矩阵W22为降维后的历史特征矩阵
Figure PCTCN2021136833-appb-000033
本申请实施例中,测试平台利用降维后的历史特征矩阵替代原有的历史特征矩阵,不仅减少了存储空间,还减少了计算机资源的计算量以及计算复杂度,且特征表征力提高,同时是否对所有前端测试案例进行自动化测试,提供了准确的数据作为计算依据。
In the embodiment of the present application, first, the test platform determines that the fifth difference matrix E5 obtained by subtracting the fifth product matrix Q5 from the historical feature matrix Pk does not conform to the difference threshold matrix E, and adjusts the model through the projection matrix to adjust the historical projection Each element in the matrix W21 is adjusted to obtain the newly adjusted historical projection matrix W22; secondly, the test platform adjusts each element in the adjusted historical basic matrix B21 through the basic matrix adjustment model to obtain the newly adjusted The historical basic matrix B22; then, the test platform obtains the sixth product matrix Q6 obtained by multiplying the newly adjusted historical projection matrix W22 and the newly adjusted historical basic matrix B22; finally, the test platform determines the historical feature matrix P k minus the first The sixth difference matrix E6 obtained by the six product matrix Q6 conforms to the difference threshold matrix E, and the newly adjusted historical projection matrix W22 corresponding to the sixth difference matrix E6 is determined to be the historical feature matrix after dimensionality reduction
Figure PCTCN2021136833-appb-000031
It should be noted that, in the embodiment of the present application, for the dimensionality-reduced historical feature matrix
Figure PCTCN2021136833-appb-000032
The determination of , can be the dimensionality-reduced historical feature matrix that satisfies the conditions after the test platform adjusts the historical projection matrix once, or the dimensionality-reduced feature matrix that meets the conditions after the test platform adjusts the historical projection matrix many times. Historical feature matrix. That is to say, the present application does not specifically limit the number of adjustment cycles, and the dimensionality-reduced historical feature matrix that satisfies the conditions is obtained. Here, since the test platform needs to find that the historical projection matrix corresponding to the difference threshold matrix E is the historical feature matrix after dimensionality reduction, at this time, because the sixth difference matrix E6 satisfies the condition, it is determined that the sixth difference matrix E6 corresponds to The newly adjusted historical projection matrix W22 is the historical feature matrix after dimensionality reduction
Figure PCTCN2021136833-appb-000033
In the embodiment of this application, the test platform replaces the original historical feature matrix with the historical feature matrix after dimensionality reduction, which not only reduces the storage space, but also reduces the calculation amount and computational complexity of computer resources, and the feature representation power is improved. At the same time Whether automated testing is performed on all front-end test cases, and accurate data is provided as the basis for calculation.
步骤308、计算降维后的测试特征矩阵中第n个前端测试案例的降维后的特征与降维后的历史特征矩阵中每一前端历史案例的降维后的特征的相似度,得到相似度矩阵。 Step 308, calculating the similarity between the dimensionality-reduced features of the nth front-end test case in the dimension-reduced test feature matrix and the dimension-reduced features of each front-end historical case in the dimension-reduced historical feature matrix, to obtain the similarity degree matrix.
本申请实施例中,降维后的测试特征矩阵
Figure PCTCN2021136833-appb-000034
每一降维后的历史特征矩阵
Figure PCTCN2021136833-appb-000035
测试平台通过余弦定理计算降维后的测试特征矩阵
Figure PCTCN2021136833-appb-000036
中第n个前端测试案例的降维后的特征,和第k个降维后的历史特征矩阵
Figure PCTCN2021136833-appb-000037
中每一前端历史案例的降维后的特征的相似度
Figure PCTCN2021136833-appb-000038
进而基于多个相似度
Figure PCTCN2021136833-appb-000039
得到相似度矩阵
Figure PCTCN2021136833-appb-000040
其中,相似度矩阵
Figure PCTCN2021136833-appb-000041
的大小为1×N。
In the embodiment of this application, the test feature matrix after dimensionality reduction
Figure PCTCN2021136833-appb-000034
The historical feature matrix after each dimensionality reduction
Figure PCTCN2021136833-appb-000035
The test platform calculates the test feature matrix after dimensionality reduction through the cosine theorem
Figure PCTCN2021136833-appb-000036
The dimensionality-reduced feature of the n-th front-end test case in , and the historical feature matrix of the k-th dimensionality-reduction matrix
Figure PCTCN2021136833-appb-000037
The similarity of the dimensionality-reduced features of each front-end historical case in
Figure PCTCN2021136833-appb-000038
based on multiple similarities
Figure PCTCN2021136833-appb-000039
Get the similarity matrix
Figure PCTCN2021136833-appb-000040
Among them, the similarity matrix
Figure PCTCN2021136833-appb-000041
The size is 1×N.
在一种可实现的应用场景中,测试平台通过余弦定理计算降维后的测试特征矩阵
Figure PCTCN2021136833-appb-000042
中第n行与降维后的历史特征矩阵
Figure PCTCN2021136833-appb-000043
中的每一列之间的相似度
Figure PCTCN2021136833-appb-000044
In a realizable application scenario, the test platform calculates the dimensionality-reduced test feature matrix through the cosine theorem
Figure PCTCN2021136833-appb-000042
The nth row in and the historical feature matrix after dimensionality reduction
Figure PCTCN2021136833-appb-000043
The similarity between each column in
Figure PCTCN2021136833-appb-000044
步骤309、基于相似度矩阵,确定所有前端测试案例满足自动化测试条件时,对待测系统版本集合中的所有前端测试案例进行自动化测试。 Step 309 , based on the similarity matrix, when it is determined that all front-end test cases satisfy the automated test conditions, perform automated tests on all front-end test cases in the system version set to be tested.
在一些实施例中,步骤309基于相似度矩阵,确定所有前端测试案例满足自动化测试条件时,对待测系统版本集合中的所有前端测试案例进行自动化测试,可以通过图7所示的步骤实现:In some embodiments, step 309 is based on the similarity matrix, and when it is determined that all front-end test cases meet the automated test conditions, all front-end test cases in the system version set to be tested are automatically tested, which can be implemented through the steps shown in Figure 7:
步骤601、获取至少两个历史系统版本集合中每一历史系统版本集合对应的权重。 Step 601. Obtain the weight corresponding to each historical system version set in at least two historical system version sets.
本申请实施例中,测试平台为每一历史系统版本集合对应的相似度矩阵θ k,设置一个权重w k,且该权重w k大于等于0且小于等于1。这里,为每一相似度矩阵θ k设置权重w k时,可以通过如下公式得到, In the embodiment of the present application, the test platform sets a weight w k for the similarity matrix θ k corresponding to each historical system version set, and the weight w k is greater than or equal to 0 and less than or equal to 1. Here, when setting the weight w k for each similarity matrix θ k , it can be obtained by the following formula,
Figure PCTCN2021136833-appb-000045
Figure PCTCN2021136833-appb-000045
其中,w k为每一相似度矩阵θ k对应的权重w k,k为每一历史系统版本集合在所有历史系统版本集合中排序号,K为所有历史系统版本集合的总数;需要说明的是,每一历 史系统版本集合的排序号k越小,则为每一历史系统版本集合对应的相似度矩阵θ k,设置的权重w k越大,表示待测系统在最小值k对应的历史系统中通过迭代的方式进行持续增量开发的可能性越大。 Among them, w k is the weight w k corresponding to each similarity matrix θ k , k is the sequence number of each historical system version set in all historical system version sets, and K is the total number of all historical system version sets; what needs to be explained is , the smaller the sorting number k of each historical system version set, the similarity matrix θ k corresponding to each historical system version set, the larger the weight w k is set, the historical system corresponding to the minimum value k of the system under test The greater the possibility of continuous incremental development in an iterative manner.
本申请实施例中,测试平台获取至少两个历史系统版本集合中每一历史系统版本集合k对应的权重w kIn the embodiment of the present application, the test platform obtains the weight w k corresponding to each historical system version set k in at least two historical system version sets.
步骤602、基于降维后的每一前端测试案例与降维后的每一历史版本集合中所有前端历史案例中的案例n之间的相似度矩阵、每一历史系统版本集合对应的权重,生成待测系统版本集合与所有历史系统版本集合之间的每一目标关联矩阵。 Step 602, based on the similarity matrix between each front-end test case after dimension reduction and case n in all front-end historical cases in each historical version set after dimensionality reduction, and the weight corresponding to each historical system version set, generate Each target correlation matrix between the version set of the system under test and the set of all historical system versions.
本申请实施例中,降维后的每一前端测试案例包括前端测试案例的降维后的特征,降维后的每一历史版本集合中所有前端历史案例中的案例包括每一前端历史案例的降维后的特征。In the embodiment of the present application, each front-end test case after dimension reduction includes the feature after dimension reduction of the front-end test case, and the cases in all front-end historical cases in each historical version set after dimension reduction include the features of each front-end historical case. Features after dimensionality reduction.
本申请实施例中,测试平台基于降维后的每一前端测试案例与降维后的每一历史版本集合中所有前端历史案例中的案例n之间的相似度矩阵
Figure PCTCN2021136833-appb-000046
组成目标相似度矩阵
Figure PCTCN2021136833-appb-000047
测试平台基于目标相似度矩阵θ k、每一历史系统版本集合k对应的权重w k,通过y k=w kθ k,生成待测系统版本集合与所有历史系统版本集合之间的每一目标关联矩阵y k
In the embodiment of this application, the test platform is based on the similarity matrix between each front-end test case after dimensionality reduction and case n in all front-end historical cases in each historical version set after dimensionality reduction
Figure PCTCN2021136833-appb-000046
Compose the target similarity matrix
Figure PCTCN2021136833-appb-000047
Based on the target similarity matrix θ k and the weight w k corresponding to each historical system version set k, the test platform generates each target between the system version set to be tested and all historical system version sets by y k =w k θ k Incidence matrix y k .
本申请其他实施例中,测试平台生成待测系统版本集合与所有历史系统版本集合之间的每一目标关联矩阵y k,还可以通过如下方式实现: In other embodiments of the present application, the test platform generates each target correlation matrix y k between the system version set to be tested and all historical system version sets, which can also be implemented in the following manner:
Step1、获取至少两个历史系统版本集合中每一历史系统版本集合对应的权重,和补充因子。Step 1. Acquire weights and supplementary factors corresponding to each historical system version set in at least two historical system version sets.
Step2、基于降维后的每一前端测试案例与降维后的每一历史版本集合中所有前端历史案例中的案例n之间的相似度矩阵、每一历史系统版本集合对应的权重和补充因子,生成待测系统版本集合与所有历史系统版本集合之间的每一目标关联矩阵。Step2, based on the similarity matrix between each front-end test case after dimensionality reduction and case n in all front-end historical cases in each historical version set after dimensionality reduction, the weight and supplementary factor corresponding to each historical system version set , to generate each target correlation matrix between the version set of the system under test and the set of all historical system versions.
本申请实施例中,测试平台获取至少两个历史系统版本集合中每一历史系统版本集合对应的权重w k,和补充因子h后,将降维后的每一前端测试案例与降维后的每一历史版本集合中所有前端历史案例中的案例n之间的相似度矩阵θ k、每一历史系统版本集合对应的权重w k和补充因子h,通过y k=w kθ k+h,生成待测系统版本集合与所有历史系统版本集合之间的每一目标关联矩阵y k。如此,通过设置补充因子h,防止生成的待测系统版本集合与所有历史系统版本集合之间的每一目标关联矩阵y k中的每一元素为0。 In the embodiment of this application, the test platform obtains the weight w k corresponding to each historical system version set in at least two historical system version sets, and after supplementing the factor h, compares each front-end test case after dimensionality reduction with the reduced dimensionality The similarity matrix θ k between cases n in all front-end historical cases in each historical version set, the weight w k corresponding to each historical system version set and the supplementary factor h, through y k =w k θ k +h, Generate each target correlation matrix y k between the version set of the system to be tested and the set of all historical system versions. In this way, by setting the supplementary factor h, each element in each target correlation matrix y k between the generated system-under-test version set and all historical system version sets is prevented from being 0.
步骤603、获取每一目标关联矩阵中每一行的最大值,并确定每一目标关联矩阵中所有行的最大值中,大于第一目标阈值的最大值的第一数量。Step 603: Obtain the maximum value of each row in each target correlation matrix, and determine a first number of maximum values greater than the first target threshold among the maximum values of all rows in each target correlation matrix.
本申请实施例中,测试平台获取每一目标关联矩阵y k中每一行的最大值,获取每一目标关联矩阵y k中所有行的最大值中大于第一目标阈值如1/2的最大值,并确定大于1/2的最大值的第一数量sum1。 In the embodiment of the present application, the test platform obtains the maximum value of each row in each target correlation matrix y k , and obtains the maximum value greater than the first target threshold such as 1/2 among the maximum values of all rows in each target correlation matrix y k , and determine the first quantity sum1 greater than the maximum value of 1/2.
步骤604、计算第一数量与待测系统版本集合中的所有前端测试案例的总数的比值,得到第一比值。 Step 604. Calculate the ratio of the first quantity to the total number of all front-end test cases in the system version set under test to obtain the first ratio.
本申请实施例中,测试平台计算第一数量sum1与待测系统版本集合中的所有前端测试案例的总数N的比值,得到第一比值z1,其中,
Figure PCTCN2021136833-appb-000048
In the embodiment of the present application, the test platform calculates the ratio of the first quantity sum1 to the total number N of all front-end test cases in the system version set to be tested to obtain the first ratio z1, wherein,
Figure PCTCN2021136833-appb-000048
步骤605、获取每一目标关联矩阵对应的所有第一比值中,大于第二目标阈值的第一比值的第二数量。 Step 605. Obtain a second number of first ratios greater than the second target threshold among all first ratios corresponding to each target correlation matrix.
本申请实施例中,测试平台获取每一目标关联矩阵y k对应的所有第一比值z1中大于第二目标阈值如1/2的第一比值z1,并确定大于1/2的第一比值z1的第二数量sum2。 In the embodiment of the present application, the test platform obtains the first ratio z1 greater than the second target threshold such as 1/2 among all the first ratios z1 corresponding to each target correlation matrix y k , and determines the first ratio z1 greater than 1/2 The second quantity sum2.
步骤606、计算第二数量与历史系统版本集合的总数的比值,得到第二比值。 Step 606. Calculate the ratio of the second quantity to the total number of the historical system version sets to obtain the second ratio.
本申请实施例中,测试平台计算第二数量sum2与历史系统版本集合的总数K的比值,得到第二比值z2,其中,
Figure PCTCN2021136833-appb-000049
In the embodiment of the present application, the test platform calculates the ratio of the second number sum2 to the total number K of the historical system version set to obtain the second ratio z2, wherein,
Figure PCTCN2021136833-appb-000049
步骤607、若第二比值大于第三目标阈值,确定所有前端测试案例满足自动化测试条件,对待测系统版本集合中的所有前端测试案例进行自动化测试。 Step 607. If the second ratio is greater than the third target threshold, determine that all front-end test cases meet the automated test conditions, and perform automated tests on all front-end test cases in the system version set to be tested.
本申请实施例中,测试平台确定第二比值z2大于第三目标阈值如1/2,表示待测系统版本集合中的所有前端测试案例与历史系统版本集合中的所有前端历史测试案例之间的差异不大,此时,确定所有前端测试案例满足自动化测试条件。且在开发人员对历史系统版本集合对应的自动化脚本中的部分脚本进行少量改动后,测试平台即可通过改动后的自动化脚本对待测系统版本集合中的所有前端测试案例进行自动化测试,如此,实现了对前端测试案例的自动化执行建立了统一的标准,提高了判断的准确性,同时,无需依赖人工操作,提高了处理效率。In the embodiment of the present application, the test platform determines that the second ratio z2 is greater than the third target threshold such as 1/2, which means that all front-end test cases in the system version set to be tested are compared with all front-end historical test cases in the historical system version set. The difference is not big. At this point, it is determined that all front-end test cases meet the automated test conditions. And after the developer makes a small change to some of the scripts in the automation scripts corresponding to the historical system version set, the test platform can perform automated tests on all front-end test cases in the system version set to be tested through the modified automation scripts, so that It establishes a unified standard for the automated execution of front-end test cases, improves the accuracy of judgment, and improves processing efficiency without relying on manual operations.
参见图8,图8是本申请实施例提供的测试案例处理方法的一个可选的流程示意图,将结合图8示出的步骤进行说明,Referring to FIG. 8, FIG. 8 is an optional flow chart of the test case processing method provided by the embodiment of the present application, which will be described in conjunction with the steps shown in FIG. 8,
步骤701、获取待测系统版本集合中的所有测试案例。 Step 701. Obtain all test cases in the version set of the system to be tested.
步骤702、将待测系统版本集合中的所有测试案例输入至训练好的分类器中,得到训练好的分类器输出的所有测试案例中的所有前端测试案例。Step 702: Input all test cases in the version set of the system to be tested into the trained classifier, and obtain all front-end test cases in all test cases output by the trained classifier.
步骤703、获取至少两个历史系统版本集合中每一历史系统版本集合中的所有前端历史案例。 Step 703. Obtain all front-end historical cases in each historical system version set in at least two historical system version sets.
步骤704、基于词频-逆向文件频率算法,计算所有前端测试案例中每一前端测试案例中的特征对应的特征值,得到待测系统版本集合的测试特征矩阵。 Step 704 , based on the word frequency-reverse document frequency algorithm, calculate the eigenvalues corresponding to the features in each front-end test case in all front-end test cases, and obtain the test feature matrix of the system version set to be tested.
步骤705、基于词频-逆向文件频率算法,计算每一历史系统版本集合中所有前端历史案例中每一前端历史案例中的特征对应的特征值,得到每一历史系统版本集合的历史特征矩阵。Step 705: Based on the word frequency-reverse document frequency algorithm, calculate the eigenvalues corresponding to the features in each front-end historical case in all front-end historical cases in each historical system version set, and obtain the historical feature matrix of each historical system version set.
步骤706、基于非负矩阵分解算法,对测试特征矩阵进行降维处理,得到降维后的测试特征矩阵。 Step 706 , based on the non-negative matrix factorization algorithm, perform dimension reduction processing on the test feature matrix to obtain a dimension-reduced test feature matrix.
步骤707、基于非负矩阵分解算法,对历史特征矩阵进行降维处理,得到降维后的历史特征矩阵。 Step 707 , based on the non-negative matrix factorization algorithm, perform dimensionality reduction processing on the historical feature matrix to obtain a dimensionally reduced historical feature matrix.
步骤708、计算降维后的测试特征矩阵中第n个前端测试案例的降维后的特征与降维后的历史特征矩阵中每一前端历史案例的降维后的特征的相似度,得到相似度矩阵。 Step 708. Calculate the similarity between the dimensionality-reduced feature of the nth front-end test case in the dimension-reduced test feature matrix and the dimension-reduced feature of each front-end historical case in the dimension-reduced historical feature matrix, and obtain the similarity degree matrix.
步骤709、基于获取的每一历史系统版本集合对应的权重和补充因子,以及降维后的每一前端测试案例与降维后的每一历史版本集合中所有前端历史案例中的案例n之间的相似度矩阵,生成待测系统版本集合与所有历史系统版本集合之间的每一目标关联矩阵。 Step 709, based on the obtained weight and supplementary factor corresponding to each historical system version set, and the relationship between each front-end test case after dimension reduction and case n in all front-end historical cases in each historical version set after dimension reduction The similarity matrix of is used to generate each target correlation matrix between the version set of the system under test and the set of all historical system versions.
步骤710、基于待测系统版本集合与所有历史系统版本集合之间的每一目标关联矩阵,确定所有前端测试案例是否满足自动化测试条件,以确定是否对待测系统版本集合中的所有前端测试案例进行自动化测试。 Step 710, based on each target correlation matrix between the system version set to be tested and all historical system version sets, determine whether all front-end test cases meet the automated test conditions, so as to determine whether to perform all front-end test cases in the system version set to be tested automated test.
由上述可知,本申请实施例中,测试平台在获取到待测系统版本集合中的所有前端测试案例和所有前端历史案例后,首先,通过词频-逆向文件频率算法,计算每一前端测试案例中的特征对应的特征值,得到待测系统版本集合的测试特征矩阵,计算每一前端历史案例中的特征对应的特征值,得到每一历史系统版本集合的历史特征矩阵;其次,通过非负矩阵算法,对测试特征矩阵和历史特征矩阵分别进行降维处理,并对降维后的 测试特征矩阵和降维后的历史特征矩阵进行相似度处理,以得到相似度矩阵,进而根据相似度矩阵,确定所有前端测试案例满足自动化测试条件时,对所有前端测试案例进行自动化测试。如此,本申请解决了相关技术必须依赖于人工操作以及人工主观带来的不确定性,且至少存在效率低、准确性差的问题;实现了对前端测试案例的自动化执行建立了统一的标准,提高了判断的准确性,同时,无需依赖人工操作,提高了处理效率。As can be seen from the above, in the embodiment of the present application, after the test platform obtains all front-end test cases and all front-end historical cases in the system version set to be tested, first, it calculates the number of front-end test cases in each front-end test case through the word frequency-reverse file frequency algorithm. The eigenvalues corresponding to the features of the system to be tested are obtained from the test feature matrix of the system version set to be tested, and the eigenvalues corresponding to the features in each front-end historical case are calculated to obtain the historical feature matrix of each historical system version set; secondly, through the non-negative matrix Algorithm, the dimensionality reduction process is performed on the test feature matrix and the historical feature matrix respectively, and the similarity processing is performed on the dimensionality-reduced test feature matrix and the dimensionality-reduced historical feature matrix to obtain a similarity matrix, and then according to the similarity matrix, When it is determined that all front-end test cases meet the automation test conditions, perform automated tests on all front-end test cases. In this way, this application solves the problem that related technologies must rely on manual operation and uncertainty brought by manual subjectivity, and at least has the problems of low efficiency and poor accuracy; realizes the establishment of a unified standard for the automatic execution of front-end test cases, and improves The accuracy of judgment is improved, and at the same time, it does not need to rely on manual operation, which improves the processing efficiency.
下面继续说明本申请实施例提供的测试案例处理装置154实施为软件模块的示例性结构,在一些实施例中,如图1所示,存储在存储器150的测试案例处理装置154中的软件模块可以是测试平台100中的测试案例处理装置,包括:The following continues to illustrate the exemplary structure of the test case processing device 154 provided by the embodiment of the present application implemented as a software module. In some embodiments, as shown in FIG. 1 , the software modules stored in the test case processing device 154 of the memory 150 can be is a test case processing device in the test platform 100, including:
获取模块1541,用于获取待测系统版本集合中的所有前端测试案例,以及至少两个历史系统版本集合中每一历史系统版本集合中的所有前端历史案例;An acquisition module 1541, configured to acquire all front-end test cases in the system version set to be tested, and all front-end historical cases in each of the at least two historical system version sets;
处理模块1542,用于计算所有前端测试案例中每一前端测试案例中的特征对应的特征值,得到待测系统版本集合的测试特征矩阵;The processing module 1542 is used to calculate the eigenvalues corresponding to the features in each front-end test case in all front-end test cases, and obtain the test feature matrix of the system version set to be tested;
处理模块1542,还用于计算每一历史系统版本集合中所有前端历史案例中每一前端历史案例中的特征对应的特征值,得到每一历史系统版本集合的历史特征矩阵;The processing module 1542 is also used to calculate the eigenvalues corresponding to the features in each front-end historical case in all front-end historical cases in each historical system version set, and obtain the historical feature matrix of each historical system version set;
处理模块1542,还用于基于非负矩阵分解算法,对测试特征矩阵进行降维处理,得到降维后的测试特征矩阵;The processing module 1542 is also used to perform dimensionality reduction processing on the test feature matrix based on the non-negative matrix factorization algorithm, and obtain the test feature matrix after dimensionality reduction;
处理模块1542,还用于基于非负矩阵分解算法,对历史特征矩阵进行降维处理,得到降维后的历史特征矩阵;The processing module 1542 is also used to perform dimensionality reduction processing on the historical feature matrix based on the non-negative matrix factorization algorithm to obtain the historical feature matrix after dimensionality reduction;
处理模块1542,还用于计算降维后的测试特征矩阵中第n个前端测试案例的降维后的特征与降维后的历史特征矩阵中每一前端历史案例的降维后的特征的相似度,得到相似度矩阵;其中,n为大于等于1且小于等于N的正整数,N为待测系统版本集合中的前端测试案例的总数;The processing module 1542 is also used to calculate the similarity between the dimension-reduced features of the nth front-end test case in the dimension-reduced test feature matrix and the dimension-reduced features of each front-end historical case in the dimension-reduced historical feature matrix degree, to obtain a similarity matrix; wherein, n is a positive integer greater than or equal to 1 and less than or equal to N, and N is the total number of front-end test cases in the system version set to be tested;
处理模块1542,还用于基于相似度矩阵,确定所有前端测试案例满足自动化测试条件时,对待测系统版本集合中的所有前端测试案例进行自动化测试。The processing module 1542 is further configured to perform automated testing on all front-end test cases in the system version set to be tested when it is determined that all front-end test cases meet the automated test conditions based on the similarity matrix.
在一些实施例中,处理模块1542,还用于基于确定的测试特征矩阵降维后的特征数,通过非负矩阵分解算法,对测试特征矩阵进行分解,得到测试投影矩阵和测试基础矩阵;获取模块1541,还用于获取测试投影矩阵和测试基础矩阵相乘得到的第一乘积矩阵;处理模块1542,还用于若测试特征矩阵减去第一乘积矩阵得到的第一差值矩阵符合差值阈值矩阵,确定第一差值矩阵对应的测试投影矩阵为降维后的测试特征矩阵。In some embodiments, the processing module 1542 is further configured to decompose the test feature matrix through a non-negative matrix decomposition algorithm based on the determined feature number after dimensionality reduction of the test feature matrix to obtain a test projection matrix and a test fundamental matrix; obtain Module 1541 is also used to obtain the first product matrix obtained by multiplying the test projection matrix and the test fundamental matrix; the processing module 1542 is also used to obtain the first difference matrix obtained by subtracting the first product matrix from the test feature matrix according to the difference value The threshold matrix is used to determine the test projection matrix corresponding to the first difference matrix as the dimension-reduced test feature matrix.
在一些实施例中,处理模块1542,还用于若第一差值矩阵不符合差值阈值矩阵,通过投影矩阵调整模型对测试投影矩阵中的每一元素进行调整,得到调整后的测试投影矩阵;通过基础矩阵调整模型对测试基础矩阵中的每一元素进行调整,得到调整后的测试基础矩阵;获取模块1541,还用于获取调整后的测试投影矩阵和调整后的测试基础矩阵相乘得到的第二乘积矩阵;处理模块1542,还用于若测试特征矩阵减去第二乘积矩阵得到的第二差值矩阵符合差值阈值矩阵,确定第二差值矩阵对应的调整后的测试投影矩阵为降维后的测试特征矩阵。In some embodiments, the processing module 1542 is further configured to adjust each element in the test projection matrix through the projection matrix adjustment model to obtain the adjusted test projection matrix if the first difference matrix does not meet the difference threshold matrix ; Each element in the test fundamental matrix is adjusted through the fundamental matrix adjustment model to obtain the adjusted test fundamental matrix; the acquisition module 1541 is also used to obtain the adjusted test projection matrix and multiply the adjusted test fundamental matrix to obtain The second product matrix; the processing module 1542 is also used to determine the adjusted test projection matrix corresponding to the second difference matrix if the second difference matrix obtained by subtracting the second product matrix from the test feature matrix meets the difference threshold matrix is the test feature matrix after dimensionality reduction.
在一些实施例中,投影矩阵调整模型为:In some embodiments, the projection matrix adjustment model is:
Figure PCTCN2021136833-appb-000050
Figure PCTCN2021136833-appb-000050
其中,W′ ns为调整后的测试投影矩阵中第n行第s列的元素,W为测试投影矩阵,W ns为测试投影矩阵中第n行第s列的元素,X为测试特征矩阵,B为测试基础矩阵,B T为测试基础矩阵的转置矩阵,(XB T) ns为测试特征矩阵X与测试基础矩阵的转置矩阵B T相乘后所得到的矩阵中第n行第s列的元素,(WBB T) ns为测试投影矩阵W、测试基础矩阵B和测试基础矩阵的转置矩阵B T相乘后所得到的矩阵中第n行第s列的元素; Among them, W' ns is the element in row n and column s in the adjusted test projection matrix, W is the test projection matrix, W ns is the element in row n and column s in the test projection matrix, X is the test feature matrix, B is the test fundamental matrix, B T is the transpose matrix of the test fundamental matrix, (XB T ) ns is the nth row s of the matrix obtained by multiplying the test feature matrix X and the transpose matrix B T of the test fundamental matrix The element of the column, (WBB T ) ns is the element of the nth row and the sth column in the matrix obtained after multiplying the transposition matrix B T of the test projection matrix W, the test fundamental matrix B and the test fundamental matrix;
基础矩阵调整模型为:The basic matrix adjustment model is:
Figure PCTCN2021136833-appb-000051
Figure PCTCN2021136833-appb-000051
其中,B′ sm为调整后的测试基础矩阵中第s行第m列的元素,B为测试基础矩阵,B sm为测试基础矩阵中第s行第m列的元素,X为测试特征矩阵,W为测试投影矩阵,W T为测试投影矩阵的转置矩阵,(W TX) sm为测试投影矩阵的转置矩阵W T与测试特征矩阵X相乘后所得到的矩阵中第s行第m列的元素,(W TWB) sm为测试投影矩阵的转置矩阵W T、测试投影矩阵W和测试基础矩阵B相乘后所得到的矩阵中第s行第m列的元素。 Among them, B'sm is the element of the sth row and the mth column in the adjusted test fundamental matrix, B is the test fundamental matrix, B sm is the element of the sth row and the mth column in the test fundamental matrix, X is the test feature matrix, W is the test projection matrix, W T is the transpose matrix of the test projection matrix, (W T X) sm is the matrix obtained by multiplying the transpose matrix W T of the test projection matrix by the test feature matrix X The elements in column m, (W T WB ) sm are the elements in row s and column m in the matrix obtained by multiplying the transposition matrix W T of the test projection matrix, the test projection matrix W and the test fundamental matrix B.
在一些实施例中,处理模块1542,还用于若第二差值矩阵不符合差值阈值矩阵,通过投影矩阵调整模型对调整后的测试投影矩阵中的每一元素进行调整,得到新调整后的测试投影矩阵;通过基础矩阵调整模型对调整后的测试基础矩阵中的每一元素进行调整,得到新调整后的测试基础矩阵;获取模块1541,还用于获取新调整后的测试投影矩阵和新调整后的测试基础矩阵相乘得到的第三乘积矩阵;处理模块1542,还用于若测试特征矩阵减去第三乘积矩阵得到的第三差值矩阵符合差值阈值矩阵,确定第三差值矩阵对应的新调整后的测试投影矩阵为降维后的测试特征矩阵。In some embodiments, the processing module 1542 is further configured to adjust each element in the adjusted test projection matrix through the projection matrix adjustment model to obtain a new adjusted The test projection matrix; each element in the adjusted test fundamental matrix is adjusted through the fundamental matrix adjustment model to obtain a new adjusted test fundamental matrix; the acquisition module 1541 is also used to obtain the newly adjusted test projection matrix and The third product matrix obtained by multiplying the newly adjusted test fundamental matrix; the processing module 1542 is also used to determine the third difference matrix if the third difference matrix obtained by subtracting the third product matrix from the test feature matrix meets the difference threshold matrix. The newly adjusted test projection matrix corresponding to the value matrix is the dimensionality-reduced test feature matrix.
在一些实施例中,获取模块1541,还用于获取至少两个历史系统版本集合中每一历史系统版本集合对应的权重;处理模块1542,还用于基于降维后的每一前端测试案例与降维后的每一历史版本集合中所有前端历史案例中的案例n之间的相似度矩阵、每一历史系统版本集合对应的权重,生成待测系统版本集合与所有历史系统版本集合之间的每一目标关联矩阵;获取模块1541,还用于获取每一目标关联矩阵中每一行的最大值,并确定每一目标关联矩阵中所有行的最大值中,大于第一目标阈值的最大值的第一数量;处理模块1542,还用于计算第一数量与待测系统版本集合中的所有前端测试案例的总数的比值,得到第一比值;获取模块1541,还用于获取每一目标关联矩阵对应的所有第一比值中,大于第二目标阈值的第一比值的第二数量;处理模块1542,还用于计算第二数量与历史系统版本集合的总数的比值,得到第二比值;若第二比值大于第三目标阈值,确定所有前端测试案例满足自动化测试条件,对待测系统版本集合中的所有前端测试案例进行自动化测试。In some embodiments, the obtaining module 1541 is also used to obtain the weight corresponding to each historical system version set in at least two historical system version sets; the processing module 1542 is also used to obtain the weight corresponding to each front-end test case and The similarity matrix between cases n in all front-end historical cases in each historical version set after dimensionality reduction, and the weight corresponding to each historical system version set, generate the relationship between the system version set to be tested and all historical system version sets Each target correlation matrix; the acquisition module 1541 is also used to obtain the maximum value of each row in each target correlation matrix, and determine among the maximum values of all rows in each target correlation matrix, which is greater than the maximum value of the first target threshold The first quantity; the processing module 1542 is also used to calculate the ratio of the first quantity and the total number of all front-end test cases in the system version set to be tested to obtain the first ratio; the acquisition module 1541 is also used to obtain each target correlation matrix Among all the corresponding first ratios, the second number of the first ratio greater than the second target threshold; the processing module 1542 is also used to calculate the ratio of the second number to the total number of historical system version sets to obtain the second ratio; if the second If the second ratio is greater than the third target threshold, it is determined that all front-end test cases meet the automated test conditions, and automated tests are performed on all front-end test cases in the system version set to be tested.
在一些实施例中,获取模块1541,还用于获取待测系统版本集合中的所有测试案例;处理模块1542,还用于将待测系统版本集合中的所有测试案例输入至训练好的分类器中,得到训练好的分类器输出的所有测试案例中的所有前端测试案例。In some embodiments, the obtaining module 1541 is also used to obtain all test cases in the version set of the system under test; the processing module 1542 is also used to input all test cases in the version set of the system under test to the trained classifier In , get all front-end test cases in all test cases output by the trained classifier.
本申请实施例提供一种存储有可执行指令的存储介质,其中存储有可执行指令,当可执行指令被处理器执行时,将引起处理器执行本申请实施例提供的方法,例如,如图2-图3、图5-图8示出的方法。The embodiment of the present application provides a storage medium storing executable instructions, and the executable instruction is stored therein. When the executable instruction is executed by the processor, it will cause the processor to execute the method provided in the embodiment of the present application, for example, as shown in FIG. 2 - the method shown in Figure 3, Figure 5-Figure 8.
在一些实施例中,存储介质可以是计算机可读存储介质,例如,铁电存储器(FRAM,Ferromagnetic Random Access Memory)、只读存储器(ROM,Read Only Memory)、可编程只读存储器(PROM,Programmable Read Only Memory)、可擦除可编程只读存储器(EPROM,Erasable Programmable Read Only Memory)、带电可擦可编程只读存储器(EEPROM,Electrically Erasable Programmable Read Only Memory)、闪存、磁表面存储器、光盘、或光盘只读存储器(CD-ROM,Compact Disk-Read Only Memory)等存储器;也可以是包括上述存储器之一或任意组合的各种设备。In some embodiments, the storage medium can be a computer-readable storage medium, for example, a ferroelectric memory (FRAM, Ferromagnetic Random Access Memory), a read-only memory (ROM, Read Only Memory), a programmable read-only memory (PROM, Programmable Read Only Memory), Erasable Programmable Read Only Memory (EPROM, Erasable Programmable Read Only Memory), Electrically Erasable Programmable Read Only Memory (EEPROM, Electrically Erasable Programmable Read Only Memory), flash memory, magnetic surface memory, optical disc, Or memory such as CD-ROM (Compact Disk-Read Only Memory); It can also be various devices including one or any combination of the above-mentioned memories.
在一些实施例中,可执行指令可以采用程序、软件、软件模块、脚本或代码的形式,按任意形式的编程语言(包括编译或解释语言,或者声明性或过程性语言)来编写,并且其可按任意形式部署,包括被部署为独立的程序或者被部署为模块、组件、子例程或者适合在计算环境中使用的其它单元。In some embodiments, executable instructions may take the form of programs, software, software modules, scripts, or code written in any form of programming language, including compiled or interpreted languages, or declarative or procedural languages, and its Can be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
作为示例,可执行指令可以但不一定对应于文件系统中的文件,可以可被存储在保存其它程序或数据的文件的一部分,例如,存储在超文本标记语言(超文本标记语言,Hyper Text Markup Language)文档中的一个或多个脚本中,存储在专用于所讨论的程序的单个文件中,或者,存储在多个协同文件(例如,存储一个或多个模块、子程序或代码部分的文件)中。作为示例,可执行指令可被部署为在一个计算设备上执行,或者在位于一个地点的多个计算设备上执行,又或者,在分布在多个地点且通过通信网络互连的多个计算设备上执行。As an example, executable instructions may, but do not necessarily correspond to files in a file system, may be stored as part of a file that holds other programs or data, for example, in Hyper Text Markup Language (HTML, Hyper Text Markup Language) in one or more scripts in a document, in a single file dedicated to the program in question, or in multiple cooperating files (for example, a file that stores one or more modules, subroutines, or code sections )middle. As an example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices located at one site, or alternatively, on multiple computing devices distributed across multiple sites and interconnected by a communication network. to execute.
以上所述,仅为本申请的实施例而已,并非用于限定本申请的保护范围。凡在本申请的精神和范围之内所作的任何修改、等同替换和改进等,均包含在本申请的保护范围之内。The above descriptions are merely examples of the present application, and are not intended to limit the protection scope of the present application. Any modifications, equivalent replacements and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.
工业实用性Industrial Applicability
本申请实施例提供一种测试案例处理方法、测试案例处理装置、测试平台及存储介质,通过获取待测系统版本集合中的所有前端测试案例,以及至少两个历史系统版本集合中每一历史系统版本集合中的所有前端历史案例;计算所有前端测试案例中每一前端测试案例中的特征对应的特征值,得到待测系统版本集合的测试特征矩阵;计算每一历史系统版本集合中所有前端历史案例中每一前端历史案例中的特征对应的特征值,得到每一历史系统版本集合的历史特征矩阵;基于非负矩阵分解算法,对测试特征矩阵进行降维处理,得到降维后的测试特征矩阵;基于非负矩阵分解算法,对历史特征矩阵进行降维处理,得到降维后的历史特征矩阵;计算降维后的测试特征矩阵中第n个前端测试案例的降维后的特征与降维后的历史特征矩阵中每一前端历史案例的降维后的特征的相似度,得到相似度矩阵;基于相似度矩阵,确定所有前端测试案例满足自动化测试条件时,对待测系统版本集合中的所有前端测试案例进行自动化测试;也就是说,测试平台在获取到待测系统版本集合中的所有前端测试案例和所有前端历史案例后,首先,计算每一前端测试案例中的特征对应的特征值,得到待测系统版本集合的测试特征矩阵,计算每一前端历史案例中的特征对应的特征值,得到每一历史系统版本集合的历史特征矩阵;其次,通过非负矩阵算法,对测试特征矩阵和历史特征矩阵分别进行降维处理,并对降维后的测试特征矩阵和降维后的历史特征矩阵进行相似度处理,以得到相似度矩阵,进而根据相似度矩阵,确定所有前端测试案例满足自动化测试条件时,对所有前端测试案例进行自动化测试。如此,本申请解决了相关技术必须依赖于人工操作以及人工主观带来的不确定性,且至少存在效率低、准确性差的问题;实现了对前端测试案例的自动化执行建立了统一的标准,提高了判断的准确性,同时,无需依赖人工操作,提高了处理效率。The embodiment of the present application provides a test case processing method, test case processing device, test platform and storage medium, by obtaining all front-end test cases in the system version set to be tested, and each historical system in at least two historical system version sets All front-end historical cases in the version set; calculate the eigenvalues corresponding to the features in each front-end test case in all front-end test cases, and obtain the test feature matrix of the system version set to be tested; calculate all front-end history in each historical system version set In the case, the eigenvalues corresponding to the features in each front-end historical case are obtained to obtain the historical feature matrix of each historical system version set; based on the non-negative matrix decomposition algorithm, the dimensionality reduction process is performed on the test feature matrix to obtain the dimensionality-reduced test features matrix; based on the non-negative matrix factorization algorithm, the dimensionality reduction process is performed on the historical feature matrix to obtain the dimensionality-reduced historical feature matrix; the dimensionality-reduced feature and the dimensionality-reduced Based on the similarity of the dimensionality-reduced features of each front-end historical case in the dimensioned historical feature matrix, a similarity matrix is obtained; based on the similarity matrix, when it is determined that all front-end test cases meet the automated test conditions, the test system version set All front-end test cases are automatically tested; that is to say, after the test platform obtains all front-end test cases and all front-end historical cases in the system version set to be tested, first, it calculates the feature value corresponding to the feature in each front-end test case , to obtain the test feature matrix of the system version set to be tested, calculate the eigenvalues corresponding to the features in each front-end historical case, and obtain the historical feature matrix of each historical system version set; secondly, through the non-negative matrix algorithm, the test feature matrix and the historical feature matrix are respectively subjected to dimensionality reduction processing, and the similarity processing is performed on the dimensionality-reduced test feature matrix and the dimensionality-reduced historical feature matrix to obtain a similarity matrix, and then according to the similarity matrix, it is determined that all front-end test cases satisfy When automating test conditions, automate testing for all front-end test cases. In this way, this application solves the problem that related technologies must rely on manual operation and uncertainty brought by manual subjectivity, and at least has the problems of low efficiency and poor accuracy; realizes the establishment of a unified standard for the automatic execution of front-end test cases, and improves The accuracy of judgment is improved, and at the same time, it does not need to rely on manual operation, which improves the processing efficiency.

Claims (10)

  1. 一种测试案例处理方法,包括:A test case processing method, comprising:
    获取待测系统版本集合中的所有前端测试案例,以及至少两个历史系统版本集合中每一历史系统版本集合中的所有前端历史案例;Obtain all front-end test cases in the system version set to be tested, and all front-end historical cases in each historical system version set in at least two historical system version sets;
    计算所述所有前端测试案例中每一前端测试案例中的特征对应的特征值,得到所述待测系统版本集合的测试特征矩阵;Calculate the eigenvalues corresponding to the features in each front-end test case in all the front-end test cases, and obtain the test feature matrix of the version set of the system to be tested;
    计算所述每一历史系统版本集合中所述所有前端历史案例中每一前端历史案例中的特征对应的特征值,得到所述每一历史系统版本集合的历史特征矩阵;Calculating the eigenvalues corresponding to the features in each of the front-end historical cases in all the front-end historical cases in the set of each historical system version, to obtain the historical feature matrix of each set of historical system versions;
    基于非负矩阵分解算法,对所述测试特征矩阵进行降维处理,得到降维后的测试特征矩阵;Based on a non-negative matrix factorization algorithm, performing dimensionality reduction processing on the test feature matrix to obtain a dimensionally reduced test feature matrix;
    基于所述非负矩阵分解算法,对所述历史特征矩阵进行降维处理,得到降维后的历史特征矩阵;Based on the non-negative matrix decomposition algorithm, performing dimensionality reduction processing on the historical feature matrix to obtain a dimensionally reduced historical feature matrix;
    计算所述降维后的测试特征矩阵中第n个前端测试案例的降维后的特征与所述降维后的历史特征矩阵中每一前端历史案例的降维后的特征的相似度,得到相似度矩阵;其中,所述n为大于等于1且小于等于N的正整数,N为所述待测系统版本集合中的前端测试案例的总数;Calculating the similarity between the dimension-reduced feature of the nth front-end test case in the dimension-reduced test feature matrix and the dimension-reduced feature of each front-end historical case in the dimension-reduced historical feature matrix, to obtain A similarity matrix; wherein, the n is a positive integer greater than or equal to 1 and less than or equal to N, and N is the total number of front-end test cases in the version set of the system to be tested;
    基于所述相似度矩阵,确定所述所有前端测试案例满足自动化测试条件时,对所述待测系统版本集合中的所有前端测试案例进行自动化测试。Based on the similarity matrix, when it is determined that all the front-end test cases meet the automated test conditions, the automated test is performed on all the front-end test cases in the version set of the system under test.
  2. 根据权利要求1所述的方法,其中,所述基于非负矩阵分解算法,对所述测试特征矩阵进行降维处理,得到降维后的测试特征矩阵,包括:The method according to claim 1, wherein the non-negative matrix factorization algorithm is used to perform dimensionality reduction processing on the test feature matrix to obtain a dimensionally reduced test feature matrix, including:
    基于确定的所述测试特征矩阵降维后的特征数,通过所述非负矩阵分解算法,对所述测试特征矩阵进行分解,得到测试投影矩阵和测试基础矩阵;Based on the determined eigennumbers after dimension reduction of the test feature matrix, the test feature matrix is decomposed by the non-negative matrix factorization algorithm to obtain a test projection matrix and a test fundamental matrix;
    获取所述测试投影矩阵和所述测试基础矩阵相乘得到的第一乘积矩阵;Obtaining a first product matrix obtained by multiplying the test projection matrix and the test fundamental matrix;
    若所述测试特征矩阵减去所述第一乘积矩阵得到的第一差值矩阵符合差值阈值矩阵,确定所述第一差值矩阵对应的所述测试投影矩阵为所述降维后的测试特征矩阵。If the first difference matrix obtained by subtracting the first product matrix from the test feature matrix conforms to the difference threshold matrix, determine that the test projection matrix corresponding to the first difference matrix is the dimension-reduced test feature matrix.
  3. 根据权利要求2所述的方法,其中,所述方法还包括:The method according to claim 2, wherein the method further comprises:
    若所述第一差值矩阵不符合所述差值阈值矩阵,通过投影矩阵调整模型对所述测试投影矩阵中的每一元素进行调整,得到调整后的测试投影矩阵;If the first difference matrix does not conform to the difference threshold matrix, each element in the test projection matrix is adjusted through a projection matrix adjustment model to obtain an adjusted test projection matrix;
    通过基础矩阵调整模型对所述测试基础矩阵中的每一元素进行调整,得到调整后的测试基础矩阵;Adjust each element in the basic test matrix through the basic matrix adjustment model to obtain an adjusted basic test matrix;
    获取所述调整后的测试投影矩阵和所述调整后的测试基础矩阵相乘得到的第二乘积矩阵;Obtaining a second product matrix obtained by multiplying the adjusted test projection matrix and the adjusted test fundamental matrix;
    若所述测试特征矩阵减去所述第二乘积矩阵得到的第二差值矩阵符合所述差值阈值矩阵,确定所述第二差值矩阵对应的所述调整后的测试投影矩阵为所述降维后的测试特征矩阵。If the second difference matrix obtained by subtracting the second product matrix from the test feature matrix conforms to the difference threshold matrix, determine that the adjusted test projection matrix corresponding to the second difference matrix is the The reduced test feature matrix.
  4. 根据权利要求3所述的方法,其中,所述投影矩阵调整模型为:The method according to claim 3, wherein the projection matrix adjustment model is:
    Figure PCTCN2021136833-appb-100001
    Figure PCTCN2021136833-appb-100001
    其中,所述W′ ns为所述调整后的测试投影矩阵中第n行第s列的元素,所述W为所述测试投影矩阵,所述W ns为所述测试投影矩阵中第n行第s列的元素,所述X为所述测试特征矩阵,所述B为所述测试基础矩阵,所述B T为所述测试基础矩阵的转置矩阵,所述(XB T) ns为所述测试特征矩阵X与所述测试基础矩阵的转置矩阵B T相乘后所得到的 矩阵中第n行第s列的元素,所述(WBB T) ns为所述测试投影矩阵W、所述测试基础矩阵B以及所述测试基础矩阵的转置矩阵B T相乘后所得到的矩阵中第n行第s列的元素; Wherein, the W' ns is the element of the nth row and the sth column in the adjusted test projection matrix, the W is the test projection matrix, and the W ns is the nth row in the test projection matrix The elements in the sth column, the X is the test feature matrix, the B is the test fundamental matrix, the B T is the transpose matrix of the test fundamental matrix, and the (XB T ) ns is the The elements of the nth row and the sth column in the matrix obtained after the test feature matrix X is multiplied by the transpose matrix B T of the test fundamental matrix, the (WBB T ) ns is the test projection matrix W, the The elements of the nth row and the sth column in the matrix obtained after the multiplication of the test fundamental matrix B and the transpose matrix B T of the test fundamental matrix;
    所述基础矩阵调整模型为:The basic matrix adjustment model is:
    Figure PCTCN2021136833-appb-100002
    Figure PCTCN2021136833-appb-100002
    其中,所述B′ sm为所述调整后的测试基础矩阵中第s行第m列的元素,所述B为所述测试基础矩阵,所述B sm为所述测试基础矩阵中第s行第m列的元素,所述X为所述测试特征矩阵,所述W为所述测试投影矩阵,所述W T为所述测试投影矩阵的转置矩阵,所述(W TX) sm为所述测试投影矩阵的转置矩阵W T与所述测试特征矩阵X相乘后所得到的矩阵中第s行第m列的元素,所述(W TWB) sm为所述测试投影矩阵的转置矩阵W T、所述测试投影矩阵W和所述测试基础矩阵B相乘后所得到的矩阵中第s行第m列的元素。 Wherein, the B' sm is the element of the sth row and the mth column in the adjusted test fundamental matrix, the B is the test fundamental matrix, and the B sm is the sth row in the test fundamental matrix The element in the m column, the X is the test feature matrix, the W is the test projection matrix, the W T is the transpose matrix of the test projection matrix, and the (W T X) sm is The transpose matrix W T of the test projection matrix is multiplied by the test feature matrix X, and the elements in the sth row and the mth column of the matrix are obtained, and the (W T WB) sm is the element of the test projection matrix Elements in row s and column m in a matrix obtained by multiplying the transpose matrix W T , the test projection matrix W and the test fundamental matrix B.
  5. 根据权利要求3所述的方法,其中,所述方法还包括:The method according to claim 3, wherein the method further comprises:
    若所述第二差值矩阵不符合所述差值阈值矩阵,通过所述投影矩阵调整模型对所述调整后的测试投影矩阵中的每一元素进行调整,得到新调整后的测试投影矩阵;If the second difference matrix does not conform to the difference threshold matrix, adjust each element in the adjusted test projection matrix through the projection matrix adjustment model to obtain a new adjusted test projection matrix;
    通过所述基础矩阵调整模型对所述调整后的测试基础矩阵中的每一元素进行调整,得到新调整后的测试基础矩阵;Each element in the adjusted test fundamental matrix is adjusted by the fundamental matrix adjustment model to obtain a new adjusted test fundamental matrix;
    获取所述新调整后的测试投影矩阵和所述新调整后的测试基础矩阵相乘得到的第三乘积矩阵;Obtaining a third product matrix obtained by multiplying the newly adjusted test projection matrix and the newly adjusted test fundamental matrix;
    若所述测试特征矩阵减去所述第三乘积矩阵得到的第三差值矩阵符合差值阈值矩阵,确定所述第三差值矩阵对应的所述新调整后的测试投影矩阵为所述降维后的测试特征矩阵。If the third difference matrix obtained by subtracting the third product matrix from the test feature matrix conforms to the difference threshold matrix, determine that the newly adjusted test projection matrix corresponding to the third difference matrix is the reduced Dimensional test feature matrix.
  6. 根据权利要求1所述的方法,其中,所述基于所述相似度矩阵,确定所述所有前端测试案例满足自动化测试条件时,对所述待测系统版本集合中的所有前端测试案例进行自动化测试,包括:The method according to claim 1, wherein, based on the similarity matrix, when it is determined that all the front-end test cases meet the automated test conditions, the automated test is performed on all the front-end test cases in the version set of the system under test ,include:
    获取至少两个历史系统版本集合中每一历史系统版本集合对应的权重;Obtain the weight corresponding to each historical system version set in at least two historical system version sets;
    基于降维后的所述每一前端测试案例与降维后的所述每一历史版本集合中所有前端历史案例中的案例n之间的所述相似度矩阵、所述每一历史系统版本集合对应的权重,生成所述待测系统版本集合与所有历史系统版本集合之间的每一目标关联矩阵;Based on the similarity matrix between each front-end test case after dimensionality reduction and case n in all front-end history cases in each historical version set after dimensionality reduction, each historical system version set Corresponding weights, generating each target correlation matrix between the system version set to be tested and all historical system version sets;
    获取所述每一目标关联矩阵中所述每一行的最大值,并确定所述每一目标关联矩阵中所有行的最大值中,大于第一目标阈值的最大值的第一数量;Obtaining the maximum value of each row in each target incidence matrix, and determining a first number of maximum values greater than a first target threshold among the maximum values of all rows in each target incidence matrix;
    计算所述第一数量与所述待测系统版本集合中的所有前端测试案例的总数的比值,得到第一比值;calculating the ratio of the first quantity to the total number of all front-end test cases in the system version set under test to obtain the first ratio;
    获取所述每一目标关联矩阵对应的所有所述第一比值中,大于第二目标阈值的所述第一比值的第二数量;Obtaining a second number of the first ratios greater than a second target threshold among all the first ratios corresponding to each target incidence matrix;
    计算所述第二数量与所述历史系统版本集合的总数的比值,得到第二比值;calculating the ratio of the second quantity to the total number of the historical system version set to obtain a second ratio;
    若所述第二比值大于第三目标阈值,确定所述所有前端测试案例满足自动化测试条件,对所述待测系统版本集合中的所有前端测试案例进行自动化测试。If the second ratio is greater than the third target threshold, it is determined that all the front-end test cases meet the automated test conditions, and the automated test is performed on all the front-end test cases in the version set of the system under test.
  7. 根据权利要求1至6任一项所述的方法,其中,所述获取待测系统版本集合中的所有前端测试案例之前,所述方法还包括:The method according to any one of claims 1 to 6, wherein, before obtaining all front-end test cases in the system version set to be tested, the method further includes:
    获取所述待测系统版本集合中的所有测试案例;Obtain all test cases in the system version set to be tested;
    将所述待测系统版本集合中的所有测试案例输入至训练好的分类器中,得到所述训练好的分类器输出的所述所有测试案例中的所述所有前端测试案例。Inputting all the test cases in the version set of the system to be tested into the trained classifier to obtain all the front-end test cases among the all test cases output by the trained classifier.
  8. 一种测试案例处理装置,其中,所述装置包括:A test case processing device, wherein the device comprises:
    获取模块,用于获取待测系统版本集合中的所有前端测试案例,以及至少两个历史 系统版本集合中每一历史系统版本集合中的所有前端历史案例;Obtaining module, used to obtain all front-end test cases in the system version collection to be tested, and all front-end historical cases in each historical system version collection in at least two historical system version collections;
    处理模块,用于计算所述所有前端测试案例中每一前端测试案例中的特征对应的特征值,得到所述待测系统版本集合的测试特征矩阵;A processing module, configured to calculate the eigenvalues corresponding to the features in each of the front-end test cases in all the front-end test cases, and obtain the test feature matrix of the version set of the system to be tested;
    所述处理模块,还用于计算所述每一历史系统版本集合中所述所有前端历史案例中每一前端历史案例中的特征对应的特征值,得到所述每一历史系统版本集合的历史特征矩阵;The processing module is also used to calculate the feature value corresponding to the feature in each front-end historical case in all the front-end historical cases in the set of each historical system version, and obtain the historical feature of each historical system version set matrix;
    所述处理模块,还用于基于非负矩阵分解算法,对所述测试特征矩阵进行降维处理,得到降维后的测试特征矩阵;The processing module is also used to perform dimensionality reduction processing on the test feature matrix based on a non-negative matrix factorization algorithm to obtain a dimensionality-reduced test feature matrix;
    所述处理模块,还用于基于所述非负矩阵分解算法,对所述历史特征矩阵进行降维处理,得到降维后的历史特征矩阵;The processing module is further configured to perform dimensionality reduction processing on the historical feature matrix based on the non-negative matrix factorization algorithm, to obtain a dimensionally reduced historical feature matrix;
    所述处理模块,还用于计算所述降维后的测试特征矩阵中第n个前端测试案例的降维后的特征与所述降维后的历史特征矩阵中每一前端历史案例的降维后的特征的相似度,得到相似度矩阵;其中,所述n为大于等于1且小于等于N的正整数,N为所述待测系统版本集合中的前端测试案例的总数;The processing module is also used to calculate the dimensionality-reduced feature of the nth front-end test case in the dimension-reduced test feature matrix and the dimensionality reduction of each front-end historical case in the dimension-reduced historical feature matrix The degree of similarity of the features after is obtained similarity matrix; Wherein, said n is a positive integer greater than or equal to 1 and less than or equal to N, and N is the total number of front-end test cases in the described system version set to be tested;
    所述处理模块,还用于基于所述相似度矩阵,确定所述所有前端测试案例满足自动化测试条件时,对所述待测系统版本集合中的所有前端测试案例进行自动化测试。The processing module is further configured to perform automated testing on all front-end test cases in the version set of the system under test when it is determined that all front-end test cases meet the automated test conditions based on the similarity matrix.
  9. 一种测试平台,其中,包括:A test platform, including:
    存储器,用于存储可执行指令;处理器,用于执行所述存储器中存储的可执行指令时,实现权利要求1至7任一项所述的方法。The memory is used to store executable instructions; the processor is used to implement the method according to any one of claims 1 to 7 when executing the executable instructions stored in the memory.
  10. 一种存储介质,其中,存储有可执行指令,用于引起处理器执行时,实现权利要求1至7任一项所述的方法。A storage medium, wherein executable instructions are stored for causing a processor to implement the method according to any one of claims 1 to 7.
PCT/CN2021/136833 2021-06-29 2021-12-09 Test case processing method and apparatus, platform, and storage medium WO2023273177A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110729999.3 2021-06-29
CN202110729999.3A CN113342683B (en) 2021-06-29 2021-06-29 Test case processing method, device, platform and storage medium

Publications (1)

Publication Number Publication Date
WO2023273177A1 true WO2023273177A1 (en) 2023-01-05

Family

ID=77481496

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/136833 WO2023273177A1 (en) 2021-06-29 2021-12-09 Test case processing method and apparatus, platform, and storage medium

Country Status (2)

Country Link
CN (1) CN113342683B (en)
WO (1) WO2023273177A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113342683B (en) * 2021-06-29 2024-04-09 深圳前海微众银行股份有限公司 Test case processing method, device, platform and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2924585A1 (en) * 2014-03-19 2015-09-30 SIDACT GmbH Method for compressing observations of a plurality of test procedures
CN112148620A (en) * 2020-10-12 2020-12-29 中国农业银行股份有限公司 Test case generation method and related equipment
CN113342683A (en) * 2021-06-29 2021-09-03 深圳前海微众银行股份有限公司 Test case processing method, device, platform and storage medium

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102222038B (en) * 2010-04-16 2014-05-07 中国工商银行股份有限公司 Transaction software test method and system based on banking business
AR093834A1 (en) * 2012-12-06 2015-06-24 Miami Int Securities Exchange Llc SYSTEMS AND METHODS TO TEST A FINANCIAL MARKETING SYSTEM
US9411710B2 (en) * 2014-08-01 2016-08-09 Unisys Corporation Automated regression test case selector and black box test coverage tool for product testing
CN109902006A (en) * 2019-02-20 2019-06-18 北京安和瑞福信息技术有限公司 Automated testing method and device
CN110502432B (en) * 2019-07-23 2023-11-28 平安科技(深圳)有限公司 Intelligent test method, device, equipment and readable storage medium
CN110647461B (en) * 2019-08-19 2023-03-28 江苏大学 Multi-information fusion regression test case sequencing method and system
CN110716857B (en) * 2019-08-27 2023-12-29 天航长鹰(江苏)科技有限公司 Test case management method, device, computer equipment and storage medium
US11379758B2 (en) * 2019-12-06 2022-07-05 International Business Machines Corporation Automatic multilabel classification using machine learning
CN111538669B (en) * 2020-04-29 2023-09-22 中国银行股份有限公司 Test case extraction method and device based on historical problem backtracking analysis
CN112199285B (en) * 2020-10-12 2023-08-01 中国农业银行股份有限公司 Test case optimization method and device and electronic equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2924585A1 (en) * 2014-03-19 2015-09-30 SIDACT GmbH Method for compressing observations of a plurality of test procedures
CN112148620A (en) * 2020-10-12 2020-12-29 中国农业银行股份有限公司 Test case generation method and related equipment
CN113342683A (en) * 2021-06-29 2021-09-03 深圳前海微众银行股份有限公司 Test case processing method, device, platform and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
DANIEL LEE, H. SEBASTIAN SEUNG: "Algorithms for Non-negative Matrix Factorization", ADVANCES IN NEURAL INFORMATION PROCESSING SYSTEMS 13, 31 December 2000 (2000-12-31), pages 1 - 7, XP002468346 *
ZHANG, FENGBIN: "Application of Non-negative Matrix Factorization on Intrusion Detection", JOURNAL OF HARBIN UNIVERSITY OF SCIENCE AND TECHNOLOGY, no. 2, 15 April 2008 (2008-04-15), CN , pages 19 - 22, XP009542222, ISSN: 1007-2683 *

Also Published As

Publication number Publication date
CN113342683B (en) 2024-04-09
CN113342683A (en) 2021-09-03

Similar Documents

Publication Publication Date Title
Annis et al. Bayesian inference with Stan: A tutorial on adding custom distributions
CN112100386B (en) Method for determining target type app, electronic device and medium
US11442891B2 (en) Holographic quantum dynamics simulation
WO2023273177A1 (en) Test case processing method and apparatus, platform, and storage medium
CN112100401A (en) Knowledge graph construction method, device, equipment and storage medium for scientific and technological service
CN108717547A (en) The method and device of sample data generation method and device, training pattern
Mukherjee et al. Identification of the polaron measure I: fixed coupling regime and the central limit theorem for large times
Pelivani et al. An empirical study of user interface testing tools
Jessup et al. Performance-based numerical solver selection in the Lighthouse framework
US11615016B2 (en) System and method for executing a test case
CN104077408A (en) Distributed semi-supervised content identification and classification method and device for large-scale cross-media data
Jianhong et al. Data Driven Strategies: Theory and Applications
Patilea et al. Testing for lack-of-fit in functional regression models against general alternatives
CN117235527A (en) End-to-end containerized big data model construction method, device, equipment and medium
Patiño Douce Statistical distribution laws for metallic mineral deposit sizes
Weisser et al. Machine learning and multivariate goodness of fit
CN116956102A (en) Classification model training method, device, equipment, storage medium and program product
US20220261336A1 (en) Building, training, and maintaining an artificial intellignece-based functionl testing tool
Basso et al. Computational evaluation of ranking models in an automatic decomposition framework
Weiß et al. Testing the compounding structure of the CP-INARCH model
Kaliuzhna et al. Analysis of machine learning methods in the task of searching duplicates in the software code
Gardner Characterizing categorical map patterns using neutral landscape models
Petrozziello et al. Feature based multivariate data imputation
Casado et al. Guiding the creation of deep learning-based object detectors
Cho et al. Variational Bayesian multinomial logistic Gaussian process classification

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21948102

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE