| With the maturity and popularity of cloud computing technology,the architecture and development model of software services tend to be centered on cloud computing platforms.The microservice architecture,which uses distributed and independently running microservices as the basic units of the software,is rapidly becoming the mainstream of the modern software ecology because it can take full advantage of the cloud computing platform.The demand of global digital transformation and the efficient deployment capabilities provided by the cloud computing platform have shifted the mainstream development models to a continuous delivery model with frequent release and rapid iteration.The innovation of software architecture and development model has brought new challenges to automated software testing.First,in the microservice architecture,the execution of individual services is easily influenced by the execution environment,resulting in uncontrollable test results.Second,there is a large number of data fields in the input data which are irrelevant to the execution of the service under test.Third,there are constraint relationships between data fields,but the description of such constraints is hard to find.These problems significantly affect the effectiveness and efficiency of automated testing.On the other hand,the technical base of microservice architecture software has also created many favorable conditions for automated software testing.Typical,the infrastructure provided by cloud computing platforms makes easier for testers to access the execution records of tested services for problem analysis and guidance of the automated testing process;and the efficient and convenient multi-instance deployment capability makes it easier to implement methods sucha as differential testing.Based on the above challenges and opportunities,this paper is dedicated to designing a series of automated testing methods applicable to microservice architecture software and development model through in-depth cooperation with first-line fintech enterprises in the industry,taking modern fintech software as a typical research object,with the main goal of improving the test coverage and conducting more complete tests on the robustness and security of the service under test.The main work and innovation points are:· Fin Fuzzer: Automated Testing Method Combined with Execution Environ-ment Simulation and Field Relevance Identification.This method uses two optimization methods,execution environment simulation and field relevance identification,to compensate for the loss of testing effectiveness and efficiency caused by uncontrollable test results and the presence of irrelevant fields in the input data.The experiment results show that the application of execution envi-ronment simulation results in a code coverage improvement of up to 7.9%,and the use of field relevance identification can reduce the time required to achieve the same test coverage by 27% to 74%.· Fin Hunter: Test Data Generation Method Based on Multi-Source Informa-tion and Search.This method is based on the online execution records of the service under test,and adopts the idea of search-based software testing,uses the genetic algorithm to generate test data automatically.The method uses a gene pool expansion technique to solve the problem of insufficient data caused by the bias of the historical user input data in the online execution records by using in-formation from multiple sources such as source code and other similar services This method also uses a multi-level crossover strategy to reduce the probability of generating abnormal data.In the experiments,this approach achieves a 12.8% improvement in code coverage compared to the recording-and-replay approach commonly used in industry today.· Fin Expert: Test Data Generation Method Based on Domain Knowledge.This method is designed to generate test data without relying on execution records for scenarios where online execution records are difficult to obtain,such as when the service under test is not yet deployed or the telemetry function is not inte-grated for performance reasons.We designed a domain-specific language that can be used by domain experts to express the domain knowledge about the in-put data of the service under test,and use it as a basis for generating test data.The method can significantly reduce labor cost requirements and obtain better test coverage than writing test data entirely by hand.In practical applications,this method reduces the working hours consumed in the testing phase by 69.5%, while the branch coverage can be increased by up to 16% compared with previ-ous methods.· Hydra: Test Results Evaluation Method Based on the Comparison of Ex-ecution Results across Multiple Versions.This method provides a means for compatibility test for the scenarios where the refactoring of the previous code and the development of new features are carried out in parallel.It compares test results of multiple versions of tested service processing same test data to filter out test data that most likely expose some compatibility issues.This method will reduce the labor cost of evaluating the test results and increase the efficiency.In the experiment,we injected multiple faults into the source code of the tested service.The results showed that the test data that could expose compatibility problems could be screened with higher priority,which proved the effectiveness of the method.The contribution of this article helps automated software testing to be better applied on microservice architecture,further improve the development efficiency of software. |