# Hands-on Example3 {%hackmd 48QQ4miqSxmUyp2CZ-kBSw %} ## 重點提示 1. 了解Cucumber的資料交換擺放規則(即資料交換的架構)。 2. 了解Test Case的撰寫規則和使用==目的==。 - Table - String block 2. 了解Implement Code的內容和使用==目的==。 - `context`, `context.table`, `context.text` - `environment.py` ## 下載/更新 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,包含`example3-c`就對了。 ## 執行Cucumber example 1. 移動標有`example3-c`的commit ```bash=1 #要執行這行才會到robot這個commit上 git checkout example3-c ``` 2. 檢查在git tree上的位置,`HEAD`指到`example3-c`就對了 ```bash=+ #看看有沒有到這個commit上 git log --graph --oneline --all ``` 3. 檢查測試結果 ```bash=+ behave -f html -o log.html -f pretty firewall.feature ``` - 在Terminal中長這樣  - 到Windows相對應的資料夾中開啟log.html,察看有排版的格式(僅擷取部分)  --- :::info :heart: **感謝共同編輯** Alison、Nickson、Delbert :::
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up