Font Size: a A A

Design And Implementation Of Web Automation Testing System Based On Selenium

Posted on:2021-02-02Degree:MasterType:Thesis
Country:ChinaCandidate:M LuFull Text:PDF
GTID:2428330614972027Subject:Electronic and communication engineering
Abstract/Summary:PDF Full Text Request
With the popularity of Web applications,its testing requirements are also getting much higher.Manual testing has the character of low efficiency and low coverage.Therefore,many enterprises use automated testing tools for regression testing.Due to the high price of some commercial software,most Internet companies choose to develop their own automated testing system based on open source software.The testing system can improve test efficiency by using automated testing instead of manual testing.Combining the advantages of data-driven framework and keyword-driven framework,this thesis developed a web automated testing system based on selenium.The testing results showed that the system can greatly improve the test efficiency and element coverage.Taking the Med AI intelligent medicine research cloud platform as an example,this thesis analyzed the testing requirements of Med AI,and designed a web hybrid driven automated testing framework based on selenium.The framework mainly includes keyword module,Base Page module,image matching module,execution module and report generation module.Among them,the main function of the keyword module is to encapsulate the operations used in the test steps into keywords.The Base Page module mainly implemented the encapsulation of common methods.The image matching module realized the location of non-Web elements by matching the element screenshot with the page screenshot.The execution module realized the calling of key words and the execution of test cases in test steps.The report generation module realized the generation of automated testing report by importing H TMLTest Runner.In this thesis,Python is chosen as the development language and Pycham is chosen as the integrated development environment.The page elements are located and encapsulated by using the positioning method of XPath,and the XPath of the elements is obtained through the XPath helper plug-in.Test points and test cases are stored in the xls file for reading when the script is executed.At present,the hybrid automated testing framework based on Selenium designed in this thesis has been applied to the regression testing of Med AI platform.Through the analysis of this thesis,we found that the more times regression testing is,the greater the efficiency of automated testing is compared with manual testing.When the number of regression tests reaches 10,the efficiency of automatic test is 121.01% higher than that of manual test.For web applications,with the increasing of new requirements,the number of regression tests will be far more than 10 times,so the efficiency of automated testing will increase by at least 121.01%.Secondly,this thesis improved the positioning function of elements,and realized the positioning of non-web element by image matching.After the improvement,the coverage of elements increased from 87.8% to 95.12%.The test results showed that the framework can improve the test efficiency of testers,increase the coverage,reduce the repetitive work,and reduce the time cost.In general,this framework is more suitable for automated regression testing of web applications.
Keywords/Search Tags:Selenium, auto-testing, Hybrid-driven test framework, MedAI
PDF Full Text Request
Related items