# Hands-on Example4-2 {%hackmd 48QQ4miqSxmUyp2CZ-kBSw %} ## 重點提示 1. 學習在Test Case中使用String block和Table-like的資料。 2. 承接Example4-1變數宣告方式很多種,在這個Example中我是==考慮可讀性==,所以選擇用這樣的寫法,大家可以也可自己想一下,==如果是你怎麼寫比較好?== 3. 最後將這個Example==與Example3比較看看異同之處。== ## 下載/更新 Repository :::info :bulb: 有問題請先服用[開發環境問題/Git](/H1voIxJwSA2f5gSs_xfDMQ) ::: 1. 下載repo/commit - 若還未載過repo,須從remote下載repo ```bash= git clone http://mhqnetgitlab.moxa.com:10080/SimonWX_Zhao/auto-test-practice.git ``` - 如果已經載過repo那麼只需從remote下載新的commits ```bash= git fetch ``` 2. 檢查tag,包含`example4-r`就對了。 ## 執行Robot Framework example 1. 移動標有`example4-r`的commit ```bash=1 #要執行這行才會到robot這個commit上 git checkout example4-r ``` 2. 檢查在git tree上的位置,`HEAD`指到`example4-r`就對了 ```bash=+ #看看有沒有到這個commit上 git log --graph --oneline --all ``` 3. 檢查測試結果 ```bash=+ robot -d result Router/firewall.robot ``` - 在Terminal中長這樣 ![](https://i.imgur.com/OtjyCYF.png) - 到Windows相對應的資料夾中開啟log.html,察看有排版的格式(僅擷取部分) ![](https://i.imgur.com/zH0KgSZ.jpg)