Font Size: a A A

Design And Implementation Of Automated Test Framework For Traffic Replay Based On Microservice

Posted on:2023-07-19Degree:MasterType:Thesis
Country:ChinaCandidate:M T GuoFull Text:PDF
GTID:2568307022497554Subject:Software engineering
Abstract/Summary:PDF Full Text Request
With the continuous enrichment of software system functions,the original stand-alone system software has been unable to meet service requirements well.The stand-alone system is divided into microservice systems,which greatly improves the availability and partition fault tolerance of the system.In order to further expand the functions of the system,software companies will always iterate on current services.In order to ensure that the incremental functions will not cause usability problems of the existing functions,major companies have invested a lot of manpower and financial resources to do automated testing.However,traditional automated testing also suffers from inefficiency when faced with frequent testing,and cannot adapt to the iterative speed of the project.The release of new versions is always at risk.Therefore,searching for an automated testing solution can make up for the shortcomings of traditional testing and greatly improve testing efficiency.Based on the problems encountered in the testing of microservice systems,this thesis studies the theory of automated testing.Based on the current efficient automated testing methods in the industry,the paper uses the C++ development language to design and implement an efficient traffic playback automated testing framework.The framework is based on the company’s internal microservice framework and uses an aspect-oriented programming approach to allow all microservices that have been put into production to support automated testing with only a small amount of non-business code modification.The framework no longer requires a lot of manpower to develop test cases,but directly uses interceptors to obtain online user traffic,arranges the obtained traffic into a specific file according to a specific template,and stores it in a distributed file storage platform.Then,the recorded traffic will be re-requested for the service of the development version by means of traffic playback.By comparing the recorded file and the playback file,find out the differences between the two to track whether there are defects in the development version code,which becomes a qualification check before the release of the version.After the framework was launched,the online service has supported the framework,and it was found in the application that the entire automated testing took minutes,and it effectively intercepted the release of some defective code,which greatly improved the efficiency of automated testing and made testing faster.Code defects are eliminated,and the R&D quality is effectively guaranteed.
Keywords/Search Tags:Microservice, Automated test, Traffic recording, Traffic playback
PDF Full Text Request
Related items