Font Size: a A A

The Design And Implementation Of Test Recommendation System Based On Slicing Coverage Filtering

Posted on:2021-04-18Degree:MasterType:Thesis
Country:ChinaCandidate:D MenFull Text:PDF
GTID:2428330647450855Subject:Engineering
Abstract/Summary:PDF Full Text Request
Software testing is a vital part of the software life cycle,and white box testing is an important part of it.How to help inexperienced people learn white box testing is a problem worthy of attention.The traditional white box test learning process usually requires the use of some test auxiliary tools,such as coverage visualization tools and test case automation generation tools.Too many results generated by test automation tools and readability is poor,difficult to learn.The results of the coverage visualization tool are too simple to guide beginners to further improve the test and improve the quality of the test.In order to solve similar problems,a quick and efficient way is to recommend test code fragments related to the code under test when the user conducts test learning,to help the user understand the code under test,guide the user to dig the test direction,and guide the user to design test cases.This article relies on Mooctest WebIDE to design and implement a Test Code Snippets Recommendation System based on Slicing Coverage Filtering.This system uses Wala as a program slicing tool;AST program analysis technology is used to merge the code snippets with the project template;And Use the OpenClover tool to analyze the test coverage of the code snippets and store it in the corpus.During the user's test learning,the system will analyze the user's test coverage information in real time,and use the test coverage vector to calculate the Jaccard vector similarity filter to obtain the relevant code snippets in the recommended corpus.It also dynamically recommends high-quality code snippets that are easy for users to understand and helps them improve test coverage,thereby helping them understand source code faster and master white-box testing.The system is divided into an offline data processing module and a dynamic code recommendation module.The offline data processing module is used to build a test code fragment corpus,and the dynamic code recommendation module is used to track the user's real-time learning process.This system uses Nginx for load balancing to improve throughput;WebSocket technology is used to actively push messages to achieve asynchronous communication;In order to reduce user waiting time,Elastic-Search is used to improve query performance;And In order to ensure scalability,the system supports incremental expansion of test code snippets corpus.The system has now experienced normal and stable operation in the test environment of the Mooctest for a month.At the same time,the system has constructed a recommended corpus containing 11 original questions and more than 2,200 test code snippets.This paper proves that the system can help the test learning process of inex-perienced beginners and improve user learning efficiency through the verification of usability testing and performance testing and real case analysis.
Keywords/Search Tags:Software Testing, Program Slicing, Test Coverage, Code Recommendation
PDF Full Text Request
Related items