關鍵詞:自動化測試, 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