This Project is for XCUITest + Cucumberish Demo.
The FoodTracker App is based on following instruction:
iOS Developer Library: Start Developing iOS Apps (Swift)
FoodTracker App: Mario's FoodTracker
Installation Guild: Find Cucumberish Wiki Page
Both of Cocoapods / Carthage frameworks for swift on this project
Execute by the command line:
xcodebuild test -workspace FoodTracker.xcworkspace -scheme FoodTracker -destination 'platform=iOS Simulator,name=iPhone 8 Plus,OS=11.3'
Or, you can execute it by XCode test navigator.
- Support Scenario / Scenrio Outline
Scenario Outline: Verify Meal Rating
When I select "<meal>"
And I rating as <star>
Then I should see "<meal>" rating as <star>
Examples:
| meal | star |
| Caprese Salad | 2 |
| Chicken and Potatoes | 5 |
| Pasta with Meatballs | 1 |
- Page Object Patterns
class MainPage: Page {
private lazy var title = findElement(.navigationBar)["Your Meals"].firstMatch
required init() {
waitFor(element: title)
}
@discardableResult func doSomething(_ intputParameter: Object) -> MainPage{
// doSomehting
return self
}
}
Blog: XCUITest with Cucumberish
Jersey Su – @jerseysu