幾年前剛開始用Robotframework時,並沒有明確的規範大家的coding style;但隨著開發人員的增加,不管是測試的分類、測試涵蓋規範、測試或關鍵字的命名,都隨著時間慢慢歪掉。為了:
以上原因,必須建立一些共識。而我認為面對到以下問題:
節錄自官方參考文件Robot Best Practice:
這是Robot建議的方式,假如有自己的規範也不一定要使用他們建議的。
節錄自官方參考文件:
我認為其它可實踐的:
節錄自官方參考文件:
個人看法:
[TestSuite] user_management.txt [TestCase] Add a user Given User login When Interact with add user command Then You see the new user Add an invalid user Given User login When Interact with add user command And Input an invalid Name Then You see a feedback show the name is invalidThinking..
data-driven可搭配tempalte寫成以下形式:
*** Test Case *** WebLinks are clickable [Template] WebLink is clickable ## link name ## ## expect content ## Home home content About about content EMail email@hotmail.com *** Keyword *** WebLink is clickable [Arguments] ${link} ${expect_content} Given I login the system When I click ${link} Then I can see ${expect_content}