# Hands-on/Example1 {%hackmd 48QQ4miqSxmUyp2CZ-kBSw %} ## Clone Repository :::info :bulb: 有問題請先服用[開發環境問題/Git](/H1voIxJwSA2f5gSs_xfDMQ) ::: 1. 從GitLab將repository複製下來 ```bash=1 git clone http://mhqnetgitlab.moxa.com:10080/SimonWX_Zhao/auto-test-practice.git ``` 2. 移動到repo中,**接下來都在這個資料夾下操作!** ```bash=+ cd auto-test-practice ```  3. 檢查`tag`出現`example1-r`和`example1-c`標示正確 ```bash=+ git tag ```  ## 執行Rrobot framework example 1. 移動標有`example1-r`的commit ```bash=1 #要執行這行才會到robot這個commit上 git checkout example1-r ``` 2. 檢查在git tree上的位置,`HEAD`指到`example1-r`就對了 ```bash=+ #看看有沒有到這個commit上 git log --graph --oneline --all ```  :::info :bulb: 切換到另一個branch時,記得refresh一下  :question: 嘗試重新整理VSCode的Explorer或在Terminal中下`ls`,資料夾下檔案的變化有什麼變化? ::: 3. 執行robot framework的自動測試功能 ```bash=+ robot -d result cellular.robot ``` 4. 檢查測試結果 - 在Terminal中長這樣  - 到Windows相對應的資料夾中開啟log.html,察看有排版的格式   ## 執行Cucumber example 1. 移動標有`example1-c`的commit ```bash=1 #要執行這行才會到robot這個commit上 git checkout example1-c ``` 2. 檢查在git tree上的位置,`HEAD`指到`example1-c`就對了 ```bash=+ #看看有沒有到這個commit上 git log --graph --oneline --all ```  3. 檢查測試結果 ```bash=+ behave -f html -o log.html -f pretty cellular.feature ``` - 在Terminal中長這樣  - 到Windows相對應的資料夾中開啟log.html,察看有排版的格式  :::info :heart_decoration: 感謝共編 Sabrina :::
×
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