Font Size: a A A

Design And Implementation Of Automatic Test Framework Based On Selenium

Posted on:2024-01-13Degree:MasterType:Thesis
Country:ChinaCandidate:J Y ZhuFull Text:PDF
GTID:2568307157950629Subject:Master of Electronic Information (Professional Degree)
Abstract/Summary:PDF Full Text Request
Testers can perform software tests manually,or they can use automated tools to find defects and assess the quality of the product.It is difficult for manual testing to meet the testing requirements.Automated testing with automated testing tools can reduce human intervention and repetitive labor,and help the design and execution of test scripts,thus saving the time and cost of manual testing.Test case generation is an expensive and labor-intensive process,and automatically generating valid test cases is important for Web application testing.There are many verification codes in Web applications,so it is very important to correctly identify verification codes during testing.This thesis analyzes the structure of Web application to generate test cases automatically,defines the data dependency and control dependency in Web application,and detects these relationships from source code,and improves the method of generating test cases with analysis results.Experimental results show that this method can reduce the test case set in the process of test case generation.When identifying simple verification codes,PIL module can be used to intercept verification codes,and pytesseract module can be used to identify verification codes.For complex verification codes,a method of character verification code recognition based on artificial neural network is proposed in this framework.Firstly,weighted average method and iterative optimal threshold method are used to process and binarize the image of character verification code,and the denoised image is obtained.Then,the image is segmented by the Laplace operator,and the characters in the image are segmented.Finally,according to the feature vector,the artificial neural network model is used for sample training and adaptive learning.This method can improve the accuracy of verification code recognition.Combining the above two points,this thesis designs and implements an automated testing framework based on Selenium to test Web applications.Selenium consists of a powerful set of software tools that use Selenium Grid to distribute test cases to run on multiple different machines for distributed testing to achieve the purpose of compatibility testing and functional testing quickly,efficiently and in parallel,which can be used to test different combinations of browsers,operating systems and devices.Combined with the method of character verification code recognition based on artificial neural network,the recognition rate of verification code in the testing process is improved.Screen shots and log logs are generated for failed test cases so that developers can quickly locate and analyze problems.Data driven,the test script and data are completely separated,when the data changes,only the data in the data source file can be modified.After the test is completed,the test report will be automatically generated and visually displayed in the form of graphs and tables for easy viewing and analysis by relevant personnel.This framework saves manpower,material resources and costs,improves test efficiency and test coverage,improves script utilization and maintainability,and has good reusability,extensibility,compatibility and universality.It is very easy to maintain and regression test new versions of applications by using this testing framework.
Keywords/Search Tags:Selenium, Web, Automated testing framework, Verification code recognition, Automatically generate test cases
PDF Full Text Request
Related items