WO2022009499A1 - Test assistance device and test assistance method - Google Patents

Test assistance device and test assistance method Download PDF

Info

Publication number
WO2022009499A1
WO2022009499A1 PCT/JP2021/015753 JP2021015753W WO2022009499A1 WO 2022009499 A1 WO2022009499 A1 WO 2022009499A1 JP 2021015753 W JP2021015753 W JP 2021015753W WO 2022009499 A1 WO2022009499 A1 WO 2022009499A1
Authority
WO
WIPO (PCT)
Prior art keywords
test
test case
existing
unit
existing test
Prior art date
Application number
PCT/JP2021/015753
Other languages
French (fr)
Japanese (ja)
Inventor
有真 加藤
将史 溝口
暁 池田
Original Assignee
日立Astemo株式会社
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 日立Astemo株式会社 filed Critical 日立Astemo株式会社
Publication of WO2022009499A1 publication Critical patent/WO2022009499A1/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

Definitions

  • the present invention relates to a test support device and a test support method.
  • Patent Document 1 as a technique for searching from existing software components for lower-layer software components used in upper-layer software components when newly constructing software by reusing existing software components.
  • the techniques described in are known.
  • Patent Document 1 The problem of Patent Document 1 is to provide a technique capable of efficiently searching for necessary software components in consideration of the hierarchical structure and variations between software components, and as a solution, the upper layer software components are supported.
  • a software component information search system that searches for information on lower-layer software components, and has a function to narrow down the search results to the required variations from among the variation components that are multiple lower-layer software components that have the same name. It is stated that it has.
  • Patent Document 2 a solution for automatically forming a test case by a computer in order to verify at least one function of one software for a specification including a requirement regarding an input value and an output value of the software.
  • the means are disclosed.
  • a step to distinguish between a combination request and an order request a step to model the combination request with a truth table and a step to model the order request with a finite state machine, in order to obtain a modeled specification.
  • the software is tested by associating the input values with the probability that the input values are inherited and the transition time between the input values to establish a math matrix and by performing a Monte Carlo draw on the math matrix. Determined to be a step of selecting the inheritance of the input value and a step of determining a test case containing a test line relating each selected inheritance to the expected output value in view of the modeled specification. If the test case allows a predetermined threshold to be reached for at least one of the following criteria, functional code validated percentage, requirement validated percentage, validation time, and validation cost: A step to stop the determination step is described.
  • Patent Document 1 it is possible to narrow down the required software components to those with the required variations by considering the hierarchical structure and variations between the software components, but when there are multiple narrowing results, which software component should be referred to. Since manual confirmation is required to select a key, there is a problem that software components cannot be reused efficiently.
  • Patent Document 2 it is possible to search for test cases corresponding to the requirements by modeling the requirements, but in order to select which test case should be referred to when there are a plurality of corresponding test cases. Has a problem that test cases cannot be generated efficiently because it requires manual confirmation.
  • test case that needs to be developed in order to determine whether or not the software to be verified meets the test requirement from the test cases generated in the past. It is an object of the present invention to provide a test support device that efficiently generates the above.
  • the present invention is a test support device having a processor and a memory, accepting a new test requirement, and outputting a reusable reference test case, and the test requirement accepting the new test requirement written in a natural language.
  • the acquisition unit, the test requirement analysis unit that performs natural language analysis on the received new test requirements and generates test requirement quantified data, and the existing test cases generated in the past are based on the test requirement quantified data.
  • the test case analysis unit has a test case candidate extraction unit that generates one or more existing test cases as output test case candidates based on the test requirement quantified data, and each of the output test case candidates. It has a reusability evaluation unit that calculates the reusability of the test case, and the test case output unit refers to the output test case candidates based on the reusability calculated by the reusability evaluation unit. Determine the test case.
  • FIG. 1 is a block diagram showing Example 1 of the present invention and showing an example of a configuration including hardware of a test support device.
  • FIG. 1 shows Example 1 of the present invention and is a diagram showing an example of a test requirement described in natural language.
  • FIG. 1 shows Example 1 of the present invention and is a diagram showing an example of a test case described in a formal language that can be interpreted by a computer.
  • It is a flowchart which shows Example 1 of this invention and shows the outline of the process performed in the test requirement analysis part.
  • FIG. 1 is a flowchart of a natural language analysis process executed by the test requirement analysis unit, showing Example 1 of the present invention.
  • FIG. 1 is a block diagram showing Example 1 of the present invention and showing an example of a configuration including hardware of a test support device.
  • FIG. 1 shows Example 1 of the present invention and is a diagram showing an example of a test requirement described in natural language.
  • FIG. 1 shows Example 1 of the present invention and is a diagram showing an example of
  • Example 1 is a diagram showing Example 1 of the present invention and showing an example of test requirement quantified data obtained by converting the test requirements shown in FIG. 2 into numerical data. It is a figure which shows Example 1 of this invention and shows an example of the function of the test case candidate extraction part. It is a figure which shows Example 1 of this invention and shows an example of the code clone data. It is a figure which shows Example 1 of this invention and shows an example of cluster data. It is a figure which shows Example 1 of this invention and shows an example of a test case candidate.
  • FIG. 1 is a diagram showing Example 1 of the present invention and showing an example of the function of the code clone analysis unit. It is a figure which shows Example 1 of this invention and shows an example of a token division test case.
  • FIG. 1 is a flowchart showing the first embodiment of the present invention and showing the entire process executed in the code clone extraction unit.
  • FIG. 5 is a flowchart showing Example 1 of the present invention and showing in detail the contents of the code clone analysis process in FIG.
  • Example 1 of this invention shows an example of the function of the test case candidate determination part.
  • Example 1 of this invention shows an example of the process executed in the classifier generation part.
  • Example 1 is a diagram showing Example 1 of the present invention and showing an example of the function of the reusability evaluation unit. It is a figure which shows Example 1 of this invention and shows an example of a reuse graph. It is a figure which shows Example 1 of this invention and shows an example of the reuse degree data. It is a flowchart which shows Example 1 of this invention and shows an example of the process executed in the reuse graph generation part. It is a flowchart which shows Example 1 of this invention and shows an example of the process executed in the reuse degree calculation unit. It is a flowchart which shows Example 1 of this invention and shows an example of the process executed in the test case output part in Example 1.
  • FIG. FIG. 2 is a flowchart showing Example 2 of the present invention and showing an example of processing executed in the test case output unit.
  • This embodiment relates to a test support device, and particularly to a test technique used for developing control software for an embedded system.
  • FIG. 1A is a block diagram showing an outline of the functions of the test support device in the present invention.
  • the test support device 0 includes a test requirement acquisition unit 1 that acquires a new test requirement 11 written in natural language, and a test requirement analysis unit that generates test requirement quantified data from the test requirements using a method such as natural language processing. 2.
  • the test case analysis unit 3 that analyzes the existing test cases manually developed in the past embedded software development project based on the test requirement quantified data and outputs them as candidates for the reference test case 12, and the reference test case. It is composed of a test case output unit 4 that outputs the reference test case 12 having the highest degree of reuse among the 12 candidates.
  • test case analysis unit 3 determines the degree of reuse for each of the test case candidate extraction unit 301 that generates one or more existing test cases as test case candidates based on the test requirement quantified data and the test case candidates. It is composed of a reusability evaluation unit 302 for calculation.
  • the test support device 0 uses an existing test case with high reusability (reusability) as the reference test case 12, so that the user or the like can modify only a part of the reference test case 12 to be verified. You can generate test cases to determine if your software meets the test requirements. This makes it possible to generate a test case with a small number of man-hours.
  • FIG. 1B is a block diagram showing an example of a configuration including the hardware of the test support device 0.
  • the test support device 0 is a computer including a processor 21, a memory 22, a storage device 23, an input device 24, an output device 25, and a network device 26.
  • the input device 24 is composed of a keyboard, a mouse, a touch panel, or the like.
  • the output device 25 is composed of a display or the like.
  • the network device 26 is connected to a network (not shown) and communicates with other devices.
  • test requirement acquisition unit 1, the test requirement analysis unit 2, the test case analysis unit 3, and the test case output unit 4 are loaded into the memory 22 as programs and executed by the processor 21.
  • the test case analysis unit 3 is composed of a test case candidate extraction unit 301 and a reusability evaluation unit 302.
  • the processor 21 operates as a functional unit that provides a predetermined function by executing a process according to the program of each functional unit.
  • the processor 21 functions as the test case analysis unit 3 by executing the process according to the test case analysis program. The same applies to other programs.
  • the processor 21 also operates as a functional unit that provides each function of a plurality of processes executed by each program.
  • a computer and a computer system are devices and systems including these functional parts.
  • FIG. 2 is a diagram showing an example of test requirement 111 written in natural language.
  • the test requirement 111 is data that describes the behavior that the control software to be verified should satisfy, that is, the content to be verified in the test in natural language.
  • 112 and test requirement 113 are included in one entry.
  • the test requirement 111 is used for a unit test, a combination test, a system test, etc. of a predetermined system, and is used to determine whether or not the system meets the user's requirements.
  • control software meets the test requirements by inputting low to the control software in mode START1, then measuring the mode of the control software, and finally determining that the mode is START1. You can confirm that it is.
  • test case defines the specific input given to the control software and the specific output measured by the control software to confirm that the control software meets the test requirements.
  • write the test case in a formal language that can be interpreted by a computer.
  • FIG. 3 is a diagram showing an example of a test case written in a formal language that can be interpreted by a computer.
  • the test case 121 is data in which the contents to be verified as shown in the figure are formally described so that the contents to be verified can be executed by a test device such as a PC capable of automatically executing a test.
  • FIG. 4 is a flowchart showing an example of the processing performed by the test requirement analysis unit 2.
  • step S21 the test requirement analysis unit 2 receives the new test requirement 11 from the test requirement acquisition unit 1.
  • step S22 the test requirement analysis unit 2 performs a natural language analysis of the received new test requirement 11.
  • step S23 the test requirement analysis unit 2 outputs the result of the natural language analysis to the test case analysis unit 3 as the test requirement quantified data 200. In this way, the test requirement analysis unit 2 converts the test requirement into the test requirement quantified data and ends the process.
  • FIG. 5 is a detailed flowchart of the natural language analysis process (S22) executed by the test requirement analysis unit 2.
  • step S222 the test requirement analysis unit 2 divides the new test requirement 11 into words that are constituent units of the test requirement, and registers each of the words in the queue.
  • step S223 the test requirement analysis unit 2 determines whether or not a word exists in the queue, and if it exists, proceeds to step S224, and if it does not exist, proceeds to step S229 for processing. finish.
  • step S224 the test requirement analysis unit 2 pops a word from the queue.
  • step S225 the test requirement analysis unit 2 determines whether or not the popped word exists in the already-existing word list, and if the popped word exists in the already-existing word list, the step S226 is performed. If the popped word does not exist in the existing word list, the process proceeds to step S227.
  • step S226 the test requirement analysis unit 2 increments the number of appearances of the corresponding existing word described in the existing word list, then returns to step S223 and repeats the above process.
  • step S227 the test requirement analysis unit 2 adds the popped word to the existing word list.
  • step S228, the test requirement analysis unit 2 initializes the number of appearances of the word with 1, and then returns to step S223 to repeat the above process.
  • the test support device 0 converts the new test requirement 11 described in the natural language into a numerical vector in which the number of occurrences of the words included in the test requirement is arranged, and the test requirement quantified data 200 is obtained. Can be generated.
  • test requirement analysis unit 2 arranges the number of occurrences of the word of the test requirement 113 and converts it into a numerical vector to generate the test requirement quantified data 200.
  • FIG. 7 is a diagram showing the configuration of the test case candidate extraction unit 301 constituting the test case analysis unit 3.
  • the test case candidate extraction unit 301 is composed of an existing test case storage unit 3011, a code clone analysis unit 3012, a clustering implementation unit 3014, and a test case candidate determination unit 3016.
  • the test case candidate extraction unit 301 compares the input quantified data of the new test requirement 11 with the quantified data of the existing test requirement 30112 developed in the past, and the numerical value of the new test requirement 11 input as described later. Determine which cluster the conversion data belongs to, and output the existing test cases included in that cluster as test case candidates.
  • the existing test case storage unit 3011 is one of the components of the test case candidate extraction unit 301, and stores the existing test cases manually developed in the past embedded software development project as the existing test cases 30111.
  • the existing test cases 30111 are generated based on the test requirements that describe the behavior to be verified in natural language, and each test case is saved in a state associated with the existing test requirement 30112 that describes the behavior to be verified. ing.
  • the association is performed by a method of tagging each existing test case 30111 and each existing test requirement 30112, or a method of describing the correspondence between each existing test case 30111 and each existing test requirement 30112 in a table format.
  • the existing test case 30111 stored in the existing test case storage unit 3011 is read and executed by, for example, a test device such as HiLS (Hardware in the Loop Simulator) that tests a control controller such as an ECU (Electronic Control Unit) in a vehicle. It is described in a possible format, and FIG. 3 is an example. Further, the test requirement associated with the existing test case 30111 is referred to as an existing test requirement 30112.
  • the code clone analysis unit 3012 is one of the components of the test case candidate extraction unit 301, and evaluates the similarity between the existing test cases 30111 stored in the existing test case storage unit 3011.
  • the evaluation of the similarity is based on the ratio of code clones common to the existing test case 30111. That is, the code clone analysis unit 3012 analyzes the code clone between the formal languages described in the two existing test cases 30111, and calculates the ratio of the number of elements of the code clone to the number of elements of the formal language as the degree of similarity. do.
  • FIG. 11 is a diagram showing the configuration of the code clone analysis unit 3012.
  • the code clone analysis unit 3012 is stored in the lexical analysis unit 30121 that divides the existing test case 30111 into tokens, the token count unit 30123 that counts the number of tokens existing in the existing test case 30111, and the existing test case storage unit 3011. It is composed of a code clone extraction unit 30125 that extracts a code clone common to existing test cases 30111.
  • the lexical analysis unit 30121 divides the existing test case 30111 for each token and converts it into the token division test case 30122.
  • the token is the smallest unit that constitutes a test case such as an operator and parentheses.
  • FIG. 12 is an example in which the existing test case 30111 shown in FIG. 3 is converted into the token division test case 30122.
  • the token counting unit 30123 counts the total number of tokens existing in the token division test case 30122.
  • FIG. 14 is a flowchart showing an example of the process executed by the token counting unit 30123.
  • the token counting unit 30123 receives the token division test case 30122 from the lexical analysis unit 30121.
  • step S301232 the token counting unit 30123 initializes the index i for identifying the existing test case 30111 and the token division test case 30122 converted from the existing test case with 0.
  • step S301233 the token counting unit 30123 determines whether or not the index i is smaller than the number of test cases, proceeds to step S301234 if it is smaller than the number of test cases, and proceeds to step S30123A if it is greater than or equal to the number of test cases. move on.
  • step S30123 the token counting unit 30123 initializes the variable Count for counting the number of tokens with 1.
  • step S301235 the token counting unit 30123 extracts the first token of the token division test case [i].
  • step S301236 the token counting unit 30123 determines whether or not a token exists in the token division test case [i], proceeds to step S301237 if it exists, and proceeds to step S301238 if it does not exist. move on.
  • step S301237 the token counting unit 30123 increments the variable Count, then returns to step S301235 and repeats the above process.
  • step S301238 the token counting unit 30123 increments the index i.
  • step S301239 the token counting unit 30123 substitutes the Count for the token number data [i], then returns to step S301233 and repeats the above process.
  • step S30123A the token counting unit 30123 outputs the token number data 30124 and ends the process.
  • the token counting unit 30123 can output the total number of tokens included in the test cases, which is necessary when calculating the similarity between the existing test cases 30111.
  • FIG. 13 is a diagram showing an example of token number data 30124.
  • the token number data 30124 includes the test case identifier and the number of tokens in one entry.
  • the token number data 30124 is data in which the number of tokens included in each test case is stored in a table format.
  • the code clone extraction unit 30125 extracts a code clone common to the existing test cases 30111 stored in the existing test case storage unit 3011.
  • FIG. 15 is a flowchart showing the entire process executed by the code clone extraction unit 30125.
  • step S301251 the code clone extraction unit 30125 receives the token division test case 30122 as an input, and stores each token included in the received token division test case 30122 in the array TC.
  • the code clone extraction unit 30125 stores all the existing test cases 30111 stored in the existing test case storage unit 3011 in the array TC. Therefore, the array TC is a two-dimensional array. That is, the row index is used to identify the token split test case 30122, and the column index is used to identify each token contained in the token split test case 30122.
  • step S301252 the code clone extraction unit 30125 receives the token number data 30124 as an input.
  • step S301253 the code clone extraction unit 30125 initializes the index i for identifying the token division test case 30122 with 0.
  • step S301254 the code clone extraction unit 30125 determines whether or not the index i is smaller than the number of test cases, proceeds to step S301255 if it is smaller than the number of test cases, and step S30125A if it is greater than or equal to the number of test cases. Proceed to.
  • step S301255 the code clone extraction unit 30125 initializes the index j for identifying the token division test case 30122 with 0.
  • step S301256 the code clone extraction unit 30125 determines whether or not the index j is smaller than the number of test cases, proceeds to step S301258 if it is smaller than the number of test cases, and steps S301257 if it is greater than or equal to the number of test cases. Proceed to.
  • step S301257 the code clone extraction unit 30125 increments the index i, then returns to step S301254 and repeats the above process.
  • step S301258 the code clone extraction unit 30125 performs code clone analysis. The details of the code clone analysis process will be described with reference to FIG.
  • step S301259 the code clone extraction unit 30125 increments the index j, then returns to step S301256 and repeats the above process.
  • step S30125A the code clone extraction unit 30125 outputs the code clone data 3013 and ends the process.
  • the code clone extraction unit 30125 can output the similarity between the existing test cases 30111 as the code clone data 3013 by performing the code clone analysis on the two existing test cases 30111.
  • the code clone data 3013 analyzes the code clone between the two existing test cases 30111, and stores the ratio of the number of tokens determined to be the code clone to the total number (number) of tokens in the existing test case 30111 in a tabular format. It is the data that was done.
  • test case 1 and the test case 2 are approximately 50% similar, and the test case 3 and the test case 5 are approximately 80% similar.
  • FIG. 16 is a flowchart relating to the code clone analysis process (S301258) in FIG.
  • step S3012581 the code clone extraction unit 30125 initializes the index m for identifying the token to be processed in the token division test case 30122 identified by the index i with 0.
  • step S3012582 the code clone extraction unit 30125 determines whether or not the index m is smaller than the number of tokens [i], and if it is smaller than the number of tokens [i], proceeds to step S3012583 and the number of tokens [i] or more. In the case of, the process proceeds to step S301258D to end the process.
  • step S3012583 the code clone extraction unit 30125 initializes the index n for identifying the token to be processed in the token division test case 30122 identified by the index j to 0.
  • step S301284 the code clone extraction unit 30125 determines whether or not the index n is smaller than the number of tokens [j], and if it is smaller than the number of tokens [j], proceeds to step S301258 and proceeds to step S301258, and the number of tokens [j] or more. In the case of, the process proceeds to step S301256D.
  • step S301285 the code clone extraction unit 30125 initializes the variable clone_num that counts the number of common tokens continuously detected in the token division test cases i and j to 0.
  • step S301258 the code clone extraction unit 30125 increments the index m, then returns to step S3012582 and repeats the above process.
  • step S301257 the code clone extraction unit 30125 determines whether or not the m + clone_numth token of the token division test case [i] and the n + clone_numth token of the token division test case [j] are equal, and if they are equal, the code clone extraction unit 30125 determines whether or not they are equal. The process proceeds to step S301258, and if different, the process proceeds to step S301259.
  • step S301288 the code clone extraction unit 30125 increments the variable clone_num, then returns to step S301257 and repeats the above process.
  • step S301259 the code clone extraction unit 30125 determines whether or not the variable clone_num is larger than the minimum number of tokens, proceeds to step S301258B if it is larger than the minimum number of tokens, and step S301258A if it is less than or equal to the minimum number of tokens. Proceed to.
  • the minimum number of tokens is set small, a part that should not be detected as a code clone (for example, a simple variable declaration) will be erroneously detected as a code clone.
  • the minimum number of tokens is set large, the part that should be detected as a code clone cannot be detected as a code clone. Therefore, the minimum number of tokens needs to be set appropriately according to the data to be analyzed.
  • step S301258A the code clone extraction unit 30125 substitutes n + clone_num + 1 for the index n, then returns to step S301258 and repeats the above process.
  • step S301258B the code clone extraction unit 30125 substitutes the code clone data [i] [j] with the value (similarity) obtained by dividing the variable clone_num by the number of clones [i].
  • step S301258C the code clone extraction unit 30125 substitutes m + clone_num + 1 for the index m, then returns to step S3012582 and repeats the above process.
  • the code clone extraction unit 30125 can detect a portion having the same token configuration for the two existing test cases 30111 as a code clone.
  • the clustering implementation unit 3014 is one of the components of the test case candidate extraction unit 301, and classifies similar existing test cases 30111 into clusters based on the code clone data 3013.
  • the code clone data 3013 records the similarity between the two existing test cases 30111.
  • a known or well-known clustering algorithm is applied to cluster similar existing test cases 30111 with each other. Can be classified into.
  • VBGMM Variational Bayesian Gaussian Mixture
  • VBGMM is an algorithm for classifying point clouds based on distance, and by giving the distance between point clouds, the number of clusters is determined and the cluster classification of each point cloud is automatically performed.
  • FIG. 9 is a diagram showing an example of cluster data 3015.
  • the cluster data 3015 includes the test case identifier and the cluster identifier in one entry.
  • the cluster data 3015 is data in which each test case corresponds to which cluster in a tabular format.
  • Test case candidate determination unit 3016 is one of the components of the test case candidate extraction unit 301, and determines test case candidates to be referred to.
  • FIG. 17 is a diagram showing the configuration of the test case candidate determination unit 3016.
  • the test case candidate determination unit 3016 includes a classifier generation unit 30161 and a classification implementation unit 30162.
  • the classifier generation unit 30161 generates a classifier based on the existing test case 30111 stored in the existing test case storage unit 3011, the existing test requirement 30112 associated with the existing test case, and the cluster data 3015.
  • the classification implementation unit 30162 determines to which cluster the data obtained by quantifying the new test requirement 11 using the classifier is classified, and re-uses all the test cases included in the determined cluster as test case candidates. Output to the usability evaluation unit 302.
  • test case candidate determination unit 3016 can determine the test case candidates to be referred to for the test requirements received by the test requirement analysis unit 2.
  • FIG. 18 is a flowchart of the process executed by the classifier generation unit 30161.
  • step S301611 the classifier generation unit 30161 receives the existing test requirement 30112 associated with each existing test case 30111 stored in the existing test case storage unit 3011 as an input.
  • step S301612 the classifier generator 30161 receives the cluster data 3015 as an input.
  • step S301613 the classifier generation unit 30161 performs natural language analysis on the existing test requirement 30112 received in step S301611 and generates test requirement quantified data S301614.
  • the natural language analysis is performed by the same method as in step S22 in the test requirement analysis unit 2.
  • the classifier generator 30161 uses the digitized data (S301614) of the existing test requirement 30112 as an input vector, and refers to the cluster data 3015 to provide an existing test case 30111 associated with the existing test requirement 30112.
  • the number of the cluster to which it belongs is specified, supervised learning is performed using the number of the cluster as a label, and a classifier is generated.
  • a supervised learning algorithm for example, a well-known or known algorithm such as a deep neural network or a support vector machine is used.
  • This method is an application of the method of generating a dog or cat image classifier by performing deep neural network analysis using image data as an input vector and dogs or cats as labels.
  • the process executed by the classification execution unit 30162 will be described.
  • the classification implementation unit 30162 determines the cluster classification for the data obtained by quantifying the new test requirement 11 by using the classifier generated by the classifier generation unit 30161, and determines all the existing test cases 30111 included in the determined cluster. It is output to the reusability evaluation unit 302 as a test case candidate.
  • the test requirement quantified data 200 generated by the test requirement analysis unit 2 is input to the classifier.
  • the classifier determines the cluster in which the test requirement quantified data S301614 is classified.
  • the classification implementation unit 30162 refers to the cluster data 3015 and identifies all the existing test cases 30111 belonging to the cluster determined by the classifier. Finally, the classification implementation unit 30162 outputs all the existing test cases 30111 identified above as test case candidates 3010.
  • the classifier generation unit 30161 analyzes the relationship between the existing test case 30111 developed in the past and the existing test requirement 30112 associated with the existing test case 30111, the output of the test case candidate 3010 by the classification implementation unit 30162 is , Corresponds to predicting or estimating test cases expected to be developed for the new test requirement 11 based on past performance.
  • FIG. 10 is a diagram showing an example of test case candidate 3010.
  • the test case candidate 3010 is data in which the identifier of the existing test case 30111 is stored in a tabular format.
  • the reusability evaluation unit 302 evaluates the reusability of each existing test case 30111 included in the test case candidate 3010 and generates reusability data 3020.
  • FIG. 19 is a diagram showing the configuration of the reusability evaluation unit 302.
  • the reusability evaluation unit 302 includes a candidate-to-candidate code clone analysis unit 3021, a reuse graph generation unit 3023, and a reuse degree calculation unit 3025.
  • the degree of reuse of each existing test case 30111 included in the test case candidate 3010 is calculated using the reuse graph.
  • the inter-candidate code clone analysis unit 3021 performs code clone analysis on the existing test cases 30111 included in the test case candidates 3010.
  • the code clone analysis is performed by the same method as the code clone analysis unit 3012 described above.
  • the candidate-to-candidate code clone analysis unit 3021 generates the candidate-to-candidate code clone data 3022 as a result of the analysis.
  • the inter-candidate code clone data 3022 is the same as the code clone data 3013 generated by the code clone analysis unit 3012 regarding the existing test cases 30111 included in the test case candidate 3010.
  • FIG. 22 is a flowchart showing an example of the processing executed by the reuse graph generation unit 3023.
  • the reuse graph generation unit 3023 receives the inter-candidate code clone data 3022 as an input.
  • step S30232 the reuse graph generation unit 3023 initializes the index i that identifies the test case candidate 3010 to be processed to 0.
  • step S30233 the reuse graph generation unit 3023 determines whether or not the index i is smaller than the number of test case candidates, proceeds to step S30234 if the index i is smaller than the number of test case candidates, and if the number is equal to or greater than the number of test case candidates. To step S30236.
  • step S30234 the reuse graph generation unit 3023 adds the test case candidate [i] to the reuse degree graph 3024 as a node.
  • step S30235 the reuse graph generation unit 3023 increments the index i, then returns to step S30233 and repeats the above process.
  • step S30236 the reuse graph generation unit 3023 initializes the index i to 0.
  • step S30237 the reuse graph generation unit 3023 determines whether or not the index i is smaller than the number of test case candidates, proceeds to step S30238 if the index i is smaller than the number of test case candidates, and if the number is equal to or greater than the number of test case candidates. The process proceeds to step S3023F to end the process.
  • step S30238 the reuse graph generation unit 3023 initializes the index j that identifies the test case candidate to be compared with respect to the test case candidate of the index i to 0.
  • step S30239 the reuse graph generation unit 3023 determines whether or not the index j is smaller than the number of test case candidates, proceeds to step S3023A if the index j is smaller than the number of test case candidates, and if the number is equal to or greater than the number of test case candidates. To step S3023B.
  • step S3023A the reuse graph generation unit 3023 increments the index i, then returns to step S30237 and repeats the above process.
  • step S3023B the reuse graph generation unit 3023 has a code clone [i] [j] indicating how many clones of the test case candidate [j] exist in the test case candidate [i] from a preset threshold value. It is determined whether or not it is large, and if it is larger than the threshold value, the process proceeds to step S3023C, and if it is equal to or less than the threshold value, the process proceeds to step S3023E.
  • the threshold value is for determining whether the test case candidate [i] and the test case candidate [j] are judged to be similar or dissimilar.
  • step S3023C the reuse graph generation unit 3023 indicates how many clones of the test case candidate [i] exist in the test case candidate [j] code clones [j] [i] (inter-candidate code clone data 3022). It is determined whether or not the value (value stored in) is larger than the threshold value, and if it is larger than the threshold value, the process proceeds to step S3023D, and if it is equal to or less than the threshold value, the process proceeds to step S3023E.
  • step S3023D the reuse graph generation unit 3023 describes a node (node i) in which the test case candidates identified by the index i are described on the graph and a node in which the test case candidates identified by the index j are described on the graph. Create a link between (nodes j).
  • step S3023E the reuse graph generation unit 3023 increments the index j, then returns to step S30239 and repeats the above process.
  • the reuse degree graph 3024 can be generated by generating the link between the nodes.
  • the reuse degree graph 3024 shows that the existing test case 30111 corresponding to the node to which many links are connected is similar to many of the other existing test cases 30111 included in the test case candidate 3010. That is, it is considered that the existing test case 30111 corresponding to the node to which many of the links are connected is suitable for reference.
  • FIG. 20 is a diagram showing an example of the reuse degree graph 3024.
  • the reuse degree graph 3024 is a graph in which test cases are used as nodes and links are generated according to the ratio of code clones between test cases.
  • test case 2 has a common code clone with respect to the test case 1 and the test case 4 at a ratio equal to or higher than the threshold value.
  • test case 1 shows that test case 2, test case 4, and test case 10 have a common code clone at a ratio equal to or higher than the threshold value.
  • FIG. 23 is a flowchart of the process executed by the reuse degree calculation unit 3025.
  • step S30251 the reuse degree calculation unit 3025 receives the reuse degree graph 3024 as an input.
  • step S30252 the reuse degree calculation unit 3025 initializes the index i for identifying the test case candidate 3010 to be processed to 0.
  • step S30253 the reuse degree calculation unit 3025 determines whether or not the index i is smaller than the number of nodes included in the reuse graph, proceeds to step S30254 if it is smaller than the number of nodes, and if it is equal to or greater than the number of nodes. Goes to step S3025B.
  • step S30254 the reuse degree calculation unit 3025 initializes the variable Count to 0, which stores the number of links connected to the node (node i) corresponding to the test case candidate 3010 identified by the index i.
  • step S30255 the reuse degree calculation unit 3025 initially sets the index j for identifying the test case candidate 3010 to be compared with the index i and the node (node j) corresponding to the test case candidate to 0. To become.
  • step S30256 the reuse degree calculation unit 3025 determines whether or not the index j is smaller than the number of nodes included in the reuse degree graph 3024, and if it is smaller than the number of nodes, proceeds to step S30257 and proceeds to step S30257 or more. In that case, the process proceeds to step S30259.
  • step S30257 the reuse degree calculation unit 3025 determines whether or not a link exists between the node i and the node j, proceeds to step S30258 if it exists, and returns to step S30256 if it does not exist. And repeat the above process.
  • step S30258 the reuse degree calculation unit 3025 increments the variable Count, then returns to step S30256 and repeats the above process.
  • step S30259 the reuse degree calculation unit 3025 substitutes the value of the variable Count into the reuse degree data [i] (which stores the reuse degree of the node i).
  • step S3025A the reuse degree calculation unit 3025 increments the index i, then returns to step S30253 and repeats the above process.
  • step S3025B the reuse degree calculation unit 3025 outputs the reuse degree data 3020 and ends the process.
  • the reuse degree calculation unit 3025 can output the number of links possessed by each existing test case 30111 included in the test case candidate 3010 as the reuse degree data 3020 based on the reuse degree graph 3024.
  • FIG. 21 is a diagram showing an example of reuse degree data 3020.
  • the reuse degree data 3020 is data in which a test case storing an identifier of an existing test case 30111 and a reuse degree are included in one entry, and the reuse degree of each test case is stored in a tabular format.
  • FIG. 24 is a flowchart of the process executed by the test case output unit 4 in the first embodiment.
  • test case output unit 4 receives the reusability data 3020 from the reusability evaluation unit 302 as an input.
  • step S42 the test case output unit 4 initializes the index i for identifying the test case candidate 3010 to be processed to 0.
  • step S43 the test case output unit 4 initializes the variable Max_id that stores the index that identifies the test case candidate 3010 having the maximum reuse degree to 0.
  • step S44 the test case output unit 4 determines whether or not the index i is smaller than the number of reuse degree data, and if it is smaller than the number of reuse degree data, proceeds to step S45 and proceeds to step S45 to exceed the number of reuse degree data. In the case of, the process proceeds to step S48.
  • step S45 the test case output unit 4 determines whether or not the reuse degree data [i] is larger than the reuse degree data [Max_id], and if it is larger than the reuse degree data [Max_id], step S46. If it is less than or equal to the reuse degree data [Max_id], the process proceeds to step S47.
  • step S46 the test case output unit 4 assigns i to the variable Max_id.
  • step S47 the test case output unit 4 increments the index i, then returns to step S44 to repeat the above process.
  • step S48 the test case output unit 4 outputs the test case [Max_id] as the reference test case 12. Then, in step S49, the test case output unit 4 ends the process.
  • the existing test case 30111 having the maximum reuse degree data 3020 can be output as the reference test case 12.
  • test support device and method according to the second embodiment of the present invention will be described.
  • the difference from the first embodiment is that the test case output unit 4 outputs a plurality of reference test cases 12.
  • the same components as those in the first embodiment are designated by the same reference numerals and the description thereof will be omitted.
  • FIG. 25 is a diagram showing a flowchart of processing executed by the test case output unit 4 in the second embodiment. The difference is that step S4A and step S4B are added in the second embodiment with respect to FIG. 24 of the first embodiment.
  • test case output unit 4 tells the test case creator whether or not the determined reference test case 12 is appropriate via the output device 25. Contact us.
  • test case output unit 4 proceeds to step S49, outputs the current reference test case 12, and ends the process. On the other hand, if the input from the test case creator is inappropriate, the test case output unit 4 proceeds to step S4B.
  • step S4B the test case output unit 4 extracts the reuse degree data [Max_id], deletes the data of the [Max_id] from the reuse degree data 3020, and then returns to step S42 to repeat the above process.
  • the test case output unit 4 outputs the test case candidate 3010 having the highest reuse degree from the reuse degree data 3020, and if it is determined that the test case creator accepts the test case candidate 3010, the test case candidate 3010 is referred to. Output as 12.
  • test case output unit 4 outputs the test case candidate 3010 having the second highest degree of reuse, and if it is determined that the test case creator accepts it, the test case candidate 3010 is referred to. Output as test case 12.
  • test case output unit 4 outputs the existing test case 30111 with the third highest reuse rate, and if the test case creator determines that the test case creator accepts the test case candidate, the test case candidate is output. The process of outputting 3010 as the reference test case 12 is repeated until the test case creator accepts it.
  • test case 12 even if the reference test case 12 first output from the test support device 0 is not acceptable to the test case creator, as long as the test case exists in the test case candidate 3010, the test case is set. It is possible to continue to present and select the test case candidate 3010, which the test case creator has determined to be more reusable, as the reference test case 12.
  • test support device 0 of the above embodiment can be configured as follows.
  • a test support device having a processor (21) and a memory (22), accepting a new test requirement (12), and outputting a reusable reference test case (12), in natural language.
  • a test that receives the described new test requirement (12), a test requirement acquisition unit (1), and a test that performs natural language analysis on the accepted new test requirement (12) to generate test requirement quantified data (200).
  • the requirement analysis unit (2) and the existing test case (30111) generated in the past are analyzed based on the test requirement quantified data (200), and candidates for the reusable existing test case (30111) are selected.
  • a test case analysis unit (3) generated as an output test case candidate (3010), and a test case output unit (4) that outputs a part or all of the output test case candidate (3010) as a reference test case (12).
  • test case analysis unit (3) generates one or more existing test cases (30111) as output test case candidates (3010) based on the test requirement quantified data (200). It has a candidate extraction unit (301) and a reusability evaluation unit (302) that calculates the degree of reuse for each of the output test case candidates (3010), and the test case output unit (4) is said.
  • a test support device comprising determining a reference test case (12) from the output test case candidates (3010) based on the reusability calculated by the reusability evaluation unit (302).
  • the test support device 0 applies the new test requirement 11 to the new test requirement 11 by using the existing test case 30111 having the highest reusability among the existing test cases 30111 generated in the past. It is possible to efficiently generate test cases.
  • test case candidate extraction unit (301) is included in the existing test case (30111) and the output test case candidate (3010), and , The similarity between the existing test case (30111) and the existing test case (30111) different from the existing test case (30111) is analyzed, and based on the number of test cases having a value equal to or higher than a predetermined threshold among the similarities, the above-mentioned A test support device characterized by calculating the degree of reuse for each of the output test case candidates (3010).
  • the test support device 0 can calculate the reuse degree of the output test case candidate by comparing the similarity between the existing test cases 30111 with a predetermined threshold value.
  • the test case candidate extraction unit (301) includes an existing test case storage unit (3011), an existing test case storage unit (3012), and clustering. It has a unit (3014) and a test case candidate determination unit (3016), and the existing test case storage unit (3011) sets the test requirements developed in the past as the existing test requirements (30112) and the existing test.
  • the test case developed for verifying that the requirement (30112) is satisfied is set as an existing test case (30111), and the existing test requirement (30112) and the existing test case (30111) are linked and saved, and the above-mentioned
  • the existing test case storage unit (3012) extracts two existing test cases (30111) from the existing test cases (30111) stored in the existing test case storage unit (3011), and the two existing test cases.
  • the code clones between the formal languages described in (30111) are analyzed to calculate the ratio of the number of elements of the code clone to the number of elements of the formal language, and the two existing test cases (30111) are extracted and Code clone data (3013) is generated by performing the calculation by the extraction for all combinations of the existing test cases (30111) stored in the existing test case storage unit (3011), and the clustering execution unit (3011). 3014) clusters by regarding the ratio of the number of elements of the code clone to the number of elements of the formal language stored in the code clone data (3013) as a pseudo distance between the existing test cases (30111).
  • the existing test cases (30111) stored in the existing test case storage unit (3011) are classified into clusters, and information on which cluster each existing test case (30111) is classified into is provided in the cluster data (3015).
  • the test case candidate determination unit (3016) determines one cluster from the clusters based on the test requirement quantified data (200), and the test case candidate determination unit (3016) determines at least one existing cluster included in the determined cluster.
  • a test support device characterized in that a test case (30111) is determined as an output test case candidate (3010).
  • the code clone analysis unit 3012 evaluates the similarity between the existing test cases 30111 stored in the existing test case storage unit 3011, and the token configuration is the same for the two existing test cases 30111. Can be detected as a code clone. Further, the clustering implementation unit 3014 classifies similar existing test cases 30111 into clusters based on the code clone data 3013, and the test case candidate determination unit 3016 determines the test requirements received by the test requirement analysis unit 2. Candidates for existing test cases 30111 to be referenced can be determined.
  • test support device which is included in the existing test case (30111) and the output test case candidate (3010), and is different from the existing test case (30111).
  • the similarity between (30111) is included in the format language describing the existing test case (30111) and the output test case candidate (3010), and is different from the existing test case (30111).
  • the similarity is analyzed by analyzing the code clone between the formal languages that are included in the existing test cases and the output test case candidates and that describe the existing test cases that are different from the existing test cases. It is possible to calculate from the ratio of the number of elements of the code clone to the number of elements of.
  • test case candidate determination unit (3016) has a classifier generation unit (30161) and a classification implementation unit (30162).
  • the classifier generation unit (30161) digitizes the existing test requirement (30112) linked to the existing test case (30111) by using the natural language analysis, and obtains the existing test requirement (30112) quantified data (200).
  • the cluster to which the existing test case (30111) linked to the existing test requirement (30112) is classified as training data is specified based on the cluster data (3015), and the identifier that identifies the classified cluster is the correct answer.
  • a classifier for determining which cluster the test requirement quantified data (200) is classified into is generated, and the classification implementation unit (30162) generates a classifier.
  • the classification implementation unit 30162 uses the classifier generated by the classifier generation unit 30161 to identify the cluster corresponding to the test requirement quantified data 200 as a result of the natural language analysis of the new test requirement 11.
  • the existing test case 30111 included in the cluster can be specified as a test case candidate.
  • test case can be automatically executed, and the labor required for the test case work can be reduced.
  • the present invention is not limited to the above-described embodiment, but includes various modifications.
  • the above-described embodiment is described in detail for the purpose of explaining the present invention in an easy-to-understand manner, and is not necessarily limited to the one including all the configurations described.
  • any of addition, deletion, or replacement of other configurations can be applied alone or in combination.
  • each of the above configurations, functions, processing units, processing means and the like may be realized by hardware by designing a part or all of them by, for example, an integrated circuit. Further, each of the above configurations and functions may be realized by software by the processor interpreting and executing a program that realizes each function. Information such as programs, tables, and files that realize each function can be placed in a memory, a hard disk, a recording device such as an SSD (Solid State Drive), or a recording medium such as an IC card, an SD card, or a DVD.
  • SSD Solid State Drive
  • control lines and information lines indicate what is considered necessary for explanation, and not all control lines and information lines are shown in the product. In practice, it can be considered that almost all configurations are interconnected.

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

Provided is a device for outputting a reference test case by inputting a new test requirement, the device comprising: a test requirement acquisition unit for inputting a new test requirement; a test requirement analysis unit for generating test requirement quantifying data for the new test requirement by natural language analysis; a test case analysis unit for analyzing an existing test case on the basis of the test requirement quantifying data and using a reusable candidate to generate an output test case candidate; and a test case output unit for outputting the output test case candidate as a reference test case. The test case analysis unit uses an existing test case on the basis of test requirement quantifying data to generate an output test case candidate, and calculates the degree of reuse for each output test case candidate. The test case output unit determines a reference test case from among the output test case candidates on the basis of the degree of reuse.

Description

テスト支援装置及びテスト支援方法Test support device and test support method 参照による取り込みCapture by reference
 本出願は、令和2年(2020年)7月7日に出願された日本出願である特願2020-116748の優先権を主張し、その内容を参照することにより、本出願に取り込む。 This application claims the priority of Japanese Patent Application No. 2020-116748, which is a Japanese application filed on July 7, 2020, and incorporates it into this application by referring to its contents.
 本発明は、テスト支援装置及びテスト支援方法に関する。 The present invention relates to a test support device and a test support method.
 既存のソフトウェア部品を再利用してソフトウェアを新規に構築する際に、上位層のソフトウェア部品で利用される下位層のソフトウェア部品を既存のソフトウェア部品の中から検索するための技術として、特許文献1に記載の技術が知られている。 Patent Document 1 as a technique for searching from existing software components for lower-layer software components used in upper-layer software components when newly constructing software by reusing existing software components. The techniques described in are known.
 この特許文献1には、ソフトウェア部品間の階層構造やバリエーションを考慮した上で、必要なソフトウェア部品を効率よく検索可能な技術を提供することを課題とし、解決手段として、上位層ソフトウェア部品に対応する下位層ソフトウェア部品の情報を検索するソフトウェア部品情報検索システムであって、互いに同一の名称を有する複数の下位層ソフトウェア部品であるバリエーション部品の中から、検索結果を必要なバリエーションのものに絞り込む機能を有することが記載されている。 The problem of Patent Document 1 is to provide a technique capable of efficiently searching for necessary software components in consideration of the hierarchical structure and variations between software components, and as a solution, the upper layer software components are supported. A software component information search system that searches for information on lower-layer software components, and has a function to narrow down the search results to the required variations from among the variation components that are multiple lower-layer software components that have the same name. It is stated that it has.
 また、特許文献2において、ソフトウェアの入力値及び出力値に関する要求を含む仕様に対して、1個のソフトウェアの少なくとも1つの機能を検証するためにコンピュータによってテストケースを自動的に形成するための解決手段が開示されている。 Further, in Patent Document 2, a solution for automatically forming a test case by a computer in order to verify at least one function of one software for a specification including a requirement regarding an input value and an output value of the software. The means are disclosed.
 解決手段として、組み合わせ要求と順序要求とを区別するステップと、モデル化された仕様を取得するために、真偽表で組み合わせ要求をモデル化し、有限状態機械で順序要求をモデル化するステップと、前記ソフトウェアの前記入力値を、前記入力値が承継である確率及び前記入力値の間の遷移時間に関連付けて演算行列を確立するステップと、前記演算行列にモンテカルロドローを実行することによりテストされる前記入力値の承継を選択するステップと、それぞれ選択された承継を前記モデル化された仕様を考慮して予測される前記出力値に関係付けるテスト行を含むテストケースを決定するステップと、決定される前記テストケースが以下の基準、機能コードの検証された割合、要求の検証された割合、検証時間、及び検証コストの少なくとも1つに対して既定の閾値に到達することを可能にする場合、前記決定工程を停止するステップが記載されている。 As a solution, a step to distinguish between a combination request and an order request, a step to model the combination request with a truth table and a step to model the order request with a finite state machine, in order to obtain a modeled specification. The software is tested by associating the input values with the probability that the input values are inherited and the transition time between the input values to establish a math matrix and by performing a Monte Carlo draw on the math matrix. Determined to be a step of selecting the inheritance of the input value and a step of determining a test case containing a test line relating each selected inheritance to the expected output value in view of the modeled specification. If the test case allows a predetermined threshold to be reached for at least one of the following criteria, functional code validated percentage, requirement validated percentage, validation time, and validation cost: A step to stop the determination step is described.
特開2008-287352号公報Japanese Unexamined Patent Publication No. 2008-287352 特表2011-521368号公報Japanese Patent Publication No. 2011-521368
 特許文献1では、ソフトウェア部品間の階層構造やバリエーションを考慮することで、必要なソフトウェア部品を必要なバリエーションのものに絞り込むことはできるが、絞り込み結果が複数存在する場合にどのソフトウェア部品を参照すべきかを選択するためには人手による確認が必要となるため、ソフトウェア部品を効率よく再利用することができない、という問題があった。 In Patent Document 1, it is possible to narrow down the required software components to those with the required variations by considering the hierarchical structure and variations between the software components, but when there are multiple narrowing results, which software component should be referred to. Since manual confirmation is required to select a key, there is a problem that software components cannot be reused efficiently.
 特許文献2では、要求をモデル化することで、要求に対応するテストケースを検索することはできるが、対応するテストケースが複数存在する場合に、どのテストケースを参照すべきかを選択するためには人手による確認が必要となるため、テストケースを効率よく生成することができない、という問題があった。 In Patent Document 2, it is possible to search for test cases corresponding to the requirements by modeling the requirements, but in order to select which test case should be referred to when there are a plurality of corresponding test cases. Has a problem that test cases cannot be generated efficiently because it requires manual confirmation.
 そこで本発明では、外部から与えられたテスト要件に対し、過去に生成したテストケースの中から、検証すべきソフトウェアが該テスト要件を満たしているか否かを判定するために開発が必要なテストケースを、効率よく生成するテスト支援装置を提供することを目的とする。 Therefore, in the present invention, for a test requirement given from the outside, a test case that needs to be developed in order to determine whether or not the software to be verified meets the test requirement from the test cases generated in the past. It is an object of the present invention to provide a test support device that efficiently generates the above.
 本発明は、プロセッサとメモリを有して、新規テスト要件を受け付けて、再利用可能な参照テストケースを出力するテスト支援装置であって、自然言語で記述された前記新規テスト要件を受け付けるテスト要件取得部と、前記受け付けた新規テスト要件について自然言語解析を実施してテスト要件数値化データを生成するテスト要件解析部と、過去に生成された既存テストケースを前記テスト要件数値化データに基づいて解析して、再利用可能な前記既存テストケースの候補を出力テストケース候補として生成するテストケース解析部と、前記出力テストケース候補の一部又は全部を参照テストケースとして出力するテストケース出力部と、を有し、前記テストケース解析部は、前記テスト要件数値化データに基づいて1つ以上の既存テストケースを出力テストケース候補として生成するテストケース候補抽出部と、前記出力テストケース候補のそれぞれに対する再利用度を算出する再利用性評価部と、を有し、前記テストケース出力部は、前記再利用性評価部が算出した前記再利用度に基づいて前記出力テストケース候補の中から参照テストケースを決定する。 The present invention is a test support device having a processor and a memory, accepting a new test requirement, and outputting a reusable reference test case, and the test requirement accepting the new test requirement written in a natural language. The acquisition unit, the test requirement analysis unit that performs natural language analysis on the received new test requirements and generates test requirement quantified data, and the existing test cases generated in the past are based on the test requirement quantified data. A test case analysis unit that analyzes and generates reusable existing test case candidates as output test case candidates, and a test case output unit that outputs part or all of the output test case candidates as reference test cases. The test case analysis unit has a test case candidate extraction unit that generates one or more existing test cases as output test case candidates based on the test requirement quantified data, and each of the output test case candidates. It has a reusability evaluation unit that calculates the reusability of the test case, and the test case output unit refers to the output test case candidates based on the reusability calculated by the reusability evaluation unit. Determine the test case.
 本発明によれば、外部から与えられたテスト要件に対して、過去に生成したテストケースの中から最も再利用度の高いテストケースを用いて、テストケースを効率よく生成することが可能となる。 According to the present invention, it is possible to efficiently generate a test case by using the test case having the highest degree of reuse from the test cases generated in the past for the test requirement given from the outside. ..
 本明細書において開示される主題の、少なくとも一つの実施の詳細は、添付されている図面と以下の記述の中で述べられる。開示される主題のその他の特徴、態様、効果は、以下の開示、図面、請求項により明らかにされる。 Details of at least one implementation of the subject matter disclosed herein are set forth in the accompanying drawings and in the description below. Other features, aspects, and effects of the disclosed subject matter are manifested in the following disclosures, drawings, and claims.
本発明の実施例1を示し、テスト支援装置の機能の一例を示すブロック図である。It is a block diagram which shows Example 1 of this invention and shows an example of the function of the test support apparatus. 本発明の実施例1を示し、テスト支援装置のハードウェアを含む構成の一例を示すブロック図である。FIG. 1 is a block diagram showing Example 1 of the present invention and showing an example of a configuration including hardware of a test support device. 本発明の実施例1を示し、自然言語で記述されたテスト要件の一例を示す図である。FIG. 1 shows Example 1 of the present invention and is a diagram showing an example of a test requirement described in natural language. 本発明の実施例1を示し、計算機が解釈可能な形式言語で記述されたテストケースの一例を示す図である。FIG. 1 shows Example 1 of the present invention and is a diagram showing an example of a test case described in a formal language that can be interpreted by a computer. 本発明の実施例1を示し、テスト要件解析部で行われる処理の概要を示すフローチャートである。It is a flowchart which shows Example 1 of this invention and shows the outline of the process performed in the test requirement analysis part. 本発明の実施例1を示し、テスト要件解析部において実行される自然言語解析処理のフローチャートである。FIG. 1 is a flowchart of a natural language analysis process executed by the test requirement analysis unit, showing Example 1 of the present invention. 本発明の実施例1を示し、図2に記載のテスト要件を数値データに変換したテスト要件数値化データの一例を示す図である。FIG. 1 is a diagram showing Example 1 of the present invention and showing an example of test requirement quantified data obtained by converting the test requirements shown in FIG. 2 into numerical data. 本発明の実施例1を示し、テストケース候補抽出部の機能の一例を示す図である。It is a figure which shows Example 1 of this invention and shows an example of the function of the test case candidate extraction part. 本発明の実施例1を示し、コードクローンデータの一例を示す図である。It is a figure which shows Example 1 of this invention and shows an example of the code clone data. 本発明の実施例1を示し、クラスタデータの一例を示す図である。It is a figure which shows Example 1 of this invention and shows an example of cluster data. 本発明の実施例1を示し、テストケース候補の一例を示す図である。It is a figure which shows Example 1 of this invention and shows an example of a test case candidate. 本発明の実施例1を示し、コードクローン解析部の機能の一例を示す図である。FIG. 1 is a diagram showing Example 1 of the present invention and showing an example of the function of the code clone analysis unit. 本発明の実施例1を示し、トークン分割テストケースの一例を示す図である。It is a figure which shows Example 1 of this invention and shows an example of a token division test case. 本発明の実施例1を示し、トークン数データの一例を示す図である。It is a figure which shows Example 1 of this invention and shows an example of the token number data. 本発明の実施例1を示し、トークンカウント部において実行される処理の一例を示すフローチャートである。It is a flowchart which shows Example 1 of this invention and shows an example of the process executed in the token counting part. 本発明の実施例1を示し、コードクローン抽出部において実行される処理全体を表すフローチャートである。FIG. 1 is a flowchart showing the first embodiment of the present invention and showing the entire process executed in the code clone extraction unit. 本発明の実施例1を示し、図15におけるコードクローン解析処理の内容を詳細に示したフローチャートである。FIG. 5 is a flowchart showing Example 1 of the present invention and showing in detail the contents of the code clone analysis process in FIG. 本発明の実施例1を示し、テストケース候補決定部の機能の一例を示す図である。It is a figure which shows Example 1 of this invention and shows an example of the function of the test case candidate determination part. 本発明の実施例1を示し、分類器生成部において実行される処理の一例を示すフローチャートである。It is a flowchart which shows Example 1 of this invention and shows an example of the process executed in the classifier generation part. 本発明の実施例1を示し、再利用性評価部の機能の一例を示す図である。FIG. 1 is a diagram showing Example 1 of the present invention and showing an example of the function of the reusability evaluation unit. 本発明の実施例1を示し、再利用グラフの一例を示す図である。It is a figure which shows Example 1 of this invention and shows an example of a reuse graph. 本発明の実施例1を示し、再利用度データの一例を示す図である。It is a figure which shows Example 1 of this invention and shows an example of the reuse degree data. 本発明の実施例1を示し、再利用グラフ生成部において実行される処理の一例を示すフローチャートである。It is a flowchart which shows Example 1 of this invention and shows an example of the process executed in the reuse graph generation part. 本発明の実施例1を示し、再利用度算出部において実行される処理の一例を示すフローチャートである。It is a flowchart which shows Example 1 of this invention and shows an example of the process executed in the reuse degree calculation unit. 本発明の実施例1を示し、実施例1におけるテストケース出力部において実行される処理の一例を示すフローチャートである。It is a flowchart which shows Example 1 of this invention and shows an example of the process executed in the test case output part in Example 1. FIG. 本発明の実施例2を示し、テストケース出力部において実行される処理の一例を示すフローチャートである。FIG. 2 is a flowchart showing Example 2 of the present invention and showing an example of processing executed in the test case output unit.
 本実施例は、テスト支援装置に関するものであって、特に、組み込みシステムの制御ソフトウェアの開発に用いるテスト技術に関する。 This embodiment relates to a test support device, and particularly to a test technique used for developing control software for an embedded system.
 以下、本発明に好適な実施形態の例(実施例)を説明する。 Hereinafter, examples (examples) of embodiments suitable for the present invention will be described.
 <構成>
 図1Aは、本発明におけるテスト支援装置の機能の概要を示すブロック図である。
<Structure>
FIG. 1A is a block diagram showing an outline of the functions of the test support device in the present invention.
 <テスト支援装置>
 本発明にかかるテスト支援装置について図1Aを用いて説明する。テスト支援装置0は、自然言語で記述された新規テスト要件11を取得するテスト要件取得部1と、テスト要件から自然言語処理などの手法を用いてテスト要件数値化データを生成するテスト要件解析部2と、過去の組み込みソフトウェア開発プロジェクトにおいて人手で開発した既存のテストケースを前記テスト要件数値化データに基づき解析して参照テストケース12の候補として出力するテストケース解析部3と、前記参照テストケース12の候補のうち最も再利用度の高い参照テストケース12を出力するテストケース出力部4から構成される。
<Test support device>
The test support device according to the present invention will be described with reference to FIG. 1A. The test support device 0 includes a test requirement acquisition unit 1 that acquires a new test requirement 11 written in natural language, and a test requirement analysis unit that generates test requirement quantified data from the test requirements using a method such as natural language processing. 2. The test case analysis unit 3 that analyzes the existing test cases manually developed in the past embedded software development project based on the test requirement quantified data and outputs them as candidates for the reference test case 12, and the reference test case. It is composed of a test case output unit 4 that outputs the reference test case 12 having the highest degree of reuse among the 12 candidates.
 また、テストケース解析部3は、前記テスト要件数値化データに基づき1つ以上の既存テストケースをテストケース候補として生成するテストケース候補抽出部301と、前記テストケース候補のそれぞれに対する再利用度を算出する再利用性評価部302から構成される。 Further, the test case analysis unit 3 determines the degree of reuse for each of the test case candidate extraction unit 301 that generates one or more existing test cases as test case candidates based on the test requirement quantified data and the test case candidates. It is composed of a reusability evaluation unit 302 for calculation.
 テスト支援装置0は、再利用性(再利用度)の高い既存テストケースを参照テストケース12とすることにより、ユーザ等は、前記参照テストケース12の一部のみを修正すれば、検証対象のソフトウェアがテスト要件を満たしているかを判定するためのテストケースを生成できる。これにより、少ない工数でテストケースを生成することが可能となる。 The test support device 0 uses an existing test case with high reusability (reusability) as the reference test case 12, so that the user or the like can modify only a part of the reference test case 12 to be verified. You can generate test cases to determine if your software meets the test requirements. This makes it possible to generate a test case with a small number of man-hours.
 図1Bは、テスト支援装置0のハードウェアを含む構成の一例を示すブロック図である。テスト支援装置0は、プロセッサ21と、メモリ22と、ストレージ装置23と、入力装置24と、出力装置25と、ネットワーク装置26を含む計算機である。 FIG. 1B is a block diagram showing an example of a configuration including the hardware of the test support device 0. The test support device 0 is a computer including a processor 21, a memory 22, a storage device 23, an input device 24, an output device 25, and a network device 26.
 入力装置24は、キーボードやマウス或いはタッチパネル等で構成される。出力装置25はディスプレイなどで構成される。ネットワーク装置26は、図示しないネットワークに接続されて他の装置と通信を行う。 The input device 24 is composed of a keyboard, a mouse, a touch panel, or the like. The output device 25 is composed of a display or the like. The network device 26 is connected to a network (not shown) and communicates with other devices.
 メモリ22には、テスト要件取得部1と、テスト要件解析部2と、テストケース解析部3と、テストケース出力部4がプログラムとしてロードされて、プロセッサ21によって実行される。なお、テストケース解析部3は、テストケース候補抽出部301と、再利用性評価部302から構成される。 The test requirement acquisition unit 1, the test requirement analysis unit 2, the test case analysis unit 3, and the test case output unit 4 are loaded into the memory 22 as programs and executed by the processor 21. The test case analysis unit 3 is composed of a test case candidate extraction unit 301 and a reusability evaluation unit 302.
 プロセッサ21は、各機能部のプログラムに従って処理を実行することによって、所定の機能を提供する機能部として稼働する。例えば、プロセッサ21は、テストケース解析プログラムに従って処理を実行することでテストケース解析部3として機能する。他のプログラムについても同様である。さらに、プロセッサ21は、各プログラムが実行する複数の処理のそれぞれの機能を提供する機能部としても稼働する。計算機及び計算機システムは、これらの機能部を含む装置及びシステムである。 The processor 21 operates as a functional unit that provides a predetermined function by executing a process according to the program of each functional unit. For example, the processor 21 functions as the test case analysis unit 3 by executing the process according to the test case analysis program. The same applies to other programs. Further, the processor 21 also operates as a functional unit that provides each function of a plurality of processes executed by each program. A computer and a computer system are devices and systems including these functional parts.
 <テスト要件とテストケース>
 図2は自然言語で記述されたテスト要件111の一例を示す図である。テスト要件111は検証対象の制御ソフトウェアが満たしているべき振る舞い、すなわちテストにおいて検証すべき内容を自然言語で記述したデータであり、No.112と、テスト要件113をひとつのエントリに含む。
<Test requirements and test cases>
FIG. 2 is a diagram showing an example of test requirement 111 written in natural language. The test requirement 111 is data that describes the behavior that the control software to be verified should satisfy, that is, the content to be verified in the test in natural language. 112 and test requirement 113 are included in one entry.
 テスト要件111は、所定のシステムのユニットテスト、組み合わせテスト、システムテスト等に用いられ、システムがユーザの要求を満たしているか否かを判定するために使用される。 The test requirement 111 is used for a unit test, a combination test, a system test, etc. of a predetermined system, and is used to determine whether or not the system meets the user's requirements.
 例えば、No.=1のテスト要件”If mode is STATE1 and input is low, output is 0 and mode remains STATE1”においては、制御ソフトウェアはモードSTATE1において入力がlowの場合にモードSTATE1を保持する必要がある。 For example, No. In the test requirement "If mode is START1 and input is low, output is 0 and mode remains START1", the control software needs to hold the mode START1 when the input is low in the mode START1.
 この場合、モードSTATE1において制御ソフトウェアにlowを入力し、次に、制御ソフトウェアのモードを測定し、最後に、モードがSTATE1となっていることを判定することにより、制御ソフトウェアが該テスト要件を満たしていることを確認することができる。 In this case, the control software meets the test requirements by inputting low to the control software in mode START1, then measuring the mode of the control software, and finally determining that the mode is START1. You can confirm that it is.
 このように、制御ソフトウェアがテスト要件を満たしていることを確認するために制御ソフトウェアに与える具体的な入力及び制御ソフトウェアが計測する具体的な出力を定めたものがテストケースである。テストケースを自動で実行するため、テストケースを計算機で解釈可能な形式言語で記述する。 In this way, the test case defines the specific input given to the control software and the specific output measured by the control software to confirm that the control software meets the test requirements. In order to execute the test case automatically, write the test case in a formal language that can be interpreted by a computer.
 図3は計算機が解釈可能な形式言語で記述されたテストケースの一例を示す図である。テストケース121は、図に示したように検証すべき内容を、例えばテストの自動実行が可能なPCのようなテスト装置で実施できるよう形式的に記述したデータである。 FIG. 3 is a diagram showing an example of a test case written in a formal language that can be interpreted by a computer. The test case 121 is data in which the contents to be verified as shown in the figure are formally described so that the contents to be verified can be executed by a test device such as a PC capable of automatically executing a test.
 <テスト要件解析部>
 図4はテスト要件解析部2で行われる処理の一例を示すフローチャートである。
<Test requirement analysis department>
FIG. 4 is a flowchart showing an example of the processing performed by the test requirement analysis unit 2.
 ステップS21にて、テスト要件解析部2は、テスト要件取得部1から新規テスト要件11を受け取る。ステップS22にて、テスト要件解析部2は前記受け取った新規テスト要件11の自然言語解析を行う。 In step S21, the test requirement analysis unit 2 receives the new test requirement 11 from the test requirement acquisition unit 1. In step S22, the test requirement analysis unit 2 performs a natural language analysis of the received new test requirement 11.
 ステップS23にて、テスト要件解析部2は前記自然言語解析の結果をテスト要件数値化データ200としてテストケース解析部3に出力する。このようにして、テスト要件解析部2はテスト要件をテスト要件数値化データに変換して処理を終了する。 In step S23, the test requirement analysis unit 2 outputs the result of the natural language analysis to the test case analysis unit 3 as the test requirement quantified data 200. In this way, the test requirement analysis unit 2 converts the test requirement into the test requirement quantified data and ends the process.
 <自然言語解析>
 図5は、テスト要件解析部2において実行される自然言語解析処理(S22)について、その処理の詳細なフローチャートである。
<Natural language analysis>
FIG. 5 is a detailed flowchart of the natural language analysis process (S22) executed by the test requirement analysis unit 2.
 ステップS222にて、テスト要件解析部2は新規テスト要件11をテスト要件の構成単位である単語に分割して前記各単語をキューに登録する。ステップS223にて、テスト要件解析部2は前記キューに単語が存在しているか否かを判定し、存在している場合にはステップS224に進み、存在しない場合にはステップS229に進んで処理を終了する。 In step S222, the test requirement analysis unit 2 divides the new test requirement 11 into words that are constituent units of the test requirement, and registers each of the words in the queue. In step S223, the test requirement analysis unit 2 determines whether or not a word exists in the queue, and if it exists, proceeds to step S224, and if it does not exist, proceeds to step S229 for processing. finish.
 ステップS224にて、テスト要件解析部2は前記キューから単語をポップする。ステップS225にて、テスト要件解析部2は前記ポップした単語が既出単語リストに存在しているか否かを判定し、前記ポップした単語が前記既出単語リストに存在している場合にはステップS226に進み、前記ポップした単語が前記既出単語リストに存在しない場合にはステップS227に進む。 In step S224, the test requirement analysis unit 2 pops a word from the queue. In step S225, the test requirement analysis unit 2 determines whether or not the popped word exists in the already-existing word list, and if the popped word exists in the already-existing word list, the step S226 is performed. If the popped word does not exist in the existing word list, the process proceeds to step S227.
 ステップS226にて、テスト要件解析部2は前記既出単語リストに記載の該当既出単語の出現回数をインクリメントしてからステップS223に戻って上記処理を繰り返す。ステップS227にて、テスト要件解析部2は前記ポップした単語を既出単語リストに追加する。ステップS228にて、テスト要件解析部2は該単語の出現回数を1で初期化してからステップS223に戻って上記処理を繰り返す。 In step S226, the test requirement analysis unit 2 increments the number of appearances of the corresponding existing word described in the existing word list, then returns to step S223 and repeats the above process. In step S227, the test requirement analysis unit 2 adds the popped word to the existing word list. In step S228, the test requirement analysis unit 2 initializes the number of appearances of the word with 1, and then returns to step S223 to repeat the above process.
 上記自然言語解析処理により、テスト支援装置0は自然言語で記述された新規テスト要件11を、前記テスト要件に含まれる単語の出現回数を並べた数値ベクトルに変換し、テスト要件数値化データ200を生成することができる。 By the above natural language analysis process, the test support device 0 converts the new test requirement 11 described in the natural language into a numerical vector in which the number of occurrences of the words included in the test requirement is arranged, and the test requirement quantified data 200 is obtained. Can be generated.
 <テスト要件数値化データ>
 図6は、図2に記載の各テスト要件111に対して、テスト要件数値化データ200を生成した結果を示している。それぞれのテスト要件に対して、各単語が何度出現したかを表形式で保存したデータである。例えば、No.=1のテスト要件” If mode is STATE1 and input is low, output is 0 and mode remains STATE1”に関しては、単語ifは1回、modeは2回出現しているため、表で該当する箇所にそれぞれ1、2が記載され、単語theは出現していないため該当する箇所に0が記載される。
<Test requirement quantified data>
FIG. 6 shows the result of generating the test requirement quantified data 200 for each test requirement 111 shown in FIG. It is data that stores the number of times each word appears in a tabular format for each test requirement. For example, No. = 1 As for the test requirement "If mode is STATE1 and output is low, output is 0 and mode remains STATE1", the word if appears once and the mode appears twice, so 1 in each of the corresponding places in the table. 2 is described, and 0 is described in the corresponding place because the word the does not appear.
 テスト要件解析部2は、上述のようにテスト要件113の単語の出現回数を並べて数値ベクトルに変換し、テスト要件数値化データ200を生成する。 As described above, the test requirement analysis unit 2 arranges the number of occurrences of the word of the test requirement 113 and converts it into a numerical vector to generate the test requirement quantified data 200.
 <テストケース候補抽出部>
 図7は、テストケース解析部3を構成するテストケース候補抽出部301の構成を示した図である。
<Test case candidate extraction unit>
FIG. 7 is a diagram showing the configuration of the test case candidate extraction unit 301 constituting the test case analysis unit 3.
 前記テストケース候補抽出部301は、既存テストケース保存部3011と、コードクローン解析部3012と、クラスタリング実施部3014と、テストケース候補決定部3016から構成される。 The test case candidate extraction unit 301 is composed of an existing test case storage unit 3011, a code clone analysis unit 3012, a clustering implementation unit 3014, and a test case candidate determination unit 3016.
 テストケース候補抽出部301は、入力された新規テスト要件11の数値化データと、過去に開発した既存テスト要件30112の数値化データを比較し、後述するように入力された新規テスト要件11の数値化データがどのクラスタに属するかを決定し、そのクラスタに含まれる既存テストケースをテストケース候補として出力する。 The test case candidate extraction unit 301 compares the input quantified data of the new test requirement 11 with the quantified data of the existing test requirement 30112 developed in the past, and the numerical value of the new test requirement 11 input as described later. Determine which cluster the conversion data belongs to, and output the existing test cases included in that cluster as test case candidates.
 <既存テストケース保存部>
 既存テストケース保存部3011は、テストケース候補抽出部301の構成要素の1つであって、過去の組み込みソフトウェア開発プロジェクトにおいて人手で開発した既存のテストケースを既存テストケース30111として保存する。
<Existing test case storage unit>
The existing test case storage unit 3011 is one of the components of the test case candidate extraction unit 301, and stores the existing test cases manually developed in the past embedded software development project as the existing test cases 30111.
 既存テストケース30111は、検証すべき振る舞いを自然言語で記述したテスト要件を基に生成されており、各テストケースは検証すべき振る舞いを記述した既存テスト要件30112と紐付けされた状態で保存されている。前記紐付けは、各既存テストケース30111と各既存テスト要件30112をタグ付けする手法又は各既存テストケース30111と各既存テスト要件30112の対応付けを表形式で記述する手法により行う。 The existing test cases 30111 are generated based on the test requirements that describe the behavior to be verified in natural language, and each test case is saved in a state associated with the existing test requirement 30112 that describes the behavior to be verified. ing. The association is performed by a method of tagging each existing test case 30111 and each existing test requirement 30112, or a method of describing the correspondence between each existing test case 30111 and each existing test requirement 30112 in a table format.
 なお、既存テストケース保存部3011に保存する既存テストケース30111は、例えば、車両におけるECU(Electronic Control Unit)などの制御コントローラをテストするHiLS(Hardware in the Loop Simulator)などの試験装置が読み込み及び実行可能な形式で記述したものであり、図3はその一例である。また、既存テストケース30111に紐付けされたテスト要件を既存テスト要件30112と呼ぶ。 The existing test case 30111 stored in the existing test case storage unit 3011 is read and executed by, for example, a test device such as HiLS (Hardware in the Loop Simulator) that tests a control controller such as an ECU (Electronic Control Unit) in a vehicle. It is described in a possible format, and FIG. 3 is an example. Further, the test requirement associated with the existing test case 30111 is referred to as an existing test requirement 30112.
 <コードクローン解析部>
 コードクローン解析部3012は、テストケース候補抽出部301の構成要素の1つであって、既存テストケース保存部3011に保存された既存テストケース30111同士の類似度を評価する。
<Code Clone Analysis Department>
The code clone analysis unit 3012 is one of the components of the test case candidate extraction unit 301, and evaluates the similarity between the existing test cases 30111 stored in the existing test case storage unit 3011.
 前記類似度の評価は、既存テストケース30111に共通するコードクローンの割合に基づく。すなわち、コードクローン解析部3012は、2つの既存テストケース30111において記述された形式言語の間のコードクローンを解析して、形式言語の要素数に対するコードクローンの要素数の占める割合を類似度として算出する。 The evaluation of the similarity is based on the ratio of code clones common to the existing test case 30111. That is, the code clone analysis unit 3012 analyzes the code clone between the formal languages described in the two existing test cases 30111, and calculates the ratio of the number of elements of the code clone to the number of elements of the formal language as the degree of similarity. do.
 図11はコードクローン解析部3012の構成を示した図である。コードクローン解析部3012は、既存テストケース30111をトークンに分割する字句解析部30121、既存テストケース30111に存在するトークンの数をカウントするトークンカウント部30123と、既存テストケース保存部3011に保存された既存テストケース30111同士に共通するコードクローンを抽出するコードクローン抽出部30125から構成される。 FIG. 11 is a diagram showing the configuration of the code clone analysis unit 3012. The code clone analysis unit 3012 is stored in the lexical analysis unit 30121 that divides the existing test case 30111 into tokens, the token count unit 30123 that counts the number of tokens existing in the existing test case 30111, and the existing test case storage unit 3011. It is composed of a code clone extraction unit 30125 that extracts a code clone common to existing test cases 30111.
 <字句解析部>
 字句解析部30121は、既存テストケース30111をトークンごとに分割し、トークン分割テストケース30122に変換する。前記トークンとは、演算子や括弧といったテストケースを構成する最小の単位である。図12は、図3に示した既存テストケース30111をトークン分割テストケース30122に変換した例である。この例においては、字句解析部30121は、inputやmodeなどの変数名、==や<などの演算子、及び括弧ごとに既存テストケース30111を分割する。
<Lexical analysis department>
The lexical analysis unit 30121 divides the existing test case 30111 for each token and converts it into the token division test case 30122. The token is the smallest unit that constitutes a test case such as an operator and parentheses. FIG. 12 is an example in which the existing test case 30111 shown in FIG. 3 is converted into the token division test case 30122. In this example, the lexical analysis unit 30121 divides the existing test case 30111 into variable names such as input and mode, operators such as == and <, and parentheses.
 <トークンカウント部>
トークンカウント部30123は、トークン分割テストケース30122に存在するトークンの総数をカウントする。
<Token count section>
The token counting unit 30123 counts the total number of tokens existing in the token division test case 30122.
 図14はトークンカウント部30123において実行される処理の一例を示すフローチャートである。ステップS301231にて、トークンカウント部30123は、字句解析部30121からトークン分割テストケース30122を受け取る。 FIG. 14 is a flowchart showing an example of the process executed by the token counting unit 30123. In step S301231, the token counting unit 30123 receives the token division test case 30122 from the lexical analysis unit 30121.
 ステップS301232にて、トークンカウント部30123は既存テストケース30111及び該既存テストケースを変換したトークン分割テストケース30122を識別するためのインデックスiを0で初期化する。 In step S301232, the token counting unit 30123 initializes the index i for identifying the existing test case 30111 and the token division test case 30122 converted from the existing test case with 0.
 ステップS301233にて、トークンカウント部30123はインデックスiがテストケース数より小さいか否かを判定し、テストケース数より小さい場合にはステップS301234に進み、テストケース数以上である場合にはステップS30123Aに進む。 In step S301233, the token counting unit 30123 determines whether or not the index i is smaller than the number of test cases, proceeds to step S301234 if it is smaller than the number of test cases, and proceeds to step S30123A if it is greater than or equal to the number of test cases. move on.
 ステップS301234にて、トークンカウント部30123はトークン数をカウントするための変数Countを1で初期化する。 In step S301234, the token counting unit 30123 initializes the variable Count for counting the number of tokens with 1.
 ステップS301235にて、トークンカウント部30123はトークン分割テストケース[i]の先頭のトークンを抽出する。 In step S301235, the token counting unit 30123 extracts the first token of the token division test case [i].
 ステップS301236にて、トークンカウント部30123はトークン分割テストケース[i]にトークンが存在しているか否かを判定し、存在している場合にはステップS301237に進み、存在しない場合にはステップS301238に進む。 In step S301236, the token counting unit 30123 determines whether or not a token exists in the token division test case [i], proceeds to step S301237 if it exists, and proceeds to step S301238 if it does not exist. move on.
 ステップS301237にて、トークンカウント部30123は変数CountをインクリメントしてからステップS301235に戻って上記処理を繰り返す。 In step S301237, the token counting unit 30123 increments the variable Count, then returns to step S301235 and repeats the above process.
 ステップS301238にて、トークンカウント部30123はインデックスiをインクリメントする。ステップS301239にて、トークンカウント部30123はトークン数データ[i]にCountを代入してからステップS301233に戻って上記処理を繰り返す。 In step S301238, the token counting unit 30123 increments the index i. In step S301239, the token counting unit 30123 substitutes the Count for the token number data [i], then returns to step S301233 and repeats the above process.
 ステップS30123Aにて、トークンカウント部30123はトークン数データ30124を出力して処理を終了する。 In step S30123A, the token counting unit 30123 outputs the token number data 30124 and ends the process.
 これにより、トークンカウント部30123は、既存テストケース30111同士の類似度を算出する際に必要となる、テストケースに含まれるトークンの総数を出力することができる。 As a result, the token counting unit 30123 can output the total number of tokens included in the test cases, which is necessary when calculating the similarity between the existing test cases 30111.
 <トークン数データ>
 図13はトークン数データ30124の例を示した図である。トークン数データ30124は、テストケースの識別子とトークン数をひとつのエントリに含む。トークン数データ30124は、それぞれのテストケースに含まれるトークンの数を表形式で保存したデータである。
<Token number data>
FIG. 13 is a diagram showing an example of token number data 30124. The token number data 30124 includes the test case identifier and the number of tokens in one entry. The token number data 30124 is data in which the number of tokens included in each test case is stored in a table format.
 <コードクローン抽出部>
 コードクローン抽出部30125は、既存テストケース保存部3011に保存された既存テストケース30111同士に共通するコードクローンを抽出する。
<Code clone extraction unit>
The code clone extraction unit 30125 extracts a code clone common to the existing test cases 30111 stored in the existing test case storage unit 3011.
 図15は、コードクローン抽出部30125において実行される処理全体を表すフローチャートである。 FIG. 15 is a flowchart showing the entire process executed by the code clone extraction unit 30125.
 ステップS301251にて、コードクローン抽出部30125は、トークン分割テストケース30122を入力として受け取り、前記受け取ったトークン分割テストケース30122に含まれる各トークンを配列TCに格納する。 In step S301251, the code clone extraction unit 30125 receives the token division test case 30122 as an input, and stores each token included in the received token division test case 30122 in the array TC.
 コードクローン抽出部30125は、既存テストケース保存部3011に保存されるすべての既存テストケース30111を配列TCに格納する。したがって、配列TCは2次元配列となる。すなわち、行方向インデックスを用いてトークン分割テストケース30122を識別し、列方向インデックスを用いて該トークン分割テストケース30122に含まれる各トークンを識別する。 The code clone extraction unit 30125 stores all the existing test cases 30111 stored in the existing test case storage unit 3011 in the array TC. Therefore, the array TC is a two-dimensional array. That is, the row index is used to identify the token split test case 30122, and the column index is used to identify each token contained in the token split test case 30122.
 ステップS301252にて、コードクローン抽出部30125は、トークン数データ30124を入力として受け取る。 In step S301252, the code clone extraction unit 30125 receives the token number data 30124 as an input.
 ステップS301253にて、コードクローン抽出部30125は、トークン分割テストケース30122を識別するためのインデックスiを0で初期化する。 In step S301253, the code clone extraction unit 30125 initializes the index i for identifying the token division test case 30122 with 0.
 ステップS301254にて、コードクローン抽出部30125は、インデックスiがテストケース数より小さいか否かを判定し、テストケース数より小さい場合にはステップS301255に進み、テストケース数以上の場合にはステップS30125Aに進む。 In step S301254, the code clone extraction unit 30125 determines whether or not the index i is smaller than the number of test cases, proceeds to step S301255 if it is smaller than the number of test cases, and step S30125A if it is greater than or equal to the number of test cases. Proceed to.
 ステップS301255にて、コードクローン抽出部30125は、トークン分割テストケース30122を識別するためのインデックスjを0で初期化する。 In step S301255, the code clone extraction unit 30125 initializes the index j for identifying the token division test case 30122 with 0.
 ステップS301256にて、コードクローン抽出部30125は、インデックスjがテストケース数より小さいか否かを判定し、テストケース数より小さい場合にはステップS301258に進み、テストケース数以上の場合にはステップS301257に進む。 In step S301256, the code clone extraction unit 30125 determines whether or not the index j is smaller than the number of test cases, proceeds to step S301258 if it is smaller than the number of test cases, and steps S301257 if it is greater than or equal to the number of test cases. Proceed to.
 ステップS301257にて、コードクローン抽出部30125は、インデックスiをインクリメントしてからステップS301254に戻って上記処理を繰り返す。 In step S301257, the code clone extraction unit 30125 increments the index i, then returns to step S301254 and repeats the above process.
 ステップS301258にて、コードクローン抽出部30125は、コードクローン解析を行う。コードクローン解析処理の詳細は図16で説明する。 In step S301258, the code clone extraction unit 30125 performs code clone analysis. The details of the code clone analysis process will be described with reference to FIG.
 ステップS301259にて、コードクローン抽出部30125は、インデックスjをインクリメントしてからステップS301256に戻って上記処理を繰り返す。 In step S301259, the code clone extraction unit 30125 increments the index j, then returns to step S301256 and repeats the above process.
 ステップS30125Aにて、コードクローン抽出部30125は、コードクローンデータ3013を出力して処理を終了する。 In step S30125A, the code clone extraction unit 30125 outputs the code clone data 3013 and ends the process.
 これにより、コードクローン抽出部30125は、2つの既存テストケース30111に対してコードクローン解析を行うことで既存テストケース30111同士の類似度をコードクローンデータ3013として出力することができる。 As a result, the code clone extraction unit 30125 can output the similarity between the existing test cases 30111 as the code clone data 3013 by performing the code clone analysis on the two existing test cases 30111.
 コードクローンデータ3013は、2つの既存テストケース30111の間のコードクローンを解析し、該既存テストケース30111のトークンの総数(個数)に占めるコードクローンと判定されたトークン数の割合を表形式で保存したデータである。 The code clone data 3013 analyzes the code clone between the two existing test cases 30111, and stores the ratio of the number of tokens determined to be the code clone to the total number (number) of tokens in the existing test case 30111 in a tabular format. It is the data that was done.
 この割合が高いほど該2つのテストケースは類似していると評価することができる。コードクローンデータ3013の一例を図8に示す。図示の例では、テストケース1とテストケース2はおおむね50%程度類似しており、テストケース3とテストケース5はおおむね80%程度類似していると判定することができる。 The higher this ratio, the more similar the two test cases can be evaluated. An example of the code clone data 3013 is shown in FIG. In the illustrated example, it can be determined that the test case 1 and the test case 2 are approximately 50% similar, and the test case 3 and the test case 5 are approximately 80% similar.
 <コードクローン解析>
 図16は、図15におけるコードクローン解析処理(S301258)に関するフローチャートである。
<Code clone analysis>
FIG. 16 is a flowchart relating to the code clone analysis process (S301258) in FIG.
 ステップS3012581にて、コードクローン抽出部30125は、インデックスiで識別されたトークン分割テストケース30122において処理対象とするトークンを識別するためのインデックスmを0で初期化する。 In step S3012581, the code clone extraction unit 30125 initializes the index m for identifying the token to be processed in the token division test case 30122 identified by the index i with 0.
 ステップS3012582にて、コードクローン抽出部30125は、インデックスmがトークン数[i]より小さいか否かを判定し、トークン数[i]より小さい場合にはステップS3012583に進み、トークン数[i]以上の場合にはステップS301258Dに進んで処理を終了する。 In step S3012582, the code clone extraction unit 30125 determines whether or not the index m is smaller than the number of tokens [i], and if it is smaller than the number of tokens [i], proceeds to step S3012583 and the number of tokens [i] or more. In the case of, the process proceeds to step S301258D to end the process.
 ステップS3012583にて、コードクローン抽出部30125は、インデックスjで識別されたトークン分割テストケース30122において処理対象とするトークンを識別するためのインデックスnを0に初期化する。 In step S3012583, the code clone extraction unit 30125 initializes the index n for identifying the token to be processed in the token division test case 30122 identified by the index j to 0.
 ステップS3012584にて、コードクローン抽出部30125は、インデックスnがトークン数[j]より小さいか否かを判定し、トークン数[j]より小さい場合にはステップS3012585に進み、トークン数[j]以上の場合にはステップS301256Dに進む。 In step S301284, the code clone extraction unit 30125 determines whether or not the index n is smaller than the number of tokens [j], and if it is smaller than the number of tokens [j], proceeds to step S301258 and proceeds to step S301258, and the number of tokens [j] or more. In the case of, the process proceeds to step S301256D.
 ステップS3012585にて、コードクローン抽出部30125は、トークン分割テストケースiとjで連続的に検出された共通トークン数をカウントする変数clone_numを0に初期化する。 In step S301285, the code clone extraction unit 30125 initializes the variable clone_num that counts the number of common tokens continuously detected in the token division test cases i and j to 0.
 ステップS3012586にて、コードクローン抽出部30125は、インデックスmをインクリメントしてからステップS3012582へ戻って上記処理を繰り返す。 In step S301258, the code clone extraction unit 30125 increments the index m, then returns to step S3012582 and repeats the above process.
 ステップS3012587にて、コードクローン抽出部30125は、トークン分割テストケース[i]のm+clone_num番目のトークンとトークン分割テストケース[j]のn+clone_num番目のトークンが等しいか否かを判定し、等しい場合にはステップS3012588に進み、異なる場合にはステップS3012589に進む。 In step S301257, the code clone extraction unit 30125 determines whether or not the m + clone_numth token of the token division test case [i] and the n + clone_numth token of the token division test case [j] are equal, and if they are equal, the code clone extraction unit 30125 determines whether or not they are equal. The process proceeds to step S301258, and if different, the process proceeds to step S301259.
 ステップS3012588にて、コードクローン抽出部30125は、変数clone_numをインクリメントしてからステップS3012587に戻って上記処理を繰り返す。 In step S301288, the code clone extraction unit 30125 increments the variable clone_num, then returns to step S301257 and repeats the above process.
 ステップS3012589にて、コードクローン抽出部30125は、変数clone_numが最小トークン数より大きいか否かを判定し、最小トークン数より大きい場合にはステップS301258Bに進み、最小トークン数以下の場合にはステップS301258Aに進む。 In step S301259, the code clone extraction unit 30125 determines whether or not the variable clone_num is larger than the minimum number of tokens, proceeds to step S301258B if it is larger than the minimum number of tokens, and step S301258A if it is less than or equal to the minimum number of tokens. Proceed to.
 これにより、連続的に検出された共通トークン数が最小トークン数以下である場合に、該連続的に検出された共通トークンがコードクローンとして検出されることを防止することができる。 This makes it possible to prevent the continuously detected common tokens from being detected as a code clone when the number of continuously detected common tokens is less than or equal to the minimum number of tokens.
 最小トークン数を小さく設定すると、本来はコードクローンとして検出されるべきでない箇所(例えば、単なる変数の宣言)をコードクローンとして誤検出することとなる。一方、最小トークン数を大きく設定すると、本来はコードクローンとして検出されるべき箇所をコードクローンとして検出できないこととなる。したがって、最小トークン数は解析するデータに応じて適切に設定する必要がある。 If the minimum number of tokens is set small, a part that should not be detected as a code clone (for example, a simple variable declaration) will be erroneously detected as a code clone. On the other hand, if the minimum number of tokens is set large, the part that should be detected as a code clone cannot be detected as a code clone. Therefore, the minimum number of tokens needs to be set appropriately according to the data to be analyzed.
 ステップS301258Aにて、コードクローン抽出部30125は、インデックスnにn+clone_num+1を代入してからステップS3012584へ戻って上記処理を繰り返す。 In step S301258A, the code clone extraction unit 30125 substitutes n + clone_num + 1 for the index n, then returns to step S301258 and repeats the above process.
 ステップS301258Bにて、コードクローン抽出部30125は、コードクローンデータ[i][j]に変数clone_numをクローン数[i]で割った値(類似度)を代入する。 In step S301258B, the code clone extraction unit 30125 substitutes the code clone data [i] [j] with the value (similarity) obtained by dividing the variable clone_num by the number of clones [i].
 ステップS301258Cにて、コードクローン抽出部30125は、インデックスmにm+clone_num+1を代入してからステップS3012582へ戻って上記処理を繰り返す。 In step S301258C, the code clone extraction unit 30125 substitutes m + clone_num + 1 for the index m, then returns to step S3012582 and repeats the above process.
 これにより、コードクローン抽出部30125は、2つの既存テストケース30111に対してトークン構成が同じである箇所をコードクローンとして検出することができる。 As a result, the code clone extraction unit 30125 can detect a portion having the same token configuration for the two existing test cases 30111 as a code clone.
 <クラスタリング実施部>
 クラスタリング実施部3014は、テストケース候補抽出部301の構成要素の1つであって、コードクローンデータ3013に基づき、類似した既存テストケース30111同士をクラスタに分類する。
<Clustering implementation unit>
The clustering implementation unit 3014 is one of the components of the test case candidate extraction unit 301, and classifies similar existing test cases 30111 into clusters based on the code clone data 3013.
 コードクローンデータ3013には、2つの既存テストケース30111の類似度が記録されている。2つの既存テストケース30111の類似度の逆数を、該2つの既存テストケース30111同士の疑似的な距離とみなすことにより、公知又は周知のクラスタリングアルゴリズムを適用して類似した既存テストケース30111同士をクラスタに分類することができる。 The code clone data 3013 records the similarity between the two existing test cases 30111. By regarding the reciprocal of the reciprocal of the similarity of two existing test cases 30111 as a pseudo distance between the two existing test cases 30111, a known or well-known clustering algorithm is applied to cluster similar existing test cases 30111 with each other. Can be classified into.
 例えば、図8に示すコードクローンデータ3013の場合、テストケース1とテストケース2はおおむね50%程度類似のためテストケース1と2の間の距離は1/0.5=2、テストケース3とテストケース5はおおむね80%程度類似のため距離は1/0.8=1.25とみなすことができる。 For example, in the case of the code clone data 3013 shown in FIG. 8, since test case 1 and test case 2 are approximately 50% similar, the distance between test cases 1 and 2 is 1 / 0.5 = 2, and test case 3 and so on. Since the test case 5 is approximately 80% similar, the distance can be regarded as 1 / 0.8 = 1.25.
 これにより、類似している既存テストケース30111同士の距離が近いと判定できる。クラスタリングアルゴリズムにはVBGMM (Variational Bayesian Gaussian Mixture)を使用する。VBGMMは点群を距離に基づき分類するためのアルゴリズムで、点群間の距離を与えることにより、クラスタ数の決定及び各点群のクラスタ分類を自動で行うものである。 From this, it can be determined that the distance between similar existing test cases 30111 is close. VBGMM (Variational Bayesian Gaussian Mixture) is used as the clustering algorithm. VBGMM is an algorithm for classifying point clouds based on distance, and by giving the distance between point clouds, the number of clusters is determined and the cluster classification of each point cloud is automatically performed.
 本実施例においては、既存テストケース30111間の疑似的な距離が与えられているので、VBGMMにより、類似した既存テストケース30111同士をクラスタに分類することが可能である。 In this embodiment, since a pseudo distance between the existing test cases 30111 is given, it is possible to classify similar existing test cases 30111 into clusters by VBGMM.
 <クラスタデータ>
 図9はクラスタデータ3015の例を示した図である。クラスタデータ3015は、テストケースの識別子と、クラスタの識別子をひとつのエントリに含む。クラスタデータ3015は、それぞれのテストケースがどのクラスタと対応しているかを表形式で保存したデータである。
<Cluster data>
FIG. 9 is a diagram showing an example of cluster data 3015. The cluster data 3015 includes the test case identifier and the cluster identifier in one entry. The cluster data 3015 is data in which each test case corresponds to which cluster in a tabular format.
 <テストケース候補決定部>
 テストケース候補決定部3016は、テストケース候補抽出部301の構成要素の1つであって、参照すべきテストケースの候補を決定する。
<Test case candidate determination unit>
The test case candidate determination unit 3016 is one of the components of the test case candidate extraction unit 301, and determines test case candidates to be referred to.
 図17は、テストケース候補決定部3016の構成を示した図である。 FIG. 17 is a diagram showing the configuration of the test case candidate determination unit 3016.
 テストケース候補決定部3016は、分類器生成部30161と分類実施部30162からなる。 The test case candidate determination unit 3016 includes a classifier generation unit 30161 and a classification implementation unit 30162.
 分類器生成部30161は、既存テストケース保存部3011に保存されている既存テストケース30111及び該既存テストケースに紐付けされた既存テスト要件30112及びクラスタデータ3015に基づき分類器を生成する。 The classifier generation unit 30161 generates a classifier based on the existing test case 30111 stored in the existing test case storage unit 3011, the existing test requirement 30112 associated with the existing test case, and the cluster data 3015.
 分類実施部30162は、前記分類器を用いて新規テスト要件11を数値化したデータがどのクラスタに分類されるかを決定し、前記決定したクラスタに含まれるすべてのテストケースをテストケース候補として再利用性評価部302に出力する。 The classification implementation unit 30162 determines to which cluster the data obtained by quantifying the new test requirement 11 using the classifier is classified, and re-uses all the test cases included in the determined cluster as test case candidates. Output to the usability evaluation unit 302.
 これにより、テストケース候補決定部3016は、テスト要件解析部2が受け取ったテスト要件に対して参照すべきテストケースの候補を決定することができる。 Thereby, the test case candidate determination unit 3016 can determine the test case candidates to be referred to for the test requirements received by the test requirement analysis unit 2.
 <分類器生成部>
 図18は分類器生成部30161において実行される処理のフローチャートである。
<Classifier generator>
FIG. 18 is a flowchart of the process executed by the classifier generation unit 30161.
 ステップS301611にて、分類器生成部30161は既存テストケース保存部3011に保存された各既存テストケース30111に紐付けされた既存テスト要件30112を入力として受け取る。 In step S301611, the classifier generation unit 30161 receives the existing test requirement 30112 associated with each existing test case 30111 stored in the existing test case storage unit 3011 as an input.
 ステップS301612にて、分類器生成部30161はクラスタデータ3015を入力として受け取る。 In step S301612, the classifier generator 30161 receives the cluster data 3015 as an input.
 ステップS301613にて、分類器生成部30161はステップS301611にて受け取った既存テスト要件30112について自然言語解析を実施し、テスト要件数値化データS301614を生成する。前記自然言語解析はテスト要件解析部2におけるステップS22と同一の方法で行う。 In step S301613, the classifier generation unit 30161 performs natural language analysis on the existing test requirement 30112 received in step S301611 and generates test requirement quantified data S301614. The natural language analysis is performed by the same method as in step S22 in the test requirement analysis unit 2.
 ステップS301615にて、分類器生成部30161は、既存テスト要件30112の数値化データ(S301614)を入力ベクトルとし、クラスタデータ3015を参照して該既存テスト要件30112と紐付けされた既存テストケース30111が所属するクラスタの番号を特定し、該クラスタの番号をラベルとして教師あり学習を行い、分類器を生成する。 In step S301615, the classifier generator 30161 uses the digitized data (S301614) of the existing test requirement 30112 as an input vector, and refers to the cluster data 3015 to provide an existing test case 30111 associated with the existing test requirement 30112. The number of the cluster to which it belongs is specified, supervised learning is performed using the number of the cluster as a label, and a classifier is generated.
 教師あり学習のアルゴリズムとしては、例えば、ディープニューラルネットワークやサポートベクタマシンなどの周知又は公知のアルゴリズムを用いる。本手法は、画像データを入力ベクトルとし、犬や猫をラベルとしてディープニューラルネットワーク解析を行い犬や猫画像分類器を生成する手法をテストに応用したものである。 As a supervised learning algorithm, for example, a well-known or known algorithm such as a deep neural network or a support vector machine is used. This method is an application of the method of generating a dog or cat image classifier by performing deep neural network analysis using image data as an input vector and dogs or cats as labels.
 <分類実施部>
 分類実施部30162において実行される処理について説明する。分類実施部30162は、分類器生成部30161が生成した分類器を用いて、新規テスト要件11を数値化したデータに対するクラスタ分類を決定し、前記決定したクラスタに含まれるすべての既存テストケース30111をテストケース候補として再利用性評価部302に出力する。
<Classification Implementation Department>
The process executed by the classification execution unit 30162 will be described. The classification implementation unit 30162 determines the cluster classification for the data obtained by quantifying the new test requirement 11 by using the classifier generated by the classifier generation unit 30161, and determines all the existing test cases 30111 included in the determined cluster. It is output to the reusability evaluation unit 302 as a test case candidate.
 まず、テスト要件解析部2が生成したテスト要件数値化データ200を分類器に入力する。このとき、分類器は前記テスト要件数値化データS301614が分類されるクラスタを決定する。 First, the test requirement quantified data 200 generated by the test requirement analysis unit 2 is input to the classifier. At this time, the classifier determines the cluster in which the test requirement quantified data S301614 is classified.
 次に、分類実施部30162は、クラスタデータ3015を参照し、分類器が決定した前記クラスタに所属するすべての既存テストケース30111を特定する。最後に、分類実施部30162は、前記特定したすべての既存テストケース30111をテストケース候補3010として出力する。 Next, the classification implementation unit 30162 refers to the cluster data 3015 and identifies all the existing test cases 30111 belonging to the cluster determined by the classifier. Finally, the classification implementation unit 30162 outputs all the existing test cases 30111 identified above as test case candidates 3010.
 分類器生成部30161は、過去に開発された既存テストケース30111と該既存テストケース30111に紐づく既存テスト要件30112の関係を解析しているので、分類実施部30162によるテストケース候補3010の出力は、新規テスト要件11に対して開発されると期待されるテストケースを過去の実績に基づき予測又は推定していることに相当する。 Since the classifier generation unit 30161 analyzes the relationship between the existing test case 30111 developed in the past and the existing test requirement 30112 associated with the existing test case 30111, the output of the test case candidate 3010 by the classification implementation unit 30162 is , Corresponds to predicting or estimating test cases expected to be developed for the new test requirement 11 based on past performance.
 <テストケース候補>
 図10はテストケース候補3010の例を示した図である。テストケース候補3010は既存テストケース30111の識別子を表形式で保存したデータである。
<Test case candidate>
FIG. 10 is a diagram showing an example of test case candidate 3010. The test case candidate 3010 is data in which the identifier of the existing test case 30111 is stored in a tabular format.
 <再利用性評価部>
 再利用性評価部302は、テストケース候補3010に含まれる各既存テストケース30111に対して再利用性を評価し、再利用度データ3020を生成する。
<Reusability Evaluation Department>
The reusability evaluation unit 302 evaluates the reusability of each existing test case 30111 included in the test case candidate 3010 and generates reusability data 3020.
 図19は再利用性評価部302の構成を示した図である。再利用性評価部302は、候補間コードクローン解析部3021と、再利用グラフ生成部3023と、再利用度算出部3025からなる。 FIG. 19 is a diagram showing the configuration of the reusability evaluation unit 302. The reusability evaluation unit 302 includes a candidate-to-candidate code clone analysis unit 3021, a reuse graph generation unit 3023, and a reuse degree calculation unit 3025.
 テストケース候補3010に含まれる各既存テストケース30111の再利用度は、再利用グラフを用いて算出される。 The degree of reuse of each existing test case 30111 included in the test case candidate 3010 is calculated using the reuse graph.
 <候補間コードクローン解析部>
 候補間コードクローン解析部3021は、テストケース候補3010に含まれる既存テストケース30111同士に関してコードクローン解析を行う。前記コードクローン解析は、上述のコードクローン解析部3012と同一の方法で行う。
<Candidate code clone analysis unit>
The inter-candidate code clone analysis unit 3021 performs code clone analysis on the existing test cases 30111 included in the test case candidates 3010. The code clone analysis is performed by the same method as the code clone analysis unit 3012 described above.
 候補間コードクローン解析部3021は、解析の結果として、候補間コードクローンデータ3022を生成する。前記候補間コードクローンデータ3022は、コードクローン解析部3012が生成するコードクローンデータ3013のうち、テストケース候補3010に含まれる既存テストケース30111同士に関するものと同一である。 The candidate-to-candidate code clone analysis unit 3021 generates the candidate-to-candidate code clone data 3022 as a result of the analysis. The inter-candidate code clone data 3022 is the same as the code clone data 3013 generated by the code clone analysis unit 3012 regarding the existing test cases 30111 included in the test case candidate 3010.
 <再利用グラフ生成部>
 図22は、再利用グラフ生成部3023において実行される処理の一例を示すフローチャートある。ステップS30231にて、再利用グラフ生成部3023は、候補間コードクローンデータ3022を入力として受け取る。
<Reuse graph generator>
FIG. 22 is a flowchart showing an example of the processing executed by the reuse graph generation unit 3023. In step S30231, the reuse graph generation unit 3023 receives the inter-candidate code clone data 3022 as an input.
 ステップS30232にて、再利用グラフ生成部3023は、処理対象とするテストケース候補3010を識別するインデックスiを0に初期化する。ステップS30233にて、再利用グラフ生成部3023は、インデックスiがテストケース候補数より小さいか否かを判定し、テストケース候補数より小さい場合にはステップS30234に進み、テストケース候補数以上の場合にはステップS30236に進む。 In step S30232, the reuse graph generation unit 3023 initializes the index i that identifies the test case candidate 3010 to be processed to 0. In step S30233, the reuse graph generation unit 3023 determines whether or not the index i is smaller than the number of test case candidates, proceeds to step S30234 if the index i is smaller than the number of test case candidates, and if the number is equal to or greater than the number of test case candidates. To step S30236.
 ステップS30234にて、再利用グラフ生成部3023は、テストケース候補[i]を再利用度グラフ3024にノードとして追加する。ステップS30235にて、再利用グラフ生成部3023は、インデックスiをインクリメントした後に、ステップS30233に戻って上記処理を繰り返す。 In step S30234, the reuse graph generation unit 3023 adds the test case candidate [i] to the reuse degree graph 3024 as a node. In step S30235, the reuse graph generation unit 3023 increments the index i, then returns to step S30233 and repeats the above process.
 ステップS30236にて、再利用グラフ生成部3023は、インデックスiを0に初期化する。ステップS30237にて、再利用グラフ生成部3023は、インデックスiがテストケース候補数より小さいか否かを判定し、テストケース候補数より小さい場合にはステップS30238に進み、テストケース候補数以上の場合にはステップS3023Fに進んで処理を終了する。 In step S30236, the reuse graph generation unit 3023 initializes the index i to 0. In step S30237, the reuse graph generation unit 3023 determines whether or not the index i is smaller than the number of test case candidates, proceeds to step S30238 if the index i is smaller than the number of test case candidates, and if the number is equal to or greater than the number of test case candidates. The process proceeds to step S3023F to end the process.
 ステップS30238にて、再利用グラフ生成部3023は、インデックスiのテストケース候補に対して比較の対象となるテストケース候補を識別するインデックスjを0に初期化する。 In step S30238, the reuse graph generation unit 3023 initializes the index j that identifies the test case candidate to be compared with respect to the test case candidate of the index i to 0.
 ステップS30239にて、再利用グラフ生成部3023は、インデックスjがテストケース候補数より小さいか否かを判定し、テストケース候補数より小さい場合にはステップS3023Aに進み、テストケース候補数以上の場合にはステップS3023Bに進む。 In step S30239, the reuse graph generation unit 3023 determines whether or not the index j is smaller than the number of test case candidates, proceeds to step S3023A if the index j is smaller than the number of test case candidates, and if the number is equal to or greater than the number of test case candidates. To step S3023B.
 ステップS3023Aにて、再利用グラフ生成部3023は、インデックスiをインクリメントしてからステップS30237に戻って上記処理を繰り返すする。 In step S3023A, the reuse graph generation unit 3023 increments the index i, then returns to step S30237 and repeats the above process.
 ステップS3023Bにて、再利用グラフ生成部3023は、テストケース候補[i]にテストケース候補[j]のクローンがどれくらい存在するかを表すコードクローン[i][j]が予め設定された閾値より大きいか否かを判定し、閾値より大きい場合にはステップS3023Cに進み、閾値以下の場合にはステップS3023Eに進む。前記閾値は、テストケース候補[i]とテストケース候補[j]を類似又は非類似のどちらに判定するかを決定するためのものである。 In step S3023B, the reuse graph generation unit 3023 has a code clone [i] [j] indicating how many clones of the test case candidate [j] exist in the test case candidate [i] from a preset threshold value. It is determined whether or not it is large, and if it is larger than the threshold value, the process proceeds to step S3023C, and if it is equal to or less than the threshold value, the process proceeds to step S3023E. The threshold value is for determining whether the test case candidate [i] and the test case candidate [j] are judged to be similar or dissimilar.
 ステップS3023Cにて、再利用グラフ生成部3023は、テストケース候補[j]にテストケース候補[i]のクローンがどれくらい存在するかを表すコードクローン[j][i](候補間コードクローンデータ3022に格納されている値)が前記閾値より大きいか否かを判定し、閾値より大きい場合にはステップS3023Dに進み、前記閾値以下の場合にはステップS3023Eに進む。 In step S3023C, the reuse graph generation unit 3023 indicates how many clones of the test case candidate [i] exist in the test case candidate [j] code clones [j] [i] (inter-candidate code clone data 3022). It is determined whether or not the value (value stored in) is larger than the threshold value, and if it is larger than the threshold value, the process proceeds to step S3023D, and if it is equal to or less than the threshold value, the process proceeds to step S3023E.
 ステップS3023Dにて、再利用グラフ生成部3023は、インデックスiで識別したテストケースの候補をグラフ上で記述したノード(ノードi)とインデックスjで識別したテストケースの候補をグラフ上で記述したノード(ノードj)の間にリンクを生成する。 In step S3023D, the reuse graph generation unit 3023 describes a node (node i) in which the test case candidates identified by the index i are described on the graph and a node in which the test case candidates identified by the index j are described on the graph. Create a link between (nodes j).
 ステップS3023Eにて、再利用グラフ生成部3023は、インデックスjをインクリメントしてからステップS30239に戻って上記処理を繰り返す。 In step S3023E, the reuse graph generation unit 3023 increments the index j, then returns to step S30239 and repeats the above process.
 以上の処理により、前記テストケース候補3010に含まれるすべての既存テストケース30111をノードとし、既存テストケース30111同士のコードクローン解析結果により算出される該既存テストケース30111間の類似度が閾値以上の場合にノード間のリンクを生成することで再利用度グラフ3024を生成することができる。 By the above processing, all the existing test cases 30111 included in the test case candidate 3010 are used as nodes, and the similarity between the existing test cases 30111 calculated from the code clone analysis results of the existing test cases 30111 is equal to or higher than the threshold value. In some cases, the reuse degree graph 3024 can be generated by generating the link between the nodes.
 再利用度グラフ3024は、多くのリンクがつながっているノードに対応する既存テストケース30111が、テストケース候補3010に含まれる他の既存テストケース30111の多くと類似していることを表している。すなわち、前記多くのリンクがつながっているノードに対応する既存テストケース30111が参照するにふさわしいと考えられる。 The reuse degree graph 3024 shows that the existing test case 30111 corresponding to the node to which many links are connected is similar to many of the other existing test cases 30111 included in the test case candidate 3010. That is, it is considered that the existing test case 30111 corresponding to the node to which many of the links are connected is suitable for reference.
 <再利用グラフ>
 図20は再利用度グラフ3024の例を示した図である。再利用度グラフ3024は、テストケースをノードとし、テストケース同士のコードクローンの割合に応じてリンクを生成したグラフである。
<Reuse graph>
FIG. 20 is a diagram showing an example of the reuse degree graph 3024. The reuse degree graph 3024 is a graph in which test cases are used as nodes and links are generated according to the ratio of code clones between test cases.
 図20に示す例の場合、テストケース2は、テストケース1とテストケース4に対し、閾値以上の割合で共通するコードクローンを有することを示す。同様に、テストケース1は、テストケース2とテストケース4とテストケース10に対し、閾値以上の割合で共通するコードクローンを持つことを示している。 In the case of the example shown in FIG. 20, it is shown that the test case 2 has a common code clone with respect to the test case 1 and the test case 4 at a ratio equal to or higher than the threshold value. Similarly, test case 1 shows that test case 2, test case 4, and test case 10 have a common code clone at a ratio equal to or higher than the threshold value.
 <再利用度算出部>
 図23は再利用度算出部3025において実行される処理のフローチャートである。
<Reuse degree calculation unit>
FIG. 23 is a flowchart of the process executed by the reuse degree calculation unit 3025.
 ステップS30251にて、再利用度算出部3025は再利用度グラフ3024を入力として受け取る。 In step S30251, the reuse degree calculation unit 3025 receives the reuse degree graph 3024 as an input.
 ステップS30252にて、再利用度算出部3025は処理対象とするテストケース候補3010を識別するためのインデックスiを0に初期化する。 In step S30252, the reuse degree calculation unit 3025 initializes the index i for identifying the test case candidate 3010 to be processed to 0.
 ステップS30253にて、再利用度算出部3025はインデックスiが再利用グラフに含まれるノード数より小さいか否かを判定し、ノード数より小さい場合にはステップS30254に進み、ノード数以上の場合にはステップS3025Bに進む。 In step S30253, the reuse degree calculation unit 3025 determines whether or not the index i is smaller than the number of nodes included in the reuse graph, proceeds to step S30254 if it is smaller than the number of nodes, and if it is equal to or greater than the number of nodes. Goes to step S3025B.
 ステップS30254にて、再利用度算出部3025は、インデックスiで識別されるテストケース候補3010に対応するノード(ノードi)に接続されるリンクの数を格納する変数Countを0に初期化する。 In step S30254, the reuse degree calculation unit 3025 initializes the variable Count to 0, which stores the number of links connected to the node (node i) corresponding to the test case candidate 3010 identified by the index i.
 ステップS30255にて、再利用度算出部3025はインデックスiに対して比較の対象とするテストケース候補3010及び該テストケース候補に対応するノード(ノードj)を識別するためのインデックスjを0に初期化する。 In step S30255, the reuse degree calculation unit 3025 initially sets the index j for identifying the test case candidate 3010 to be compared with the index i and the node (node j) corresponding to the test case candidate to 0. To become.
 ステップS30256にて、再利用度算出部3025はインデックスjが再利用度グラフ3024に含まれるノード数より小さいか否かを判定し、ノード数より小さい場合にはステップS30257に進み、ノード数以上の場合にはステップS30259に進む。 In step S30256, the reuse degree calculation unit 3025 determines whether or not the index j is smaller than the number of nodes included in the reuse degree graph 3024, and if it is smaller than the number of nodes, proceeds to step S30257 and proceeds to step S30257 or more. In that case, the process proceeds to step S30259.
 ステップS30257にて、再利用度算出部3025はノードiとノードjの間にリンクが存在するか否かを判定し、存在する場合にはステップS30258に進み、存在しない場合にはステップS30256に戻って上記処理を繰り返す。 In step S30257, the reuse degree calculation unit 3025 determines whether or not a link exists between the node i and the node j, proceeds to step S30258 if it exists, and returns to step S30256 if it does not exist. And repeat the above process.
 ステップS30258にて、再利用度算出部3025は変数Countをインクリメントした後に、ステップS30256に戻って上記処理を繰り返す。 In step S30258, the reuse degree calculation unit 3025 increments the variable Count, then returns to step S30256 and repeats the above process.
 ステップS30259にて、再利用度算出部3025は再利用度データ[i](ノードiの再利用度を格納する)に変数Countの値を代入する。ステップS3025Aにて、再利用度算出部3025はインデックスiをインクリメントしてからステップS30253に戻って上記処理を繰り返す。 In step S30259, the reuse degree calculation unit 3025 substitutes the value of the variable Count into the reuse degree data [i] (which stores the reuse degree of the node i). In step S3025A, the reuse degree calculation unit 3025 increments the index i, then returns to step S30253 and repeats the above process.
 ステップS3025Bにて、再利用度算出部3025は再利用度データ3020を出力して処理を終了する。 In step S3025B, the reuse degree calculation unit 3025 outputs the reuse degree data 3020 and ends the process.
 これにより、再利用度算出部3025は、前記再利用度グラフ3024に基づきテストケース候補3010に含まれる各既存テストケース30111が有するリンクの数を再利用度データ3020として出力することができる。 Thereby, the reuse degree calculation unit 3025 can output the number of links possessed by each existing test case 30111 included in the test case candidate 3010 as the reuse degree data 3020 based on the reuse degree graph 3024.
 <再利用度データ>
 図21は、再利用度データ3020の例を示した図である。再利用度データ3020は、既存テストケース30111の識別子を格納するテストケースと、再利用度をひとつのエントリに含み、各テストケースの再利用度を表形式で保存したデータである。
<Reuse degree data>
FIG. 21 is a diagram showing an example of reuse degree data 3020. The reuse degree data 3020 is data in which a test case storing an identifier of an existing test case 30111 and a reuse degree are included in one entry, and the reuse degree of each test case is stored in a tabular format.
 <テストケース出力部>
 図24は実施例1におけるテストケース出力部4において実行される処理のフローチャートである。
<Test case output section>
FIG. 24 is a flowchart of the process executed by the test case output unit 4 in the first embodiment.
 ステップS40からテストケース出力部4の処理が開始される。ステップS41にて、テストケース出力部4は再利用性評価部302から再利用度データ3020を入力として受け取る。 The process of the test case output unit 4 is started from step S40. In step S41, the test case output unit 4 receives the reusability data 3020 from the reusability evaluation unit 302 as an input.
 ステップS42にて、テストケース出力部4は処理対象のテストケース候補3010を識別するためのインデックスiを0に初期化する。ステップS43にて、テストケース出力部4は、最大の再利用度を有するテストケース候補3010を識別するインデックスを格納する変数Max_idを0に初期化する。 In step S42, the test case output unit 4 initializes the index i for identifying the test case candidate 3010 to be processed to 0. In step S43, the test case output unit 4 initializes the variable Max_id that stores the index that identifies the test case candidate 3010 having the maximum reuse degree to 0.
 ステップS44にて、テストケース出力部4は、インデックスiが再利用度データ数より小さいか否かを判定し、再利用度データ数より小さい場合にはステップS45に進み、再利用度データ数以上の場合にはステップS48に進む。 In step S44, the test case output unit 4 determines whether or not the index i is smaller than the number of reuse degree data, and if it is smaller than the number of reuse degree data, proceeds to step S45 and proceeds to step S45 to exceed the number of reuse degree data. In the case of, the process proceeds to step S48.
 ステップS45にて、テストケース出力部4は、再利用度データ[i]が再利用度データ[Max_id]より大きいか否かを判定し、再利用度データ[Max_id]より大きい場合にはステップS46に進み、再利用度データ[Max_id]以下の場合にはステップS47に進む。 In step S45, the test case output unit 4 determines whether or not the reuse degree data [i] is larger than the reuse degree data [Max_id], and if it is larger than the reuse degree data [Max_id], step S46. If it is less than or equal to the reuse degree data [Max_id], the process proceeds to step S47.
 ステップS46にて、テストケース出力部4は、変数Max_idにiを代入する。ステップS47にて、テストケース出力部4は、インデックスiをインクリメントしてからステップS44に戻って上記処理を繰り返す。 In step S46, the test case output unit 4 assigns i to the variable Max_id. In step S47, the test case output unit 4 increments the index i, then returns to step S44 to repeat the above process.
 ステップS48にて、テストケース出力部4は、テストケース[Max_id]を参照テストケース12として出力する。そして、ステップS49ではテストケース出力部4が処理を終了する。 In step S48, the test case output unit 4 outputs the test case [Max_id] as the reference test case 12. Then, in step S49, the test case output unit 4 ends the process.
 これにより、テストケース候補3010のうち、再利用度データ3020が最大である既存テストケース30111を参照テストケース12として出力することができる。 As a result, among the test case candidates 3010, the existing test case 30111 having the maximum reuse degree data 3020 can be output as the reference test case 12.
 本実施例によれば、外部から与えられた新規テスト要件11に対して、過去に人手で生成した既存テストケース30111の中から最も再利用度の高い既存テストケース30111を提示することができるため、テストケースを効率よく生成することが可能となる。 According to this embodiment, it is possible to present the existing test case 30111, which has the highest degree of reuse, among the existing test cases 30111 manually generated in the past, for the new test requirement 11 given from the outside. , It is possible to efficiently generate test cases.
 本発明にかかる実施例2におけるテスト支援装置及び方法について説明する。前記実施例1と異なる点は、テストケース出力部4が複数の参照テストケース12を出力する点である。なお、実施例1と同様の構成については、同一の符号を付してその説明を省略する。 The test support device and method according to the second embodiment of the present invention will be described. The difference from the first embodiment is that the test case output unit 4 outputs a plurality of reference test cases 12. The same components as those in the first embodiment are designated by the same reference numerals and the description thereof will be omitted.
 <テストケース出力部>
 図25は実施例2におけるテストケース出力部4において実行される処理のフローチャートを示した図である。前記実施例1の図24に対して、実施例2ではステップS4AとステップS4Bを追加した点が相違する。
<Test case output section>
FIG. 25 is a diagram showing a flowchart of processing executed by the test case output unit 4 in the second embodiment. The difference is that step S4A and step S4B are added in the second embodiment with respect to FIG. 24 of the first embodiment.
 ステップS48で参照テストケース12を決定した後、ステップS4Aでは、テストケース出力部4がテストケース作成者に対して、決定された参照テストケース12が適切であるか否か出力装置25を介して問い合わせる。 After determining the reference test case 12 in step S48, in step S4A, the test case output unit 4 tells the test case creator whether or not the determined reference test case 12 is appropriate via the output device 25. Contact us.
 テストケース作成者からの入力が適切であれば、テストケース出力部4はステップS49に進んで、現在の参照テストケース12を出力して処理を終了する。一方、テストケース作成者からの入力が不適切であれば、テストケース出力部4はステップS4Bに進む。 If the input from the test case creator is appropriate, the test case output unit 4 proceeds to step S49, outputs the current reference test case 12, and ends the process. On the other hand, if the input from the test case creator is inappropriate, the test case output unit 4 proceeds to step S4B.
 ステップS4Bでは、テストケース出力部4が再利用度データ[Max_id]を抽出して、当該[Max_id]のデータを再利用度データ3020から削除してから、ステップS42へ戻って上記処理を繰り返す。 In step S4B, the test case output unit 4 extracts the reuse degree data [Max_id], deletes the data of the [Max_id] from the reuse degree data 3020, and then returns to step S42 to repeat the above process.
 テストケース出力部4は、再利用度データ3020の中から、最も再利用度が高いテストケース候補3010を出力し、テストケース作成者が受け入れると判断をすれば該テストケース候補3010を参照テストケース12として出力する。 The test case output unit 4 outputs the test case candidate 3010 having the highest reuse degree from the reuse degree data 3020, and if it is determined that the test case creator accepts the test case candidate 3010, the test case candidate 3010 is referred to. Output as 12.
 テストケース作成者が拒否した場合、テストケース出力部4は、2番目に再利用度が高いテストケース候補3010を出力し、テストケース作成者が受け入れると判断をすれば該テストケース候補3010を参照テストケース12として出力する。 If the test case creator refuses, the test case output unit 4 outputs the test case candidate 3010 having the second highest degree of reuse, and if it is determined that the test case creator accepts it, the test case candidate 3010 is referred to. Output as test case 12.
 テストケース作成者が2番目も拒否した場合、テストケース出力部4は、3番目に再利用度が高い既存テストケース30111を出力し、テストケース作成者が受け入れると判断をすれば該テストケース候補3010を参照テストケース12として出力する処理をテストケース作成者が受け入れるまで繰り返す。 If the test case creator rejects the second test case, the test case output unit 4 outputs the existing test case 30111 with the third highest reuse rate, and if the test case creator determines that the test case creator accepts the test case candidate, the test case candidate is output. The process of outputting 3010 as the reference test case 12 is repeated until the test case creator accepts it.
 本実施例によれば、テスト支援装置0から最初に出力された参照テストケース12がテストケース作成者にとって受け入れられるものでなくても、テストケース候補3010にテストケースが存在する限りにおいてテストケースを提示しつづけることができ、テストケース作成者がより再利用できると判断したテストケース候補3010を参照テストケース12として選択することが可能となる。 According to this embodiment, even if the reference test case 12 first output from the test support device 0 is not acceptable to the test case creator, as long as the test case exists in the test case candidate 3010, the test case is set. It is possible to continue to present and select the test case candidate 3010, which the test case creator has determined to be more reusable, as the reference test case 12.
 <結び>
 以上のように、上記実施例のテスト支援装置0は、以下のような構成とすることができる。
<Conclusion>
As described above, the test support device 0 of the above embodiment can be configured as follows.
 (1)プロセッサ(21)とメモリ(22)を有して、新規テスト要件(12)を受け付けて、再利用可能な参照テストケース(12)を出力するテスト支援装置であって、自然言語で記述された前記新規テスト要件(12)を受け付けるテスト要件取得部(1)と、前記受け付けた新規テスト要件(12)について自然言語解析を実施してテスト要件数値化データ(200)を生成するテスト要件解析部(2)と、過去に生成された既存テストケース(30111)を前記テスト要件数値化データ(200)に基づいて解析して、再利用可能な前記既存テストケース(30111)の候補を出力テストケース候補(3010)として生成するテストケース解析部(3)と、前記出力テストケース候補(3010)の一部又は全部を参照テストケース(12)として出力するテストケース出力部(4)と、を有し、前記テストケース解析部(3)は、前記テスト要件数値化データ(200)に基づいて1つ以上の既存テストケース(30111)を出力テストケース候補(3010)として生成するテストケース候補抽出部(301)と、前記出力テストケース候補(3010)のそれぞれに対する再利用度を算出する再利用性評価部(302)と、を有し、前記テストケース出力部(4)は、前記再利用性評価部(302)が算出した前記再利用度に基づいて前記出力テストケース候補(3010)の中から参照テストケース(12)を決定することを特徴とするテスト支援装置。 (1) A test support device having a processor (21) and a memory (22), accepting a new test requirement (12), and outputting a reusable reference test case (12), in natural language. A test that receives the described new test requirement (12), a test requirement acquisition unit (1), and a test that performs natural language analysis on the accepted new test requirement (12) to generate test requirement quantified data (200). The requirement analysis unit (2) and the existing test case (30111) generated in the past are analyzed based on the test requirement quantified data (200), and candidates for the reusable existing test case (30111) are selected. A test case analysis unit (3) generated as an output test case candidate (3010), and a test case output unit (4) that outputs a part or all of the output test case candidate (3010) as a reference test case (12). , And the test case analysis unit (3) generates one or more existing test cases (30111) as output test case candidates (3010) based on the test requirement quantified data (200). It has a candidate extraction unit (301) and a reusability evaluation unit (302) that calculates the degree of reuse for each of the output test case candidates (3010), and the test case output unit (4) is said. A test support device comprising determining a reference test case (12) from the output test case candidates (3010) based on the reusability calculated by the reusability evaluation unit (302).
 上記構成により、テスト支援装置0は、新規テスト要件11に対して、過去に生成した既存テストケース30111の中から最も再利用度の高い既存テストケース30111を用いて、新規テスト要件11に適用するテストケースを効率よく生成することが可能となる。 With the above configuration, the test support device 0 applies the new test requirement 11 to the new test requirement 11 by using the existing test case 30111 having the highest reusability among the existing test cases 30111 generated in the past. It is possible to efficiently generate test cases.
 (2)上記(1)に記載のテスト支援装置であって、前記テストケース候補抽出部(301)は、前記既存テストケース(30111)と前記出力テストケース候補(3010)に含まれて、かつ、当該既存テストケース(30111)と異なる既存テストケース(30111)の間の類似度を解析して、前記類似度のうち所定の閾値以上の値となっているテストケースの個数に基づいて、前記出力テストケース候補(3010)のそれぞれに対する再利用度を算出することを特徴とするテスト支援装置。 (2) In the test support device according to (1) above, the test case candidate extraction unit (301) is included in the existing test case (30111) and the output test case candidate (3010), and , The similarity between the existing test case (30111) and the existing test case (30111) different from the existing test case (30111) is analyzed, and based on the number of test cases having a value equal to or higher than a predetermined threshold among the similarities, the above-mentioned A test support device characterized by calculating the degree of reuse for each of the output test case candidates (3010).
 上記構成により、テスト支援装置0は、既存テストケース30111の間の類似度と所定の閾値を比較して出力テストケース候補の再利用度を算出することができる。 With the above configuration, the test support device 0 can calculate the reuse degree of the output test case candidate by comparing the similarity between the existing test cases 30111 with a predetermined threshold value.
 (3)上記(1)に記載のテスト支援装置であって、前記テストケース候補抽出部(301)は、既存テストケース保存部(3011)と、既存テストケース保存部(3012)と、クラスタリング実施部(3014)と、テストケース候補決定部(3016)と、を有し、前記既存テストケース保存部(3011)は、前記過去に開発したテスト要件を既存テスト要件(30112)とし、前記既存テスト要件(30112)を満たしていることを検証するために開発したテストケースを既存テストケース(30111)として、前記既存テスト要件(30112)と前記既存テストケース(30111)を紐づけて保存し、前記既存テストケース保存部(3012)は、前記既存テストケース保存部(3011)に保存された既存テストケース(30111)の中から2つの既存テストケース(30111)を抽出して前記2つの既存テストケース(30111)において記述された形式言語の間のコードクローンを解析して前記形式言語の要素数に対する前記コードクローンの要素数の占める割合を算出し、前記2つの既存テストケース(30111)の抽出及び前記抽出による前記算出を前記既存テストケース保存部(3011)に保存された既存テストケース(30111)のすべての組み合わせに対して行うことによりコードクローンデータ(3013)を生成し、前記クラスタリング実施部(3014)は、前記コードクローンデータ(3013)に保存された前記形式言語の要素数に対する前記コードクローンの要素数の占める割合を前記既存テストケース(30111)間の疑似的な距離とみなすことによりクラスタリングを実施して前記既存テストケース保存部(3011)に保存された既存テストケース(30111)をクラスタに分類して各既存テストケース(30111)がどのクラスタに分類されたかの情報をクラスタデータ(3015)として生成し、前記テストケース候補決定部(3016)は、前記テスト要件数値化データ(200)に基づいて前記クラスタの中からクラスタを1つ決定して前記決定したクラスタに含まれる少なくとも1つの既存テストケース(30111)を出力テストケース候補(3010)として決定することを特徴とするテスト支援装置。 (3) In the test support device according to (1) above, the test case candidate extraction unit (301) includes an existing test case storage unit (3011), an existing test case storage unit (3012), and clustering. It has a unit (3014) and a test case candidate determination unit (3016), and the existing test case storage unit (3011) sets the test requirements developed in the past as the existing test requirements (30112) and the existing test. The test case developed for verifying that the requirement (30112) is satisfied is set as an existing test case (30111), and the existing test requirement (30112) and the existing test case (30111) are linked and saved, and the above-mentioned The existing test case storage unit (3012) extracts two existing test cases (30111) from the existing test cases (30111) stored in the existing test case storage unit (3011), and the two existing test cases. The code clones between the formal languages described in (30111) are analyzed to calculate the ratio of the number of elements of the code clone to the number of elements of the formal language, and the two existing test cases (30111) are extracted and Code clone data (3013) is generated by performing the calculation by the extraction for all combinations of the existing test cases (30111) stored in the existing test case storage unit (3011), and the clustering execution unit (3011). 3014) clusters by regarding the ratio of the number of elements of the code clone to the number of elements of the formal language stored in the code clone data (3013) as a pseudo distance between the existing test cases (30111). The existing test cases (30111) stored in the existing test case storage unit (3011) are classified into clusters, and information on which cluster each existing test case (30111) is classified into is provided in the cluster data (3015). The test case candidate determination unit (3016) determines one cluster from the clusters based on the test requirement quantified data (200), and the test case candidate determination unit (3016) determines at least one existing cluster included in the determined cluster. A test support device characterized in that a test case (30111) is determined as an output test case candidate (3010).
 上記構成により、コードクローン解析部3012は、既存テストケース保存部3011に保存された既存テストケース30111同士の類似度を評価して、2つの既存テストケース30111に対してトークン構成が同じである箇所をコードクローンとして検出することができる。また、クラスタリング実施部3014は、コードクローンデータ3013に基づいて、類似した既存テストケース30111同士をクラスタに分類し、テストケース候補決定部3016は、テスト要件解析部2が受け取ったテスト要件に対して参照すべき既存テストケース30111の候補を決定することができる。 With the above configuration, the code clone analysis unit 3012 evaluates the similarity between the existing test cases 30111 stored in the existing test case storage unit 3011, and the token configuration is the same for the two existing test cases 30111. Can be detected as a code clone. Further, the clustering implementation unit 3014 classifies similar existing test cases 30111 into clusters based on the code clone data 3013, and the test case candidate determination unit 3016 determines the test requirements received by the test requirement analysis unit 2. Candidates for existing test cases 30111 to be referenced can be determined.
 (4)上記(2)に記載のテスト支援装置であって、前記既存テストケース(30111)と前記出力テストケース候補(3010)に含まれて、かつ既存テストケース(30111)と異なる既存テストケース(30111)の間の類似度は、当該既存テストケース(30111)を記述した形式言語と前記出力テストケース候補(3010)に含まれて、かつ当該既存テストケース(30111)とは異なる既存テストケース(30111)を記述した形式言語の間のコードクローンを解析して前記形式言語の要素数に対する前記コードクローンの要素数が占める割合であることを特徴とするテスト支援装置。 (4) The test support device according to (2) above, which is included in the existing test case (30111) and the output test case candidate (3010), and is different from the existing test case (30111). The similarity between (30111) is included in the format language describing the existing test case (30111) and the output test case candidate (3010), and is different from the existing test case (30111). A test support device for analyzing a code clone between the formal languages in which (30111) is described and characterized in that the number of elements of the code clone occupies the number of elements of the formal language.
 上記構成により、類似度は、既存テストケースと出力テストケース候補に含まれて、かつ当該既存テストケースとは異なる既存テストケースを記述した形式言語の間のコードクローンを解析して、前記形式言語の要素数に対するコードクローンの要素数が占める割合から算出することが可能となる。 With the above configuration, the similarity is analyzed by analyzing the code clone between the formal languages that are included in the existing test cases and the output test case candidates and that describe the existing test cases that are different from the existing test cases. It is possible to calculate from the ratio of the number of elements of the code clone to the number of elements of.
 (5)上記(3)に記載のテスト支援装置であって、前記テストケース候補決定部(3016)は、分類器生成部(30161)と、分類実施部(30162)と、を有し、前記分類器生成部(30161)は、前記既存テストケース(30111)に紐づいた既存テスト要件(30112)を前記自然言語解析を用いて数値化した既存テスト要件(30112)数値化データ(200)を学習データとして前記既存テスト要件(30112)に紐づいた既存テストケース(30111)がどのクラスタに分類されたかを前記クラスタデータ(3015)に基づき特定し、当該分類されたクラスタを識別する識別子を正解ラベルとして所定の分類器生成手法を用いて分類を学習することによりテスト要件数値化データ(200)がどのクラスタに分類されるかを決定する分類器を生成し、前記分類実施部(30162)は、前記分類器に前記テスト要件数値化データ(200)を入力することにより、前記テスト要件数値化データ(200)がどのクラスタに分類されるかを決定することを特徴とするテスト支援装置。 (5) The test support device according to (3) above, wherein the test case candidate determination unit (3016) has a classifier generation unit (30161) and a classification implementation unit (30162). The classifier generation unit (30161) digitizes the existing test requirement (30112) linked to the existing test case (30111) by using the natural language analysis, and obtains the existing test requirement (30112) quantified data (200). The cluster to which the existing test case (30111) linked to the existing test requirement (30112) is classified as training data is specified based on the cluster data (3015), and the identifier that identifies the classified cluster is the correct answer. By learning the classification using a predetermined classifier generation method as a label, a classifier for determining which cluster the test requirement quantified data (200) is classified into is generated, and the classification implementation unit (30162) generates a classifier. , A test support device for determining to which cluster the test requirement quantified data (200) is classified by inputting the test requirement quantified data (200) into the classifier.
 上記構成により、分類実施部30162は分類器生成部30161で生成した分類器を用いて、新規テスト要件11の自然言語解析の結果としてのテスト要件数値化データ200に対応するクラスタを特定し、当該クラスタに含まれる既存テストケース30111をテストケース候補として特定することが可能となる。 With the above configuration, the classification implementation unit 30162 uses the classifier generated by the classifier generation unit 30161 to identify the cluster corresponding to the test requirement quantified data 200 as a result of the natural language analysis of the new test requirement 11. The existing test case 30111 included in the cluster can be specified as a test case candidate.
 (6)上記(1)に記載のテスト支援装置であって、前記参照テストケース(12)は、計算機が解釈可能な形式言語で記述されることを特徴とするテスト支援装置。 (6) The test support device according to (1) above, wherein the reference test case (12) is described in a formal language that can be interpreted by a computer.
 上記構成により、決定された参照テストケース12を計算機に読み込ませれば、自動的にテストケースを実行することが可能となり、テストケースの作業に要する労力を低減することができる。 With the above configuration, if the determined reference test case 12 is read into the computer, the test case can be automatically executed, and the labor required for the test case work can be reduced.
 なお、本発明は上記した実施例に限定されるものではなく、様々な変形例が含まれる。例えば、上記した実施例は本発明を分かりやすく説明するために詳細に記載したものであり、必ずしも説明したすべての構成を備えるものに限定されるものではない。また、ある実施例の構成の一部を他の実施例の構成に置き換えることが可能であり、また、ある実施例の構成に他の実施例の構成を加えることも可能である。また、各実施例の構成の一部について、他の構成の追加、削除、又は置換のいずれもが、単独で、又は組み合わせても適用可能である。 The present invention is not limited to the above-described embodiment, but includes various modifications. For example, the above-described embodiment is described in detail for the purpose of explaining the present invention in an easy-to-understand manner, and is not necessarily limited to the one including all the configurations described. Further, it is possible to replace a part of the configuration of one embodiment with the configuration of another embodiment, and it is also possible to add the configuration of another embodiment to the configuration of one embodiment. Further, for a part of the configuration of each embodiment, any of addition, deletion, or replacement of other configurations can be applied alone or in combination.
 また、上記の各構成、機能、処理部、及び処理手段等は、それらの一部又は全部を、例えば集積回路で設計する等によりハードウェアで実現してもよい。また、上記の各構成、及び機能等は、プロセッサがそれぞれの機能を実現するプログラムを解釈し、実行することによりソフトウェアで実現してもよい。各機能を実現するプログラム、テーブル、ファイル等の情報は、メモリや、ハードディスク、SSD(Solid State Drive)等の記録装置、又は、ICカード、SDカード、DVD等の記録媒体に置くことができる。 Further, each of the above configurations, functions, processing units, processing means and the like may be realized by hardware by designing a part or all of them by, for example, an integrated circuit. Further, each of the above configurations and functions may be realized by software by the processor interpreting and executing a program that realizes each function. Information such as programs, tables, and files that realize each function can be placed in a memory, a hard disk, a recording device such as an SSD (Solid State Drive), or a recording medium such as an IC card, an SD card, or a DVD.
 また、制御線や情報線は説明上必要と考えられるものを示しており、製品上必ずしもすべての制御線や情報線を示しているとは限らない。実際には殆どすべての構成が相互に接続されていると考えてもよい。 In addition, the control lines and information lines indicate what is considered necessary for explanation, and not all control lines and information lines are shown in the product. In practice, it can be considered that almost all configurations are interconnected.

Claims (12)

  1.  プロセッサとメモリを有して、新規テスト要件を受け付けて、再利用可能な参照テストケースを出力するテスト支援装置であって、
     自然言語で記述された前記新規テスト要件を受け付けるテスト要件取得部と、
     前記受け付けた新規テスト要件について自然言語解析を実施してテスト要件数値化データを生成するテスト要件解析部と、
     過去に生成された既存テストケースを前記テスト要件数値化データに基づいて解析して、再利用可能な前記既存テストケースの候補を出力テストケース候補として生成するテストケース解析部と、
     前記出力テストケース候補の一部又は全部を参照テストケースとして出力するテストケース出力部と、を有し、
     前記テストケース解析部は、
     前記テスト要件数値化データに基づいて1つ以上の既存テストケースを出力テストケース候補として生成するテストケース候補抽出部と、
     前記出力テストケース候補のそれぞれに対する再利用度を算出する再利用性評価部と、を有し、
     前記テストケース出力部は、
     前記再利用性評価部が算出した前記再利用度に基づいて前記出力テストケース候補の中から参照テストケースを決定することを特徴とするテスト支援装置。
    A test support device that has a processor and memory, accepts new test requirements, and outputs reusable reference test cases.
    The test requirement acquisition department that accepts the new test requirements written in natural language,
    The test requirement analysis unit that performs natural language analysis on the accepted new test requirements and generates test requirement quantified data,
    A test case analysis unit that analyzes existing test cases generated in the past based on the test requirement quantified data and generates reusable existing test case candidates as output test case candidates.
    It has a test case output unit that outputs a part or all of the output test case candidates as a reference test case.
    The test case analysis unit
    A test case candidate extraction unit that generates one or more existing test cases as output test case candidates based on the test requirement quantified data, and a test case candidate extraction unit.
    It has a reusability evaluation unit that calculates the degree of reuse for each of the output test case candidates.
    The test case output unit
    A test support device characterized in that a reference test case is determined from the output test case candidates based on the reusability calculated by the reusability evaluation unit.
  2.  請求項1に記載のテスト支援装置であって、
     前記テストケース候補抽出部は、
     前記既存テストケースと前記出力テストケース候補に含まれて、かつ、当該既存テストケースと異なる既存テストケースの間の類似度を解析して、前記類似度のうち所定の閾値以上の値となっている既存テストケースの個数に基づいて、前記出力テストケース候補のそれぞれに対する再利用度を算出することを特徴とするテスト支援装置。
    The test support device according to claim 1.
    The test case candidate extraction unit
    The similarity between the existing test case and the existing test case included in the output test case candidate and different from the existing test case is analyzed, and the value of the similarity becomes a value equal to or higher than a predetermined threshold. A test support device characterized in that the degree of reuse for each of the output test case candidates is calculated based on the number of existing test cases.
  3.  請求項1に記載のテスト支援装置であって、
     前記テストケース候補抽出部は、
     既存テストケース保存部と、コードクローン解析部と、クラスタリング実施部と、テストケース候補決定部と、を有し、
     前記既存テストケース保存部は、
     前記過去に開発したテスト要件を既存テスト要件とし、前記既存テスト要件を満たしていることを検証するために開発したテストケースを既存テストケースとして、前記既存テスト要件と前記既存テストケースを紐づけて保存し、
     前記コードクローン解析部は、
     前記既存テストケース保存部に保存された既存テストケースの中から2つの既存テストケースを抽出して前記2つの既存テストケースにおいて記述された形式言語の間のコードクローンを解析して前記形式言語の要素数に対する前記コードクローンの要素数の占める割合を算出し、前記2つの既存テストケースの抽出及び前記抽出による前記算出を前記既存テストケース保存部に保存された既存テストケースのすべての組み合わせに対して行うことによりコードクローンデータを生成し、
     前記クラスタリング実施部は、
     前記コードクローンデータに保存された前記形式言語の要素数に対する前記コードクローンの要素数の占める割合を前記既存テストケース間の疑似的な距離とみなすことによりクラスタリングを実施して前記既存テストケース保存部に保存された既存テストケースをクラスタに分類して各既存テストケースがどのクラスタに分類されたかの情報をクラスタデータとして生成し、
     前記テストケース候補決定部は、
     前記テスト要件数値化データに基づいて前記クラスタの中からクラスタを1つ決定して前記決定したクラスタに含まれる少なくとも1つの既存テストケースを出力テストケース候補として決定することを特徴とするテスト支援装置。
    The test support device according to claim 1.
    The test case candidate extraction unit
    It has an existing test case storage unit, a code clone analysis unit, a clustering implementation unit, and a test case candidate determination unit.
    The existing test case storage unit
    The test requirements developed in the past are set as existing test requirements, and the test cases developed to verify that the existing test requirements are satisfied are set as existing test cases, and the existing test requirements and the existing test cases are linked. Save and
    The code clone analysis unit
    Two existing test cases are extracted from the existing test cases stored in the existing test case storage unit, and a code clone between the formal languages described in the two existing test cases is analyzed to analyze the formal language. The ratio of the number of elements of the code clone to the number of elements is calculated, and the extraction of the two existing test cases and the calculation by the extraction are performed for all combinations of the existing test cases stored in the existing test case storage unit. Generate code clone data by doing
    The clustering implementation unit
    Clustering is performed by regarding the ratio of the number of elements of the code clone to the number of elements of the formal language stored in the code clone data as a pseudo distance between the existing test cases, and the existing test case storage unit is used. The existing test cases stored in are classified into clusters, and information on which cluster each existing test case is classified into is generated as cluster data.
    The test case candidate determination unit
    A test support device characterized in that one cluster is determined from the clusters based on the test requirement quantified data, and at least one existing test case included in the determined cluster is determined as an output test case candidate. ..
  4.  請求項2に記載のテスト支援装置であって、
     前記既存テストケースと前記出力テストケース候補に含まれて、かつ既存テストケースと異なる既存テストケースの間の類似度は、
     当該既存テストケースを記述した形式言語と前記出力テストケース候補に含まれて、かつ当該既存テストケースとは異なる既存テストケースを記述した形式言語の間のコードクローンを解析して前記形式言語の要素数に対する前記コードクローンの要素数が占める割合であることを特徴とするテスト支援装置。
    The test support device according to claim 2.
    The degree of similarity between the existing test case and the existing test case included in the output test case candidate and different from the existing test case is
    An element of the formal language is analyzed by analyzing a code clone between the formal language that describes the existing test case and the formal language that is included in the output test case candidate and describes an existing test case different from the existing test case. A test support device characterized in that the number of elements of the code clone occupies the number.
  5.  請求項3に記載のテスト支援装置であって、
     前記テストケース候補決定部は、
     分類器生成部と、分類実施部と、を有し、
     前記分類器生成部は、
     前記既存テストケースに紐づいた既存テスト要件を前記自然言語解析を用いて数値化した既存テスト要件数値化データを学習データとして前記既存テスト要件に紐づいた既存テストケースがどのクラスタに分類されたかを前記クラスタデータに基づき特定し、当該分類されたクラスタを識別する識別子を正解ラベルとして所定の分類器生成手法を用いて分類を学習することによりテスト要件数値化データがどのクラスタに分類されるかを決定する分類器を生成し、
     前記分類実施部は、
     前記分類器に前記テスト要件数値化データを入力することにより、前記テスト要件数値化データがどのクラスタに分類されるかを決定することを特徴とするテスト支援装置。
    The test support device according to claim 3.
    The test case candidate determination unit
    It has a classifier generation unit and a classification implementation unit.
    The classifier generator
    Existing test requirements in which the existing test requirements linked to the existing test cases are quantified using the natural language analysis Which cluster the existing test cases linked to the existing test requirements are classified into as training data using the quantified data. Is specified based on the cluster data, and the test requirement quantified data is classified into which cluster by learning the classification using a predetermined classifier generation method with the identifier that identifies the classified cluster as the correct answer label. Generate a classifier to determine
    The classification implementation unit
    A test support device for determining to which cluster the test requirement quantified data is classified by inputting the test requirement quantified data into the classifier.
  6.  請求項1に記載のテスト支援装置であって、
     前記参照テストケースは、計算機が解釈可能な形式言語で記述されることを特徴とするテスト支援装置。
    The test support device according to claim 1.
    The reference test case is a test support device characterized in that it is described in a formal language that can be interpreted by a computer.
  7.  プロセッサとメモリを有する計算機が、新規テスト要件を受け付けて、再利用可能な参照テストケースを出力するテスト支援方法であって、
     前記計算機が、自然言語で記述された前記新規テスト要件を受け付けるテスト要件取得ステップと、
     前記計算機が、前記受け付けた新規テスト要件について自然言語解析を実施してテスト要件数値化データを生成するテスト要件解析ステップと、
     前記計算機が、過去に生成された既存テストケースを前記テスト要件数値化データに基づいて解析して、再利用可能な前記既存テストケースの候補を出力テストケース候補として生成するテストケース解析ステップと、
     前記計算機が、前記出力テストケース候補の一部又は全部を参照テストケースとして出力するテストケース出力ステップと、を含みし、
     前記テストケース解析ステップは、
     前記テスト要件数値化データに基づいて1つ以上の既存テストケースを出力テストケース候補として生成するテストケース候補抽出ステップと、
     前記出力テストケース候補のそれぞれに対する再利用度を算出する再利用性評価ステップと、を含みし、
     前記テストケース出力ステップは、
     前記再利用性評価ステップで算出された前記再利用度に基づいて前記出力テストケース候補の中から参照テストケースを決定することを特徴とするテスト支援方法。
    A test support method in which a computer with a processor and memory accepts new test requirements and outputs reusable reference test cases.
    A test requirement acquisition step in which the computer accepts the new test requirement written in natural language.
    A test requirement analysis step in which the computer performs natural language analysis on the accepted new test requirement and generates test requirement quantified data.
    A test case analysis step in which the computer analyzes existing test cases generated in the past based on the test requirement quantified data and generates reusable existing test case candidates as output test case candidates.
    Includes a test case output step in which the computer outputs some or all of the output test case candidates as reference test cases.
    The test case analysis step is
    A test case candidate extraction step that generates one or more existing test cases as output test case candidates based on the test requirement quantified data, and
    Includes a reusability evaluation step to calculate the reusability for each of the output test case candidates.
    The test case output step is
    A test support method comprising determining a reference test case from the output test case candidates based on the reusability calculated in the reusability evaluation step.
  8.  請求項7に記載のテスト支援方法であって、
     前記テストケース候補抽出ステップは、
     前記既存テストケースと前記出力テストケース候補に含まれて、かつ、当該既存テストケースと異なる既存テストケースの間の類似度を解析して、前記類似度のうち所定の閾値以上の値となっている既存テストケースの個数に基づいて、前記出力テストケース候補のそれぞれに対する再利用度を算出することを特徴とするテスト支援方法。
    The test support method according to claim 7.
    The test case candidate extraction step is
    The similarity between the existing test case and the existing test case included in the output test case candidate and different from the existing test case is analyzed, and the value of the similarity becomes a value equal to or higher than a predetermined threshold. A test support method characterized in that the degree of reuse for each of the output test case candidates is calculated based on the number of existing test cases.
  9.  請求項7に記載のテスト支援方法であって、
     前記テストケース候補抽出ステップは、
     既存テストケース保存ステップと、コードクローン解析ステップと、クラスタリング実施ステップと、テストケース候補決定ステップと、を含み、
     前記既存テストケース保存ステップは、
     前記過去に開発したテスト要件を既存テスト要件とし、前記既存テスト要件を満たしていることを検証するために開発したテストケースを既存テストケースとして、前記既存テスト要件と前記既存テストケースを紐づけて保存し、
     前記コードクローン解析ステップは、
     前記保存された既存テストケースの中から2つの既存テストケースを抽出して前記2つの既存テストケースにおいて記述された形式言語の間のコードクローンを解析して前記形式言語の要素数に対する前記コードクローンの要素数の占める割合を算出し、前記2つの既存テストケースの抽出及び前記抽出による前記算出を前記保存された既存テストケースのすべての組み合わせに対して行うことによりコードクローンデータを生成し、
     前記クラスタリング実施ステップは、
     前記コードクローンデータに保存された前記形式言語の要素数に対する前記コードクローンの要素数の占める割合を前記既存テストケース間の疑似的な距離とみなすことによりクラスタリングを実施して前記保存された既存テストケースをクラスタに分類して各既存テストケースがどのクラスタに分類されたかの情報をクラスタデータとして生成し、
     前記テストケース候補決定ステップは、
     前記テスト要件数値化データに基づいて前記クラスタの中からクラスタを1つ決定して前記決定したクラスタに含まれる少なくとも1つの既存テストケースを出力テストケース候補として決定することを特徴とするテスト支援方法。
    The test support method according to claim 7.
    The test case candidate extraction step is
    Includes an existing test case storage step, a code clone analysis step, a clustering implementation step, and a test case candidate determination step.
    The existing test case saving step is
    The test requirements developed in the past are set as existing test requirements, and the test cases developed to verify that the existing test requirements are satisfied are set as existing test cases, and the existing test requirements and the existing test cases are linked. Save and
    The code clone analysis step is
    Two existing test cases are extracted from the saved existing test cases, a code clone between the formal languages described in the two existing test cases is analyzed, and the code clone for the number of elements of the formal language is obtained. Code clone data is generated by calculating the proportion of the number of elements in the above and performing the extraction of the two existing test cases and the calculation by the extraction for all combinations of the saved existing test cases.
    The clustering implementation step is
    Clustering is performed by regarding the ratio of the number of elements of the code clone to the number of elements of the formal language stored in the code clone data as a pseudo distance between the existing test cases, and the stored existing test is performed. The cases are classified into clusters, and information on which cluster each existing test case is classified into is generated as cluster data.
    The test case candidate determination step is
    A test support method characterized in that one cluster is determined from the clusters based on the test requirement quantified data, and at least one existing test case included in the determined cluster is determined as an output test case candidate. ..
  10.  請求項8に記載のテスト支援方法であって、
     前記既存テストケースと前記出力テストケース候補に含まれて、かつ既存テストケースと異なる既存テストケースの間の類似度は、
     当該既存テストケースを記述した形式言語と前記出力テストケース候補に含まれて、かつ当該既存テストケースとは異なる既存テストケースを記述した形式言語の間のコードクローンを解析して前記形式言語の要素数に対する前記コードクローンの要素数が占める割合であることを特徴とするテスト支援方法。
    The test support method according to claim 8.
    The degree of similarity between the existing test case and the existing test case included in the output test case candidate and different from the existing test case is
    An element of the formal language is analyzed by analyzing a code clone between the formal language that describes the existing test case and the formal language that is included in the output test case candidate and describes an existing test case different from the existing test case. A test support method characterized in that the number of elements of the code clone occupies the number.
  11.  請求項9に記載のテスト支援方法であって、
     前記テストケース候補決定ステップは、
     分類器生成ステップと、分類実施ステップと、を有し、
     前記分類器生成ステップは、
     前記既存テストケースに紐づいた既存テスト要件を前記自然言語解析を用いて数値化した既存テスト要件数値化データを学習データとして前記既存テスト要件に紐づいた既存テストケースがどのクラスタに分類されたかを前記クラスタデータに基づき特定し、当該分類されたクラスタを識別する識別子を正解ラベルとして所定の分類器生成手法を用いて分類を学習することによりテスト要件数値化データがどのクラスタに分類されるかを決定する分類器を生成し、
     前記分類実施ステップは、
     前記分類器に前記テスト要件数値化データを入力することにより、前記テスト要件数値化データがどのクラスタに分類されるかを決定することを特徴とするテスト支援方法。
    The test support method according to claim 9.
    The test case candidate determination step is
    It has a classifier generation step and a classification implementation step.
    The classifier generation step is
    Existing test requirements in which the existing test requirements linked to the existing test cases are quantified using the natural language analysis Which cluster the existing test cases linked to the existing test requirements are classified into as training data using the quantified data. Is specified based on the cluster data, and the test requirement quantified data is classified into which cluster by learning the classification using a predetermined classifier generation method with the identifier that identifies the classified cluster as the correct answer label. Generate a classifier to determine
    The classification implementation step is
    A test support method comprising inputting the test requirement quantified data into the classifier to determine to which cluster the test requirement quantified data is classified.
  12.  請求項7に記載のテスト支援方法であって、
     前記参照テストケースは、計算機が解釈可能な形式言語で記述されることを特徴とするテスト支援方法。
    The test support method according to claim 7.
    The reference test case is a test support method characterized in that it is described in a formal language that can be interpreted by a computer.
PCT/JP2021/015753 2020-07-07 2021-04-16 Test assistance device and test assistance method WO2022009499A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2020-116748 2020-07-07
JP2020116748A JP2022014468A (en) 2020-07-07 2020-07-07 Test support device and test support method

Publications (1)

Publication Number Publication Date
WO2022009499A1 true WO2022009499A1 (en) 2022-01-13

Family

ID=79552883

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2021/015753 WO2022009499A1 (en) 2020-07-07 2021-04-16 Test assistance device and test assistance method

Country Status (2)

Country Link
JP (1) JP2022014468A (en)
WO (1) WO2022009499A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011521368A (en) * 2008-05-19 2011-07-21 ジョンソン コントロールズ テクノロジー カンパニー Method for automatically creating test cases to verify at least part of a piece of software
JP2017138851A (en) * 2016-02-04 2017-08-10 株式会社ベリサーブ Test design assist system, test design assist method, and test design assist program
JP2020098413A (en) * 2018-12-17 2020-06-25 株式会社リアルグローブ Test support device, test support method and computer program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011521368A (en) * 2008-05-19 2011-07-21 ジョンソン コントロールズ テクノロジー カンパニー Method for automatically creating test cases to verify at least part of a piece of software
JP2017138851A (en) * 2016-02-04 2017-08-10 株式会社ベリサーブ Test design assist system, test design assist method, and test design assist program
JP2020098413A (en) * 2018-12-17 2020-06-25 株式会社リアルグローブ Test support device, test support method and computer program

Also Published As

Publication number Publication date
JP2022014468A (en) 2022-01-20

Similar Documents

Publication Publication Date Title
US11790256B2 (en) Analyzing test result failures using artificial intelligence models
Deissenboeck et al. Clone detection in automotive model-based development
US8589884B2 (en) Method and system for identifying regression test cases for a software
US9477799B2 (en) Hierarchical determination of metrics for component-based parameterized SoCs
JP2018181318A (en) Systems and methods for classification of software defect reports
Clarisó et al. Applying graph kernels to model-driven engineering problems
Rehse et al. Clustering business process activities for identifying reference model components
JP7059220B2 (en) Machine learning program verification device and machine learning program verification method
JP5846006B2 (en) Program, code generation method, and information processing apparatus
JP2021071823A (en) Forecasting model explanation method and forecasting model explanation program and forecasting model explanation device
JP6658507B2 (en) Load estimation system, information processing device, load estimation method, and computer program
CN111373406A (en) Accelerated simulation setup procedure using a priori knowledge extraction for problem matching
Schlie et al. Clustering variation points in matlab/simulink models using reverse signal propagation analysis
US11645539B2 (en) Machine learning-based techniques for representing computing processes as vectors
US20140325490A1 (en) Classifying Source Code Using an Expertise Model
US20230385037A1 (en) Method and system for automated discovery of artificial intelligence (ai)/ machine learning (ml) assets in an enterprise
WO2022009499A1 (en) Test assistance device and test assistance method
CN111949514A (en) Model prediction method, device and storage medium
CN115098389B (en) REST interface test case generation method based on dependency model
AU2021251463B2 (en) Generating performance predictions with uncertainty intervals
Chinna Gounder Dhanajayan et al. SLMBC: spiral life cycle model-based Bayesian classification technique for efficient software fault prediction and classification
US7454680B2 (en) Method, system and computer program product for improving efficiency in generating high-level coverage data for a circuit-testing scheme
JP2006190085A (en) Modeling method and design method for digital circuit
US20090234787A1 (en) Integrated problem solving system
Mishra et al. Data mining techniques for software quality prediction

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: 21838474

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21838474

Country of ref document: EP

Kind code of ref document: A1