Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jun 22, 2021. It is now read-only.

Commit 74ce05b

Browse files
committed
Update README.md
1 parent 8adce72 commit 74ce05b

File tree

1 file changed

+72
-22
lines changed

1 file changed

+72
-22
lines changed

‎README.md

Lines changed: 72 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,9 @@ Contact List | Contact Details | Edit Contact | Remove Contact
1818

1919
#### Scenarios
2020

21-
Add contact:
22-
23-
```gherkin
24-
Feature: Create a new contact in the contacts list
25-
In order to interact with a new contact
26-
As I user
27-
I want to add a new contact in my contacts list
21+
**Add contact:**
2822

23+
```
2924
Scenario: User can add a new contact in the contacts list
3025
Given I see the contacts list screen
3126
When I press on "Add" button
@@ -36,14 +31,9 @@ Scenario: User can add a new contact in the contacts list
3631
Then I see the "Jon Snow" contact in the contact list
3732
```
3833

39-
Update contact:
40-
41-
```gherkin
42-
Feature: Update an existing contact in the contacts list
43-
In order to keep all my contacts up-to-date
44-
As I user
45-
I want to update an existing contact in my contacts list
34+
**Update contact:**
4635

36+
```
4737
Scenario: User can update an existing contact in the contacts list
4838
Given I see the contacts list screen
4939
Given I see at least one contact in the list
@@ -60,14 +50,9 @@ Scenario: User can update an existing contact in the contacts list
6050
Then I see the "Robb Stark" contact in the contact list
6151
```
6252

63-
Remove contact:
64-
65-
```gherkin
66-
Feature: Remove an existing contact from the contacts list
67-
In order to get rid of annoying contacts
68-
As I user
69-
I want to remove an existing contact from my contacts list
53+
**Remove contact:**
7054

55+
```
7156
Scenario: User can remove an existing contact from the contacts list
7257
Given I see the contacts list screen
7358
Given I see at least one contact in the list
@@ -94,4 +79,69 @@ bundle install
9479

9580
For **Appium** we will need to install Appium server separately. For this demo we will use Appium server standalone app.
9681

97-
![Contact List](/assets/appium.png)
82+
![Appium Standalone App](/assets/appium.png)
83+
84+
## Running
85+
86+
For all solutions there are two options to run the tests, first one is using `fastlane` and the second one is manuall run.
87+
88+
### UI Tests (XCTest)
89+
UI tests were introduced in XCode 7. It is native solution which allows us to write UI tests using `Objective-C` or `Swift`.
90+
Tests are located in `ContactsUITests` folder.
91+
92+
Run tests:
93+
```bash
94+
# Run using fastlane
95+
fastlane test_xctests
96+
97+
# Run manually
98+
xcodebuild -project Contacts.xcodeproj \
99+
-scheme "Contacts" \
100+
-sdk iphonesimulator \
101+
-destination 'platform=iOS Simulator,name=iPhone 6,OS=9.1'
102+
test
103+
```
104+
**Note:** UI tests can be run directly from Xcode: `Product -> Test`
105+
106+
### Appium
107+
Appium is an open source test automation framework for use with native, hybrid and mobile web apps. It drives iOS and Android apps using the WebDriver protocol. Appium supports client libraries for multiple programming languages `Java`, `Python`, `Ruby`, `JavaScript`, `PHP` and `C#`. Tests were written in `Ruby` and are located in `appium` folder.
108+
109+
Run tests:
110+
```bash
111+
# Run using fastlane
112+
fastlane test_appium
113+
114+
# Run manually
115+
xcodebuild -project Contacts.xcodeproj \
116+
-scheme "Contacts" \
117+
-sdk iphonesimulator \
118+
-derivedDataPath "build"
119+
build
120+
121+
cd ../appium && cucumber
122+
```
123+
**Note:** Appium server should be running while running tests.
124+
125+
### Calabash
126+
Calabash is an automated testing technology for Android and iOS native and hybrid applications. It is a free-to-use open source project that is developed and maintained by Xamarin. Calabash has two client libraries for `Ruby` and `Java`. Tests were written in `Ruby` and are located in `calabash` folder.
127+
128+
Run tests:
129+
```bash
130+
# Run using fastlane
131+
fastlane test_calabash
132+
133+
# Run manually
134+
xcodebuild -project Contacts.xcodeproj \
135+
-scheme "Contacts-cal" \
136+
-sdk iphonesimulator \
137+
-derivedDataPath "build"
138+
build
139+
140+
cd ../calabash && APP=\"../Build/Products/Debug-iphonesimulator/Contacts-cal.app\" cucumber
141+
```
142+
**Note:** Before running calabash tests disable firewall otherwise the prompt below will appear on every simulator run:
143+
![Contact List](/assets/calabash-firewall.png)
144+
145+
### UI Automation
146+
147+
TBD

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /