摘要
随着Web应用系统的广泛应用,传统的手工测试已经难以满足Web应用系统测试需求。根据自动化测试的特点,研究Selenium自动化测试框架,分析Selenium的工作原理和元素定位的方法。进一步研究自动化测试用例的设计方法和编写流程,阐述Python自带的单元测试框架(Unittest框架)编写自动化测试用例的基本使用方法和常用断言方法。最后以资产管理系统的登录模块测试用例为例,完成具体脚本的编写和执行,实现了自动化测试代替手工测试,提高了软件测试效率。
Along with the wide application of Web application systems,traditional manual testing canmeet the needs of web application system testing no longer.This paper describes the characteristics of automatedtesting,and studies the selenium automated testing framework,and analyses the working principleofselenium and the methods of element positioning,and further studies the designing method and writingprocess of automated test cases,describes the basic usage methods and common assertion methods of writingautomated test cases by Python’s built-in unit test framework(Unittest framework).Finally,with the log-inmodule test case of the asset management system as an example,the writing and execution of specific scriptsare completed,which realizes the automatic testing instead of manual testing,and greatly improves theefficiency of software testing.
作者
许礼捷
葛华
Xu Lijie;Ge Hua(Shazhou Professional Institute of Technology,Zhangjiagang 215600,Jiangsu,China)
出处
《沙洲职业工学院学报》
2022年第4期1-6,共6页
Journal of Shazhou Professional Institute of Technology
基金
2022年江苏高校“青蓝工程”优秀教学团队培养项目(苏教师函〔2022〕29号)。