RobotFramework环境配置十七:数据驱动(Read Excel File)
来源:互联网 发布:网络协同是什么意思 编辑:程序博客网 时间:2024/05/23 16:54
数据驱动
RIDE提供的库:
- Create List
- Get File
- Import Variables
- Template
- ExcelLibrary
自定义库:DataCenter.py
- Read Data From Excel
- Read Excel File
- Read CSV File
- Read Column From Excel
- Get Sheet Values From Excel
一、数据驱动测试注重于测试软件的功能性需求,也即数据驱动测试执行程序所有功能需求的输入条件。实现KISS。
二、Read Excel File 方法
以搜索课程测试为例讨论 Read Excel File 方法。
导入自定义库文件 data_center.py
目录:F:\Robotframework\common\library
数据源
有关Excel数据源的问题,请参考个人博客数据驱动(ExcelLibrary)
用例:Case15220_eCard_Excel_SearchSingleCard
- 登录选课
- 输入“单张畅学卡全名”,进行搜索
- 检测搜索到畅学卡是否正确
封装keyword: GUI_CHECK_Single_Card
需求:因为以“单张畅学卡全名”来搜索,所以只需要卡名即可。
处理:读取所有卡名(不关心卡的类别),并去掉空卡。
源代码: Read Excel File
从第三行,第二列开始读取所有卡名;
判断数据是否为空,是空移除。
PS:
1. 关于处理Excel整数变浮点数的问题:python读取Excel文件后,如何处理浮点数的问题请查看个人博客数据驱动(ExcelLibrary)
2. 关于用json处理完list,tuple和dict中乱码之后产生的问题:无法以列表,元组和字典的方式读取数据,请查看个人博客中文日志乱码问题
0 0
- RobotFramework环境配置十七:数据驱动(Read Excel File)
- RobotFramework环境配置十八:数据驱动(Read CSV File)
- RobotFramework环境配置十六:数据驱动(Read Data From Excel)
- RobotFramework环境配置十九:数据驱动(Read Column From Excel)
- RobotFramework环境配置二十:数据驱动(Get Sheet Values From Excel)
- RobotFramework环境配置二十一:数据驱动(总结)
- RobotFramework环境配置二十三:创建报告(Excel文件)
- Robotframework 写入excel数据
- RobotFramework环境配置二十四:创建报告(Excel文件)续
- Robotframework(1):配置基础环境
- robotframework 环境配置
- jxl read excel file
- robotFramework 读取Excel文件数据
- RobotFrameWork(七)数据驱动之Template模板
- python+robotframework --环境安装+配置
- RobotFramework环境配置七:多浏览器兼容性测试(1)
- RobotFramework环境配置八:多浏览器兼容性测试(2)
- RobotFramework环境配置二十二:创建报告(CSV文件)
- 设计模式总体说明
- 【学习指导】Kaggle入门
- Windows 10 系统上安装Mac OS X 10.11
- 【练习】旋转数组
- Server性能提升趣谈
- RobotFramework环境配置十七:数据驱动(Read Excel File)
- 8皇后问题
- javaScript使用Lodop实现网页表格套打功能
- Android JNI作用及其详解
- busybox内置tftpd服务器配置
- 蓝桥杯 试题集 所用算法总结
- 数据库笔记(SQL基础之DDL与DML)
- 查询一个邮箱的状态, OSMboxQuery()
- 使用sklearn优雅地进行数据挖掘