Skip to content

Latest commit

 

History

History
71 lines (48 loc) · 1.92 KB

README.md

File metadata and controls

71 lines (48 loc) · 1.92 KB

xcuitest_cucumberish

This Project is for XCUITest + Cucumberish Demo.

Build Status

The FoodTracker App is based on following instruction:

iOS Developer Library: Start Developing iOS Apps (Swift)

FoodTracker App: Mario's FoodTracker

Cucumberish Installation:

Installation Guild: Find Cucumberish Wiki Page

Both of Cocoapods / Carthage frameworks for swift on this project

Execution Test:

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.

Useful Sample:

  • 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
    }
}
  • Show failure error on feature steps

Documentation:

Blog: XCUITest with Cucumberish

Author

Jersey Su – @jerseysu