Font Size: a A A

Research On The Method Of Use Case Selection In The Commutativity Test Of Reduce Function

Posted on:2022-10-22Degree:MasterType:Thesis
Country:ChinaCandidate:X Y MuFull Text:PDF
GTID:2518306329961089Subject:Computer software and theory
Abstract/Summary:PDF Full Text Request
With the development of random Internet technology,all kinds of information and data on the Internet are rapidly increasing at an explosive rate every day.The analysis and processing of massive data poses a challenge to traditional data processing methods.In order to solve this problem,big data processing technology based on the Map Reduce framework is also widely used in society.The map function and the reduce function are the two most important functions in the Map Reduce framework.The function of the map function is to map each piece of data to a key,and the reduce function plays a role in the aggregation operation of the data with the same key.According to the survey,more than half of the reduce functions have the commutativity problem,that is,the reduce function may produce different output results for different input sequences.This leads to the possibility of producing different results every time a program of the Map Reduce framework is run under the same environment.The test of the noncommutativity of the Reduce function is different from the ordinary program test.It requires at least two test cases with different sequences as the test case set to detect the problem.If the reduce function has different outputs to the test case set,it means that the reduce function is non-commutative.Now the research on the commutativity problem of reduce functions focuses on how to reduce the number of elements in the initial test case,and less attention is paid to how to select fewer subsequent test cases for testing in the case of existing initial test cases.However,the subsequent test case set generated by a poor subsequent test case selection strategy consumes a lot of space resources when the reduce function is tested.An initial test case with n inputs will reach n! in the extreme case.Through in-depth research on the classification of reduce functions with noncommutability,this paper proposes a method to detect the commutability of reduce functions and the selection of test case sets.Since the reduce function is not commutative,most of the reasons are that the reduce function only selects one or more values at a specific position in the input sequence for operation or uses a binary operator with non-commutability to connect all the values of the input sequence.As the output result of the function.Therefore,this paper analyzes the abstract syntax tree of the reduce function to be tested to determine the name of the variable that affects the output of the function in the program.All the values in the initial test case are labeled by instrumentation technology,and these labels can reflect the impact of each value in the test case on the result of the reduce function.Then classify the reduce function according to the label information.Finally,according to the characteristics of each type of reduce function and the label information of the initial test cases,the corresponding test cases are selected to generate a test case set.In this way,you can select appropriate test cases for testing by analyzing the reasons for the non-commutability of the reduce function,which can effectively improve testing efficiency.In order to verify the effectiveness and efficiency of the method,this paper selects100 non-commutative and 80 commutative reduce functions as test functions.The experimental results show that the test case set generated by the test case selection method for the exchangeability problem of reduce functions proposed in this paper is highly effective in the exchangeability test of reduce functions.Moreover,compared with the existing replacement method for generating subsequent test cases,fewer test cases can be used to detect the non-commutability of the reduce function,which has higher efficiency.
Keywords/Search Tags:Commutability issues, software testing, test case set generation
PDF Full Text Request
Related items