GithubHelp home page GithubHelp logo

jerseysu / xcuitest_cucumberish Goto Github PK

View Code? Open in Web Editor NEW
14.0 1.0 1.0 6.55 MB

Sample Project for XCUITest + Cucumberish demo

Home Page: https://medium.com/@loverjersey/%E4%BD%BF%E7%94%A8-xcuitest-%E7%8E%A9-cucumber-xcuitest-with-cucumberish-a4770bec7f0c

License: MIT License

Swift 94.04% Gherkin 1.69% C 0.38% Objective-C 2.33% Ruby 1.57%
cucumber xcuitest cucumberish ios-testing ios-test bdd-framework

xcuitest_cucumberish's Introduction

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

xcuitest_cucumberish's People

Contributors

jerseysu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

jtrouvere

xcuitest_cucumberish's Issues

error when run test schema

I got this error:

Showing Recent Errors Only
Multiple commands produce '/Users/phuongthaonguyen/Library/Developer/Xcode/DerivedData/FoodTracker-ccraqtkhmgaqbseddcbkcpgpdmbd/Build/Products/Debug-iphonesimulator/FoodTrackerUITests-Runner.app/PlugIns/FoodTrackerUITests.xctest/Frameworks/Cucumberish.framework':
1) Target 'FoodTrackerUITests' has copy command from '/Users/phuongthaonguyen/coding/ios/xcuitest_cucumberish/Carthage/Build/iOS/Cucumberish.framework' to '/Users/phuongthaonguyen/Library/Developer/Xcode/DerivedData/FoodTracker-ccraqtkhmgaqbseddcbkcpgpdmbd/Build/Products/Debug-iphonesimulator/FoodTrackerUITests-Runner.app/PlugIns/FoodTrackerUITests.xctest/Frameworks/Cucumberish.framework'
2) That command depends on command in Target 'FoodTrackerUITests': script phase “[CP] Embed Pods Frameworks”

Can you help me fix it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.