????????????? feature ????????????
????Feature: Login feature  Scenario: As a valid user I can log into my app    When I press "Add Contact"
????Then I see "Target Account"
????Then I enter "hello" into input field number 1    Then I enter "13817861875" into input field number 2    Then I enter "hengwen@hotmail.com" into input field number 3    When I press "Save"
????Then I wait for 1 second    Then I toggle checkbox number 1    Then I see "hello"
???????? input field number ????? ContactAdder Activity ?????????????????д????????????????????????η?????? DSL ?д??????????磺
When I enter "hello" as "Contact Name"
step_definition
When (/^I enter "([^"]*)" as "([^"]*)"$/) do | text?? target |
index = case target
when "Contact Name": 1
...
end
steps %{
Then I enter #{text} into input field number #{index}
}end
???????? feature ??????????
???????? feature
??????????????????? apk ?????????£???????????Щ????
????App did not start (RuntimeError)
???????calabash-android??client??test server?????????????? AndroidManifest.xml ?????????
????<uses-permission android:name="android.permission.INTERNET" />
????ContacterManager ???????????
???????? ContacerManager ??????????????????????????????????? Save ???????????????????У????????????
????????????? $ANDROID_HOME/samples/android-19/legacy/ContactManager????????????
?????????? com.example.android.contactmanager.ContactAdder ??????? createContactEntry ??????????????? mSelectedAccount ?????ж?? ????????£?
// Prepare contact creation request
//
// Note: We use RawContacts because this data must be associated with a particular account.
//       The system will aggregate this with any other data for this contact and create a
//       coresponding entry in the ContactsContract.Contacts provider for us.
ArrayList<ContentProviderOperation> ops = new ArrayList<ContentProviderOperation>();
if(mSelectedAccount != null ) {
ops.add(ContentProviderOperation.newInsert(ContactsContract.RawContacts.CONTENT_URI)
.withValue(ContactsContract.RawContacts.ACCOUNT_TYPE?? mSelectedAccount.getType())
.withValue(ContactsContract.RawContacts.ACCOUNT_NAME?? mSelectedAccount.getName())
.build());
} else {
ops.add(ContentProviderOperation.newInsert(ContactsContract.RawContacts.CONTENT_URI)
.withValue(ContactsContract.RawContacts.ACCOUNT_TYPE?? null)
.withValue(ContactsContract.RawContacts.ACCOUNT_NAME?? null)
.build());
}....
if (mSelectedAccount != null) {
// Ask the Contact provider to create a new contact
Log.i(TAG??"Selected account: " + mSelectedAccount.getName() + " (" +
mSelectedAccount.getType() + ")");
} else {
Log.i(TAG??"No selected account");
}
??????????????????? apk ?????
???????к????
????calabash-android run <apk>
??????????????????????? calabash-android resign apk??
????????????????е??????
?  calabash  calabash-android run ContactManager.apk
Feature: Login feature
Scenario: As a valid user I can log into my app                # features/my_first.feature:33135 KB/s (556639 bytes in 0.173s)3315 KB/s (26234 bytes in 0.007s)
When I press "Add Contact"                                   # calabash-android-0.4.21/lib/calabash-android/steps/press_button_steps.rb:17
Then I see "Target Account"                                  # calabash-android-0.4.21/lib/calabash-android/steps/assert_steps.rb:5
Then I enter "hello" into input field number 1               # calabash-android-0.4.21/lib/calabash-android/steps/enter_text_steps.rb:5
Then I enter "13817861875" into input field number 2         # calabash-android-0.4.21/lib/calabash-android/steps/enter_text_steps.rb:5
Then I enter "hengwen@hotmail.com" into input field number 3 # calabash-android-0.4.21/lib/calabash-android/steps/enter_text_steps.rb:5
When I press "Save"                                          # calabash-android-0.4.21/lib/calabash-android/steps/press_button_steps.rb:17
Then I wait for 1 second                                     # calabash-android-0.4.21/lib/calabash-android/steps/progress_steps.rb:18
Then I toggle checkbox number 1                              # calabash-android-0.4.21/lib/calabash-android/steps/check_box_steps.rb:1
Then I see "hello"                                           # calabash-android-0.4.21/lib/calabash-android/steps/assert_steps.rb:51 scenario (1 passed)9 steps (9 passed)0m28.304s
All pass??

?????????? gif ?? failed???????????????????е?????????????????????????????????е????????????????в???
???????
??????????? calabash-android ?????????????????????????????????????? Appium ????TesterHome ??????????????????????????watch and learn??