# Hands-on Example5 {%hackmd 48QQ4miqSxmUyp2CZ-kBSw %} ## 重點提示 1. 測試框架執行程式的順序,特別關注==fixture==(setup和teardown)的執行順序。 2. 參考`docstring`的撰寫方法。 3. 使用VS Code協助Debug。 ## 先設定好VS Code Debug ## 下載/更新 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,包含`example5-c`就對了。 ## 執行Robot 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 variable.robot ``` - 在Terminal中長這樣 ![](https://i.imgur.com/ghW9dch.png) - 到Windows相對應的資料夾中開啟log.html,察看有排版的格式(僅擷取部分) :::info :bulb: **變數宣吿是基礎**記得耐心的確確認每一個變數使用都理解了! ::: ![](https://i.imgur.com/0u1Nzf2.jpg) --- :::info :heart: **感謝共同編輯** Sabrina、Nickson :::