YAML
格式。
首先是對于單一操作步驟的描述。
從UI層面來看,每一個操作步驟都可以歸納為三個方面:定位控件、操作控件和檢查結果。
AppiumBooster
的做法是,將App根據功能模塊進行拆分,每一個模塊單獨創建一個YAML
文件,并保存在steps
目錄下。然后,在每個模塊中以控件為單位,分別進行定義。
現以如下示例進行詳細說明。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
AccountSteps:
enter Login page:
control_id: tablecellMyAccountLogin
control_action: click
expectation: btnForgetPassword
input test EmailAddress:
control_id: txtfieldEmailAddress
control_action: type
data: leo.lee@debugtalk.com
expectation: sectxtfieldPassword
check if coupon popup window exists(optional):
control_id: inner_screen
control_action: has_control
data: btnViewMyCoupons
expectation: btnClose
optional: true
|
原文轉自:http://debugtalk.com/post/build-ideal-app-automation-test-framework/