Font Size: a A A

Research And Implementation Of Web Automation Testing Framework Based On Selenium

Posted on:2022-03-19Degree:MasterType:Thesis
Country:ChinaCandidate:X Y PengFull Text:PDF
GTID:2518306470459184Subject:Master of Engineering
Abstract/Summary:PDF Full Text Request
The rise of agile development has led to the shortening of the development cycle of Web application products and the update iteration cycle is extremely frequent.At the same time,the scale and system complexity of Web applications have gradually increased,the demand for product quality is also higher and higher.Traditional manual detection is difficult to meet the requirement,and automated testing has become an urgent need for various enterprises.Mainstream commercial automated test tools generally have problems such as high cost and high complexity.Open-source automated test tools have shortcomings such as high coupling,low script reuse rate,and low applicability.Therefore,building a flexible,easy-to-use,and lightweight automated testing framework can better solve practical problems in Web functional testing and regression testing,thereby improving testing efficiency.This dissertation analyzes the research status of web automation testing at home and abroad,and chooses selenium as the basis,aiming at the high coupling,maintenance difficulty,and poor flexibility,a Selenium-based Web automation test framework was devised,built and carried out.This framework integrates the Pytest unit test framework to implement test script writing,introduces page object and data-driven design patterns,realizes separation of elements and business logic,separation of test scripts and test data,reduces system coupling,and achieves the goal of script reusability.The system adopts four-layer structure,which is divided into common library layer,business logic layer,test cases layer and presentation layer.It supports several browsers,encapsulation of common methods,automatic script execution,assertion checking,reexecute the failed case,test log and test report generation and other key functions.At the same time,in response to the typical problems in the Web testing process,this article proposes secondary positioning and mouse simulation to improve the accuracy of element positioning;on the basis of simple assertions and database assertions,a page interactive verification method is proposed to enrich the test assertion checking capabilities.For framework application evaluation,framework use Git tool to realize version control.Jenkins realizes continuous integration and automatic execution of test tasks.After execution,test reports are automatically sent by email,which helps testers to quickly analyze and locate software defects in a timely manner.Through actual engineering applications and evaluation of the framework from multiple perspectives such as stability,test efficiency and comparison with other frameworks,the evaluation results show that this framework can stably and quickly support automated testing of web applications,while being easy to use and extensible,which reduces maintenance and management costs,labor,time and other resource consumption and improves the efficiency of testing work effectively,achieves the expected design goals.
Keywords/Search Tags:Automated testing framework, Data driven, Selenium, Jenkins
PDF Full Text Request
Related items