close

RobotFramework (以下簡稱RF) 是通用自動化測試框架(generic test automation framework), 以 Python 寫得成, 主要用於 BDD(Behavior Driven Development), ATDD(Acceptance Test-Driven Development) 測試. 寫測試者主要是寫 Keyword (Keyword 相當是 RF 的 function), 然後將這些 Keyword 組成 Test Case. 

# 安裝 python 和 pip
centos:~ # yum install epel-release
centos:~ # yum makecache
centos:~ # yum install python python2-pip

# 透過 pip 安裝 RF
centos:~ # pip install robotframework

# 測試
centos:~ # cat hello.robot
*** Test Cases ***
Hello RF
    Log  Hello RobotFramework

centos:~ # pybot hello.robot

rf_1.png


執行完後會有產生 output.xml, log.html, report.html

output.xml: 以 xml 格式紀錄執行時的一切動作

report.hml: 給人看的執行完後統計的報告

rf_3.png

log.html: 給人看的執行時的一切動作

rf_2.png

report.html 和 log.html 都是由 output.xml 轉換產生

arrow
arrow
    文章標籤
    RobotFramework CentOS
    全站熱搜
    創作者介紹
    創作者 wsunccake 的頭像
    wsunccake

    wsunccake的隨手記事

    wsunccake 發表在 痞客邦 留言(0) 人氣()