CN116680162B - Test case multiplexing method, device, medium, equipment and product - Google Patents

Test case multiplexing method, device, medium, equipment and product Download PDF

Info

Publication number
CN116680162B
CN116680162B CN202310410740.1A CN202310410740A CN116680162B CN 116680162 B CN116680162 B CN 116680162B CN 202310410740 A CN202310410740 A CN 202310410740A CN 116680162 B CN116680162 B CN 116680162B
Authority
CN
China
Prior art keywords
test requirement
target
test
attribute information
level
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202310410740.1A
Other languages
Chinese (zh)
Other versions
CN116680162A (en
Inventor
刘云龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Software Evaluation Center
Original Assignee
China Software Evaluation Center
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 China Software Evaluation Center filed Critical China Software Evaluation Center
Priority to CN202310410740.1A priority Critical patent/CN116680162B/en
Publication of CN116680162A publication Critical patent/CN116680162A/en
Application granted granted Critical
Publication of CN116680162B publication Critical patent/CN116680162B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/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/3676Test management for coverage analysis
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention provides a test case multiplexing method, a device, a medium, equipment and a product, which are used for acquiring configuration information and a target test requirement description file set by a user aiming at software to be tested; and responding to multiplexing triggering operation of a user, executing a second recommendation flow under the condition that file parameters corresponding to the ID of the target test requirement description file are stored under the conditions of the current configuration information and the current timestamp, responding to selection of attribute information in a recommendation result set of a target recommendation level by the user, and inquiring the attribute information along an attribute information hierarchical structure until the selection operation of the test case is obtained. The scheme of the invention can effectively improve the flexibility and multiplexing rate of test case multiplexing and meet the multiplexing requirements of different fields/layers.

Description

Test case multiplexing method, device, medium, equipment and product
Technical Field
The present invention relates to the field of software testing technologies, and in particular, to a method, an apparatus, a medium, a device, and a product for multiplexing test cases.
Background
This section is intended to provide a background or context for the embodiments recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
The software test is an important means for guaranteeing the quality of software engineering, and aims to reveal software defects and possible faults caused by the execution of test cases, thereby playing a vital role in guaranteeing the quality of the whole software.
A test case is a collection of a set of input, output and operation sequences of an application scenario established for verifying quality attribute conditions. The purpose of test case design is to determine a set of test data that is most likely to find a certain error or class of errors, and to implement the test of a certain function by the system. However, since the design of the software test case depends on the personal experience of the test engineer to a great extent, the writing format of the test case also often varies with the change of the test engineer, so that great blindness is brought to the test, and the later maintenance cost of the software occupies a great proportion in the software cost.
The rapid development process in the software industry today makes software testing difficult, such as increasing test requirements, and insufficient test skills and experience of newly added testers. Multiplexing of software test cases can solve these problems and deficiencies precisely and becomes a solution to avoid repetitive labor in test case design. The test case multiplexing refers to the function of using the valid cases in the existing test to construct new cases and strengthening multiplexing. The test case multiplexing is an important link in the software test process, and the design and execution of new visual test cases are guided by using the test cases of history items. In the multiplexing process, the existing test knowledge is mobilized, and the use case design is quickened. The reusable test cases should have the following characteristics: applicability, configurability, independence, standardization and integrity, etc., which are sufficient and necessary for reusable test cases. The test cases are basic elements for implementing software test, and the multiplexing of the test cases has quite practical significance for reducing the software test cost, improving the test quality and the test efficiency.
In the related art, related work related to test case multiplexing is mainly focused on constructing a test case library so as to achieve the purpose of test case multiplexing. However, this method only uses a keyword-based search model to search test cases from the test case library for multiplexing, and has a disadvantage in terms of flexibility and multiplexing rate.
Disclosure of Invention
The invention provides a test case multiplexing method, a device, a medium, equipment and a product, which can effectively improve the flexibility and multiplexing rate of test case multiplexing and meet multiplexing requirements of different fields/layers.
In a first aspect, an embodiment of the present invention provides a test case multiplexing method, including:
acquiring configuration information and target test requirement description files which are set by a user aiming at software to be tested, wherein the configuration information comprises a target recommendation level, a target quality test attribute category and the recommendation number n of the target recommendation level, the target recommendation level is an attribute information level in an attribute information hierarchical structure which is established in advance based on test data, and the target test requirement description files comprise overall test requirements, test requirement attribute information, test requirement points and test requirement description files corresponding to test requirement point use cases;
Responding to multiplexing triggering operation of a user, and detecting whether a file parameter corresponding to a target test requirement description file ID is stored under the conditions of the configuration information and the current timestamp, wherein the file parameter is a parameter required for calculating a tf-idf value;
under the condition that the corresponding file parameters of the target test requirement description file ID are stored under the conditions of the configuration information and the current timestamp, executing a second recommendation flow, wherein the second recommendation flow comprises:
updating the target test requirement description file to the test requirement description file set of the target recommendation level, and updating part of file parameters of the target recommendation level;
aiming at the test requirement description file set of the target recommendation level, calculating tf-idf values of words in each test requirement description file based on the file parameters, determining s words with the largest tf-idf values as keywords, forming a keyword dictionary of the target recommendation level, wherein s represents the number of preset keywords;
constructing a first matrix by taking tf-idf values of each keyword in the keyword dictionary as elements, carrying out singular value decomposition on the first matrix, extracting w dimensionalities with the largest singular value to obtain corresponding U vectors, V vectors and sigma values, wherein w represents the number of preset dimensionalities;
Determining n second V vectors with highest similarity to the first V vectors corresponding to the target test requirement description file in the w dimensions, and determining attribute information of a target recommendation level corresponding to the n second V vectors as a recommendation result set of the target recommendation level;
and responding to the selection of the attribute information in the recommendation result set of the target recommendation level by the user, and inquiring the attribute information along the attribute information hierarchical structure until the selection operation of the test case is obtained.
In some implementations, the attribute information hierarchy includes, in order from big to small, a software attribute information hierarchy to be tested, an overall test requirement attribute information hierarchy, a test requirement point attribute information hierarchy, and a test requirement point use case attribute information hierarchy.
In some implementations, if the file parameter corresponding to the target test requirement description file ID is stored under the condition of the configuration information and the current timestamp, the method further includes a second update procedure, where the second update procedure includes:
under the condition that a new test report is put in storage or is passively invoked for updating, updating and storing the configuration information and file parameters corresponding to the target test requirement description file ID under the condition of the current timestamp.
In some implementations, the file parameters include: the number of times that the word appears in the test requirement description file, the number of times that the word appears in the test requirement description file with the highest frequency of occurrence in the test requirement description file, the number of test requirement description files, and the number of test requirement description files that the word appears.
In some implementations, the test case multiplexing method further includes:
under the condition that file parameters corresponding to the target test requirement description file ID are not stored under the conditions of the configuration information and the current time stamp, executing a first training process, and storing file parameters corresponding to the target test requirement description file ID under the conditions of the configuration information and the current time stamp;
executing a first recommendation process, the first recommendation process comprising:
updating a target test requirement description file to a test requirement description file set of a test requirement attribute information level, and updating part of file parameters of the test requirement attribute information level;
aiming at the test requirement description file set of the test requirement attribute information level, calculating tf-idf values of words in each test requirement description file based on the file parameters, determining s words with the largest tf-idf values as keywords, and forming a keyword dictionary of the test requirement attribute information level;
Constructing a second matrix by taking tf-idf values of each keyword in the keyword dictionary as elements, carrying out singular value decomposition on the second matrix, and extracting w dimensionalities with the maximum singular value to obtain corresponding U vectors, V vectors and sigma values;
determining n second V vectors with highest similarity to the first V vectors corresponding to the target test requirement description file in the w dimensions, and determining the attribute information of the test requirement attribute information level corresponding to the n second V vectors as a recommended result set of the test requirement attribute information level;
executing a second training process, the second training process comprising:
based on the recommendation result set of the test requirement attribute information level, backtracking to the target recommendation level, and extracting a test requirement description file set of the target recommendation level;
the test requirement description file in the test requirement description file set of the target recommendation level is segmented;
counting the occurrence times of words in the test requirement description file in which the words are located, the occurrence times of words with highest occurrence frequency in the test requirement description file in which the words are located, the number of the test requirement description files and the number of the test requirement description files in which the words are located aiming at the target recommendation level;
Storing the configuration information and file parameters of the target recommendation level under the condition of the current time stamp;
and executing the second recommended flow after the second training flow is completed.
In some implementations, the first training procedure includes:
screening test requirement attribute information meeting the target quality test attribute category in a test requirement attribute information level;
word segmentation is carried out on the test requirement description file corresponding to the screening result;
and storing file parameters corresponding to the target test requirement description file ID under the condition of the configuration information and the current time stamp.
In some implementations, between the performing the first training procedure and the performing the first recommended procedure, further comprising performing a first update procedure;
the first updating flow comprises the following steps: under the condition that a new test report is put in storage or is passively invoked for updating, updating and storing the configuration information and file parameters corresponding to the target test requirement description file ID under the condition of the current timestamp.
In some implementations, the test case multiplexing method further includes:
detecting whether file parameters corresponding to the target test requirement description file ID are stored under the conditions of the configuration information and the current time stamp at regular time;
And executing the first updating flow under the condition that the corresponding file parameters of the target test requirement description file ID are stored under the conditions of the configuration information and the current timestamp.
In some implementations, the extracting the set of test requirement description files of the target recommendation level based on the set of recommendation results of the test requirement attribute information level backtracking to the target recommendation level includes:
if the target recommendation level is higher than the test requirement attribute information level, downwards indexing the covered attribute information to the target recommendation level according to the ID in the attribute information hierarchical structure;
and if the target recommendation level is lower than the test requirement attribute information level, upwards indexing the covered attribute information to the target recommendation level according to the ID in the attribute information hierarchical structure.
In some implementations, the recommended number of attribute information levels covered in the indexing process is determined based on the recommended number n of target recommendation levels.
In a second aspect, an embodiment of the present invention provides a test case multiplexing apparatus, including:
the system comprises an acquisition module, a test requirement setting module and a test requirement setting module, wherein the acquisition module is used for acquiring configuration information and a target test requirement description file which are set by a user aiming at software to be tested, the configuration information comprises a target recommendation level, a target quality test attribute type and the recommendation number n of the target recommendation level, the target recommendation level is an attribute information level in an attribute information hierarchical structure which is established in advance based on test data, and the target test requirement description file comprises an overall test requirement, a test requirement attribute information layer, a test requirement point and a corresponding test requirement description file in a test requirement point use case;
The detection module is used for responding to multiplexing triggering operation of a user, detecting whether file parameters corresponding to the target test requirement description file ID are stored under the conditions of the configuration information and the current timestamp, wherein the file parameters are parameters required for calculating tf-idf values;
the recommending module is configured to execute a second recommending process under the condition that the file parameter corresponding to the target test requirement description file ID is stored under the conditions of the configuration information and the current timestamp, where the second recommending process includes:
updating a target test requirement description file to a test requirement description file set of the target recommendation level, and updating part of file parameters of the target recommendation level;
aiming at the test requirement description file set of the target recommendation level, calculating tf-idf values of words in each test requirement description file based on the file parameters, determining s words with the largest tf-idf values as keywords, forming a keyword dictionary of the target recommendation level, wherein s represents the number of preset keywords;
constructing a first matrix by taking tf-idf values of each keyword in the keyword dictionary as elements, carrying out singular value decomposition on the first matrix, extracting w dimensionalities with the largest singular value to obtain corresponding U vectors, V vectors and sigma values, wherein w represents the number of preset dimensionalities;
Determining n second V vectors with highest similarity to the first V vectors corresponding to the target test requirement description file in the w dimensions, and determining attribute information of a target recommendation level corresponding to the n second V vectors as a recommendation result set of the target recommendation level;
and responding to the selection of the attribute information in the recommendation result set of the target recommendation level by the user, and inquiring the attribute information along the attribute information hierarchical structure until the selection operation of the test case is obtained.
In a third aspect, an embodiment of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by at least one processor, implements a method as described in the first aspect.
In a fourth aspect, an embodiment of the present invention provides an electronic device, including a memory and at least one processor, where the memory stores a computer program, where the computer program implements the method according to the first aspect when executed by the at least one processor.
In a fifth aspect, embodiments of the present invention provide a computer program product which, when run on a processor, performs the method according to the first aspect.
Compared with the prior art, the invention at least has the following beneficial effects:
the invention carries out test case multiplexing by the LSA semantic analysis technology which fuses TF-IDF for test attribute information, can solve the problems of insufficient experience and low test efficiency of testers, and meets the multiplexing requirements of different levels in different fields. Compared with the prior art that the software testing period is difficult to estimate and the use cases lack the basis, the method avoids the repeated labor of the design of the testing use cases, fully utilizes the experience data of the software testing, has high reliability, can obtain the use case multiplexing recommended information with high semantic similarity without excessive input cost and expense, and has high semantic fusion degree of the associated attribute information of the use case multiplexing retrieval.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be considered as limiting the scope.
FIG. 1 is a flow chart of a test case multiplexing method according to an embodiment of the present invention;
FIG. 2 is a flowchart of a test case multiplexing method according to an embodiment of the present invention;
Fig. 3 is a block diagram of a test case multiplexing device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. The components of the embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the invention, as presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be made by a person skilled in the art without making any inventive effort, are intended to be within the scope of the present invention.
In the related art, related work related to test case multiplexing is mainly focused on constructing a test case library so as to achieve the purpose of test case multiplexing. However, in this way, only a keyword-based search model is used to search test cases from the test case library for multiplexing, so that the flexibility and multiplexing rate of test case multiplexing are poor, and the requirements cannot be met. And is mainly limited in a certain field or a certain layer, and lacks a systematic and intelligent multiplexing scheme.
Example 1
Fig. 1 shows a flowchart of a test case multiplexing method, and as shown in fig. 1, the test case multiplexing method provided in this embodiment at least includes steps S101 to S104:
and step S101, acquiring configuration information and a target test requirement description file which are set by a user aiming at the software to be tested. The configuration information comprises a target recommendation level, a target quality test attribute category and a recommendation number n of the target recommendation level, wherein the target recommendation level is an attribute information level in an attribute information hierarchical structure established in advance based on test data, and the target test requirement description file comprises an overall test requirement, test requirement attribute information, a test requirement point and a test requirement description file corresponding to the test requirement point use case.
In this embodiment, a hierarchical structure of attribute information based on test data is established in advance. The attribute information hierarchical structure sequentially comprises a to-be-tested software attribute information layer, an overall test requirement attribute information layer, a test requirement point attribute information layer and a test requirement point use case attribute information layer from big to small according to granularity.
In practical applications, the target recommendation level is selectively input by the user to make use case multiplexed recommendations based on that level later. The user may set the target test requirements by filling in a text description of the test requirements, which exists in the form of a file, i.e. a target test requirements description file. The target test requirements include overall test requirements, test requirement points, and corresponding test requirements of test requirement point cases. The user may select a set q of test requirement quality attribute categories comprising one or more of function, performance, reliability, ease of use, compatibility, portability, security, maintainability. The user also sets the number of recommendations n for the target recommendation level m.
In some implementations, the attribute information in each level is structured data stored in a table. Tables 1 to 5 below are examples of main attribute information of each level in the attribute information hierarchy:
TABLE 1 software System attribute information to be tested
Table 2 overall test requirement attribute information
Overall test demand attributes Description of the invention
Overall test requirement ID Uniquely identifying overall test requirements
Test type Quality test of technical identification, acceptance test, single function and the like
Overall test requirements Overall test requirement description
Running environment Operating hardware and software environment, configuration information, topology information and the like
Software or System name ID number Unique identification software
Test status Whether or not to already test completion
Test report Test report
Conclusion of the test Test conclusion description
Test requirements Test demand ID number, to
Table 3 test requirement attribute information
Table 4 test demand point attribute information
Table 5 demand point use case attribute information
Demand point use case attributes Description of the invention
Case ID Use case unique identification
Creation date Date of use case creation
Description of use case requirements Language description of test contents that use cases need to complete
Multiplexing frequency Number of times of multiplexing
Use case scenario Environment for executing use cases
Precondition for Use case execution requirement
Executing the steps of Input and operation of test
Expected results Desired output
Purpose of testing Purpose of use case execution
Test method Case testing method
Test phase Software lifecycle stage
Test demand Point ID Uniquely identifying test demand points
The above 5 types of tables form a tree structure of attribute information of test data, from table 1 to table 5, the secondary root node to the leaf node of the tree structure are sequentially, each table is equivalent to one node in the tree structure, it should be understood that the root node may refer to an overall system including a plurality of software systems to be tested, and each software system to be tested included in the overall system corresponds to one table 1 to display attribute information of the software system to be tested; each total test requirement contained in each software system to be tested corresponds to one table 2 so as to display attribute information of the total test requirement; each test requirement contained in each total test requirement corresponds to a table 3 so as to display attribute information of the test requirement; each test requirement point contained in each test requirement corresponds to one table 4 so as to display the attribute information of the test requirement point; each case contained in each test requirement point corresponds to a table 5 to show the attribute information of the case.
Calculating and setting the recommended number of any ith hierarchy according to the recommended number of the target recommended hierarchy:
where ni represents the number of recommendations (tables/nodes) for the i-th level, hm represents the number of tables (nodes) contained in the target recommendation level m, and hi represents the number of tables (nodes) contained in only the i-th level.
Similarly, the number of recommendations (tables/nodes) for any 3 rd level (test requirement attribute information level) can be calculated and set according to the number of recommendations for the target recommendation level:
where n3 represents the number of recommendations (tables/nodes) for level 3, and h3 represents the number of tables (nodes) contained only in level 3.
Similarly, the number of recommendations (tables/nodes) for any level may be calculated from the number of recommendations for the target recommendation level.
The multiplexing of the test cases in this embodiment may be based on the retrieval of the tree structure and the matching of the semantics (requirement description file) of the attribute information of the test data. The use case multiplexing can be recommended according to the tree-shaped hierarchy requirement, the selectable hierarchy in the tree structure is divided into 5 hierarchies, each hierarchy is exclusive selection, namely, multiplexing information of only one hierarchy can be selected as output.
The first level is a software system attribute information level to be tested, the recommended multiplexing information covers all attribute information of tables 1 to 5 in the tree structure, and available specific case information can be inquired and selected from the recommended result of the first level. The second level is a total test requirement attribute information level, the recommended multiplexing information covers the attribute information of tables 2 to 5 in the tree structure, and available specific case information can be queried and selected in the recommended result of the second level. The third level is a test requirement attribute information level, the recommended multiplexing information covers the attribute information of tables 3 to 5 in the tree structure, and available specific case information can be queried and selected in the recommended result of the third level. The fourth level is a test requirement point attribute information level, the recommended multiplexing information covers the attribute information of tables 4 to 5 in the tree structure, and available specific case information can be queried and selected in the recommended result of the fourth level. The fifth level is a test requirement point case attribute information level, the recommended multiplexing information covers the attribute information in the table 5 in the tree structure, and the available specific case information can be directly inquired and selected in the recommended result of the fifth level. It should be understood that when the fifth level is selected as the target recommendation level, the multiplexing information recommended by the fifth level is only attribute information of a specific test case, namely leaf nodes of the tree structure, and in this case, the user does not need to specifically query the case information down the tree hierarchy structure, but directly recommends the specific multiplexing information of the test case meeting the test requirement. Similarly, if the user selects the middle hierarchy as the target recommendation hierarchy, the recommended test multiplexing information related to the target test requirement is in a tree hierarchy structure, and the user can query the required test multiplexing information from top to bottom in the recommendation result of the hierarchy.
Step S102, responding to multiplexing triggering operation of a user, and detecting whether file parameters corresponding to the target test requirement description file ID are stored under the conditions of current configuration information and current time stamp, wherein the file parameters are parameters required for calculating tf-idf values.
In some cases, the file parameters may include: the number of times that the word appears in the test requirement description file, the number of times that the word appears in the test requirement description file with the highest frequency of occurrence in the test requirement description file, the number of test requirement description files, and the number of test requirement description files that the word appears.
The embodiment can trigger the starting of multiplexing retrieval by a user multiplexing triggering operation, and obtain corresponding recommendation results based on a topic model LSA (latent semantic analysis, potential semantic analysis) of a vector space model TF-IDF (term frequency-inverse document frequency) through semantic similarity retrieval and matching.
Detecting whether parameters of a target test requirement description file ID of the target recommendation level m are stored under the conditions of the target recommendation level m, the recommendation number n, the (set of) test requirement quality attribute category q and the current time stamp: the number cm of the words appearing in the test requirement description file, the number pm of the words appearing in the test requirement description file with the highest frequency of the words appearing in the test requirement description file, the number fm of the test requirement description files and the number dm of the test requirement description files in which the words appear. If m, n, q, and the file parameters stored in correspondence with the target test requirement description file ID of the target recommendation level m under the time stamp condition are stored, step S103 is executed.
Step S103, executing a second recommendation procedure when the file parameter corresponding to the target test requirement description file ID is stored under the conditions of the current configuration information and the current timestamp.
Further, the second recommendation procedure of the present embodiment may include:
step S103a, updating the target test requirement description file to the test requirement description file set of the target recommendation level, and updating the number of the test requirement description files of the target recommendation level and the number of the test requirement description files of the word occurrence.
The updated set of test requirement description files for the target recommendation level m is denoted Am' =am. Wherein bm e B, am is the test requirement description file set of the original target recommended level m, B is the test requirement description file set of each level of the software to be tested, bm is the m-th level of the software to be tested and the target test requirement description files below, namely the target level m input by the user and the target test requirement description files below. Taking the target hierarchy m=4 as an example, bm includes test requirement points input by a user and test requirement description files corresponding to the test requirement point use cases. And updating the quantity fm of the test requirement description files of the target recommendation level m and the quantity dm of the test requirement description files of the word occurrence, but not storing.
Step S103b, aiming at the test requirement description file set of the target recommendation level, calculating tf-idf values of words in each test requirement description file based on file parameters, determining S words with the largest tf-idf values as keywords, forming a keyword dictionary of the target recommendation level, wherein S represents the number of preset keywords.
Where tfidfm [ word ] represents the tf-idf value of the word of the target recommendation level m.
Ordering tf-idfm of each word of each test requirement description file of the target recommendation level m in a descending order, finding out the first s words to serve as keywords of the corresponding test requirement description file, and further merging the keyword sets of each test requirement description file of the target recommendation level m to form a keyword dictionary of the target recommendation level m.
Step S103c, constructing a first matrix by taking tf-idf values of all keywords in a keyword dictionary as elements, carrying out singular value decomposition on the first matrix, extracting w dimensions with the largest singular value to obtain corresponding U vectors, V vectors and sigma values, wherein w represents the number of preset dimensions.
And constructing a keyword dictionary (sequence number) -file (sequence number) matrix Rm for forming the target recommendation level m by taking tf-idf values of all keywords in the keyword dictionary of the target recommendation level m as elements, wherein the elements of the matrix Rm are tf-idfm values of words in the keyword dictionary in all files.
Singular value decomposition of matrix Rm forms Um, vm, sigmam:
Rm=Um×sigmam×Vm
the first w singular value large (large element on sigma diagonal) dimensions are taken to form the corresponding Umm, vmm, sigmamm.
Step 103d, determining n second V vectors with highest similarity to the first V vectors corresponding to the target test requirement description file, and determining attribute information of the target recommendation level corresponding to the n second V vectors as a recommendation result set of the target recommendation level, where the recommendation result set may be displayed to a user to implement recommendation feedback.
V corresponding to bmmm column vector v bm (first V vector) and Vmm remaining column vectors V, respectively om And (a second V vector) for similarity comparison. The embodiment can calculate the cosine similarity of the included angle:
in cos θ bmom Representing v bm And v om The cosine similarity of the included angles between them, om represents the index set of Vmm remaining column vectors.
Will cosθ bmom And (3) arranging in a descending order, and taking out nodes (tables) of the target recommendation level m corresponding to the first n second V vectors with high correlation as a recommendation result (recommendation node) set rmdm of the target recommendation level m.
Step S104, responding to selection of attribute information in a recommendation result set of a target recommendation level obtained by a user for the second recommendation flow, and inquiring the attribute information along the attribute information hierarchical structure until the selection operation of the test case is obtained. The user can downwards expand the tree structure according to the recommended node set rmdm returning to the target recommended level m, and select the test cases meeting the conditions correspondingly for multiplexing.
In some implementations, in a case where the target test requirement description file ID corresponds to the file parameter already stored under the condition of the configuration information and the current timestamp, a second update procedure may be further included before the second recommendation procedure is performed.
Specifically, the second updating process includes:
under the condition that a new test report is put in storage or is passively invoked for updating, updating and storing configuration information and file parameters corresponding to the target test requirement description file ID of the target recommendation level under the condition of the current timestamp.
And updating the times cm of the words of the m level in the new warehouse-in test requirement description file, the times pm of the words of the m level, which have the highest occurrence frequency of the new warehouse-in test requirement description file, the number fm of the test requirement description files in the m level and the number dm of the test requirement description files of the words in the m level in the target recommendation level m, and storing.
The method of the embodiment further comprises the following steps:
under the condition that file parameters corresponding to the target test requirement description file ID are not stored under the conditions of the current configuration information and the current timestamp, executing a first training process, and storing file parameters corresponding to the target test requirement description file ID under the conditions of the current configuration information and the current timestamp;
And executing the first recommendation flow;
the first training process comprises the following steps:
and x1, screening test requirement attribute information (nodes) meeting the target quality test attribute category q in a test requirement attribute information level. In some cases, according to the target test requirement quality attribute category, nodes meeting the third level (test requirement attribute information level) of the target test requirement quality attribute category, i.e. the set of table 3, are screened as output results by means of key value matching.
And x2, word segmentation is carried out on the test requirement description file corresponding to the screening result. For example, the test requirement descriptions of the nodes of the third level in the set of table 3 are extracted, each test requirement description forms a file, and the set is denoted as a test requirement description file set A3.
And x3, storing file parameters corresponding to the target test requirement description file ID under the condition of the current configuration information and the current timestamp.
Specifically, the test requirement description file set A3 of the third-level node is subjected to word segmentation, punctuation removal and stop word removal, and semantic words are reserved. It should be appreciated that either global segmentation or extraction of keywords with heuristic properties may be used to generate the segmentation result file. And counting the number of times each word appears in the test requirement description file, the number of the test requirement description files and the number of the test requirement description files of the word aiming at the third level. And further storing the file parameters correspondingly stored by the target test requirement description file ID under the conditions of m, n and q and the corresponding time stamp: the number of times c3 that the third-level word appears in the test requirement description file, the number of times p3 that the word with the highest appearance frequency of the test requirement description file where the third-level word is located appears, the number f3 of the test requirement description files of the third level, and the number d3 of the test requirement description files where the third-level word appears.
The first recommendation process comprises the following steps:
t1, updating target test requirement description files of the test requirement attribute information level to a test requirement description file set of the test requirement attribute information level, and updating the number f3 of the test requirement description files and the number d3 of the test requirement description files of the word occurrence, but not storing.
The target test requirement description file set of the third hierarchy is denoted as A3' =a3 u b 3. A3 represents an original third-level test requirement description file set, B3 epsilon B, B represents test requirement description file sets of all layers of the software to be tested, and B3 represents test requirement description files of the third level and below which the software to be tested is input. The number f3 of test requirement description files and the number d3 of the word appearing test requirement description files are updated, but are not stored.
And t2, aiming at the test requirement description file set of the test requirement attribute information level, calculating tf-idf values of words in each test requirement description file based on file parameters, and determining s words with the largest tf-idf values as keywords to form a keyword dictionary of the test requirement attribute information level.
Where tfidf3[ word ] represents the tf-idf value of the word of the third level.
And t3, constructing a second matrix by using tf-idf values of the keywords in the keyword dictionary, carrying out singular value decomposition on the second matrix, extracting w dimensions with the largest singular values, and obtaining corresponding U vectors, V vectors and sigma values.
And (3) sorting the tf-idf3 values of the words of each file of the third level in a descending order, finding out the words corresponding to the first s tf-idf3 values as the keywords of the file, and taking the union set of the keywords of each file of the third level to form a keyword dictionary. And forming a second matrix R3 of the keyword dictionary (sequence number) -file (sequence number) of the third level based on tf-idf3 values corresponding to the keyword dictionary, wherein elements of the matrix R3 are tf-idf3 values of words in the keyword dictionary in each file. Singular value decomposition is carried out on the matrix R3 to form U3, V3 and sigma3: r3=u3×sigma3×v3.
And taking the dimension of the first w singular values (the elements on the diagonal line of sigma3 are large) to form corresponding U33, V33 and sigma33, thereby realizing the dimension reduction of the recommended data. The V33 column vector vb3 corresponding to b3 is compared with the remaining column vector vo3 by similarity, for example, calculating by adopting cosine similarity of an included angle:
in cos θ b3o3 Representing v b3 And v o3 The cosine similarity of the included angles between the two, and O3 represents the index set of the V33 residual column vectors.
And t4, determining the attribute information of the test requirement attribute information level corresponding to n second V vectors with high similarity of the first V vectors corresponding to the target test requirement description file as a recommended result set of the test requirement attribute information level.
Specifically, cosθ is arranged in descending order b3o3 The correlation was found to be high (cos θ b3o3 Large) of the first n3 vectors as the third level recommended node set rmd 3. n3 can be usedAnd (5) calculating to obtain the product.
In some implementations, between the step of performing the first training procedure and the step of performing the first recommended procedure, further comprising performing a first update procedure; the first updating flow comprises: under the condition that a new test report is put in storage or is passively invoked for updating, updating and storing file parameters corresponding to the target test requirement description file ID under the conditions of current configuration information and current time stamp.
Specifically, if a new test report is put in storage (event triggering) or (management end) is called passively (for example, timing detection, user manually triggers), the corresponding stored file parameters are set for m, n, q and the corresponding target test requirement description file ID of the target recommendation level m under the timestamp condition: the number of times c3 that the third-level word appears in the new warehousing test requirement description file, the number of times p3 that the word with the highest appearance frequency of the new warehousing file where the third-level word is located appears, the number f3 of files, and the number d3 of files in which the word appears are updated and stored.
Executing a second training process after executing the first recommended process, wherein the specific second training process comprises:
a. and backtracking the recommendation result set of the test requirement attribute information level to the target recommendation level, and extracting the test requirement description file set of the target recommendation level.
If the target recommendation level is higher than the test requirement attribute information level, downwards indexing the covered attribute information to the target recommendation level according to the ID in the attribute information hierarchical structure;
and if the target recommendation level is lower than the test requirement attribute information level, the covered attribute information is upwards indexed to the target recommendation level according to the ID in the attribute information hierarchical structure.
Specifically, the node set rmd is recommended by the third level and the node corresponding to the third level is traced back. If m is>3 (m is lower than the third level), extracting test requirement descriptions of m-layer nodes according to the tree nodes covered by the index downward to m layers, forming a file by each test requirement description, and recording the set as Am. Otherwise, m < 3 indexes up the covered tree node to m layers according to the index, the test requirement description of the m layers of nodes is extracted, each test requirement description forms a file, and the test requirement description file set is recorded as Am. The number of recommendations of attribute information levels covered in the indexing process is determined based on the number of recommendations n of the target recommendation level, e.g. with reference to the foregoing The calculation determines that a proportional scaling of the recommended number is achieved.
b. And segmenting the test requirement description file in the test requirement description file set of the target recommendation level. The set Am is segmented, punctuation and stop words are removed. The method can be used for global word segmentation and extracting keywords so as to generate a word segmentation result file.
c. Counting the occurrence times of words in the test requirement description files, the number of the test requirement description files and the number of the test requirement description files of words according to the target recommendation level m;
d. storing the corresponding file parameters of the target test requirement description file ID of the target recommendation level under the condition of the current configuration information and the current timestamp; specifically, under the conditions of m, n and q and corresponding time stamps, the target test requirement description file ID corresponds to the stored file parameters: the number of times cm that the word of the target recommendation level m appears in the file, the number of times pm that the word of the target recommendation level m appears in the file with the highest frequency of occurrence, the number of files fm of the target recommendation level m, and the number of files dm that the word of the target recommendation level m appears.
After the second training process is completed, the aforementioned second recommended process is executed.
In some implementations, the test case multiplexing method of the present embodiment further includes:
Detecting whether file parameters corresponding to the target test requirement description file ID are stored under the condition of the current configuration information and the current timestamp at fixed time; and executing the first updating flow under the condition that the corresponding file parameters of the target test requirement description file ID are stored under the conditions of the configuration information and the current timestamp.
In a specific example, the test case multiplexing method execution flow may be as shown in fig. 2: the target recommendation level m (i.e., multiplexing level), the test requirement quality attribute category q, the number of recommendations (nodes) n are set by the user selection input. The number of keywords s and the number of dimensions w corresponding to the number of keywords s and the number of the singular values are set at the front end by operators. Under the condition that a user needs to multiplex test cases for the software to be tested, the user sets a target test requirement by filling in text description of the test requirement, and the text description of the target test requirement exists in a file form, namely a target test requirement description file. The target test requirements include overall test requirements, test requirement points, and corresponding test requirements in test requirement point cases. The set q of user-selected test requirement quality attribute categories may include one or more of functionality, performance, reliability, ease of use, compatibility, portability, security, maintainability.
Under the condition, after the user operation starts the test case multiplexing, the semantic similarity of the back-end test case multiplexing is searched.
Detecting whether file parameters of a target recommendation level m (i.e. multiplexing level), a test requirement quality attribute category q and a recommendation (node) number n of target recommendation level m exist or not;
if the test requirement description file exists, only the test requirement description file set which is updated to the target recommendation level m according to the target test requirement description file is considered, and then part of file parameters, namely the number fm of the test requirement description files of the target recommendation level m and the number dm of the test requirement description files appearing by words, are updated, and only the file parameters related to the target test requirement description file are updated. And executing a second updating flow to update the file parameters under the condition that a new test report is put in storage or the updating is passively invoked. Updating the target test requirement description file into a file set corresponding to the target recommendation level m, executing a second recommendation flow to calculate tf-idf values and singular value decomposition, recommending n recommendation results which are most similar to the target test requirement description file to be fed back and displayed to a user.
If the current target recommendation level m (i.e. multiplexing level), the test requirement quality attribute category q and the recommended (node) number n are required to be counted and stored for the first time, the file parameters corresponding to the third-level target test requirement description file ID are required to be executed, and the first updating flow is executed under the condition that a new test report is put in storage or is passively invoked and updated, and the file parameters corresponding to the third-level target test requirement description file ID are updated and stored under the conditions of current configuration information and current time stamp. Further, executing a first recommendation process to update the target test requirement description file of the test requirement attribute information level to the test requirement description file set of the test requirement attribute information level, and updating part of the file parameters related to the test requirement description file set; and calculating tf-idf values and singular value decomposition of the third level, recommending n recommended results of the third level which are most similar to the target test requirement description file, and quickly and effectively retrieving retrieval results of the target recommended level by taking the third level containing the specific test requirement as a recommended entry point. Further, executing a second training process after the first recommendation process, backtracking from the recommendation result set of the third level to the target recommendation level m, and further counting and storing file parameters corresponding to the target test requirement description file ID of the target recommendation level under the conditions of configuration information and the current timestamp; after the second training process is finished, executing the second recommendation process, calculating tf-idf values and singular value decomposition, recommending n recommendation results which are most similar to the target test requirement description file to be fed back and displayed to the user, and finishing multiplexing recommendation of the test cases.
In another case, detecting whether the file parameters corresponding to the target test requirement description file ID are stored under the conditions of the current configuration information and the current timestamp at regular time; under the condition that the file parameters corresponding to the target test requirement description file ID are stored under the conditions of the current configuration information and the current timestamp, executing a first updating flow, updating and storing the file parameters corresponding to the third-level target test requirement description file ID under the conditions of the current configuration information and the current timestamp, then executing a first recommending flow, updating the target test requirement description file of the third level to the test requirement description file set of the third level, and updating part of the file parameters related to the third-level target test requirement description file set; calculating tf-idf values and singular value decomposition of a third level, recommending n recommended results of the third level which are most similar to the target test demand description file, executing a second training process, backtracking to a target recommended level m from a recommended result set of the third level, and further counting and storing configuration information and file parameters corresponding to the target recommended level and the target test demand description file ID under the condition of a current timestamp; and then, the second updating process and the second recommending process are executed, so that the retrieval result of the target recommending level is quickly and effectively retrieved by taking the file parameter of the third level as the access point.
It should be appreciated that the stored file parameters and the hierarchically structured attribute information are stored separately as external storage in a database, providing for invocation during execution of the method.
According to the method, the attribute information of the test data is stored in the database in a progressive hierarchical structure mode, so that the requirement of different granularity of query multiplexing of users can be met. Under the condition that parameters required by tf-idf values of target recommendation levels in a stored calculation hierarchy structure exist, a matrix is constructed according to tf-idf values of words in the target recommendation levels so as to fully reflect global information of word occurrence frequencies, and therefore multiplexing information recommended based on recommendation results determined according to the matrix is accurate and efficient, and semantic similarity is fully embodied. Further, under the condition that parameters required by tf-idf values of target recommendation levels in a calculation hierarchy are not stored, training the parameters required by tf-idf values of calculation test requirement attribute information levels, recommending the test requirement attribute information levels based on tf-idf values of the test requirement attribute information levels, training the parameters required by tf-idf values of the target recommendation levels according to recommended information of the test requirement attribute information levels, recommending multiplexing information of the target recommendation levels, and accordingly accurately recommending multiplexing information based on the test requirement attribute information.
Example two
As shown in fig. 3, the test case multiplexing device provided in this embodiment includes:
the obtaining module 201 is configured to obtain configuration information and a target test requirement description file set by a user for software to be tested, where the configuration information includes a target recommendation level, a target quality test attribute category, and a recommendation number n of the target recommendation level, the target recommendation level is an attribute information level in an attribute information hierarchy that is built in advance based on test data, and the target test requirement description file includes a total test requirement, test requirement attribute information, a test requirement point, and a test requirement description file corresponding to a test requirement point case;
the detection module 202 is configured to detect whether a file parameter corresponding to the target test requirement description file ID is stored under the conditions of the current configuration information and the current timestamp in response to a multiplexing trigger operation of a user, where the file parameter is a parameter required for calculating tf-idf values;
a recommending module 203, configured to execute a second recommending process when the file parameter corresponding to the ID of the target test requirement description file is stored under the conditions of the current configuration information and the current timestamp;
the second recommendation process includes:
Updating the target test requirement description file to a test requirement description file set of a target recommendation level, and updating part of file parameters of the target recommendation level;
aiming at a test requirement description file set of a target recommendation level, calculating tf-idf values of words in each test requirement description file based on file parameters, determining s words with the largest tf-idf values as keywords, forming a keyword dictionary of the target recommendation level, wherein s represents the number of preset keywords;
constructing a first matrix by taking tf-idf values of each keyword in a keyword dictionary as elements, carrying out singular value decomposition on the first matrix, extracting w dimensionalities with the largest singular values to obtain corresponding U vectors, V vectors and sigma values, wherein w represents the number of preset dimensionalities;
determining n second V vectors with highest similarity to the first V vectors corresponding to the target test requirement description file in w dimensions, and determining attribute information of a target recommendation level corresponding to the n second V vectors as a recommendation result set of the target recommendation level;
and the query module 204 is configured to query the attribute information along the attribute information hierarchy in response to the selection of the attribute information in the recommendation result set of the target recommendation level by the user until the selection operation on the test case is obtained.
Specific implementation details and beneficial effects of the embodiment refer to the first embodiment, and are not described in detail in the embodiment.
Example III
The present embodiment provides a computer-readable storage medium having a computer program stored thereon, which when executed by at least one processor, implements the method of the first embodiment.
The computer readable storage medium may be implemented by any type or combination of volatile or nonvolatile Memory devices, such as static random access Memory (Static Random Access Memory, SRAM for short), electrically erasable programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory, EPROM for short), programmable Read-Only Memory (Programmable Read-Only Memory, PROM for short), read-Only Memory (ROM for short), magnetic Memory, flash Memory, magnetic disk, or optical disk.
Example IV
The present embodiment provides an electronic device comprising a memory and at least one processor, the memory having stored thereon a computer program which, when executed by the at least one processor, performs the method of embodiment one.
The processor may be an application specific integrated circuit (Application Specific Integrated Circuit, abbreviated as ASIC), a digital signal processor (Digital Signal Processor, abbreviated as DSP), a digital signal processing device (Digital Signal Processing Device, abbreviated as DSPD), a programmable logic device (Programmable Logic Device, abbreviated as PLD), a field programmable gate array (Field Programmable Gate Array, abbreviated as FPGA), a controller, a microcontroller (Microcontroller Unit, MCU), a microprocessor, or other electronic components for executing the walk-slip fracture strain type determining method in the above embodiments.
Example five
The present embodiment provides a computer program product for performing the method of embodiment one when the computer program product is run on a processor.
In practical applications, the computer program product may be implemented to run in an electronic device.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The apparatus and method embodiments described above are merely illustrative.
It should be noted that, in this document, the terms "first," "second," and the like in the description and the claims of the present application and the above drawings are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. The terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Although the embodiments of the present invention are described above, the embodiments are only used for facilitating understanding of the present invention, and are not intended to limit the present invention. Any person skilled in the art can make any modification and variation in form and detail without departing from the spirit and scope of the present disclosure, but the scope of the present disclosure is still subject to the scope of the appended claims.

Claims (12)

1. A test case multiplexing method, comprising:
acquiring configuration information and target test requirement description files which are set by a user aiming at software to be tested, wherein the configuration information comprises a target recommendation level, a target quality test attribute category and the recommendation number n of the target recommendation level, the target recommendation level is an attribute information level in an attribute information hierarchical structure which is established in advance based on test data, and the target test requirement description files comprise overall test requirements, test requirement attribute information, test requirement points and test requirement description files corresponding to test requirement point use cases;
responding to multiplexing triggering operation of a user, and detecting whether a file parameter corresponding to a target test requirement description file ID is stored under the conditions of the configuration information and the current timestamp, wherein the file parameter comprises parameters required for calculating tf-idf values;
Under the condition that the corresponding file parameters of the target test requirement description file ID are stored under the conditions of the configuration information and the current timestamp, executing a second recommendation flow, wherein the second recommendation flow comprises:
updating a target test requirement description file to a test requirement description file set of the target recommendation level, and updating part of file parameters of the target recommendation level;
aiming at the test requirement description file set of the target recommendation level, calculating tf-idf values of words in each test requirement description file based on the file parameters, determining s words with the largest tf-idf values as keywords, forming a keyword dictionary of the target recommendation level, wherein s represents the number of preset keywords;
constructing a first matrix by taking tf-idf values of each keyword in the keyword dictionary as elements, carrying out singular value decomposition on the first matrix, extracting w dimensionalities with the largest singular value to obtain corresponding U vectors, V vectors and sigma values, wherein w represents the number of preset dimensionalities;
determining n second V vectors with highest similarity to the first V vectors corresponding to the target test requirement description file in the w dimensions, and determining attribute information of a target recommendation level corresponding to the n second V vectors as a recommendation result set of the target recommendation level;
Responding to the selection of attribute information in a recommendation result set of a target recommendation level by a user, and inquiring the attribute information along the attribute information hierarchical structure until the selection operation of the test case is obtained;
under the condition that file parameters corresponding to the target test requirement description file ID are not stored under the conditions of the configuration information and the current time stamp, executing a first training process, and storing file parameters corresponding to the target test requirement description file ID under the conditions of the configuration information and the current time stamp;
executing a first recommendation process, the first recommendation process comprising:
updating a target test requirement description file to a test requirement description file set of a test requirement attribute information level, and updating part of file parameters of the test requirement attribute information level;
aiming at the test requirement description file set of the test requirement attribute information level, calculating tf-idf values of words in each test requirement description file based on the file parameters, determining s words with the largest tf-idf values as keywords, and forming a keyword dictionary of the test requirement attribute information level;
constructing a second matrix based on tf-idf values of each keyword in the keyword dictionary, performing singular value decomposition on the second matrix, and extracting w dimensions with the largest singular value to obtain corresponding U vectors, V vectors and sigma values;
Determining n V vectors with highest similarity to the V vectors corresponding to the target test requirement description file in w dimensions, and determining the attribute information of the test requirement attribute information level corresponding to the n V vectors as a recommended result set of the test requirement attribute information level;
executing a second training process, the second training process comprising:
based on the recommendation result set of the test requirement attribute information level, backtracking to the target recommendation level, and extracting a test requirement description file set of the target recommendation level;
the test requirement description file in the test requirement description file set of the target recommendation level is segmented;
counting the occurrence times of words in the test requirement description file in which the words are located, the occurrence times of words with highest occurrence frequency in the test requirement description file in which the words are located, the number of the test requirement description files and the number of the test requirement description files in which the words are located aiming at the target recommendation level;
storing the configuration information and file parameters of the target recommendation level under the condition of the current time stamp;
and executing the second recommended flow after the second training flow is completed.
2. The test case multiplexing method according to claim 1, wherein the attribute information hierarchy sequentially includes a software attribute information hierarchy to be tested, an overall test requirement attribute information hierarchy, a test requirement point attribute information hierarchy, and a test requirement point case attribute information hierarchy in order of granularity from top to bottom.
3. The test case multiplexing method according to claim 1, further comprising a second update procedure in a case where a target test requirement description file ID corresponding file parameter is stored under the condition of the configuration information and a current timestamp, the second update procedure comprising:
under the condition that a new test report is put in storage or is passively invoked for updating, updating and storing the configuration information and file parameters corresponding to the target test requirement description file ID under the condition of the current timestamp.
4. The test case multiplexing method of claim 1, wherein the file parameters include: the number of times that the word appears in the test requirement description file, the number of times that the word appears in the test requirement description file with the highest frequency of occurrence in the test requirement description file, the number of test requirement description files, and the number of test requirement description files that the word appears.
5. The test case multiplexing method of claim 1, wherein the first training process comprises:
screening test requirement attribute information meeting the target quality test attribute category in a test requirement attribute information level;
word segmentation is carried out on the test requirement description file corresponding to the screening result;
And storing file parameters corresponding to the target test requirement description file ID under the condition of the configuration information and the current time stamp.
6. The test case multiplexing method of claim 1, further comprising, between said executing a first training procedure and said executing a first recommended procedure, executing a first update procedure;
the first updating flow comprises the following steps: under the condition that a new test report is put in storage or is passively invoked for updating, updating and storing the configuration information and file parameters corresponding to the target test requirement description file ID under the condition of the current timestamp.
7. The test case multiplexing method of claim 6, further comprising:
detecting whether file parameters corresponding to the target test requirement description file ID are stored under the conditions of the configuration information and the current time stamp at regular time;
and executing the first updating flow under the condition that the corresponding file parameters of the target test requirement description file ID are stored under the conditions of the configuration information and the current timestamp.
8. The test case multiplexing method according to claim 1, wherein the extracting the test requirement description file set of the target recommendation level based on the recommendation result set of the test requirement attribute information level backtracking to the target recommendation level includes:
If the target recommendation level is higher than the test requirement attribute information level, downwards indexing the covered attribute information to the target recommendation level according to the ID in the attribute information hierarchical structure;
and if the target recommendation level is lower than the test requirement attribute information level, upwards indexing the covered attribute information to the target recommendation level according to the ID in the attribute information hierarchical structure.
9. The test case multiplexing method of claim 8, wherein the recommended number of attribute information levels covered in the indexing process is determined based on the recommended number n of target recommended levels.
10. A test case multiplexing device, comprising:
the system comprises an acquisition module, a test requirement setting module and a test requirement setting module, wherein the acquisition module is used for acquiring configuration information and a target test requirement description file which are set by a user aiming at software to be tested, the configuration information comprises a target recommendation level, a target quality test attribute type and the recommendation number n of the target recommendation level, the target recommendation level is an attribute information level in an attribute information hierarchical structure which is established in advance based on test data, and the target test requirement description file comprises overall test requirements, test requirement attribute information, test requirement points and test requirement description files corresponding to test requirement point use cases;
The detection module is used for responding to multiplexing triggering operation of a user, detecting whether file parameters corresponding to the target test requirement description file ID are stored under the conditions of the configuration information and the current timestamp, wherein the file parameters comprise parameters required for calculating tf-idf values;
the recommending module is configured to execute a second recommending process under the condition that the file parameter corresponding to the target test requirement description file ID is stored under the conditions of the configuration information and the current timestamp, where the second recommending process includes:
updating a target test requirement description file to a test requirement description file set of the target recommendation level, and updating part of file parameters of the target recommendation level;
aiming at the test requirement description file set of the target recommendation level, calculating tf-idf values of words in each test requirement description file based on the file parameters, determining s words with the largest tf-idf values as keywords, forming a keyword dictionary of the target recommendation level, wherein s represents the number of preset keywords;
constructing a first matrix by taking tf-idf values of each keyword in the keyword dictionary as elements, carrying out singular value decomposition on the tf-idf value matrix, extracting w dimensions with the largest singular value to obtain corresponding U vectors, V vectors and sigma values, wherein w represents the number of preset dimensions;
Determining n second V vectors with highest similarity to the first V vectors corresponding to the target test requirement description file in the w dimensions, and determining attribute information of a target recommendation level corresponding to the n second V vectors as a recommendation result set of the target recommendation level;
responding to the selection of attribute information in the recommendation result set of the target recommendation level by a user, and inquiring the attribute information along the attribute information hierarchical structure until the selection operation of the test case is obtained;
the recommendation module is further configured to execute a first training process when the file parameter corresponding to the target test requirement description file ID is not stored under the conditions of the configuration information and the current timestamp, and store the file parameter corresponding to the target test requirement description file ID under the conditions of the configuration information and the current timestamp;
executing a first recommendation process, the first recommendation process comprising:
updating a target test requirement description file to a test requirement description file set of a test requirement attribute information level, and updating part of file parameters of the test requirement attribute information level;
aiming at the test requirement description file set of the test requirement attribute information level, calculating tf-idf values of words in each test requirement description file based on the file parameters, determining s words with the largest tf-idf values as keywords, and forming a keyword dictionary of the test requirement attribute information level;
Constructing a second matrix based on tf-idf values of each keyword in the keyword dictionary, performing singular value decomposition on the second matrix, and extracting w dimensions with the largest singular value to obtain corresponding U vectors, V vectors and sigma values;
determining n V vectors with highest similarity to the V vectors corresponding to the target test requirement description file in w dimensions, and determining the attribute information of the test requirement attribute information level corresponding to the n V vectors as a recommended result set of the test requirement attribute information level;
executing a second training process, the second training process comprising:
based on the recommendation result set of the test requirement attribute information level, backtracking to the target recommendation level, and extracting a test requirement description file set of the target recommendation level;
the test requirement description file in the test requirement description file set of the target recommendation level is segmented;
counting the occurrence times of words in the test requirement description file in which the words are located, the occurrence times of words with highest occurrence frequency in the test requirement description file in which the words are located, the number of the test requirement description files and the number of the test requirement description files in which the words are located aiming at the target recommendation level;
Storing the configuration information and file parameters of the target recommendation level under the condition of the current time stamp;
and executing the second recommended flow after the second training flow is completed.
11. A computer-readable storage medium, on which a computer program is stored which, when executed by at least one processor, implements the method according to any one of claims 1 to 9.
12. An electronic device comprising a memory and at least one processor, the memory having stored thereon a computer program which, when executed by the at least one processor, implements the method of any of claims 1-9.
CN202310410740.1A 2023-04-17 2023-04-17 Test case multiplexing method, device, medium, equipment and product Active CN116680162B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310410740.1A CN116680162B (en) 2023-04-17 2023-04-17 Test case multiplexing method, device, medium, equipment and product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310410740.1A CN116680162B (en) 2023-04-17 2023-04-17 Test case multiplexing method, device, medium, equipment and product

Publications (2)

Publication Number Publication Date
CN116680162A CN116680162A (en) 2023-09-01
CN116680162B true CN116680162B (en) 2023-11-10

Family

ID=87789756

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310410740.1A Active CN116680162B (en) 2023-04-17 2023-04-17 Test case multiplexing method, device, medium, equipment and product

Country Status (1)

Country Link
CN (1) CN116680162B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117370151B (en) * 2023-09-08 2024-03-29 中国软件评测中心(工业和信息化部软件与集成电路促进中心) Reduction and optimization method, device, medium and equipment for test case execution
CN117591624B (en) * 2024-01-18 2024-04-05 航天中认软件测评科技(北京)有限责任公司 Test case recommendation method based on semantic index relation

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004227301A (en) * 2003-01-23 2004-08-12 Nippon Steel Corp Shipment amount predicting device and method for product and computer readable recording medium
CN110442684A (en) * 2019-08-14 2019-11-12 山东大学 A kind of class case recommended method based on content of text
CN111931075A (en) * 2020-10-19 2020-11-13 腾讯科技(深圳)有限公司 Content recommendation method and device, computer equipment and storage medium
CN112416778A (en) * 2020-11-24 2021-02-26 北京金山云网络技术有限公司 Test case recommendation method and device and electronic equipment
CN115422095A (en) * 2022-11-07 2022-12-02 易方信息科技股份有限公司 Regression test case recommendation method, device, equipment and medium
KR102500433B1 (en) * 2022-11-01 2023-02-16 주식회사 큐로드 Method, apparatus and computer program for automatically generating test case for software quality assurance

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004227301A (en) * 2003-01-23 2004-08-12 Nippon Steel Corp Shipment amount predicting device and method for product and computer readable recording medium
CN110442684A (en) * 2019-08-14 2019-11-12 山东大学 A kind of class case recommended method based on content of text
CN111931075A (en) * 2020-10-19 2020-11-13 腾讯科技(深圳)有限公司 Content recommendation method and device, computer equipment and storage medium
CN112416778A (en) * 2020-11-24 2021-02-26 北京金山云网络技术有限公司 Test case recommendation method and device and electronic equipment
KR102500433B1 (en) * 2022-11-01 2023-02-16 주식회사 큐로드 Method, apparatus and computer program for automatically generating test case for software quality assurance
CN115422095A (en) * 2022-11-07 2022-12-02 易方信息科技股份有限公司 Regression test case recommendation method, device, equipment and medium

Also Published As

Publication number Publication date
CN116680162A (en) 2023-09-01

Similar Documents

Publication Publication Date Title
CN116680162B (en) Test case multiplexing method, device, medium, equipment and product
Abedjan et al. Detecting data errors: Where are we and what needs to be done?
CN110968699B (en) Logic map construction and early warning method and device based on fact recommendation
CN105765560A (en) Software component recommendation based on multiple trace runs
CN111316296A (en) Structure of learning level extraction model
EP4332785A2 (en) Rules-based dataset cleaning
CN110188165A (en) Contract template acquisition methods, device, storage medium and computer equipment
CN113779272A (en) Data processing method, device and equipment based on knowledge graph and storage medium
CN110716539A (en) Fault diagnosis and analysis method and device
WO2008094970A9 (en) Method and apparatus for creating a tool for generating an index for a document
Le et al. Multi-abstraction concern localization
CN109408385A (en) A kind of disfigurement discovery method based on mischief rule and classifying feedback
CN113779261B (en) Quality evaluation method and device of knowledge graph, computer equipment and storage medium
Swe et al. Bug localization approach using source code structure with different structure fields
CN112631889A (en) Portrayal method, device and equipment for application system and readable storage medium
Kamp et al. SeSaMe: A data set of semantically similar Java methods
CN111523921A (en) Funnel analysis method, analysis device, electronic device, and readable storage medium
Ferrara et al. Design of automatically adaptable web wrappers
CN109614467B (en) Knowledge association and dynamic organization method and system based on fragment similarity
CN111309773A (en) Vehicle information query method, device and system and storage medium
CN109299381B (en) Software defect retrieval and analysis system and method based on semantic concept
KR101418744B1 (en) System and method for searching weak signal
US11816112B1 (en) Systems and methods for automated process discovery
CN117591624B (en) Test case recommendation method based on semantic index relation
CN115374108B (en) Knowledge graph technology-based data standard generation and automatic mapping method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant