另外,在某些測試場景中可能需要重復進行某一個功能點的操作。雖然可以將需要重復的步驟多寫幾次,但會顯得比較累贅,特別是重復次數較多時更是麻煩。
AppiumBooster
的做法是,在測試用例的步驟中可指定執行次數,并以|
進行分隔,如下例所示。
1
2
3
4
5
6
|
Send random text messages:
- SettingsFeatures | initialize first startup
- AccountFeatures | login with valid test account
- MessageFeatures | enter follower user message page
- MessageFeatures | send random text message | 100
|
原文轉自:http://debugtalk.com/post/build-ideal-app-automation-test-framework/