关键词:自动化测试, python, robot
Ubuntu 12.04
Intro
robot framework是一种基于python的可扩展关键字驱动自动化测试框架,通常用于端到端的可接收测试和可接收测试驱动的开发。可以用于测试声明涉及到多种技术和接口的分布式的,异构的应用系统。
环境
安装包
RobotDemo-20130319.zip (https://bitbucket.org/robotframework/robotdemo/downloads)
robotframework-2.8.6.tar.gz
robot framework安装,解压压缩包,进入目录执行命令 python setup.py install
RobotDemo文件说明
calculator.py 实现计算器功能 (system undertest)
CalculatorLibrary.py 为了测试calculator.py逻辑 testlibraries
keyword_driven.txt 测试数据 test data
test case
解压RobotDemo-20130319.zip,进入目录执行命令
pybot keyword_driven.txt
wuchao@wuchao-VirtualBox:~/sbox/robot/RobotDemo$ pybot keyword_driven.txt
==============================================================================
Keyword Driven :: Example test cases using the keyword-driven testing appro...
==============================================================================
Push button | PASS |
------------------------------------------------------------------------------
Push multiple buttons | PASS |
------------------------------------------------------------------------------
Simple calculation | PASS |
------------------------------------------------------------------------------
Longer calculation | PASS |
------------------------------------------------------------------------------
Clear | PASS |
------------------------------------------------------------------------------
Keyword Driven :: Example test cases using the keyword-driven test... | PASS |
5 critical tests, 5 passed, 0 failed
5 tests total, 5 passed, 0 failed
==============================================================================
Output: /home/wuchao/sbox/robot/RobotDemo/output.xml
Log: /home/wuchao/sbox/robot/RobotDemo/log.html
Report: /home/wuchao/sbox/robot/RobotDemo/report.html
wuchao@wuchao-VirtualBox:~/sbox/robot/RobotDemo$
参考资料
https://bitbucket.org/robotframework/robotdemo/wiki/Home