检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
作 者:李宝智 张绛丽 陈孟祥 张毅 肖新凤 LI Baozhi;ZHANG Jiangli;CHEN Mengxiang;ZHANG Yi;XIAO Xinfeng(Advanced Manufacturing College,Guangdong Polytechnic of Environmental Protection Engineering,Foshan 528216,China)
机构地区:[1]广东环境保护工程职业学院,先进制造学院,广东佛山528216
出 处:《微型电脑应用》2024年第2期29-32,共4页Microcomputer Applications
基 金:粤高职计算机教指委教育教学改革研究与实践项目(JSJJZW2021058);广东省教育厅高等职业教育教学质量与教学改革工程项目(GDJG202151);广东省职业院校教学能力与教育技术工作指导委员会教育教学改革研究与实践项目(JXNLJG202118)。
摘 要:在Web测试过程中,某些步骤所涉及的页面操作比较多,测试人员需要根据页面DOM的结构和填充的数据重新构建测试代码的挑战。这样增加了测试人员的工作强度和代码编写的工作量。每一次的页面测试基本都可以归纳为查找页面元素和处理元素动作。将自动化测试组件进行二次封装,可以减少测试过程中的重复代码编写,让开发人员专注于测试过程的数据编制。介绍一种在Python环境下,以外部数据驱动WebDriver实现自动化测试的组件的设计与实现方法。该方法将页面操作的动作和填写的信息保存在外部数据文件中,将常用的执行动作和填写的数据组合为页面操作的过程封装为一个组件。利用此套组件,可以实现“数据-操作-代码”的分离,大大减少了测试人员的开发代码量。During the Web testing process,certain steps involve a significant number of page operations.Testers need to reconstruct test code based on the structure of the page’s Document Object Model(DOM)and the data being filled.This increases the workload for testers and the amount of code to be written.Each page test can generally be summarized as follows:locating page elements-performing element actions.By encapsulating automation test components,the redundancy in code writing during the testing process can be reduced,allowing developers to focus on data preparation for the testing process.This article introduces a method for designing and implementing components for automated testing using WebDriver driven by external data in the Python environment.This method stores the actions of page operations and the information filled in external data files,combining common execution actions and data filling into a component encapsulating the process of page operations.By using this set of components,the separation of“data-operation-code”can be achieved,greatly reducing the amount of code development for testers.
分 类 号:TP319[自动化与计算机技术—计算机软件与理论]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:18.216.51.7