ExcelDataDriver是一个用于Robot框架的Excel数据驱动测试库。
robotframework-exceldatadriver的Python项目详细描述
内容
Introduction
ExcelDataDriver是RobotFramework的Excel数据驱动测试库。 该项目托管在GitHub上,下载可以从PyPI找到。在
Keyword documentation
请参阅keyword documentation以获取可用的关键字和有关库的一般信息。在
Installation
建议的安装方法是使用pip:
pip install --upgrade robotframework-exceldatadriver
手动将源代码下载到本地计算机并运行以下命令以使用python进行安装:
^{pr2}$Directory Layout
- 示例/
- 使用web应用程序和RF测试套件进行简单演示
- 文档/ 文档
- CoreRPAHive/ Python源代码
- 测试/ Python nose测试脚本
Usage
使用Robot框架和ExcelDataDriver编写测试, ExcelDataDriver必须导入到RF测试套件中。在
通过从模板复制(download)创建Excel文件。在
在- Mandatory Columns:
- [Status] For report test result Pass/Fail
- [Log Message] Error message or any message after test done
- [Screenshot] Screenshot (Support only 1 screenshot)
- [Tags] Robot Tag
Test data Columns:
- User can add their own test data columns without limit
Example:
- Username
- Password
创建射频测试套件
在
*** Setting ***LibraryExcelDataDriver./test_data/BasicDemoData.xlsxcapture_screenshot=SkipTest TemplateValidate user data template*** Test Cases ***Verify valid user '${username}' ${None} ${None} ${None} *** Keywords ***Validate user data template [Arguments] ${username} ${password} ${email} Log ${username} Log ${password} Log ${email} Should Be True'${password}' != '${None}'Should Match Regexp ${email} [A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}
Enhancement and release
- 创建更新关键字文档
python-mrobot.libdoc-fhtmlExcelDataDriverdocs/ExcelDataDriver.html
- 扩展(进行中)
Limitation
Eclipse plug-in RED
如果使用Eclipse插件RED,则存在已知问题。因为这个工具的调试监听器在数据驱动程序创建测试用例之前预先计算了测试用例的数量。这会导致RED侦听器抛出异常,因为每个测试步骤都会调用它,但RED GUI已经停止调试,因此侦听器无法向GUI发送信息。在
这不会以任何方式影响执行,但会在日志中产生许多不需要的异常。在
- 项目
标签: